1 Star 0 Fork 0

MrCoder / openapi

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
model_mbs_media_comp.go 8.78 KB
一键复制 编辑 原始数据 按行查看 历史
MrCoder 提交于 2023-12-22 15:27 . update
/*
Npcf_MBSPolicyAuthorization API
MBS Policy Authorization Service. © 2022, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
API version: 1.0.1
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package OpenAPI_Npcf_MBSPolicyAuthorization
import (
"encoding/json"
"fmt"
)
// checks if the MbsMediaComp type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &MbsMediaComp{}
// MbsMediaComp Represents an MBS Media Component.
type MbsMediaComp struct {
MbsMedCompNum int32 `json:"mbsMedCompNum"`
MbsFlowDescs []string `json:"mbsFlowDescs,omitempty"`
MbsSdfResPrio *ReservPriority `json:"mbsSdfResPrio,omitempty"`
MbsMediaInfo *MbsMediaInfo `json:"mbsMediaInfo,omitempty"`
QosRef *string `json:"qosRef,omitempty"`
MbsQoSReq *MbsQoSReq `json:"mbsQoSReq,omitempty"`
}
type _MbsMediaComp MbsMediaComp
// NewMbsMediaComp instantiates a new MbsMediaComp 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 NewMbsMediaComp(mbsMedCompNum int32) *MbsMediaComp {
this := MbsMediaComp{}
this.MbsMedCompNum = mbsMedCompNum
return &this
}
// NewMbsMediaCompWithDefaults instantiates a new MbsMediaComp 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 NewMbsMediaCompWithDefaults() *MbsMediaComp {
this := MbsMediaComp{}
return &this
}
// GetMbsMedCompNum returns the MbsMedCompNum field value
func (o *MbsMediaComp) GetMbsMedCompNum() int32 {
if o == nil {
var ret int32
return ret
}
return o.MbsMedCompNum
}
// GetMbsMedCompNumOk returns a tuple with the MbsMedCompNum field value
// and a boolean to check if the value has been set.
func (o *MbsMediaComp) GetMbsMedCompNumOk() (*int32, bool) {
if o == nil {
return nil, false
}
return &o.MbsMedCompNum, true
}
// SetMbsMedCompNum sets field value
func (o *MbsMediaComp) SetMbsMedCompNum(v int32) {
o.MbsMedCompNum = v
}
// GetMbsFlowDescs returns the MbsFlowDescs field value if set, zero value otherwise.
func (o *MbsMediaComp) GetMbsFlowDescs() []string {
if o == nil || IsNil(o.MbsFlowDescs) {
var ret []string
return ret
}
return o.MbsFlowDescs
}
// GetMbsFlowDescsOk returns a tuple with the MbsFlowDescs field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *MbsMediaComp) GetMbsFlowDescsOk() ([]string, bool) {
if o == nil || IsNil(o.MbsFlowDescs) {
return nil, false
}
return o.MbsFlowDescs, true
}
// HasMbsFlowDescs returns a boolean if a field has been set.
func (o *MbsMediaComp) HasMbsFlowDescs() bool {
if o != nil && !IsNil(o.MbsFlowDescs) {
return true
}
return false
}
// SetMbsFlowDescs gets a reference to the given []string and assigns it to the MbsFlowDescs field.
func (o *MbsMediaComp) SetMbsFlowDescs(v []string) {
o.MbsFlowDescs = v
}
// GetMbsSdfResPrio returns the MbsSdfResPrio field value if set, zero value otherwise.
func (o *MbsMediaComp) GetMbsSdfResPrio() ReservPriority {
if o == nil || IsNil(o.MbsSdfResPrio) {
var ret ReservPriority
return ret
}
return *o.MbsSdfResPrio
}
// GetMbsSdfResPrioOk returns a tuple with the MbsSdfResPrio field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *MbsMediaComp) GetMbsSdfResPrioOk() (*ReservPriority, bool) {
if o == nil || IsNil(o.MbsSdfResPrio) {
return nil, false
}
return o.MbsSdfResPrio, true
}
// HasMbsSdfResPrio returns a boolean if a field has been set.
func (o *MbsMediaComp) HasMbsSdfResPrio() bool {
if o != nil && !IsNil(o.MbsSdfResPrio) {
return true
}
return false
}
// SetMbsSdfResPrio gets a reference to the given ReservPriority and assigns it to the MbsSdfResPrio field.
func (o *MbsMediaComp) SetMbsSdfResPrio(v ReservPriority) {
o.MbsSdfResPrio = &v
}
// GetMbsMediaInfo returns the MbsMediaInfo field value if set, zero value otherwise.
func (o *MbsMediaComp) GetMbsMediaInfo() MbsMediaInfo {
if o == nil || IsNil(o.MbsMediaInfo) {
var ret MbsMediaInfo
return ret
}
return *o.MbsMediaInfo
}
// GetMbsMediaInfoOk returns a tuple with the MbsMediaInfo field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *MbsMediaComp) GetMbsMediaInfoOk() (*MbsMediaInfo, bool) {
if o == nil || IsNil(o.MbsMediaInfo) {
return nil, false
}
return o.MbsMediaInfo, true
}
// HasMbsMediaInfo returns a boolean if a field has been set.
func (o *MbsMediaComp) HasMbsMediaInfo() bool {
if o != nil && !IsNil(o.MbsMediaInfo) {
return true
}
return false
}
// SetMbsMediaInfo gets a reference to the given MbsMediaInfo and assigns it to the MbsMediaInfo field.
func (o *MbsMediaComp) SetMbsMediaInfo(v MbsMediaInfo) {
o.MbsMediaInfo = &v
}
// GetQosRef returns the QosRef field value if set, zero value otherwise.
func (o *MbsMediaComp) GetQosRef() string {
if o == nil || IsNil(o.QosRef) {
var ret string
return ret
}
return *o.QosRef
}
// GetQosRefOk returns a tuple with the QosRef field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *MbsMediaComp) GetQosRefOk() (*string, bool) {
if o == nil || IsNil(o.QosRef) {
return nil, false
}
return o.QosRef, true
}
// HasQosRef returns a boolean if a field has been set.
func (o *MbsMediaComp) HasQosRef() bool {
if o != nil && !IsNil(o.QosRef) {
return true
}
return false
}
// SetQosRef gets a reference to the given string and assigns it to the QosRef field.
func (o *MbsMediaComp) SetQosRef(v string) {
o.QosRef = &v
}
// GetMbsQoSReq returns the MbsQoSReq field value if set, zero value otherwise.
func (o *MbsMediaComp) GetMbsQoSReq() MbsQoSReq {
if o == nil || IsNil(o.MbsQoSReq) {
var ret MbsQoSReq
return ret
}
return *o.MbsQoSReq
}
// GetMbsQoSReqOk returns a tuple with the MbsQoSReq field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *MbsMediaComp) GetMbsQoSReqOk() (*MbsQoSReq, bool) {
if o == nil || IsNil(o.MbsQoSReq) {
return nil, false
}
return o.MbsQoSReq, true
}
// HasMbsQoSReq returns a boolean if a field has been set.
func (o *MbsMediaComp) HasMbsQoSReq() bool {
if o != nil && !IsNil(o.MbsQoSReq) {
return true
}
return false
}
// SetMbsQoSReq gets a reference to the given MbsQoSReq and assigns it to the MbsQoSReq field.
func (o *MbsMediaComp) SetMbsQoSReq(v MbsQoSReq) {
o.MbsQoSReq = &v
}
func (o MbsMediaComp) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o MbsMediaComp) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
toSerialize["mbsMedCompNum"] = o.MbsMedCompNum
if !IsNil(o.MbsFlowDescs) {
toSerialize["mbsFlowDescs"] = o.MbsFlowDescs
}
if !IsNil(o.MbsSdfResPrio) {
toSerialize["mbsSdfResPrio"] = o.MbsSdfResPrio
}
if !IsNil(o.MbsMediaInfo) {
toSerialize["mbsMediaInfo"] = o.MbsMediaInfo
}
if !IsNil(o.QosRef) {
toSerialize["qosRef"] = o.QosRef
}
if !IsNil(o.MbsQoSReq) {
toSerialize["mbsQoSReq"] = o.MbsQoSReq
}
return toSerialize, nil
}
func (o *MbsMediaComp) 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{
"mbsMedCompNum",
}
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)
}
}
varMbsMediaComp := _MbsMediaComp{}
err = json.Unmarshal(bytes, &varMbsMediaComp)
if err != nil {
return err
}
*o = MbsMediaComp(varMbsMediaComp)
return err
}
type NullableMbsMediaComp struct {
value *MbsMediaComp
isSet bool
}
func (v NullableMbsMediaComp) Get() *MbsMediaComp {
return v.value
}
func (v *NullableMbsMediaComp) Set(val *MbsMediaComp) {
v.value = val
v.isSet = true
}
func (v NullableMbsMediaComp) IsSet() bool {
return v.isSet
}
func (v *NullableMbsMediaComp) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableMbsMediaComp(val *MbsMediaComp) *NullableMbsMediaComp {
return &NullableMbsMediaComp{value: val, isSet: true}
}
func (v NullableMbsMediaComp) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableMbsMediaComp) 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

搜索帮助