1 Star 0 Fork 0

MrCoder/openapi

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
model_usage_monitoring_data.go 23.02 KB
一键复制 编辑 原始数据 按行查看 历史
MrCoder 提交于 2年前 . update
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673
/*
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"
"time"
)
// checks if the UsageMonitoringData type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &UsageMonitoringData{}
// UsageMonitoringData Contains usage monitoring related control information.
type UsageMonitoringData struct {
// Univocally identifies the usage monitoring policy data within a PDU session.
UmId string `json:"umId"`
// Unsigned integer identifying a volume in units of bytes with \"nullable=true\" property.
VolumeThreshold NullableInt64 `json:"volumeThreshold,omitempty"`
// Unsigned integer identifying a volume in units of bytes with \"nullable=true\" property.
VolumeThresholdUplink NullableInt64 `json:"volumeThresholdUplink,omitempty"`
// Unsigned integer identifying a volume in units of bytes with \"nullable=true\" property.
VolumeThresholdDownlink NullableInt64 `json:"volumeThresholdDownlink,omitempty"`
// indicating a time in seconds with OpenAPI defined 'nullable: true' property.
TimeThreshold NullableInt32 `json:"timeThreshold,omitempty"`
// string with format 'date-time' as defined in OpenAPI with 'nullable:true' property.
MonitoringTime NullableTime `json:"monitoringTime,omitempty"`
// Unsigned integer identifying a volume in units of bytes with \"nullable=true\" property.
NextVolThreshold NullableInt64 `json:"nextVolThreshold,omitempty"`
// Unsigned integer identifying a volume in units of bytes with \"nullable=true\" property.
NextVolThresholdUplink NullableInt64 `json:"nextVolThresholdUplink,omitempty"`
// Unsigned integer identifying a volume in units of bytes with \"nullable=true\" property.
NextVolThresholdDownlink NullableInt64 `json:"nextVolThresholdDownlink,omitempty"`
// indicating a time in seconds with OpenAPI defined 'nullable: true' property.
NextTimeThreshold NullableInt32 `json:"nextTimeThreshold,omitempty"`
// indicating a time in seconds with OpenAPI defined 'nullable: true' property.
InactivityTime NullableInt32 `json:"inactivityTime,omitempty"`
// Contains the PCC rule identifier(s) which corresponding service data flow(s) shall be excluded from PDU Session usage monitoring. It is only included in the UsageMonitoringData instance for session level usage monitoring.
ExUsagePccRuleIds []string `json:"exUsagePccRuleIds,omitempty"`
}
type _UsageMonitoringData UsageMonitoringData
// NewUsageMonitoringData instantiates a new UsageMonitoringData 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 NewUsageMonitoringData(umId string) *UsageMonitoringData {
this := UsageMonitoringData{}
this.UmId = umId
return &this
}
// NewUsageMonitoringDataWithDefaults instantiates a new UsageMonitoringData 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 NewUsageMonitoringDataWithDefaults() *UsageMonitoringData {
this := UsageMonitoringData{}
return &this
}
// GetUmId returns the UmId field value
func (o *UsageMonitoringData) GetUmId() string {
if o == nil {
var ret string
return ret
}
return o.UmId
}
// GetUmIdOk returns a tuple with the UmId field value
// and a boolean to check if the value has been set.
func (o *UsageMonitoringData) GetUmIdOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.UmId, true
}
// SetUmId sets field value
func (o *UsageMonitoringData) SetUmId(v string) {
o.UmId = v
}
// GetVolumeThreshold returns the VolumeThreshold field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *UsageMonitoringData) GetVolumeThreshold() int64 {
if o == nil || IsNil(o.VolumeThreshold.Get()) {
var ret int64
return ret
}
return *o.VolumeThreshold.Get()
}
// GetVolumeThresholdOk returns a tuple with the VolumeThreshold field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *UsageMonitoringData) GetVolumeThresholdOk() (*int64, bool) {
if o == nil {
return nil, false
}
return o.VolumeThreshold.Get(), o.VolumeThreshold.IsSet()
}
// HasVolumeThreshold returns a boolean if a field has been set.
func (o *UsageMonitoringData) HasVolumeThreshold() bool {
if o != nil && o.VolumeThreshold.IsSet() {
return true
}
return false
}
// SetVolumeThreshold gets a reference to the given NullableInt64 and assigns it to the VolumeThreshold field.
func (o *UsageMonitoringData) SetVolumeThreshold(v int64) {
o.VolumeThreshold.Set(&v)
}
// SetVolumeThresholdNil sets the value for VolumeThreshold to be an explicit nil
func (o *UsageMonitoringData) SetVolumeThresholdNil() {
o.VolumeThreshold.Set(nil)
}
// UnsetVolumeThreshold ensures that no value is present for VolumeThreshold, not even an explicit nil
func (o *UsageMonitoringData) UnsetVolumeThreshold() {
o.VolumeThreshold.Unset()
}
// GetVolumeThresholdUplink returns the VolumeThresholdUplink field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *UsageMonitoringData) GetVolumeThresholdUplink() int64 {
if o == nil || IsNil(o.VolumeThresholdUplink.Get()) {
var ret int64
return ret
}
return *o.VolumeThresholdUplink.Get()
}
// GetVolumeThresholdUplinkOk returns a tuple with the VolumeThresholdUplink field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *UsageMonitoringData) GetVolumeThresholdUplinkOk() (*int64, bool) {
if o == nil {
return nil, false
}
return o.VolumeThresholdUplink.Get(), o.VolumeThresholdUplink.IsSet()
}
// HasVolumeThresholdUplink returns a boolean if a field has been set.
func (o *UsageMonitoringData) HasVolumeThresholdUplink() bool {
if o != nil && o.VolumeThresholdUplink.IsSet() {
return true
}
return false
}
// SetVolumeThresholdUplink gets a reference to the given NullableInt64 and assigns it to the VolumeThresholdUplink field.
func (o *UsageMonitoringData) SetVolumeThresholdUplink(v int64) {
o.VolumeThresholdUplink.Set(&v)
}
// SetVolumeThresholdUplinkNil sets the value for VolumeThresholdUplink to be an explicit nil
func (o *UsageMonitoringData) SetVolumeThresholdUplinkNil() {
o.VolumeThresholdUplink.Set(nil)
}
// UnsetVolumeThresholdUplink ensures that no value is present for VolumeThresholdUplink, not even an explicit nil
func (o *UsageMonitoringData) UnsetVolumeThresholdUplink() {
o.VolumeThresholdUplink.Unset()
}
// GetVolumeThresholdDownlink returns the VolumeThresholdDownlink field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *UsageMonitoringData) GetVolumeThresholdDownlink() int64 {
if o == nil || IsNil(o.VolumeThresholdDownlink.Get()) {
var ret int64
return ret
}
return *o.VolumeThresholdDownlink.Get()
}
// GetVolumeThresholdDownlinkOk returns a tuple with the VolumeThresholdDownlink field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *UsageMonitoringData) GetVolumeThresholdDownlinkOk() (*int64, bool) {
if o == nil {
return nil, false
}
return o.VolumeThresholdDownlink.Get(), o.VolumeThresholdDownlink.IsSet()
}
// HasVolumeThresholdDownlink returns a boolean if a field has been set.
func (o *UsageMonitoringData) HasVolumeThresholdDownlink() bool {
if o != nil && o.VolumeThresholdDownlink.IsSet() {
return true
}
return false
}
// SetVolumeThresholdDownlink gets a reference to the given NullableInt64 and assigns it to the VolumeThresholdDownlink field.
func (o *UsageMonitoringData) SetVolumeThresholdDownlink(v int64) {
o.VolumeThresholdDownlink.Set(&v)
}
// SetVolumeThresholdDownlinkNil sets the value for VolumeThresholdDownlink to be an explicit nil
func (o *UsageMonitoringData) SetVolumeThresholdDownlinkNil() {
o.VolumeThresholdDownlink.Set(nil)
}
// UnsetVolumeThresholdDownlink ensures that no value is present for VolumeThresholdDownlink, not even an explicit nil
func (o *UsageMonitoringData) UnsetVolumeThresholdDownlink() {
o.VolumeThresholdDownlink.Unset()
}
// GetTimeThreshold returns the TimeThreshold field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *UsageMonitoringData) GetTimeThreshold() int32 {
if o == nil || IsNil(o.TimeThreshold.Get()) {
var ret int32
return ret
}
return *o.TimeThreshold.Get()
}
// GetTimeThresholdOk returns a tuple with the TimeThreshold field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *UsageMonitoringData) GetTimeThresholdOk() (*int32, bool) {
if o == nil {
return nil, false
}
return o.TimeThreshold.Get(), o.TimeThreshold.IsSet()
}
// HasTimeThreshold returns a boolean if a field has been set.
func (o *UsageMonitoringData) HasTimeThreshold() bool {
if o != nil && o.TimeThreshold.IsSet() {
return true
}
return false
}
// SetTimeThreshold gets a reference to the given NullableInt32 and assigns it to the TimeThreshold field.
func (o *UsageMonitoringData) SetTimeThreshold(v int32) {
o.TimeThreshold.Set(&v)
}
// SetTimeThresholdNil sets the value for TimeThreshold to be an explicit nil
func (o *UsageMonitoringData) SetTimeThresholdNil() {
o.TimeThreshold.Set(nil)
}
// UnsetTimeThreshold ensures that no value is present for TimeThreshold, not even an explicit nil
func (o *UsageMonitoringData) UnsetTimeThreshold() {
o.TimeThreshold.Unset()
}
// GetMonitoringTime returns the MonitoringTime field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *UsageMonitoringData) GetMonitoringTime() time.Time {
if o == nil || IsNil(o.MonitoringTime.Get()) {
var ret time.Time
return ret
}
return *o.MonitoringTime.Get()
}
// GetMonitoringTimeOk returns a tuple with the MonitoringTime field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *UsageMonitoringData) GetMonitoringTimeOk() (*time.Time, bool) {
if o == nil {
return nil, false
}
return o.MonitoringTime.Get(), o.MonitoringTime.IsSet()
}
// HasMonitoringTime returns a boolean if a field has been set.
func (o *UsageMonitoringData) HasMonitoringTime() bool {
if o != nil && o.MonitoringTime.IsSet() {
return true
}
return false
}
// SetMonitoringTime gets a reference to the given NullableTime and assigns it to the MonitoringTime field.
func (o *UsageMonitoringData) SetMonitoringTime(v time.Time) {
o.MonitoringTime.Set(&v)
}
// SetMonitoringTimeNil sets the value for MonitoringTime to be an explicit nil
func (o *UsageMonitoringData) SetMonitoringTimeNil() {
o.MonitoringTime.Set(nil)
}
// UnsetMonitoringTime ensures that no value is present for MonitoringTime, not even an explicit nil
func (o *UsageMonitoringData) UnsetMonitoringTime() {
o.MonitoringTime.Unset()
}
// GetNextVolThreshold returns the NextVolThreshold field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *UsageMonitoringData) GetNextVolThreshold() int64 {
if o == nil || IsNil(o.NextVolThreshold.Get()) {
var ret int64
return ret
}
return *o.NextVolThreshold.Get()
}
// GetNextVolThresholdOk returns a tuple with the NextVolThreshold field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *UsageMonitoringData) GetNextVolThresholdOk() (*int64, bool) {
if o == nil {
return nil, false
}
return o.NextVolThreshold.Get(), o.NextVolThreshold.IsSet()
}
// HasNextVolThreshold returns a boolean if a field has been set.
func (o *UsageMonitoringData) HasNextVolThreshold() bool {
if o != nil && o.NextVolThreshold.IsSet() {
return true
}
return false
}
// SetNextVolThreshold gets a reference to the given NullableInt64 and assigns it to the NextVolThreshold field.
func (o *UsageMonitoringData) SetNextVolThreshold(v int64) {
o.NextVolThreshold.Set(&v)
}
// SetNextVolThresholdNil sets the value for NextVolThreshold to be an explicit nil
func (o *UsageMonitoringData) SetNextVolThresholdNil() {
o.NextVolThreshold.Set(nil)
}
// UnsetNextVolThreshold ensures that no value is present for NextVolThreshold, not even an explicit nil
func (o *UsageMonitoringData) UnsetNextVolThreshold() {
o.NextVolThreshold.Unset()
}
// GetNextVolThresholdUplink returns the NextVolThresholdUplink field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *UsageMonitoringData) GetNextVolThresholdUplink() int64 {
if o == nil || IsNil(o.NextVolThresholdUplink.Get()) {
var ret int64
return ret
}
return *o.NextVolThresholdUplink.Get()
}
// GetNextVolThresholdUplinkOk returns a tuple with the NextVolThresholdUplink field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *UsageMonitoringData) GetNextVolThresholdUplinkOk() (*int64, bool) {
if o == nil {
return nil, false
}
return o.NextVolThresholdUplink.Get(), o.NextVolThresholdUplink.IsSet()
}
// HasNextVolThresholdUplink returns a boolean if a field has been set.
func (o *UsageMonitoringData) HasNextVolThresholdUplink() bool {
if o != nil && o.NextVolThresholdUplink.IsSet() {
return true
}
return false
}
// SetNextVolThresholdUplink gets a reference to the given NullableInt64 and assigns it to the NextVolThresholdUplink field.
func (o *UsageMonitoringData) SetNextVolThresholdUplink(v int64) {
o.NextVolThresholdUplink.Set(&v)
}
// SetNextVolThresholdUplinkNil sets the value for NextVolThresholdUplink to be an explicit nil
func (o *UsageMonitoringData) SetNextVolThresholdUplinkNil() {
o.NextVolThresholdUplink.Set(nil)
}
// UnsetNextVolThresholdUplink ensures that no value is present for NextVolThresholdUplink, not even an explicit nil
func (o *UsageMonitoringData) UnsetNextVolThresholdUplink() {
o.NextVolThresholdUplink.Unset()
}
// GetNextVolThresholdDownlink returns the NextVolThresholdDownlink field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *UsageMonitoringData) GetNextVolThresholdDownlink() int64 {
if o == nil || IsNil(o.NextVolThresholdDownlink.Get()) {
var ret int64
return ret
}
return *o.NextVolThresholdDownlink.Get()
}
// GetNextVolThresholdDownlinkOk returns a tuple with the NextVolThresholdDownlink field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *UsageMonitoringData) GetNextVolThresholdDownlinkOk() (*int64, bool) {
if o == nil {
return nil, false
}
return o.NextVolThresholdDownlink.Get(), o.NextVolThresholdDownlink.IsSet()
}
// HasNextVolThresholdDownlink returns a boolean if a field has been set.
func (o *UsageMonitoringData) HasNextVolThresholdDownlink() bool {
if o != nil && o.NextVolThresholdDownlink.IsSet() {
return true
}
return false
}
// SetNextVolThresholdDownlink gets a reference to the given NullableInt64 and assigns it to the NextVolThresholdDownlink field.
func (o *UsageMonitoringData) SetNextVolThresholdDownlink(v int64) {
o.NextVolThresholdDownlink.Set(&v)
}
// SetNextVolThresholdDownlinkNil sets the value for NextVolThresholdDownlink to be an explicit nil
func (o *UsageMonitoringData) SetNextVolThresholdDownlinkNil() {
o.NextVolThresholdDownlink.Set(nil)
}
// UnsetNextVolThresholdDownlink ensures that no value is present for NextVolThresholdDownlink, not even an explicit nil
func (o *UsageMonitoringData) UnsetNextVolThresholdDownlink() {
o.NextVolThresholdDownlink.Unset()
}
// GetNextTimeThreshold returns the NextTimeThreshold field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *UsageMonitoringData) GetNextTimeThreshold() int32 {
if o == nil || IsNil(o.NextTimeThreshold.Get()) {
var ret int32
return ret
}
return *o.NextTimeThreshold.Get()
}
// GetNextTimeThresholdOk returns a tuple with the NextTimeThreshold field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *UsageMonitoringData) GetNextTimeThresholdOk() (*int32, bool) {
if o == nil {
return nil, false
}
return o.NextTimeThreshold.Get(), o.NextTimeThreshold.IsSet()
}
// HasNextTimeThreshold returns a boolean if a field has been set.
func (o *UsageMonitoringData) HasNextTimeThreshold() bool {
if o != nil && o.NextTimeThreshold.IsSet() {
return true
}
return false
}
// SetNextTimeThreshold gets a reference to the given NullableInt32 and assigns it to the NextTimeThreshold field.
func (o *UsageMonitoringData) SetNextTimeThreshold(v int32) {
o.NextTimeThreshold.Set(&v)
}
// SetNextTimeThresholdNil sets the value for NextTimeThreshold to be an explicit nil
func (o *UsageMonitoringData) SetNextTimeThresholdNil() {
o.NextTimeThreshold.Set(nil)
}
// UnsetNextTimeThreshold ensures that no value is present for NextTimeThreshold, not even an explicit nil
func (o *UsageMonitoringData) UnsetNextTimeThreshold() {
o.NextTimeThreshold.Unset()
}
// GetInactivityTime returns the InactivityTime field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *UsageMonitoringData) GetInactivityTime() int32 {
if o == nil || IsNil(o.InactivityTime.Get()) {
var ret int32
return ret
}
return *o.InactivityTime.Get()
}
// GetInactivityTimeOk returns a tuple with the InactivityTime field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *UsageMonitoringData) GetInactivityTimeOk() (*int32, bool) {
if o == nil {
return nil, false
}
return o.InactivityTime.Get(), o.InactivityTime.IsSet()
}
// HasInactivityTime returns a boolean if a field has been set.
func (o *UsageMonitoringData) HasInactivityTime() bool {
if o != nil && o.InactivityTime.IsSet() {
return true
}
return false
}
// SetInactivityTime gets a reference to the given NullableInt32 and assigns it to the InactivityTime field.
func (o *UsageMonitoringData) SetInactivityTime(v int32) {
o.InactivityTime.Set(&v)
}
// SetInactivityTimeNil sets the value for InactivityTime to be an explicit nil
func (o *UsageMonitoringData) SetInactivityTimeNil() {
o.InactivityTime.Set(nil)
}
// UnsetInactivityTime ensures that no value is present for InactivityTime, not even an explicit nil
func (o *UsageMonitoringData) UnsetInactivityTime() {
o.InactivityTime.Unset()
}
// GetExUsagePccRuleIds returns the ExUsagePccRuleIds field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *UsageMonitoringData) GetExUsagePccRuleIds() []string {
if o == nil {
var ret []string
return ret
}
return o.ExUsagePccRuleIds
}
// GetExUsagePccRuleIdsOk returns a tuple with the ExUsagePccRuleIds field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *UsageMonitoringData) GetExUsagePccRuleIdsOk() ([]string, bool) {
if o == nil || IsNil(o.ExUsagePccRuleIds) {
return nil, false
}
return o.ExUsagePccRuleIds, true
}
// HasExUsagePccRuleIds returns a boolean if a field has been set.
func (o *UsageMonitoringData) HasExUsagePccRuleIds() bool {
if o != nil && IsNil(o.ExUsagePccRuleIds) {
return true
}
return false
}
// SetExUsagePccRuleIds gets a reference to the given []string and assigns it to the ExUsagePccRuleIds field.
func (o *UsageMonitoringData) SetExUsagePccRuleIds(v []string) {
o.ExUsagePccRuleIds = v
}
func (o UsageMonitoringData) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o UsageMonitoringData) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
toSerialize["umId"] = o.UmId
if o.VolumeThreshold.IsSet() {
toSerialize["volumeThreshold"] = o.VolumeThreshold.Get()
}
if o.VolumeThresholdUplink.IsSet() {
toSerialize["volumeThresholdUplink"] = o.VolumeThresholdUplink.Get()
}
if o.VolumeThresholdDownlink.IsSet() {
toSerialize["volumeThresholdDownlink"] = o.VolumeThresholdDownlink.Get()
}
if o.TimeThreshold.IsSet() {
toSerialize["timeThreshold"] = o.TimeThreshold.Get()
}
if o.MonitoringTime.IsSet() {
toSerialize["monitoringTime"] = o.MonitoringTime.Get()
}
if o.NextVolThreshold.IsSet() {
toSerialize["nextVolThreshold"] = o.NextVolThreshold.Get()
}
if o.NextVolThresholdUplink.IsSet() {
toSerialize["nextVolThresholdUplink"] = o.NextVolThresholdUplink.Get()
}
if o.NextVolThresholdDownlink.IsSet() {
toSerialize["nextVolThresholdDownlink"] = o.NextVolThresholdDownlink.Get()
}
if o.NextTimeThreshold.IsSet() {
toSerialize["nextTimeThreshold"] = o.NextTimeThreshold.Get()
}
if o.InactivityTime.IsSet() {
toSerialize["inactivityTime"] = o.InactivityTime.Get()
}
if o.ExUsagePccRuleIds != nil {
toSerialize["exUsagePccRuleIds"] = o.ExUsagePccRuleIds
}
return toSerialize, nil
}
func (o *UsageMonitoringData) 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{
"umId",
}
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)
}
}
varUsageMonitoringData := _UsageMonitoringData{}
err = json.Unmarshal(bytes, &varUsageMonitoringData)
if err != nil {
return err
}
*o = UsageMonitoringData(varUsageMonitoringData)
return err
}
type NullableUsageMonitoringData struct {
value *UsageMonitoringData
isSet bool
}
func (v NullableUsageMonitoringData) Get() *UsageMonitoringData {
return v.value
}
func (v *NullableUsageMonitoringData) Set(val *UsageMonitoringData) {
v.value = val
v.isSet = true
}
func (v NullableUsageMonitoringData) IsSet() bool {
return v.isSet
}
func (v *NullableUsageMonitoringData) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableUsageMonitoringData(val *UsageMonitoringData) *NullableUsageMonitoringData {
return &NullableUsageMonitoringData{value: val, isSet: true}
}
func (v NullableUsageMonitoringData) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableUsageMonitoringData) 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

搜索帮助