1 Star 0 Fork 0

MrCoder/openapi

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
model_requested_qos.go 5.93 KB
一键复制 编辑 原始数据 按行查看 历史
MrCoder 提交于 2年前 . update
/*
Npcf_SMPolicyControl API
Session Management Policy Control Service © 2023, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
API version: 1.2.4
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package OpenAPI_Npcf_SMPolicyControl
import (
"encoding/json"
"fmt"
)
// checks if the RequestedQos type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &RequestedQos{}
// RequestedQos Contains the QoS information requested by the UE.
type RequestedQos struct {
// Unsigned integer representing a 5G QoS Identifier (see clause 5.7.2.1 of 3GPP TS 23.501, within the range 0 to 255.
Var5qi int32 `json:"5qi"`
// String representing a bit rate; the prefixes follow the standard symbols from The International System of Units, and represent x1000 multipliers, with the exception that prefix \"K\" is used to represent the standard symbol \"k\".
GbrUl *string `json:"gbrUl,omitempty"`
// String representing a bit rate; the prefixes follow the standard symbols from The International System of Units, and represent x1000 multipliers, with the exception that prefix \"K\" is used to represent the standard symbol \"k\".
GbrDl *string `json:"gbrDl,omitempty"`
}
type _RequestedQos RequestedQos
// NewRequestedQos instantiates a new RequestedQos 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 NewRequestedQos(var5qi int32) *RequestedQos {
this := RequestedQos{}
this.Var5qi = var5qi
return &this
}
// NewRequestedQosWithDefaults instantiates a new RequestedQos 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 NewRequestedQosWithDefaults() *RequestedQos {
this := RequestedQos{}
return &this
}
// GetVar5qi returns the Var5qi field value
func (o *RequestedQos) GetVar5qi() int32 {
if o == nil {
var ret int32
return ret
}
return o.Var5qi
}
// GetVar5qiOk returns a tuple with the Var5qi field value
// and a boolean to check if the value has been set.
func (o *RequestedQos) GetVar5qiOk() (*int32, bool) {
if o == nil {
return nil, false
}
return &o.Var5qi, true
}
// SetVar5qi sets field value
func (o *RequestedQos) SetVar5qi(v int32) {
o.Var5qi = v
}
// GetGbrUl returns the GbrUl field value if set, zero value otherwise.
func (o *RequestedQos) GetGbrUl() string {
if o == nil || IsNil(o.GbrUl) {
var ret string
return ret
}
return *o.GbrUl
}
// GetGbrUlOk returns a tuple with the GbrUl field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *RequestedQos) GetGbrUlOk() (*string, bool) {
if o == nil || IsNil(o.GbrUl) {
return nil, false
}
return o.GbrUl, true
}
// HasGbrUl returns a boolean if a field has been set.
func (o *RequestedQos) HasGbrUl() bool {
if o != nil && !IsNil(o.GbrUl) {
return true
}
return false
}
// SetGbrUl gets a reference to the given string and assigns it to the GbrUl field.
func (o *RequestedQos) SetGbrUl(v string) {
o.GbrUl = &v
}
// GetGbrDl returns the GbrDl field value if set, zero value otherwise.
func (o *RequestedQos) GetGbrDl() string {
if o == nil || IsNil(o.GbrDl) {
var ret string
return ret
}
return *o.GbrDl
}
// GetGbrDlOk returns a tuple with the GbrDl field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *RequestedQos) GetGbrDlOk() (*string, bool) {
if o == nil || IsNil(o.GbrDl) {
return nil, false
}
return o.GbrDl, true
}
// HasGbrDl returns a boolean if a field has been set.
func (o *RequestedQos) HasGbrDl() bool {
if o != nil && !IsNil(o.GbrDl) {
return true
}
return false
}
// SetGbrDl gets a reference to the given string and assigns it to the GbrDl field.
func (o *RequestedQos) SetGbrDl(v string) {
o.GbrDl = &v
}
func (o RequestedQos) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o RequestedQos) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
toSerialize["5qi"] = o.Var5qi
if !IsNil(o.GbrUl) {
toSerialize["gbrUl"] = o.GbrUl
}
if !IsNil(o.GbrDl) {
toSerialize["gbrDl"] = o.GbrDl
}
return toSerialize, nil
}
func (o *RequestedQos) 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{
"5qi",
}
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)
}
}
varRequestedQos := _RequestedQos{}
err = json.Unmarshal(bytes, &varRequestedQos)
if err != nil {
return err
}
*o = RequestedQos(varRequestedQos)
return err
}
type NullableRequestedQos struct {
value *RequestedQos
isSet bool
}
func (v NullableRequestedQos) Get() *RequestedQos {
return v.value
}
func (v *NullableRequestedQos) Set(val *RequestedQos) {
v.value = val
v.isSet = true
}
func (v NullableRequestedQos) IsSet() bool {
return v.isSet
}
func (v *NullableRequestedQos) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableRequestedQos(val *RequestedQos) *NullableRequestedQos {
return &NullableRequestedQos{value: val, isSet: true}
}
func (v NullableRequestedQos) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableRequestedQos) 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

搜索帮助