1 Star 0 Fork 0

MrCoder/openapi

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
model_ecr_control.go 12.39 KB
一键复制 编辑 原始数据 按行查看 历史
MrCoder 提交于 2年前 . update
/*
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 ECRControl type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &ECRControl{}
// ECRControl Represents the parameters to request Enhanced Coverage Restriction control.
type ECRControl 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"`
// Identifies the MTC Service Provider and/or MTC Application.
MtcProviderId *string `json:"mtcProviderId,omitempty"`
// Identifier of the SCS/AS.
ScsAsId *string `json:"scsAsId,omitempty"`
// string containing a local identifier followed by \"@\" and a domain identifier. Both the local identifier and the domain identifier shall be encoded as strings that do not contain any \"@\" characters. See Clause 4.6.2 of 3GPP TS 23.682 for more information.
ExternalId *string `json:"externalId,omitempty"`
// string formatted according to clause 3.3 of 3GPP TS 23.003 that describes an MSISDN.
Msisdn *string `json:"msisdn,omitempty"`
EcrDataWbs []PlmnEcRestrictionDataWb `json:"ecrDataWbs,omitempty"`
// Indicates a complete list (and possibly empty) of serving PLMNs where Enhanced Coverage shall be restricted. This attribute shall not be present for the query custom operation.
RestrictedPlmnIds []PlmnId `json:"restrictedPlmnIds,omitempty"`
// Indicates a complete list (and possibly empty) of serving PLMNs where Enhanced Coverage shall be allowed. This attribute shall not be present for the query custom operation.
AllowedPlmnIds []PlmnId `json:"allowedPlmnIds,omitempty"`
}
type _ECRControl ECRControl
// NewECRControl instantiates a new ECRControl 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 NewECRControl(supportedFeatures string) *ECRControl {
this := ECRControl{}
return &this
}
// NewECRControlWithDefaults instantiates a new ECRControl 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 NewECRControlWithDefaults() *ECRControl {
this := ECRControl{}
return &this
}
// GetSupportedFeatures returns the SupportedFeatures field value
func (o *ECRControl) 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 *ECRControl) GetSupportedFeaturesOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.SupportedFeatures, true
}
// SetSupportedFeatures sets field value
func (o *ECRControl) SetSupportedFeatures(v string) {
o.SupportedFeatures = v
}
// GetMtcProviderId returns the MtcProviderId field value if set, zero value otherwise.
func (o *ECRControl) GetMtcProviderId() string {
if o == nil || IsNil(o.MtcProviderId) {
var ret string
return ret
}
return *o.MtcProviderId
}
// GetMtcProviderIdOk returns a tuple with the MtcProviderId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ECRControl) GetMtcProviderIdOk() (*string, bool) {
if o == nil || IsNil(o.MtcProviderId) {
return nil, false
}
return o.MtcProviderId, true
}
// HasMtcProviderId returns a boolean if a field has been set.
func (o *ECRControl) HasMtcProviderId() bool {
if o != nil && !IsNil(o.MtcProviderId) {
return true
}
return false
}
// SetMtcProviderId gets a reference to the given string and assigns it to the MtcProviderId field.
func (o *ECRControl) SetMtcProviderId(v string) {
o.MtcProviderId = &v
}
// GetScsAsId returns the ScsAsId field value if set, zero value otherwise.
func (o *ECRControl) GetScsAsId() string {
if o == nil || IsNil(o.ScsAsId) {
var ret string
return ret
}
return *o.ScsAsId
}
// GetScsAsIdOk returns a tuple with the ScsAsId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ECRControl) GetScsAsIdOk() (*string, bool) {
if o == nil || IsNil(o.ScsAsId) {
return nil, false
}
return o.ScsAsId, true
}
// HasScsAsId returns a boolean if a field has been set.
func (o *ECRControl) HasScsAsId() bool {
if o != nil && !IsNil(o.ScsAsId) {
return true
}
return false
}
// SetScsAsId gets a reference to the given string and assigns it to the ScsAsId field.
func (o *ECRControl) SetScsAsId(v string) {
o.ScsAsId = &v
}
// GetExternalId returns the ExternalId field value if set, zero value otherwise.
func (o *ECRControl) GetExternalId() string {
if o == nil || IsNil(o.ExternalId) {
var ret string
return ret
}
return *o.ExternalId
}
// GetExternalIdOk returns a tuple with the ExternalId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ECRControl) GetExternalIdOk() (*string, bool) {
if o == nil || IsNil(o.ExternalId) {
return nil, false
}
return o.ExternalId, true
}
// HasExternalId returns a boolean if a field has been set.
func (o *ECRControl) HasExternalId() bool {
if o != nil && !IsNil(o.ExternalId) {
return true
}
return false
}
// SetExternalId gets a reference to the given string and assigns it to the ExternalId field.
func (o *ECRControl) SetExternalId(v string) {
o.ExternalId = &v
}
// GetMsisdn returns the Msisdn field value if set, zero value otherwise.
func (o *ECRControl) GetMsisdn() string {
if o == nil || IsNil(o.Msisdn) {
var ret string
return ret
}
return *o.Msisdn
}
// GetMsisdnOk returns a tuple with the Msisdn field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ECRControl) GetMsisdnOk() (*string, bool) {
if o == nil || IsNil(o.Msisdn) {
return nil, false
}
return o.Msisdn, true
}
// HasMsisdn returns a boolean if a field has been set.
func (o *ECRControl) HasMsisdn() bool {
if o != nil && !IsNil(o.Msisdn) {
return true
}
return false
}
// SetMsisdn gets a reference to the given string and assigns it to the Msisdn field.
func (o *ECRControl) SetMsisdn(v string) {
o.Msisdn = &v
}
// GetEcrDataWbs returns the EcrDataWbs field value if set, zero value otherwise.
func (o *ECRControl) 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 *ECRControl) 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 *ECRControl) 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 *ECRControl) SetEcrDataWbs(v []PlmnEcRestrictionDataWb) {
o.EcrDataWbs = v
}
// GetRestrictedPlmnIds returns the RestrictedPlmnIds field value if set, zero value otherwise.
func (o *ECRControl) 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 *ECRControl) 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 *ECRControl) 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 *ECRControl) SetRestrictedPlmnIds(v []PlmnId) {
o.RestrictedPlmnIds = v
}
// GetAllowedPlmnIds returns the AllowedPlmnIds field value if set, zero value otherwise.
func (o *ECRControl) 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 *ECRControl) 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 *ECRControl) 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 *ECRControl) SetAllowedPlmnIds(v []PlmnId) {
o.AllowedPlmnIds = v
}
func (o ECRControl) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o ECRControl) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
toSerialize["supportedFeatures"] = o.SupportedFeatures
if !IsNil(o.MtcProviderId) {
toSerialize["mtcProviderId"] = o.MtcProviderId
}
if !IsNil(o.ScsAsId) {
toSerialize["scsAsId"] = o.ScsAsId
}
if !IsNil(o.ExternalId) {
toSerialize["externalId"] = o.ExternalId
}
if !IsNil(o.Msisdn) {
toSerialize["msisdn"] = o.Msisdn
}
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 *ECRControl) 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)
}
}
varECRControl := _ECRControl{}
err = json.Unmarshal(bytes, &varECRControl)
if err != nil {
return err
}
*o = ECRControl(varECRControl)
return err
}
type NullableECRControl struct {
value *ECRControl
isSet bool
}
func (v NullableECRControl) Get() *ECRControl {
return v.value
}
func (v *NullableECRControl) Set(val *ECRControl) {
v.value = val
v.isSet = true
}
func (v NullableECRControl) IsSet() bool {
return v.isSet
}
func (v *NullableECRControl) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableECRControl(val *ECRControl) *NullableECRControl {
return &NullableECRControl{value: val, isSet: true}
}
func (v NullableECRControl) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableECRControl) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/konglinglong/openapi.git
git@gitee.com:konglinglong/openapi.git
konglinglong
openapi
openapi
e403a3c726a4

搜索帮助