1 Star 0 Fork 0

MrCoder/openapi

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
model_pdu_session_information.go 8.80 KB
一键复制 编辑 原始数据 按行查看 历史
MrCoder 提交于 2023-12-22 15:27 +08:00 . update
/*
Npcf_EventExposure
PCF Event Exposure Service. © 2022, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
API version: 1.2.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package OpenAPI_Npcf_EventExposure
import (
"encoding/json"
"fmt"
)
// checks if the PduSessionInformation type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &PduSessionInformation{}
// PduSessionInformation Represents PDU session identification information.
type PduSessionInformation struct {
Snssai Snssai `json:"snssai"`
// String representing a Data Network as defined in clause 9A of 3GPP TS 23.003; it shall contain either a DNN Network Identifier, or a full DNN with both the Network Identifier and Operator Identifier, as specified in 3GPP TS 23.003 clause 9.1.1 and 9.1.2. It shall be coded as string in which the labels are separated by dots (e.g. \"Label1.Label2.Label3\").
Dnn string `json:"dnn"`
// String identifying a IPv4 address formatted in the 'dotted decimal' notation as defined in RFC 1166.
UeIpv4 *string `json:"ueIpv4,omitempty"`
UeIpv6 *Ipv6Prefix `json:"ueIpv6,omitempty"`
IpDomain *string `json:"ipDomain,omitempty"`
// String identifying a MAC address formatted in the hexadecimal notation according to clause 1.1 and clause 2.1 of RFC 7042.
UeMac *string `json:"ueMac,omitempty"`
}
type _PduSessionInformation PduSessionInformation
// NewPduSessionInformation instantiates a new PduSessionInformation 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 NewPduSessionInformation(snssai Snssai, dnn string) *PduSessionInformation {
this := PduSessionInformation{}
return &this
}
// NewPduSessionInformationWithDefaults instantiates a new PduSessionInformation 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 NewPduSessionInformationWithDefaults() *PduSessionInformation {
this := PduSessionInformation{}
return &this
}
// GetSnssai returns the Snssai field value
func (o *PduSessionInformation) GetSnssai() Snssai {
if o == nil {
var ret Snssai
return ret
}
return o.Snssai
}
// GetSnssaiOk returns a tuple with the Snssai field value
// and a boolean to check if the value has been set.
func (o *PduSessionInformation) GetSnssaiOk() (*Snssai, bool) {
if o == nil {
return nil, false
}
return &o.Snssai, true
}
// SetSnssai sets field value
func (o *PduSessionInformation) SetSnssai(v Snssai) {
o.Snssai = v
}
// GetDnn returns the Dnn field value
func (o *PduSessionInformation) GetDnn() string {
if o == nil {
var ret string
return ret
}
return o.Dnn
}
// GetDnnOk returns a tuple with the Dnn field value
// and a boolean to check if the value has been set.
func (o *PduSessionInformation) GetDnnOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Dnn, true
}
// SetDnn sets field value
func (o *PduSessionInformation) SetDnn(v string) {
o.Dnn = v
}
// GetUeIpv4 returns the UeIpv4 field value if set, zero value otherwise.
func (o *PduSessionInformation) GetUeIpv4() string {
if o == nil || IsNil(o.UeIpv4) {
var ret string
return ret
}
return *o.UeIpv4
}
// GetUeIpv4Ok returns a tuple with the UeIpv4 field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PduSessionInformation) GetUeIpv4Ok() (*string, bool) {
if o == nil || IsNil(o.UeIpv4) {
return nil, false
}
return o.UeIpv4, true
}
// HasUeIpv4 returns a boolean if a field has been set.
func (o *PduSessionInformation) HasUeIpv4() bool {
if o != nil && !IsNil(o.UeIpv4) {
return true
}
return false
}
// SetUeIpv4 gets a reference to the given string and assigns it to the UeIpv4 field.
func (o *PduSessionInformation) SetUeIpv4(v string) {
o.UeIpv4 = &v
}
// GetUeIpv6 returns the UeIpv6 field value if set, zero value otherwise.
func (o *PduSessionInformation) GetUeIpv6() Ipv6Prefix {
if o == nil || IsNil(o.UeIpv6) {
var ret Ipv6Prefix
return ret
}
return *o.UeIpv6
}
// GetUeIpv6Ok returns a tuple with the UeIpv6 field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PduSessionInformation) GetUeIpv6Ok() (*Ipv6Prefix, bool) {
if o == nil || IsNil(o.UeIpv6) {
return nil, false
}
return o.UeIpv6, true
}
// HasUeIpv6 returns a boolean if a field has been set.
func (o *PduSessionInformation) HasUeIpv6() bool {
if o != nil && !IsNil(o.UeIpv6) {
return true
}
return false
}
// SetUeIpv6 gets a reference to the given Ipv6Prefix and assigns it to the UeIpv6 field.
func (o *PduSessionInformation) SetUeIpv6(v Ipv6Prefix) {
o.UeIpv6 = &v
}
// GetIpDomain returns the IpDomain field value if set, zero value otherwise.
func (o *PduSessionInformation) GetIpDomain() string {
if o == nil || IsNil(o.IpDomain) {
var ret string
return ret
}
return *o.IpDomain
}
// GetIpDomainOk returns a tuple with the IpDomain field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PduSessionInformation) GetIpDomainOk() (*string, bool) {
if o == nil || IsNil(o.IpDomain) {
return nil, false
}
return o.IpDomain, true
}
// HasIpDomain returns a boolean if a field has been set.
func (o *PduSessionInformation) HasIpDomain() bool {
if o != nil && !IsNil(o.IpDomain) {
return true
}
return false
}
// SetIpDomain gets a reference to the given string and assigns it to the IpDomain field.
func (o *PduSessionInformation) SetIpDomain(v string) {
o.IpDomain = &v
}
// GetUeMac returns the UeMac field value if set, zero value otherwise.
func (o *PduSessionInformation) GetUeMac() string {
if o == nil || IsNil(o.UeMac) {
var ret string
return ret
}
return *o.UeMac
}
// GetUeMacOk returns a tuple with the UeMac field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PduSessionInformation) GetUeMacOk() (*string, bool) {
if o == nil || IsNil(o.UeMac) {
return nil, false
}
return o.UeMac, true
}
// HasUeMac returns a boolean if a field has been set.
func (o *PduSessionInformation) HasUeMac() bool {
if o != nil && !IsNil(o.UeMac) {
return true
}
return false
}
// SetUeMac gets a reference to the given string and assigns it to the UeMac field.
func (o *PduSessionInformation) SetUeMac(v string) {
o.UeMac = &v
}
func (o PduSessionInformation) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o PduSessionInformation) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
toSerialize["snssai"] = o.Snssai
toSerialize["dnn"] = o.Dnn
if !IsNil(o.UeIpv4) {
toSerialize["ueIpv4"] = o.UeIpv4
}
if !IsNil(o.UeIpv6) {
toSerialize["ueIpv6"] = o.UeIpv6
}
if !IsNil(o.IpDomain) {
toSerialize["ipDomain"] = o.IpDomain
}
if !IsNil(o.UeMac) {
toSerialize["ueMac"] = o.UeMac
}
return toSerialize, nil
}
func (o *PduSessionInformation) 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{
"snssai",
"dnn",
}
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)
}
}
varPduSessionInformation := _PduSessionInformation{}
err = json.Unmarshal(bytes, &varPduSessionInformation)
if err != nil {
return err
}
*o = PduSessionInformation(varPduSessionInformation)
return err
}
type NullablePduSessionInformation struct {
value *PduSessionInformation
isSet bool
}
func (v NullablePduSessionInformation) Get() *PduSessionInformation {
return v.value
}
func (v *NullablePduSessionInformation) Set(val *PduSessionInformation) {
v.value = val
v.isSet = true
}
func (v NullablePduSessionInformation) IsSet() bool {
return v.isSet
}
func (v *NullablePduSessionInformation) Unset() {
v.value = nil
v.isSet = false
}
func NewNullablePduSessionInformation(val *PduSessionInformation) *NullablePduSessionInformation {
return &NullablePduSessionInformation{value: val, isSet: true}
}
func (v NullablePduSessionInformation) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullablePduSessionInformation) 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

搜索帮助