1 Star 0 Fork 0

MrCoder/openapi

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
model_five_qi_characteristics_single.go 11.91 KB
一键复制 编辑 原始数据 按行查看 历史
MrCoder 提交于 2023-12-22 15:27 +08:00 . update
/*
Provisioning MnS
OAS 3.0.1 definition of the Provisioning MnS © 2023, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
API version: 17.6.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package OpenAPI_ProvMnS
import (
"encoding/json"
"fmt"
)
// checks if the FiveQICharacteristicsSingle type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &FiveQICharacteristicsSingle{}
// FiveQICharacteristicsSingle struct for FiveQICharacteristicsSingle
type FiveQICharacteristicsSingle struct {
Top
FiveQIValue *int32 `json:"fiveQIValue,omitempty"`
ResourceType *string `json:"resourceType,omitempty"`
PriorityLevel *int32 `json:"priorityLevel,omitempty"`
PacketDelayBudget *int32 `json:"packetDelayBudget,omitempty"`
PacketErrorRate *PacketErrorRate `json:"packetErrorRate,omitempty"`
AveragingWindow *int32 `json:"averagingWindow,omitempty"`
MaximumDataBurstVolume *int32 `json:"maximumDataBurstVolume,omitempty"`
}
type _FiveQICharacteristicsSingle FiveQICharacteristicsSingle
// NewFiveQICharacteristicsSingle instantiates a new FiveQICharacteristicsSingle 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 NewFiveQICharacteristicsSingle(id NullableString) *FiveQICharacteristicsSingle {
this := FiveQICharacteristicsSingle{}
this.Id = id
return &this
}
// NewFiveQICharacteristicsSingleWithDefaults instantiates a new FiveQICharacteristicsSingle 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 NewFiveQICharacteristicsSingleWithDefaults() *FiveQICharacteristicsSingle {
this := FiveQICharacteristicsSingle{}
return &this
}
// GetFiveQIValue returns the FiveQIValue field value if set, zero value otherwise.
func (o *FiveQICharacteristicsSingle) GetFiveQIValue() int32 {
if o == nil || IsNil(o.FiveQIValue) {
var ret int32
return ret
}
return *o.FiveQIValue
}
// GetFiveQIValueOk returns a tuple with the FiveQIValue field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *FiveQICharacteristicsSingle) GetFiveQIValueOk() (*int32, bool) {
if o == nil || IsNil(o.FiveQIValue) {
return nil, false
}
return o.FiveQIValue, true
}
// HasFiveQIValue returns a boolean if a field has been set.
func (o *FiveQICharacteristicsSingle) HasFiveQIValue() bool {
if o != nil && !IsNil(o.FiveQIValue) {
return true
}
return false
}
// SetFiveQIValue gets a reference to the given int32 and assigns it to the FiveQIValue field.
func (o *FiveQICharacteristicsSingle) SetFiveQIValue(v int32) {
o.FiveQIValue = &v
}
// GetResourceType returns the ResourceType field value if set, zero value otherwise.
func (o *FiveQICharacteristicsSingle) GetResourceType() string {
if o == nil || IsNil(o.ResourceType) {
var ret string
return ret
}
return *o.ResourceType
}
// GetResourceTypeOk returns a tuple with the ResourceType field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *FiveQICharacteristicsSingle) GetResourceTypeOk() (*string, bool) {
if o == nil || IsNil(o.ResourceType) {
return nil, false
}
return o.ResourceType, true
}
// HasResourceType returns a boolean if a field has been set.
func (o *FiveQICharacteristicsSingle) HasResourceType() bool {
if o != nil && !IsNil(o.ResourceType) {
return true
}
return false
}
// SetResourceType gets a reference to the given string and assigns it to the ResourceType field.
func (o *FiveQICharacteristicsSingle) SetResourceType(v string) {
o.ResourceType = &v
}
// GetPriorityLevel returns the PriorityLevel field value if set, zero value otherwise.
func (o *FiveQICharacteristicsSingle) 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 *FiveQICharacteristicsSingle) 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 *FiveQICharacteristicsSingle) 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 *FiveQICharacteristicsSingle) SetPriorityLevel(v int32) {
o.PriorityLevel = &v
}
// GetPacketDelayBudget returns the PacketDelayBudget field value if set, zero value otherwise.
func (o *FiveQICharacteristicsSingle) GetPacketDelayBudget() int32 {
if o == nil || IsNil(o.PacketDelayBudget) {
var ret int32
return ret
}
return *o.PacketDelayBudget
}
// GetPacketDelayBudgetOk returns a tuple with the PacketDelayBudget field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *FiveQICharacteristicsSingle) GetPacketDelayBudgetOk() (*int32, bool) {
if o == nil || IsNil(o.PacketDelayBudget) {
return nil, false
}
return o.PacketDelayBudget, true
}
// HasPacketDelayBudget returns a boolean if a field has been set.
func (o *FiveQICharacteristicsSingle) HasPacketDelayBudget() bool {
if o != nil && !IsNil(o.PacketDelayBudget) {
return true
}
return false
}
// SetPacketDelayBudget gets a reference to the given int32 and assigns it to the PacketDelayBudget field.
func (o *FiveQICharacteristicsSingle) SetPacketDelayBudget(v int32) {
o.PacketDelayBudget = &v
}
// GetPacketErrorRate returns the PacketErrorRate field value if set, zero value otherwise.
func (o *FiveQICharacteristicsSingle) GetPacketErrorRate() PacketErrorRate {
if o == nil || IsNil(o.PacketErrorRate) {
var ret PacketErrorRate
return ret
}
return *o.PacketErrorRate
}
// GetPacketErrorRateOk returns a tuple with the PacketErrorRate field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *FiveQICharacteristicsSingle) GetPacketErrorRateOk() (*PacketErrorRate, bool) {
if o == nil || IsNil(o.PacketErrorRate) {
return nil, false
}
return o.PacketErrorRate, true
}
// HasPacketErrorRate returns a boolean if a field has been set.
func (o *FiveQICharacteristicsSingle) HasPacketErrorRate() bool {
if o != nil && !IsNil(o.PacketErrorRate) {
return true
}
return false
}
// SetPacketErrorRate gets a reference to the given PacketErrorRate and assigns it to the PacketErrorRate field.
func (o *FiveQICharacteristicsSingle) SetPacketErrorRate(v PacketErrorRate) {
o.PacketErrorRate = &v
}
// GetAveragingWindow returns the AveragingWindow field value if set, zero value otherwise.
func (o *FiveQICharacteristicsSingle) GetAveragingWindow() int32 {
if o == nil || IsNil(o.AveragingWindow) {
var ret int32
return ret
}
return *o.AveragingWindow
}
// GetAveragingWindowOk returns a tuple with the AveragingWindow field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *FiveQICharacteristicsSingle) GetAveragingWindowOk() (*int32, bool) {
if o == nil || IsNil(o.AveragingWindow) {
return nil, false
}
return o.AveragingWindow, true
}
// HasAveragingWindow returns a boolean if a field has been set.
func (o *FiveQICharacteristicsSingle) HasAveragingWindow() bool {
if o != nil && !IsNil(o.AveragingWindow) {
return true
}
return false
}
// SetAveragingWindow gets a reference to the given int32 and assigns it to the AveragingWindow field.
func (o *FiveQICharacteristicsSingle) SetAveragingWindow(v int32) {
o.AveragingWindow = &v
}
// GetMaximumDataBurstVolume returns the MaximumDataBurstVolume field value if set, zero value otherwise.
func (o *FiveQICharacteristicsSingle) GetMaximumDataBurstVolume() int32 {
if o == nil || IsNil(o.MaximumDataBurstVolume) {
var ret int32
return ret
}
return *o.MaximumDataBurstVolume
}
// GetMaximumDataBurstVolumeOk returns a tuple with the MaximumDataBurstVolume field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *FiveQICharacteristicsSingle) GetMaximumDataBurstVolumeOk() (*int32, bool) {
if o == nil || IsNil(o.MaximumDataBurstVolume) {
return nil, false
}
return o.MaximumDataBurstVolume, true
}
// HasMaximumDataBurstVolume returns a boolean if a field has been set.
func (o *FiveQICharacteristicsSingle) HasMaximumDataBurstVolume() bool {
if o != nil && !IsNil(o.MaximumDataBurstVolume) {
return true
}
return false
}
// SetMaximumDataBurstVolume gets a reference to the given int32 and assigns it to the MaximumDataBurstVolume field.
func (o *FiveQICharacteristicsSingle) SetMaximumDataBurstVolume(v int32) {
o.MaximumDataBurstVolume = &v
}
func (o FiveQICharacteristicsSingle) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o FiveQICharacteristicsSingle) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
serializedTop, errTop := json.Marshal(o.Top)
if errTop != nil {
return map[string]interface{}{}, errTop
}
errTop = json.Unmarshal([]byte(serializedTop), &toSerialize)
if errTop != nil {
return map[string]interface{}{}, errTop
}
if !IsNil(o.FiveQIValue) {
toSerialize["fiveQIValue"] = o.FiveQIValue
}
if !IsNil(o.ResourceType) {
toSerialize["resourceType"] = o.ResourceType
}
if !IsNil(o.PriorityLevel) {
toSerialize["priorityLevel"] = o.PriorityLevel
}
if !IsNil(o.PacketDelayBudget) {
toSerialize["packetDelayBudget"] = o.PacketDelayBudget
}
if !IsNil(o.PacketErrorRate) {
toSerialize["packetErrorRate"] = o.PacketErrorRate
}
if !IsNil(o.AveragingWindow) {
toSerialize["averagingWindow"] = o.AveragingWindow
}
if !IsNil(o.MaximumDataBurstVolume) {
toSerialize["maximumDataBurstVolume"] = o.MaximumDataBurstVolume
}
return toSerialize, nil
}
func (o *FiveQICharacteristicsSingle) 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{
"id",
}
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)
}
}
varFiveQICharacteristicsSingle := _FiveQICharacteristicsSingle{}
err = json.Unmarshal(bytes, &varFiveQICharacteristicsSingle)
if err != nil {
return err
}
*o = FiveQICharacteristicsSingle(varFiveQICharacteristicsSingle)
return err
}
type NullableFiveQICharacteristicsSingle struct {
value *FiveQICharacteristicsSingle
isSet bool
}
func (v NullableFiveQICharacteristicsSingle) Get() *FiveQICharacteristicsSingle {
return v.value
}
func (v *NullableFiveQICharacteristicsSingle) Set(val *FiveQICharacteristicsSingle) {
v.value = val
v.isSet = true
}
func (v NullableFiveQICharacteristicsSingle) IsSet() bool {
return v.isSet
}
func (v *NullableFiveQICharacteristicsSingle) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableFiveQICharacteristicsSingle(val *FiveQICharacteristicsSingle) *NullableFiveQICharacteristicsSingle {
return &NullableFiveQICharacteristicsSingle{value: val, isSet: true}
}
func (v NullableFiveQICharacteristicsSingle) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableFiveQICharacteristicsSingle) 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

搜索帮助