1 Star 0 Fork 0

MrCoder/openapi

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
model_dnai_information.go 5.83 KB
一键复制 编辑 原始数据 按行查看 历史
MrCoder 提交于 2023-12-22 15:27 +08:00 . update
/*
Nnef_EASDeployment
NEF EAS Deployment service. © 2022, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
API version: 1.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package OpenAPI_Nnef_EASDeployment
import (
"encoding/json"
"fmt"
)
// checks if the DnaiInformation type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &DnaiInformation{}
// DnaiInformation Represents DNAI information.
type DnaiInformation struct {
// DNAI (Data network access identifier), see clause 5.6.7 of 3GPP TS 23.501.
Dnai string `json:"dnai"`
DnsServIds []DnsServerIdentifier `json:"dnsServIds,omitempty"`
EasIpAddrs []IpAddr `json:"easIpAddrs,omitempty"`
}
type _DnaiInformation DnaiInformation
// NewDnaiInformation instantiates a new DnaiInformation 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 NewDnaiInformation(dnai string) *DnaiInformation {
this := DnaiInformation{}
return &this
}
// NewDnaiInformationWithDefaults instantiates a new DnaiInformation 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 NewDnaiInformationWithDefaults() *DnaiInformation {
this := DnaiInformation{}
return &this
}
// GetDnai returns the Dnai field value
func (o *DnaiInformation) GetDnai() string {
if o == nil {
var ret string
return ret
}
return o.Dnai
}
// GetDnaiOk returns a tuple with the Dnai field value
// and a boolean to check if the value has been set.
func (o *DnaiInformation) GetDnaiOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Dnai, true
}
// SetDnai sets field value
func (o *DnaiInformation) SetDnai(v string) {
o.Dnai = v
}
// GetDnsServIds returns the DnsServIds field value if set, zero value otherwise.
func (o *DnaiInformation) GetDnsServIds() []DnsServerIdentifier {
if o == nil || IsNil(o.DnsServIds) {
var ret []DnsServerIdentifier
return ret
}
return o.DnsServIds
}
// GetDnsServIdsOk returns a tuple with the DnsServIds field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DnaiInformation) GetDnsServIdsOk() ([]DnsServerIdentifier, bool) {
if o == nil || IsNil(o.DnsServIds) {
return nil, false
}
return o.DnsServIds, true
}
// HasDnsServIds returns a boolean if a field has been set.
func (o *DnaiInformation) HasDnsServIds() bool {
if o != nil && !IsNil(o.DnsServIds) {
return true
}
return false
}
// SetDnsServIds gets a reference to the given []DnsServerIdentifier and assigns it to the DnsServIds field.
func (o *DnaiInformation) SetDnsServIds(v []DnsServerIdentifier) {
o.DnsServIds = v
}
// GetEasIpAddrs returns the EasIpAddrs field value if set, zero value otherwise.
func (o *DnaiInformation) GetEasIpAddrs() []IpAddr {
if o == nil || IsNil(o.EasIpAddrs) {
var ret []IpAddr
return ret
}
return o.EasIpAddrs
}
// GetEasIpAddrsOk returns a tuple with the EasIpAddrs field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DnaiInformation) GetEasIpAddrsOk() ([]IpAddr, bool) {
if o == nil || IsNil(o.EasIpAddrs) {
return nil, false
}
return o.EasIpAddrs, true
}
// HasEasIpAddrs returns a boolean if a field has been set.
func (o *DnaiInformation) HasEasIpAddrs() bool {
if o != nil && !IsNil(o.EasIpAddrs) {
return true
}
return false
}
// SetEasIpAddrs gets a reference to the given []IpAddr and assigns it to the EasIpAddrs field.
func (o *DnaiInformation) SetEasIpAddrs(v []IpAddr) {
o.EasIpAddrs = v
}
func (o DnaiInformation) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o DnaiInformation) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
toSerialize["dnai"] = o.Dnai
if !IsNil(o.DnsServIds) {
toSerialize["dnsServIds"] = o.DnsServIds
}
if !IsNil(o.EasIpAddrs) {
toSerialize["easIpAddrs"] = o.EasIpAddrs
}
return toSerialize, nil
}
func (o *DnaiInformation) 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{
"dnai",
}
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)
}
}
varDnaiInformation := _DnaiInformation{}
err = json.Unmarshal(bytes, &varDnaiInformation)
if err != nil {
return err
}
*o = DnaiInformation(varDnaiInformation)
return err
}
type NullableDnaiInformation struct {
value *DnaiInformation
isSet bool
}
func (v NullableDnaiInformation) Get() *DnaiInformation {
return v.value
}
func (v *NullableDnaiInformation) Set(val *DnaiInformation) {
v.value = val
v.isSet = true
}
func (v NullableDnaiInformation) IsSet() bool {
return v.isSet
}
func (v *NullableDnaiInformation) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableDnaiInformation(val *DnaiInformation) *NullableDnaiInformation {
return &NullableDnaiInformation{value: val, isSet: true}
}
func (v NullableDnaiInformation) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableDnaiInformation) 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

搜索帮助