1 Star 0 Fork 0

MrCoder / openapi

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
model_congestion_analytics.go 8.48 KB
一键复制 编辑 原始数据 按行查看 历史
MrCoder 提交于 2023-12-22 15:27 . update
/*
3gpp-analyticsexposure
API for Analytics Exposure. © 2022, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
API version: 1.1.2
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package OpenAPI_AnalyticsExposure
import (
"encoding/json"
"fmt"
)
// checks if the CongestionAnalytics type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &CongestionAnalytics{}
// CongestionAnalytics Represents data congestion analytics for transfer over the user plane, control plane or both.
type CongestionAnalytics struct {
CngType CongestionType `json:"cngType"`
TmWdw TimeWindow `json:"tmWdw"`
Nsi ThresholdLevel `json:"nsi"`
// Unsigned Integer, i.e. only value 0 and integers above 0 are permissible.
Confidence *int32 `json:"confidence,omitempty"`
TopAppListUl []TopApplication `json:"topAppListUl,omitempty"`
TopAppListDl []TopApplication `json:"topAppListDl,omitempty"`
}
type _CongestionAnalytics CongestionAnalytics
// NewCongestionAnalytics instantiates a new CongestionAnalytics 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 NewCongestionAnalytics(cngType CongestionType, tmWdw TimeWindow, nsi ThresholdLevel) *CongestionAnalytics {
this := CongestionAnalytics{}
this.CngType = cngType
this.TmWdw = tmWdw
this.Nsi = nsi
return &this
}
// NewCongestionAnalyticsWithDefaults instantiates a new CongestionAnalytics 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 NewCongestionAnalyticsWithDefaults() *CongestionAnalytics {
this := CongestionAnalytics{}
return &this
}
// GetCngType returns the CngType field value
func (o *CongestionAnalytics) GetCngType() CongestionType {
if o == nil {
var ret CongestionType
return ret
}
return o.CngType
}
// GetCngTypeOk returns a tuple with the CngType field value
// and a boolean to check if the value has been set.
func (o *CongestionAnalytics) GetCngTypeOk() (*CongestionType, bool) {
if o == nil {
return nil, false
}
return &o.CngType, true
}
// SetCngType sets field value
func (o *CongestionAnalytics) SetCngType(v CongestionType) {
o.CngType = v
}
// GetTmWdw returns the TmWdw field value
func (o *CongestionAnalytics) GetTmWdw() TimeWindow {
if o == nil {
var ret TimeWindow
return ret
}
return o.TmWdw
}
// GetTmWdwOk returns a tuple with the TmWdw field value
// and a boolean to check if the value has been set.
func (o *CongestionAnalytics) GetTmWdwOk() (*TimeWindow, bool) {
if o == nil {
return nil, false
}
return &o.TmWdw, true
}
// SetTmWdw sets field value
func (o *CongestionAnalytics) SetTmWdw(v TimeWindow) {
o.TmWdw = v
}
// GetNsi returns the Nsi field value
func (o *CongestionAnalytics) GetNsi() ThresholdLevel {
if o == nil {
var ret ThresholdLevel
return ret
}
return o.Nsi
}
// GetNsiOk returns a tuple with the Nsi field value
// and a boolean to check if the value has been set.
func (o *CongestionAnalytics) GetNsiOk() (*ThresholdLevel, bool) {
if o == nil {
return nil, false
}
return &o.Nsi, true
}
// SetNsi sets field value
func (o *CongestionAnalytics) SetNsi(v ThresholdLevel) {
o.Nsi = v
}
// GetConfidence returns the Confidence field value if set, zero value otherwise.
func (o *CongestionAnalytics) GetConfidence() int32 {
if o == nil || IsNil(o.Confidence) {
var ret int32
return ret
}
return *o.Confidence
}
// GetConfidenceOk returns a tuple with the Confidence field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CongestionAnalytics) GetConfidenceOk() (*int32, bool) {
if o == nil || IsNil(o.Confidence) {
return nil, false
}
return o.Confidence, true
}
// HasConfidence returns a boolean if a field has been set.
func (o *CongestionAnalytics) HasConfidence() bool {
if o != nil && !IsNil(o.Confidence) {
return true
}
return false
}
// SetConfidence gets a reference to the given int32 and assigns it to the Confidence field.
func (o *CongestionAnalytics) SetConfidence(v int32) {
o.Confidence = &v
}
// GetTopAppListUl returns the TopAppListUl field value if set, zero value otherwise.
func (o *CongestionAnalytics) GetTopAppListUl() []TopApplication {
if o == nil || IsNil(o.TopAppListUl) {
var ret []TopApplication
return ret
}
return o.TopAppListUl
}
// GetTopAppListUlOk returns a tuple with the TopAppListUl field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CongestionAnalytics) GetTopAppListUlOk() ([]TopApplication, bool) {
if o == nil || IsNil(o.TopAppListUl) {
return nil, false
}
return o.TopAppListUl, true
}
// HasTopAppListUl returns a boolean if a field has been set.
func (o *CongestionAnalytics) HasTopAppListUl() bool {
if o != nil && !IsNil(o.TopAppListUl) {
return true
}
return false
}
// SetTopAppListUl gets a reference to the given []TopApplication and assigns it to the TopAppListUl field.
func (o *CongestionAnalytics) SetTopAppListUl(v []TopApplication) {
o.TopAppListUl = v
}
// GetTopAppListDl returns the TopAppListDl field value if set, zero value otherwise.
func (o *CongestionAnalytics) GetTopAppListDl() []TopApplication {
if o == nil || IsNil(o.TopAppListDl) {
var ret []TopApplication
return ret
}
return o.TopAppListDl
}
// GetTopAppListDlOk returns a tuple with the TopAppListDl field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CongestionAnalytics) GetTopAppListDlOk() ([]TopApplication, bool) {
if o == nil || IsNil(o.TopAppListDl) {
return nil, false
}
return o.TopAppListDl, true
}
// HasTopAppListDl returns a boolean if a field has been set.
func (o *CongestionAnalytics) HasTopAppListDl() bool {
if o != nil && !IsNil(o.TopAppListDl) {
return true
}
return false
}
// SetTopAppListDl gets a reference to the given []TopApplication and assigns it to the TopAppListDl field.
func (o *CongestionAnalytics) SetTopAppListDl(v []TopApplication) {
o.TopAppListDl = v
}
func (o CongestionAnalytics) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o CongestionAnalytics) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
toSerialize["cngType"] = o.CngType
toSerialize["tmWdw"] = o.TmWdw
toSerialize["nsi"] = o.Nsi
if !IsNil(o.Confidence) {
toSerialize["confidence"] = o.Confidence
}
if !IsNil(o.TopAppListUl) {
toSerialize["topAppListUl"] = o.TopAppListUl
}
if !IsNil(o.TopAppListDl) {
toSerialize["topAppListDl"] = o.TopAppListDl
}
return toSerialize, nil
}
func (o *CongestionAnalytics) 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{
"cngType",
"tmWdw",
"nsi",
}
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)
}
}
varCongestionAnalytics := _CongestionAnalytics{}
err = json.Unmarshal(bytes, &varCongestionAnalytics)
if err != nil {
return err
}
*o = CongestionAnalytics(varCongestionAnalytics)
return err
}
type NullableCongestionAnalytics struct {
value *CongestionAnalytics
isSet bool
}
func (v NullableCongestionAnalytics) Get() *CongestionAnalytics {
return v.value
}
func (v *NullableCongestionAnalytics) Set(val *CongestionAnalytics) {
v.value = val
v.isSet = true
}
func (v NullableCongestionAnalytics) IsSet() bool {
return v.isSet
}
func (v *NullableCongestionAnalytics) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableCongestionAnalytics(val *CongestionAnalytics) *NullableCongestionAnalytics {
return &NullableCongestionAnalytics{value: val, isSet: true}
}
func (v NullableCongestionAnalytics) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableCongestionAnalytics) 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

搜索帮助