1 Star 0 Fork 0

MrCoder/openapi

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
model_interface_upf_info_item.go 8.81 KB
一键复制 编辑 原始数据 按行查看 历史
MrCoder 提交于 2023-12-22 15:27 +08:00 . update
/*
NRF NFDiscovery Service
NRF NFDiscovery Service. © 2023, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
API version: 1.2.5
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package OpenAPI_Nnrf_NFDiscovery
import (
"encoding/json"
"fmt"
)
// checks if the InterfaceUpfInfoItem type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &InterfaceUpfInfoItem{}
// InterfaceUpfInfoItem Information of a given IP interface of an UPF
type InterfaceUpfInfoItem struct {
InterfaceType UPInterfaceType `json:"interfaceType"`
Ipv4EndpointAddresses []string `json:"ipv4EndpointAddresses,omitempty"`
Ipv6EndpointAddresses []Ipv6Addr `json:"ipv6EndpointAddresses,omitempty"`
// Fully Qualified Domain Name
EndpointFqdn *string `json:"endpointFqdn,omitempty"`
NetworkInstance *string `json:"networkInstance,omitempty"`
}
type _InterfaceUpfInfoItem InterfaceUpfInfoItem
// NewInterfaceUpfInfoItem instantiates a new InterfaceUpfInfoItem 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 NewInterfaceUpfInfoItem(interfaceType UPInterfaceType) *InterfaceUpfInfoItem {
this := InterfaceUpfInfoItem{}
this.InterfaceType = interfaceType
return &this
}
// NewInterfaceUpfInfoItemWithDefaults instantiates a new InterfaceUpfInfoItem 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 NewInterfaceUpfInfoItemWithDefaults() *InterfaceUpfInfoItem {
this := InterfaceUpfInfoItem{}
return &this
}
// GetInterfaceType returns the InterfaceType field value
func (o *InterfaceUpfInfoItem) GetInterfaceType() UPInterfaceType {
if o == nil {
var ret UPInterfaceType
return ret
}
return o.InterfaceType
}
// GetInterfaceTypeOk returns a tuple with the InterfaceType field value
// and a boolean to check if the value has been set.
func (o *InterfaceUpfInfoItem) GetInterfaceTypeOk() (*UPInterfaceType, bool) {
if o == nil {
return nil, false
}
return &o.InterfaceType, true
}
// SetInterfaceType sets field value
func (o *InterfaceUpfInfoItem) SetInterfaceType(v UPInterfaceType) {
o.InterfaceType = v
}
// GetIpv4EndpointAddresses returns the Ipv4EndpointAddresses field value if set, zero value otherwise.
func (o *InterfaceUpfInfoItem) GetIpv4EndpointAddresses() []string {
if o == nil || IsNil(o.Ipv4EndpointAddresses) {
var ret []string
return ret
}
return o.Ipv4EndpointAddresses
}
// GetIpv4EndpointAddressesOk returns a tuple with the Ipv4EndpointAddresses field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *InterfaceUpfInfoItem) GetIpv4EndpointAddressesOk() ([]string, bool) {
if o == nil || IsNil(o.Ipv4EndpointAddresses) {
return nil, false
}
return o.Ipv4EndpointAddresses, true
}
// HasIpv4EndpointAddresses returns a boolean if a field has been set.
func (o *InterfaceUpfInfoItem) HasIpv4EndpointAddresses() bool {
if o != nil && !IsNil(o.Ipv4EndpointAddresses) {
return true
}
return false
}
// SetIpv4EndpointAddresses gets a reference to the given []string and assigns it to the Ipv4EndpointAddresses field.
func (o *InterfaceUpfInfoItem) SetIpv4EndpointAddresses(v []string) {
o.Ipv4EndpointAddresses = v
}
// GetIpv6EndpointAddresses returns the Ipv6EndpointAddresses field value if set, zero value otherwise.
func (o *InterfaceUpfInfoItem) GetIpv6EndpointAddresses() []Ipv6Addr {
if o == nil || IsNil(o.Ipv6EndpointAddresses) {
var ret []Ipv6Addr
return ret
}
return o.Ipv6EndpointAddresses
}
// GetIpv6EndpointAddressesOk returns a tuple with the Ipv6EndpointAddresses field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *InterfaceUpfInfoItem) GetIpv6EndpointAddressesOk() ([]Ipv6Addr, bool) {
if o == nil || IsNil(o.Ipv6EndpointAddresses) {
return nil, false
}
return o.Ipv6EndpointAddresses, true
}
// HasIpv6EndpointAddresses returns a boolean if a field has been set.
func (o *InterfaceUpfInfoItem) HasIpv6EndpointAddresses() bool {
if o != nil && !IsNil(o.Ipv6EndpointAddresses) {
return true
}
return false
}
// SetIpv6EndpointAddresses gets a reference to the given []Ipv6Addr and assigns it to the Ipv6EndpointAddresses field.
func (o *InterfaceUpfInfoItem) SetIpv6EndpointAddresses(v []Ipv6Addr) {
o.Ipv6EndpointAddresses = v
}
// GetEndpointFqdn returns the EndpointFqdn field value if set, zero value otherwise.
func (o *InterfaceUpfInfoItem) GetEndpointFqdn() string {
if o == nil || IsNil(o.EndpointFqdn) {
var ret string
return ret
}
return *o.EndpointFqdn
}
// GetEndpointFqdnOk returns a tuple with the EndpointFqdn field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *InterfaceUpfInfoItem) GetEndpointFqdnOk() (*string, bool) {
if o == nil || IsNil(o.EndpointFqdn) {
return nil, false
}
return o.EndpointFqdn, true
}
// HasEndpointFqdn returns a boolean if a field has been set.
func (o *InterfaceUpfInfoItem) HasEndpointFqdn() bool {
if o != nil && !IsNil(o.EndpointFqdn) {
return true
}
return false
}
// SetEndpointFqdn gets a reference to the given string and assigns it to the EndpointFqdn field.
func (o *InterfaceUpfInfoItem) SetEndpointFqdn(v string) {
o.EndpointFqdn = &v
}
// GetNetworkInstance returns the NetworkInstance field value if set, zero value otherwise.
func (o *InterfaceUpfInfoItem) GetNetworkInstance() string {
if o == nil || IsNil(o.NetworkInstance) {
var ret string
return ret
}
return *o.NetworkInstance
}
// GetNetworkInstanceOk returns a tuple with the NetworkInstance field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *InterfaceUpfInfoItem) GetNetworkInstanceOk() (*string, bool) {
if o == nil || IsNil(o.NetworkInstance) {
return nil, false
}
return o.NetworkInstance, true
}
// HasNetworkInstance returns a boolean if a field has been set.
func (o *InterfaceUpfInfoItem) HasNetworkInstance() bool {
if o != nil && !IsNil(o.NetworkInstance) {
return true
}
return false
}
// SetNetworkInstance gets a reference to the given string and assigns it to the NetworkInstance field.
func (o *InterfaceUpfInfoItem) SetNetworkInstance(v string) {
o.NetworkInstance = &v
}
func (o InterfaceUpfInfoItem) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o InterfaceUpfInfoItem) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
toSerialize["interfaceType"] = o.InterfaceType
if !IsNil(o.Ipv4EndpointAddresses) {
toSerialize["ipv4EndpointAddresses"] = o.Ipv4EndpointAddresses
}
if !IsNil(o.Ipv6EndpointAddresses) {
toSerialize["ipv6EndpointAddresses"] = o.Ipv6EndpointAddresses
}
if !IsNil(o.EndpointFqdn) {
toSerialize["endpointFqdn"] = o.EndpointFqdn
}
if !IsNil(o.NetworkInstance) {
toSerialize["networkInstance"] = o.NetworkInstance
}
return toSerialize, nil
}
func (o *InterfaceUpfInfoItem) 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{
"interfaceType",
}
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)
}
}
varInterfaceUpfInfoItem := _InterfaceUpfInfoItem{}
err = json.Unmarshal(bytes, &varInterfaceUpfInfoItem)
if err != nil {
return err
}
*o = InterfaceUpfInfoItem(varInterfaceUpfInfoItem)
return err
}
type NullableInterfaceUpfInfoItem struct {
value *InterfaceUpfInfoItem
isSet bool
}
func (v NullableInterfaceUpfInfoItem) Get() *InterfaceUpfInfoItem {
return v.value
}
func (v *NullableInterfaceUpfInfoItem) Set(val *InterfaceUpfInfoItem) {
v.value = val
v.isSet = true
}
func (v NullableInterfaceUpfInfoItem) IsSet() bool {
return v.isSet
}
func (v *NullableInterfaceUpfInfoItem) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableInterfaceUpfInfoItem(val *InterfaceUpfInfoItem) *NullableInterfaceUpfInfoItem {
return &NullableInterfaceUpfInfoItem{value: val, isSet: true}
}
func (v NullableInterfaceUpfInfoItem) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableInterfaceUpfInfoItem) 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

搜索帮助