1 Star 0 Fork 0

MrCoder / openapi

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
model_plmn_ec_info_1.go 6.69 KB
一键复制 编辑 原始数据 按行查看 历史
MrCoder 提交于 2023-12-22 15:27 . update
/*
Nudr_DataRepository API OpenAPI file
Unified Data Repository Service. © 2023, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
API version: 2.2.4
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package OpenAPI_Nudr_DR
import (
"encoding/json"
"fmt"
)
// checks if the PlmnEcInfo1 type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &PlmnEcInfo1{}
// PlmnEcInfo1 struct for PlmnEcInfo1
type PlmnEcInfo1 struct {
PlmnId PlmnId1 `json:"plmnId"`
EcRestrictionDataWb NullableEcRestrictionDataWb `json:"ecRestrictionDataWb,omitempty"`
EcRestrictionDataNb *bool `json:"ecRestrictionDataNb,omitempty"`
}
type _PlmnEcInfo1 PlmnEcInfo1
// NewPlmnEcInfo1 instantiates a new PlmnEcInfo1 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 NewPlmnEcInfo1(plmnId PlmnId1) *PlmnEcInfo1 {
this := PlmnEcInfo1{}
this.PlmnId = plmnId
var ecRestrictionDataNb bool = false
this.EcRestrictionDataNb = &ecRestrictionDataNb
return &this
}
// NewPlmnEcInfo1WithDefaults instantiates a new PlmnEcInfo1 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 NewPlmnEcInfo1WithDefaults() *PlmnEcInfo1 {
this := PlmnEcInfo1{}
var ecRestrictionDataNb bool = false
this.EcRestrictionDataNb = &ecRestrictionDataNb
return &this
}
// GetPlmnId returns the PlmnId field value
func (o *PlmnEcInfo1) GetPlmnId() PlmnId1 {
if o == nil {
var ret PlmnId1
return ret
}
return o.PlmnId
}
// GetPlmnIdOk returns a tuple with the PlmnId field value
// and a boolean to check if the value has been set.
func (o *PlmnEcInfo1) GetPlmnIdOk() (*PlmnId1, bool) {
if o == nil {
return nil, false
}
return &o.PlmnId, true
}
// SetPlmnId sets field value
func (o *PlmnEcInfo1) SetPlmnId(v PlmnId1) {
o.PlmnId = v
}
// GetEcRestrictionDataWb returns the EcRestrictionDataWb field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *PlmnEcInfo1) GetEcRestrictionDataWb() EcRestrictionDataWb {
if o == nil || IsNil(o.EcRestrictionDataWb.Get()) {
var ret EcRestrictionDataWb
return ret
}
return *o.EcRestrictionDataWb.Get()
}
// GetEcRestrictionDataWbOk returns a tuple with the EcRestrictionDataWb field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *PlmnEcInfo1) GetEcRestrictionDataWbOk() (*EcRestrictionDataWb, bool) {
if o == nil {
return nil, false
}
return o.EcRestrictionDataWb.Get(), o.EcRestrictionDataWb.IsSet()
}
// HasEcRestrictionDataWb returns a boolean if a field has been set.
func (o *PlmnEcInfo1) HasEcRestrictionDataWb() bool {
if o != nil && o.EcRestrictionDataWb.IsSet() {
return true
}
return false
}
// SetEcRestrictionDataWb gets a reference to the given NullableEcRestrictionDataWb and assigns it to the EcRestrictionDataWb field.
func (o *PlmnEcInfo1) SetEcRestrictionDataWb(v EcRestrictionDataWb) {
o.EcRestrictionDataWb.Set(&v)
}
// SetEcRestrictionDataWbNil sets the value for EcRestrictionDataWb to be an explicit nil
func (o *PlmnEcInfo1) SetEcRestrictionDataWbNil() {
o.EcRestrictionDataWb.Set(nil)
}
// UnsetEcRestrictionDataWb ensures that no value is present for EcRestrictionDataWb, not even an explicit nil
func (o *PlmnEcInfo1) UnsetEcRestrictionDataWb() {
o.EcRestrictionDataWb.Unset()
}
// GetEcRestrictionDataNb returns the EcRestrictionDataNb field value if set, zero value otherwise.
func (o *PlmnEcInfo1) GetEcRestrictionDataNb() bool {
if o == nil || IsNil(o.EcRestrictionDataNb) {
var ret bool
return ret
}
return *o.EcRestrictionDataNb
}
// GetEcRestrictionDataNbOk returns a tuple with the EcRestrictionDataNb field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PlmnEcInfo1) GetEcRestrictionDataNbOk() (*bool, bool) {
if o == nil || IsNil(o.EcRestrictionDataNb) {
return nil, false
}
return o.EcRestrictionDataNb, true
}
// HasEcRestrictionDataNb returns a boolean if a field has been set.
func (o *PlmnEcInfo1) HasEcRestrictionDataNb() bool {
if o != nil && !IsNil(o.EcRestrictionDataNb) {
return true
}
return false
}
// SetEcRestrictionDataNb gets a reference to the given bool and assigns it to the EcRestrictionDataNb field.
func (o *PlmnEcInfo1) SetEcRestrictionDataNb(v bool) {
o.EcRestrictionDataNb = &v
}
func (o PlmnEcInfo1) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o PlmnEcInfo1) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
toSerialize["plmnId"] = o.PlmnId
if o.EcRestrictionDataWb.IsSet() {
toSerialize["ecRestrictionDataWb"] = o.EcRestrictionDataWb.Get()
}
if !IsNil(o.EcRestrictionDataNb) {
toSerialize["ecRestrictionDataNb"] = o.EcRestrictionDataNb
}
return toSerialize, nil
}
func (o *PlmnEcInfo1) 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{
"plmnId",
}
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)
}
}
varPlmnEcInfo1 := _PlmnEcInfo1{}
err = json.Unmarshal(bytes, &varPlmnEcInfo1)
if err != nil {
return err
}
*o = PlmnEcInfo1(varPlmnEcInfo1)
return err
}
type NullablePlmnEcInfo1 struct {
value *PlmnEcInfo1
isSet bool
}
func (v NullablePlmnEcInfo1) Get() *PlmnEcInfo1 {
return v.value
}
func (v *NullablePlmnEcInfo1) Set(val *PlmnEcInfo1) {
v.value = val
v.isSet = true
}
func (v NullablePlmnEcInfo1) IsSet() bool {
return v.isSet
}
func (v *NullablePlmnEcInfo1) Unset() {
v.value = nil
v.isSet = false
}
func NewNullablePlmnEcInfo1(val *PlmnEcInfo1) *NullablePlmnEcInfo1 {
return &NullablePlmnEcInfo1{value: val, isSet: true}
}
func (v NullablePlmnEcInfo1) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullablePlmnEcInfo1) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}
Go
1
https://gitee.com/konglinglong/openapi.git
git@gitee.com:konglinglong/openapi.git
konglinglong
openapi
openapi
e403a3c726a4

搜索帮助