This repository has been archived by the owner on Aug 21, 2023. It is now read-only.
/
model_snssai.go
153 lines (125 loc) · 4.5 KB
/
model_snssai.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
/*
Npcf_BDTPolicyControl Service API
PCF BDT Policy Control Service. © 2022, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
API version: 1.3.0-alpha.1
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package openapi_Npcf_BDTPolicyControl
import (
"encoding/json"
)
// checks if the Snssai type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &Snssai{}
// Snssai When Snssai needs to be converted to string (e.g. when used in maps as key), the string shall be composed of one to three digits \"sst\" optionally followed by \"-\" and 6 hexadecimal digits \"sd\".
type Snssai struct {
// Unsigned integer, within the range 0 to 255, representing the Slice/Service Type. It indicates the expected Network Slice behaviour in terms of features and services. Values 0 to 127 correspond to the standardized SST range. Values 128 to 255 correspond to the Operator-specific range. See clause 28.4.2 of 3GPP TS 23.003. Standardized values are defined in clause 5.15.2.2 of 3GPP TS 23.501.
Sst int32 `json:"sst"`
// 3-octet string, representing the Slice Differentiator, in hexadecimal representation. Each character in the string shall take a value of \"0\" to \"9\", \"a\" to \"f\" or \"A\" to \"F\" and shall represent 4 bits. The most significant character representing the 4 most significant bits of the SD shall appear first in the string, and the character representing the 4 least significant bit of the SD shall appear last in the string. This is an optional parameter that complements the Slice/Service type(s) to allow to differentiate amongst multiple Network Slices of the same Slice/Service type. This IE shall be absent if no SD value is associated with the SST.
Sd *string `json:"sd,omitempty"`
}
// NewSnssai instantiates a new Snssai 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 NewSnssai(sst int32) *Snssai {
this := Snssai{}
this.Sst = sst
return &this
}
// NewSnssaiWithDefaults instantiates a new Snssai 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 NewSnssaiWithDefaults() *Snssai {
this := Snssai{}
return &this
}
// GetSst returns the Sst field value
func (o *Snssai) GetSst() int32 {
if o == nil {
var ret int32
return ret
}
return o.Sst
}
// GetSstOk returns a tuple with the Sst field value
// and a boolean to check if the value has been set.
func (o *Snssai) GetSstOk() (*int32, bool) {
if o == nil {
return nil, false
}
return &o.Sst, true
}
// SetSst sets field value
func (o *Snssai) SetSst(v int32) {
o.Sst = v
}
// GetSd returns the Sd field value if set, zero value otherwise.
func (o *Snssai) GetSd() string {
if o == nil || IsNil(o.Sd) {
var ret string
return ret
}
return *o.Sd
}
// GetSdOk returns a tuple with the Sd field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Snssai) GetSdOk() (*string, bool) {
if o == nil || IsNil(o.Sd) {
return nil, false
}
return o.Sd, true
}
// HasSd returns a boolean if a field has been set.
func (o *Snssai) HasSd() bool {
if o != nil && !IsNil(o.Sd) {
return true
}
return false
}
// SetSd gets a reference to the given string and assigns it to the Sd field.
func (o *Snssai) SetSd(v string) {
o.Sd = &v
}
func (o Snssai) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o Snssai) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
toSerialize["sst"] = o.Sst
if !IsNil(o.Sd) {
toSerialize["sd"] = o.Sd
}
return toSerialize, nil
}
type NullableSnssai struct {
value *Snssai
isSet bool
}
func (v NullableSnssai) Get() *Snssai {
return v.value
}
func (v *NullableSnssai) Set(val *Snssai) {
v.value = val
v.isSet = true
}
func (v NullableSnssai) IsSet() bool {
return v.isSet
}
func (v *NullableSnssai) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableSnssai(val *Snssai) *NullableSnssai {
return &NullableSnssai{value: val, isSet: true}
}
func (v NullableSnssai) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableSnssai) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}