1 Star 0 Fork 0

MrCoder/openapi

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
model_qos_notification_control_info.go 7.27 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 QosNotificationControlInfo type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &QosNotificationControlInfo{}
// QosNotificationControlInfo Contains the QoS Notification Control Information.
type QosNotificationControlInfo struct {
// An array of PCC rule id references to the PCC rules associated with the QoS notification control info.
RefPccRuleIds []string `json:"refPccRuleIds"`
NotifType QosNotifType `json:"notifType"`
// Represents the content version of some content.
ContVer *int32 `json:"contVer,omitempty"`
AltQosParamId *string `json:"altQosParamId,omitempty"`
}
type _QosNotificationControlInfo QosNotificationControlInfo
// NewQosNotificationControlInfo instantiates a new QosNotificationControlInfo 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 NewQosNotificationControlInfo(refPccRuleIds []string, notifType QosNotifType) *QosNotificationControlInfo {
this := QosNotificationControlInfo{}
this.RefPccRuleIds = refPccRuleIds
this.NotifType = notifType
return &this
}
// NewQosNotificationControlInfoWithDefaults instantiates a new QosNotificationControlInfo 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 NewQosNotificationControlInfoWithDefaults() *QosNotificationControlInfo {
this := QosNotificationControlInfo{}
return &this
}
// GetRefPccRuleIds returns the RefPccRuleIds field value
func (o *QosNotificationControlInfo) GetRefPccRuleIds() []string {
if o == nil {
var ret []string
return ret
}
return o.RefPccRuleIds
}
// GetRefPccRuleIdsOk returns a tuple with the RefPccRuleIds field value
// and a boolean to check if the value has been set.
func (o *QosNotificationControlInfo) GetRefPccRuleIdsOk() ([]string, bool) {
if o == nil {
return nil, false
}
return o.RefPccRuleIds, true
}
// SetRefPccRuleIds sets field value
func (o *QosNotificationControlInfo) SetRefPccRuleIds(v []string) {
o.RefPccRuleIds = v
}
// GetNotifType returns the NotifType field value
func (o *QosNotificationControlInfo) GetNotifType() QosNotifType {
if o == nil {
var ret QosNotifType
return ret
}
return o.NotifType
}
// GetNotifTypeOk returns a tuple with the NotifType field value
// and a boolean to check if the value has been set.
func (o *QosNotificationControlInfo) GetNotifTypeOk() (*QosNotifType, bool) {
if o == nil {
return nil, false
}
return &o.NotifType, true
}
// SetNotifType sets field value
func (o *QosNotificationControlInfo) SetNotifType(v QosNotifType) {
o.NotifType = v
}
// GetContVer returns the ContVer field value if set, zero value otherwise.
func (o *QosNotificationControlInfo) GetContVer() int32 {
if o == nil || IsNil(o.ContVer) {
var ret int32
return ret
}
return *o.ContVer
}
// GetContVerOk returns a tuple with the ContVer field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *QosNotificationControlInfo) GetContVerOk() (*int32, bool) {
if o == nil || IsNil(o.ContVer) {
return nil, false
}
return o.ContVer, true
}
// HasContVer returns a boolean if a field has been set.
func (o *QosNotificationControlInfo) HasContVer() bool {
if o != nil && !IsNil(o.ContVer) {
return true
}
return false
}
// SetContVer gets a reference to the given int32 and assigns it to the ContVer field.
func (o *QosNotificationControlInfo) SetContVer(v int32) {
o.ContVer = &v
}
// GetAltQosParamId returns the AltQosParamId field value if set, zero value otherwise.
func (o *QosNotificationControlInfo) GetAltQosParamId() string {
if o == nil || IsNil(o.AltQosParamId) {
var ret string
return ret
}
return *o.AltQosParamId
}
// GetAltQosParamIdOk returns a tuple with the AltQosParamId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *QosNotificationControlInfo) GetAltQosParamIdOk() (*string, bool) {
if o == nil || IsNil(o.AltQosParamId) {
return nil, false
}
return o.AltQosParamId, true
}
// HasAltQosParamId returns a boolean if a field has been set.
func (o *QosNotificationControlInfo) HasAltQosParamId() bool {
if o != nil && !IsNil(o.AltQosParamId) {
return true
}
return false
}
// SetAltQosParamId gets a reference to the given string and assigns it to the AltQosParamId field.
func (o *QosNotificationControlInfo) SetAltQosParamId(v string) {
o.AltQosParamId = &v
}
func (o QosNotificationControlInfo) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o QosNotificationControlInfo) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
toSerialize["refPccRuleIds"] = o.RefPccRuleIds
toSerialize["notifType"] = o.NotifType
if !IsNil(o.ContVer) {
toSerialize["contVer"] = o.ContVer
}
if !IsNil(o.AltQosParamId) {
toSerialize["altQosParamId"] = o.AltQosParamId
}
return toSerialize, nil
}
func (o *QosNotificationControlInfo) 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{
"refPccRuleIds",
"notifType",
}
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)
}
}
varQosNotificationControlInfo := _QosNotificationControlInfo{}
err = json.Unmarshal(bytes, &varQosNotificationControlInfo)
if err != nil {
return err
}
*o = QosNotificationControlInfo(varQosNotificationControlInfo)
return err
}
type NullableQosNotificationControlInfo struct {
value *QosNotificationControlInfo
isSet bool
}
func (v NullableQosNotificationControlInfo) Get() *QosNotificationControlInfo {
return v.value
}
func (v *NullableQosNotificationControlInfo) Set(val *QosNotificationControlInfo) {
v.value = val
v.isSet = true
}
func (v NullableQosNotificationControlInfo) IsSet() bool {
return v.isSet
}
func (v *NullableQosNotificationControlInfo) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableQosNotificationControlInfo(val *QosNotificationControlInfo) *NullableQosNotificationControlInfo {
return &NullableQosNotificationControlInfo{value: val, isSet: true}
}
func (v NullableQosNotificationControlInfo) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableQosNotificationControlInfo) 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

搜索帮助