1 Star 0 Fork 0

MrCoder / openapi

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
model_class_criterion.go 5.54 KB
一键复制 编辑 原始数据 按行查看 历史
MrCoder 提交于 2023-12-22 15:27 . update
/*
Nnwdaf_EventsSubscription
Nnwdaf_EventsSubscription Service API. © 2023, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
API version: 1.2.3
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package OpenAPI_Nnwdaf_EventsSubscription
import (
"encoding/json"
"fmt"
)
// checks if the ClassCriterion type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &ClassCriterion{}
// ClassCriterion Indicates the dispersion class criterion for fixed, camper and/or traveller UE, and/or the top-heavy UE dispersion class criterion.
type ClassCriterion struct {
DisperClass DispersionClass `json:"disperClass"`
// Unsigned integer indicating Sampling Ratio (see clauses 4.15.1 of 3GPP TS 23.502), expressed in percent.
ClassThreshold int32 `json:"classThreshold"`
ThresMatch MatchingDirection `json:"thresMatch"`
}
type _ClassCriterion ClassCriterion
// NewClassCriterion instantiates a new ClassCriterion 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 NewClassCriterion(disperClass DispersionClass, classThreshold int32, thresMatch MatchingDirection) *ClassCriterion {
this := ClassCriterion{}
this.DisperClass = disperClass
this.ClassThreshold = classThreshold
this.ThresMatch = thresMatch
return &this
}
// NewClassCriterionWithDefaults instantiates a new ClassCriterion 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 NewClassCriterionWithDefaults() *ClassCriterion {
this := ClassCriterion{}
return &this
}
// GetDisperClass returns the DisperClass field value
func (o *ClassCriterion) GetDisperClass() DispersionClass {
if o == nil {
var ret DispersionClass
return ret
}
return o.DisperClass
}
// GetDisperClassOk returns a tuple with the DisperClass field value
// and a boolean to check if the value has been set.
func (o *ClassCriterion) GetDisperClassOk() (*DispersionClass, bool) {
if o == nil {
return nil, false
}
return &o.DisperClass, true
}
// SetDisperClass sets field value
func (o *ClassCriterion) SetDisperClass(v DispersionClass) {
o.DisperClass = v
}
// GetClassThreshold returns the ClassThreshold field value
func (o *ClassCriterion) GetClassThreshold() int32 {
if o == nil {
var ret int32
return ret
}
return o.ClassThreshold
}
// GetClassThresholdOk returns a tuple with the ClassThreshold field value
// and a boolean to check if the value has been set.
func (o *ClassCriterion) GetClassThresholdOk() (*int32, bool) {
if o == nil {
return nil, false
}
return &o.ClassThreshold, true
}
// SetClassThreshold sets field value
func (o *ClassCriterion) SetClassThreshold(v int32) {
o.ClassThreshold = v
}
// GetThresMatch returns the ThresMatch field value
func (o *ClassCriterion) GetThresMatch() MatchingDirection {
if o == nil {
var ret MatchingDirection
return ret
}
return o.ThresMatch
}
// GetThresMatchOk returns a tuple with the ThresMatch field value
// and a boolean to check if the value has been set.
func (o *ClassCriterion) GetThresMatchOk() (*MatchingDirection, bool) {
if o == nil {
return nil, false
}
return &o.ThresMatch, true
}
// SetThresMatch sets field value
func (o *ClassCriterion) SetThresMatch(v MatchingDirection) {
o.ThresMatch = v
}
func (o ClassCriterion) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o ClassCriterion) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
toSerialize["disperClass"] = o.DisperClass
toSerialize["classThreshold"] = o.ClassThreshold
toSerialize["thresMatch"] = o.ThresMatch
return toSerialize, nil
}
func (o *ClassCriterion) 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{
"disperClass",
"classThreshold",
"thresMatch",
}
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)
}
}
varClassCriterion := _ClassCriterion{}
err = json.Unmarshal(bytes, &varClassCriterion)
if err != nil {
return err
}
*o = ClassCriterion(varClassCriterion)
return err
}
type NullableClassCriterion struct {
value *ClassCriterion
isSet bool
}
func (v NullableClassCriterion) Get() *ClassCriterion {
return v.value
}
func (v *NullableClassCriterion) Set(val *ClassCriterion) {
v.value = val
v.isSet = true
}
func (v NullableClassCriterion) IsSet() bool {
return v.isSet
}
func (v *NullableClassCriterion) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableClassCriterion(val *ClassCriterion) *NullableClassCriterion {
return &NullableClassCriterion{value: val, isSet: true}
}
func (v NullableClassCriterion) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableClassCriterion) 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

搜索帮助