1 Star 0 Fork 0

MrCoder/openapi

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
model_operator_du_single.go 7.17 KB
一键复制 编辑 原始数据 按行查看 历史
MrCoder 提交于 2023-12-22 15:27 +08:00 . update
/*
Provisioning MnS
OAS 3.0.1 definition of the Provisioning MnS © 2023, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
API version: 17.6.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package OpenAPI_ProvMnS
import (
"encoding/json"
"fmt"
)
// checks if the OperatorDuSingle type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &OperatorDuSingle{}
// OperatorDuSingle struct for OperatorDuSingle
type OperatorDuSingle struct {
Top
GnbId *string `json:"gnbId,omitempty"`
GnbIdLength *int32 `json:"gnbIdLength,omitempty"`
EPF1C *EPF1CSingle `json:"EP_F1C,omitempty"`
EPF1U []EPF1USingle `json:"EP_F1U,omitempty"`
}
type _OperatorDuSingle OperatorDuSingle
// NewOperatorDuSingle instantiates a new OperatorDuSingle 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 NewOperatorDuSingle(id NullableString) *OperatorDuSingle {
this := OperatorDuSingle{}
this.Id = id
return &this
}
// NewOperatorDuSingleWithDefaults instantiates a new OperatorDuSingle 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 NewOperatorDuSingleWithDefaults() *OperatorDuSingle {
this := OperatorDuSingle{}
return &this
}
// GetGnbId returns the GnbId field value if set, zero value otherwise.
func (o *OperatorDuSingle) GetGnbId() string {
if o == nil || IsNil(o.GnbId) {
var ret string
return ret
}
return *o.GnbId
}
// GetGnbIdOk returns a tuple with the GnbId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *OperatorDuSingle) GetGnbIdOk() (*string, bool) {
if o == nil || IsNil(o.GnbId) {
return nil, false
}
return o.GnbId, true
}
// HasGnbId returns a boolean if a field has been set.
func (o *OperatorDuSingle) HasGnbId() bool {
if o != nil && !IsNil(o.GnbId) {
return true
}
return false
}
// SetGnbId gets a reference to the given string and assigns it to the GnbId field.
func (o *OperatorDuSingle) SetGnbId(v string) {
o.GnbId = &v
}
// GetGnbIdLength returns the GnbIdLength field value if set, zero value otherwise.
func (o *OperatorDuSingle) GetGnbIdLength() int32 {
if o == nil || IsNil(o.GnbIdLength) {
var ret int32
return ret
}
return *o.GnbIdLength
}
// GetGnbIdLengthOk returns a tuple with the GnbIdLength field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *OperatorDuSingle) GetGnbIdLengthOk() (*int32, bool) {
if o == nil || IsNil(o.GnbIdLength) {
return nil, false
}
return o.GnbIdLength, true
}
// HasGnbIdLength returns a boolean if a field has been set.
func (o *OperatorDuSingle) HasGnbIdLength() bool {
if o != nil && !IsNil(o.GnbIdLength) {
return true
}
return false
}
// SetGnbIdLength gets a reference to the given int32 and assigns it to the GnbIdLength field.
func (o *OperatorDuSingle) SetGnbIdLength(v int32) {
o.GnbIdLength = &v
}
// GetEPF1C returns the EPF1C field value if set, zero value otherwise.
func (o *OperatorDuSingle) GetEPF1C() EPF1CSingle {
if o == nil || IsNil(o.EPF1C) {
var ret EPF1CSingle
return ret
}
return *o.EPF1C
}
// GetEPF1COk returns a tuple with the EPF1C field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *OperatorDuSingle) GetEPF1COk() (*EPF1CSingle, bool) {
if o == nil || IsNil(o.EPF1C) {
return nil, false
}
return o.EPF1C, true
}
// HasEPF1C returns a boolean if a field has been set.
func (o *OperatorDuSingle) HasEPF1C() bool {
if o != nil && !IsNil(o.EPF1C) {
return true
}
return false
}
// SetEPF1C gets a reference to the given EPF1CSingle and assigns it to the EPF1C field.
func (o *OperatorDuSingle) SetEPF1C(v EPF1CSingle) {
o.EPF1C = &v
}
// GetEPF1U returns the EPF1U field value if set, zero value otherwise.
func (o *OperatorDuSingle) GetEPF1U() []EPF1USingle {
if o == nil || IsNil(o.EPF1U) {
var ret []EPF1USingle
return ret
}
return o.EPF1U
}
// GetEPF1UOk returns a tuple with the EPF1U field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *OperatorDuSingle) GetEPF1UOk() ([]EPF1USingle, bool) {
if o == nil || IsNil(o.EPF1U) {
return nil, false
}
return o.EPF1U, true
}
// HasEPF1U returns a boolean if a field has been set.
func (o *OperatorDuSingle) HasEPF1U() bool {
if o != nil && !IsNil(o.EPF1U) {
return true
}
return false
}
// SetEPF1U gets a reference to the given []EPF1USingle and assigns it to the EPF1U field.
func (o *OperatorDuSingle) SetEPF1U(v []EPF1USingle) {
o.EPF1U = v
}
func (o OperatorDuSingle) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o OperatorDuSingle) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
serializedTop, errTop := json.Marshal(o.Top)
if errTop != nil {
return map[string]interface{}{}, errTop
}
errTop = json.Unmarshal([]byte(serializedTop), &toSerialize)
if errTop != nil {
return map[string]interface{}{}, errTop
}
if !IsNil(o.GnbId) {
toSerialize["gnbId"] = o.GnbId
}
if !IsNil(o.GnbIdLength) {
toSerialize["gnbIdLength"] = o.GnbIdLength
}
if !IsNil(o.EPF1C) {
toSerialize["EP_F1C"] = o.EPF1C
}
if !IsNil(o.EPF1U) {
toSerialize["EP_F1U"] = o.EPF1U
}
return toSerialize, nil
}
func (o *OperatorDuSingle) 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{
"id",
}
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)
}
}
varOperatorDuSingle := _OperatorDuSingle{}
err = json.Unmarshal(bytes, &varOperatorDuSingle)
if err != nil {
return err
}
*o = OperatorDuSingle(varOperatorDuSingle)
return err
}
type NullableOperatorDuSingle struct {
value *OperatorDuSingle
isSet bool
}
func (v NullableOperatorDuSingle) Get() *OperatorDuSingle {
return v.value
}
func (v *NullableOperatorDuSingle) Set(val *OperatorDuSingle) {
v.value = val
v.isSet = true
}
func (v NullableOperatorDuSingle) IsSet() bool {
return v.isSet
}
func (v *NullableOperatorDuSingle) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableOperatorDuSingle(val *OperatorDuSingle) *NullableOperatorDuSingle {
return &NullableOperatorDuSingle{value: val, isSet: true}
}
func (v NullableOperatorDuSingle) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableOperatorDuSingle) 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

搜索帮助