1 Star 0 Fork 0

MrCoder / openapi

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
model_backup_amf_info.go 4.80 KB
一键复制 编辑 原始数据 按行查看 历史
MrCoder 提交于 2023-12-22 15:27 . update
/*
Nudm_UECM
Nudm Context Management Service. © 2023, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
API version: 1.2.4
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package OpenAPI_Nudm_UECM
import (
"encoding/json"
"fmt"
)
// checks if the BackupAmfInfo type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &BackupAmfInfo{}
// BackupAmfInfo Provides details of the Backup AMF.
type BackupAmfInfo struct {
// Fully Qualified Domain Name
BackupAmf string `json:"backupAmf"`
// If present, this IE shall contain the list of GUAMI(s) (supported by the AMF) for which the backupAmf IE applies.
GuamiList []Guami `json:"guamiList,omitempty"`
}
type _BackupAmfInfo BackupAmfInfo
// NewBackupAmfInfo instantiates a new BackupAmfInfo 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 NewBackupAmfInfo(backupAmf string) *BackupAmfInfo {
this := BackupAmfInfo{}
this.BackupAmf = backupAmf
return &this
}
// NewBackupAmfInfoWithDefaults instantiates a new BackupAmfInfo 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 NewBackupAmfInfoWithDefaults() *BackupAmfInfo {
this := BackupAmfInfo{}
return &this
}
// GetBackupAmf returns the BackupAmf field value
func (o *BackupAmfInfo) GetBackupAmf() string {
if o == nil {
var ret string
return ret
}
return o.BackupAmf
}
// GetBackupAmfOk returns a tuple with the BackupAmf field value
// and a boolean to check if the value has been set.
func (o *BackupAmfInfo) GetBackupAmfOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.BackupAmf, true
}
// SetBackupAmf sets field value
func (o *BackupAmfInfo) SetBackupAmf(v string) {
o.BackupAmf = v
}
// GetGuamiList returns the GuamiList field value if set, zero value otherwise.
func (o *BackupAmfInfo) GetGuamiList() []Guami {
if o == nil || IsNil(o.GuamiList) {
var ret []Guami
return ret
}
return o.GuamiList
}
// GetGuamiListOk returns a tuple with the GuamiList field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *BackupAmfInfo) GetGuamiListOk() ([]Guami, bool) {
if o == nil || IsNil(o.GuamiList) {
return nil, false
}
return o.GuamiList, true
}
// HasGuamiList returns a boolean if a field has been set.
func (o *BackupAmfInfo) HasGuamiList() bool {
if o != nil && !IsNil(o.GuamiList) {
return true
}
return false
}
// SetGuamiList gets a reference to the given []Guami and assigns it to the GuamiList field.
func (o *BackupAmfInfo) SetGuamiList(v []Guami) {
o.GuamiList = v
}
func (o BackupAmfInfo) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o BackupAmfInfo) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
toSerialize["backupAmf"] = o.BackupAmf
if !IsNil(o.GuamiList) {
toSerialize["guamiList"] = o.GuamiList
}
return toSerialize, nil
}
func (o *BackupAmfInfo) 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{
"backupAmf",
}
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)
}
}
varBackupAmfInfo := _BackupAmfInfo{}
err = json.Unmarshal(bytes, &varBackupAmfInfo)
if err != nil {
return err
}
*o = BackupAmfInfo(varBackupAmfInfo)
return err
}
type NullableBackupAmfInfo struct {
value *BackupAmfInfo
isSet bool
}
func (v NullableBackupAmfInfo) Get() *BackupAmfInfo {
return v.value
}
func (v *NullableBackupAmfInfo) Set(val *BackupAmfInfo) {
v.value = val
v.isSet = true
}
func (v NullableBackupAmfInfo) IsSet() bool {
return v.isSet
}
func (v *NullableBackupAmfInfo) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableBackupAmfInfo(val *BackupAmfInfo) *NullableBackupAmfInfo {
return &NullableBackupAmfInfo{value: val, isSet: true}
}
func (v NullableBackupAmfInfo) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableBackupAmfInfo) 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

搜索帮助