代码拉取完成,页面将自动刷新
/*
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 SubscribedDefaultQos type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &SubscribedDefaultQos{}
// SubscribedDefaultQos Provides the subsribed 5QI and the ARP, it may contain the priority level.
type SubscribedDefaultQos 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"`
Arp Arp `json:"arp"`
// Unsigned integer indicating the 5QI Priority Level (see clauses 5.7.3.3 and 5.7.4 of 3GPP TS 23.501, within the range 1 to 127.Values are ordered in decreasing order of priority, i.e. with 1 as the highest priority and 127 as the lowest priority.
PriorityLevel *int32 `json:"priorityLevel,omitempty"`
}
type _SubscribedDefaultQos SubscribedDefaultQos
// NewSubscribedDefaultQos instantiates a new SubscribedDefaultQos 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 NewSubscribedDefaultQos(var5qi int32, arp Arp) *SubscribedDefaultQos {
this := SubscribedDefaultQos{}
this.Var5qi = var5qi
this.Arp = arp
return &this
}
// NewSubscribedDefaultQosWithDefaults instantiates a new SubscribedDefaultQos 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 NewSubscribedDefaultQosWithDefaults() *SubscribedDefaultQos {
this := SubscribedDefaultQos{}
return &this
}
// GetVar5qi returns the Var5qi field value
func (o *SubscribedDefaultQos) 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 *SubscribedDefaultQos) GetVar5qiOk() (*int32, bool) {
if o == nil {
return nil, false
}
return &o.Var5qi, true
}
// SetVar5qi sets field value
func (o *SubscribedDefaultQos) SetVar5qi(v int32) {
o.Var5qi = v
}
// GetArp returns the Arp field value
func (o *SubscribedDefaultQos) GetArp() Arp {
if o == nil {
var ret Arp
return ret
}
return o.Arp
}
// GetArpOk returns a tuple with the Arp field value
// and a boolean to check if the value has been set.
func (o *SubscribedDefaultQos) GetArpOk() (*Arp, bool) {
if o == nil {
return nil, false
}
return &o.Arp, true
}
// SetArp sets field value
func (o *SubscribedDefaultQos) SetArp(v Arp) {
o.Arp = v
}
// GetPriorityLevel returns the PriorityLevel field value if set, zero value otherwise.
func (o *SubscribedDefaultQos) GetPriorityLevel() int32 {
if o == nil || IsNil(o.PriorityLevel) {
var ret int32
return ret
}
return *o.PriorityLevel
}
// GetPriorityLevelOk returns a tuple with the PriorityLevel field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SubscribedDefaultQos) GetPriorityLevelOk() (*int32, bool) {
if o == nil || IsNil(o.PriorityLevel) {
return nil, false
}
return o.PriorityLevel, true
}
// HasPriorityLevel returns a boolean if a field has been set.
func (o *SubscribedDefaultQos) HasPriorityLevel() bool {
if o != nil && !IsNil(o.PriorityLevel) {
return true
}
return false
}
// SetPriorityLevel gets a reference to the given int32 and assigns it to the PriorityLevel field.
func (o *SubscribedDefaultQos) SetPriorityLevel(v int32) {
o.PriorityLevel = &v
}
func (o SubscribedDefaultQos) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o SubscribedDefaultQos) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
toSerialize["5qi"] = o.Var5qi
toSerialize["arp"] = o.Arp
if !IsNil(o.PriorityLevel) {
toSerialize["priorityLevel"] = o.PriorityLevel
}
return toSerialize, nil
}
func (o *SubscribedDefaultQos) 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",
"arp",
}
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)
}
}
varSubscribedDefaultQos := _SubscribedDefaultQos{}
err = json.Unmarshal(bytes, &varSubscribedDefaultQos)
if err != nil {
return err
}
*o = SubscribedDefaultQos(varSubscribedDefaultQos)
return err
}
type NullableSubscribedDefaultQos struct {
value *SubscribedDefaultQos
isSet bool
}
func (v NullableSubscribedDefaultQos) Get() *SubscribedDefaultQos {
return v.value
}
func (v *NullableSubscribedDefaultQos) Set(val *SubscribedDefaultQos) {
v.value = val
v.isSet = true
}
func (v NullableSubscribedDefaultQos) IsSet() bool {
return v.isSet
}
func (v *NullableSubscribedDefaultQos) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableSubscribedDefaultQos(val *SubscribedDefaultQos) *NullableSubscribedDefaultQos {
return &NullableSubscribedDefaultQos{value: val, isSet: true}
}
func (v NullableSubscribedDefaultQos) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableSubscribedDefaultQos) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。