代码拉取完成,页面将自动刷新
/*
3gpp-ecr-control
API for enhanced converage restriction control. © 2022, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
API version: 1.2.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package OpenAPI_ECRControl
import (
"encoding/json"
"fmt"
)
// checks if the ECRData type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &ECRData{}
// ECRData Represents the current visited PLMN (if any) and the current settings of enhanced coverage restriction.
type ECRData struct {
// A string used to indicate the features supported by an API that is used as defined in clause 6.6 in 3GPP TS 29.500. The string shall contain a bitmask indicating supported features in hexadecimal representation Each character in the string shall take a value of \"0\" to \"9\", \"a\" to \"f\" or \"A\" to \"F\" and shall represent the support of 4 features as described in table 5.2.2-3. The most significant character representing the highest-numbered features shall appear first in the string, and the character representing features 1 to 4 shall appear last in the string. The list of features and their numbering (starting with 1) are defined separately for each API. If the string contains a lower number of characters than there are defined features for an API, all features that would be represented by characters that are not present in the string are not supported.
SupportedFeatures string `json:"supportedFeatures"`
VisitedPlmnId *PlmnId `json:"visitedPlmnId,omitempty"`
EcrDataWbs []PlmnEcRestrictionDataWb `json:"ecrDataWbs,omitempty"`
// Indicates a complete list (and possibly empty) of serving PLMNs where Enhanced Coverage shall be restricted.
RestrictedPlmnIds []PlmnId `json:"restrictedPlmnIds,omitempty"`
// Indicates a complete list (and possibly empty) of serving PLMNs where Enhanced Coverage shall be allowed.
AllowedPlmnIds []PlmnId `json:"allowedPlmnIds,omitempty"`
}
type _ECRData ECRData
// NewECRData instantiates a new ECRData object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewECRData(supportedFeatures string) *ECRData {
this := ECRData{}
this.SupportedFeatures = supportedFeatures
return &this
}
// NewECRDataWithDefaults instantiates a new ECRData object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewECRDataWithDefaults() *ECRData {
this := ECRData{}
return &this
}
// GetSupportedFeatures returns the SupportedFeatures field value
func (o *ECRData) GetSupportedFeatures() string {
if o == nil {
var ret string
return ret
}
return o.SupportedFeatures
}
// GetSupportedFeaturesOk returns a tuple with the SupportedFeatures field value
// and a boolean to check if the value has been set.
func (o *ECRData) GetSupportedFeaturesOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.SupportedFeatures, true
}
// SetSupportedFeatures sets field value
func (o *ECRData) SetSupportedFeatures(v string) {
o.SupportedFeatures = v
}
// GetVisitedPlmnId returns the VisitedPlmnId field value if set, zero value otherwise.
func (o *ECRData) GetVisitedPlmnId() PlmnId {
if o == nil || IsNil(o.VisitedPlmnId) {
var ret PlmnId
return ret
}
return *o.VisitedPlmnId
}
// GetVisitedPlmnIdOk returns a tuple with the VisitedPlmnId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ECRData) GetVisitedPlmnIdOk() (*PlmnId, bool) {
if o == nil || IsNil(o.VisitedPlmnId) {
return nil, false
}
return o.VisitedPlmnId, true
}
// HasVisitedPlmnId returns a boolean if a field has been set.
func (o *ECRData) HasVisitedPlmnId() bool {
if o != nil && !IsNil(o.VisitedPlmnId) {
return true
}
return false
}
// SetVisitedPlmnId gets a reference to the given PlmnId and assigns it to the VisitedPlmnId field.
func (o *ECRData) SetVisitedPlmnId(v PlmnId) {
o.VisitedPlmnId = &v
}
// GetEcrDataWbs returns the EcrDataWbs field value if set, zero value otherwise.
func (o *ECRData) GetEcrDataWbs() []PlmnEcRestrictionDataWb {
if o == nil || IsNil(o.EcrDataWbs) {
var ret []PlmnEcRestrictionDataWb
return ret
}
return o.EcrDataWbs
}
// GetEcrDataWbsOk returns a tuple with the EcrDataWbs field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ECRData) GetEcrDataWbsOk() ([]PlmnEcRestrictionDataWb, bool) {
if o == nil || IsNil(o.EcrDataWbs) {
return nil, false
}
return o.EcrDataWbs, true
}
// HasEcrDataWbs returns a boolean if a field has been set.
func (o *ECRData) HasEcrDataWbs() bool {
if o != nil && !IsNil(o.EcrDataWbs) {
return true
}
return false
}
// SetEcrDataWbs gets a reference to the given []PlmnEcRestrictionDataWb and assigns it to the EcrDataWbs field.
func (o *ECRData) SetEcrDataWbs(v []PlmnEcRestrictionDataWb) {
o.EcrDataWbs = v
}
// GetRestrictedPlmnIds returns the RestrictedPlmnIds field value if set, zero value otherwise.
func (o *ECRData) GetRestrictedPlmnIds() []PlmnId {
if o == nil || IsNil(o.RestrictedPlmnIds) {
var ret []PlmnId
return ret
}
return o.RestrictedPlmnIds
}
// GetRestrictedPlmnIdsOk returns a tuple with the RestrictedPlmnIds field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ECRData) GetRestrictedPlmnIdsOk() ([]PlmnId, bool) {
if o == nil || IsNil(o.RestrictedPlmnIds) {
return nil, false
}
return o.RestrictedPlmnIds, true
}
// HasRestrictedPlmnIds returns a boolean if a field has been set.
func (o *ECRData) HasRestrictedPlmnIds() bool {
if o != nil && !IsNil(o.RestrictedPlmnIds) {
return true
}
return false
}
// SetRestrictedPlmnIds gets a reference to the given []PlmnId and assigns it to the RestrictedPlmnIds field.
func (o *ECRData) SetRestrictedPlmnIds(v []PlmnId) {
o.RestrictedPlmnIds = v
}
// GetAllowedPlmnIds returns the AllowedPlmnIds field value if set, zero value otherwise.
func (o *ECRData) GetAllowedPlmnIds() []PlmnId {
if o == nil || IsNil(o.AllowedPlmnIds) {
var ret []PlmnId
return ret
}
return o.AllowedPlmnIds
}
// GetAllowedPlmnIdsOk returns a tuple with the AllowedPlmnIds field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ECRData) GetAllowedPlmnIdsOk() ([]PlmnId, bool) {
if o == nil || IsNil(o.AllowedPlmnIds) {
return nil, false
}
return o.AllowedPlmnIds, true
}
// HasAllowedPlmnIds returns a boolean if a field has been set.
func (o *ECRData) HasAllowedPlmnIds() bool {
if o != nil && !IsNil(o.AllowedPlmnIds) {
return true
}
return false
}
// SetAllowedPlmnIds gets a reference to the given []PlmnId and assigns it to the AllowedPlmnIds field.
func (o *ECRData) SetAllowedPlmnIds(v []PlmnId) {
o.AllowedPlmnIds = v
}
func (o ECRData) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o ECRData) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
toSerialize["supportedFeatures"] = o.SupportedFeatures
if !IsNil(o.VisitedPlmnId) {
toSerialize["visitedPlmnId"] = o.VisitedPlmnId
}
if !IsNil(o.EcrDataWbs) {
toSerialize["ecrDataWbs"] = o.EcrDataWbs
}
if !IsNil(o.RestrictedPlmnIds) {
toSerialize["restrictedPlmnIds"] = o.RestrictedPlmnIds
}
if !IsNil(o.AllowedPlmnIds) {
toSerialize["allowedPlmnIds"] = o.AllowedPlmnIds
}
return toSerialize, nil
}
func (o *ECRData) UnmarshalJSON(bytes []byte) (err error) {
// This validates that all required properties are included in the JSON object
// by unmarshalling the object into a generic map with string keys and checking
// that every required field exists as a key in the generic map.
requiredProperties := []string{
"supportedFeatures",
}
allProperties := make(map[string]interface{})
err = json.Unmarshal(bytes, &allProperties)
if err != nil {
return err
}
for _, requiredProperty := range requiredProperties {
if _, exists := allProperties[requiredProperty]; !exists {
return fmt.Errorf("no value given for required property %v", requiredProperty)
}
}
varECRData := _ECRData{}
err = json.Unmarshal(bytes, &varECRData)
if err != nil {
return err
}
*o = ECRData(varECRData)
return err
}
type NullableECRData struct {
value *ECRData
isSet bool
}
func (v NullableECRData) Get() *ECRData {
return v.value
}
func (v *NullableECRData) Set(val *ECRData) {
v.value = val
v.isSet = true
}
func (v NullableECRData) IsSet() bool {
return v.isSet
}
func (v *NullableECRData) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableECRData(val *ECRData) *NullableECRData {
return &NullableECRData{value: val, isSet: true}
}
func (v NullableECRData) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableECRData) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。