1 Star 0 Fork 0

MrCoder / openapi

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
model_smcce_info.go 5.95 KB
一键复制 编辑 原始数据 按行查看 历史
MrCoder 提交于 2023-12-22 15:27 . update
/*
Namf_Communication
AMF Communication Service. © 2023, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
API version: 1.2.3
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package OpenAPI_Namf_Communication
import (
"encoding/json"
"fmt"
)
// checks if the SmcceInfo type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &SmcceInfo{}
// SmcceInfo Represents the Session Management congestion control experience information.
type SmcceInfo struct {
// 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,omitempty"`
Snssai *Snssai `json:"snssai,omitempty"`
SmcceUeList NullableSmcceUeList `json:"smcceUeList"`
}
type _SmcceInfo SmcceInfo
// NewSmcceInfo instantiates a new SmcceInfo 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 NewSmcceInfo(smcceUeList NullableSmcceUeList) *SmcceInfo {
this := SmcceInfo{}
this.SmcceUeList = smcceUeList
return &this
}
// NewSmcceInfoWithDefaults instantiates a new SmcceInfo 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 NewSmcceInfoWithDefaults() *SmcceInfo {
this := SmcceInfo{}
return &this
}
// GetDnn returns the Dnn field value if set, zero value otherwise.
func (o *SmcceInfo) GetDnn() string {
if o == nil || IsNil(o.Dnn) {
var ret string
return ret
}
return *o.Dnn
}
// GetDnnOk returns a tuple with the Dnn field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SmcceInfo) GetDnnOk() (*string, bool) {
if o == nil || IsNil(o.Dnn) {
return nil, false
}
return o.Dnn, true
}
// HasDnn returns a boolean if a field has been set.
func (o *SmcceInfo) HasDnn() bool {
if o != nil && !IsNil(o.Dnn) {
return true
}
return false
}
// SetDnn gets a reference to the given string and assigns it to the Dnn field.
func (o *SmcceInfo) SetDnn(v string) {
o.Dnn = &v
}
// GetSnssai returns the Snssai field value if set, zero value otherwise.
func (o *SmcceInfo) GetSnssai() Snssai {
if o == nil || IsNil(o.Snssai) {
var ret Snssai
return ret
}
return *o.Snssai
}
// GetSnssaiOk returns a tuple with the Snssai field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SmcceInfo) GetSnssaiOk() (*Snssai, bool) {
if o == nil || IsNil(o.Snssai) {
return nil, false
}
return o.Snssai, true
}
// HasSnssai returns a boolean if a field has been set.
func (o *SmcceInfo) HasSnssai() bool {
if o != nil && !IsNil(o.Snssai) {
return true
}
return false
}
// SetSnssai gets a reference to the given Snssai and assigns it to the Snssai field.
func (o *SmcceInfo) SetSnssai(v Snssai) {
o.Snssai = &v
}
// GetSmcceUeList returns the SmcceUeList field value
// If the value is explicit nil, the zero value for SmcceUeList will be returned
func (o *SmcceInfo) GetSmcceUeList() SmcceUeList {
if o == nil || o.SmcceUeList.Get() == nil {
var ret SmcceUeList
return ret
}
return *o.SmcceUeList.Get()
}
// GetSmcceUeListOk returns a tuple with the SmcceUeList field value
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *SmcceInfo) GetSmcceUeListOk() (*SmcceUeList, bool) {
if o == nil {
return nil, false
}
return o.SmcceUeList.Get(), o.SmcceUeList.IsSet()
}
// SetSmcceUeList sets field value
func (o *SmcceInfo) SetSmcceUeList(v SmcceUeList) {
o.SmcceUeList.Set(&v)
}
func (o SmcceInfo) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o SmcceInfo) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Dnn) {
toSerialize["dnn"] = o.Dnn
}
if !IsNil(o.Snssai) {
toSerialize["snssai"] = o.Snssai
}
toSerialize["smcceUeList"] = o.SmcceUeList.Get()
return toSerialize, nil
}
func (o *SmcceInfo) 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{
"smcceUeList",
}
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)
}
}
varSmcceInfo := _SmcceInfo{}
err = json.Unmarshal(bytes, &varSmcceInfo)
if err != nil {
return err
}
*o = SmcceInfo(varSmcceInfo)
return err
}
type NullableSmcceInfo struct {
value *SmcceInfo
isSet bool
}
func (v NullableSmcceInfo) Get() *SmcceInfo {
return v.value
}
func (v *NullableSmcceInfo) Set(val *SmcceInfo) {
v.value = val
v.isSet = true
}
func (v NullableSmcceInfo) IsSet() bool {
return v.isSet
}
func (v *NullableSmcceInfo) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableSmcceInfo(val *SmcceInfo) *NullableSmcceInfo {
return &NullableSmcceInfo{value: val, isSet: true}
}
func (v NullableSmcceInfo) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableSmcceInfo) 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

搜索帮助