代码拉取完成,页面将自动刷新
/*
Nudr_DataRepository API OpenAPI file
Unified Data Repository Service. © 2023, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
API version: 2.2.4
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package OpenAPI_Nudr_DR
import (
"encoding/json"
"fmt"
"time"
)
// checks if the UsageMonDataLimit type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &UsageMonDataLimit{}
// UsageMonDataLimit Contains usage monitoring control data for a subscriber.
type UsageMonDataLimit struct {
LimitId string `json:"limitId"`
// Identifies the SNSSAI and DNN combinations to which the usage monitoring data limit applies. The S-NSSAI is the key of the map.
Scopes *map[string]UsageMonDataScope `json:"scopes,omitempty"`
UmLevel *UsageMonLevel `json:"umLevel,omitempty"`
// string with format 'date-time' as defined in OpenAPI.
StartDate *time.Time `json:"startDate,omitempty"`
// string with format 'date-time' as defined in OpenAPI.
EndDate *time.Time `json:"endDate,omitempty"`
UsageLimit *UsageThreshold `json:"usageLimit,omitempty"`
ResetPeriod *TimePeriod `json:"resetPeriod,omitempty"`
}
type _UsageMonDataLimit UsageMonDataLimit
// NewUsageMonDataLimit instantiates a new UsageMonDataLimit 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 NewUsageMonDataLimit(limitId string) *UsageMonDataLimit {
this := UsageMonDataLimit{}
this.LimitId = limitId
return &this
}
// NewUsageMonDataLimitWithDefaults instantiates a new UsageMonDataLimit 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 NewUsageMonDataLimitWithDefaults() *UsageMonDataLimit {
this := UsageMonDataLimit{}
return &this
}
// GetLimitId returns the LimitId field value
func (o *UsageMonDataLimit) GetLimitId() string {
if o == nil {
var ret string
return ret
}
return o.LimitId
}
// GetLimitIdOk returns a tuple with the LimitId field value
// and a boolean to check if the value has been set.
func (o *UsageMonDataLimit) GetLimitIdOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.LimitId, true
}
// SetLimitId sets field value
func (o *UsageMonDataLimit) SetLimitId(v string) {
o.LimitId = v
}
// GetScopes returns the Scopes field value if set, zero value otherwise.
func (o *UsageMonDataLimit) GetScopes() map[string]UsageMonDataScope {
if o == nil || IsNil(o.Scopes) {
var ret map[string]UsageMonDataScope
return ret
}
return *o.Scopes
}
// GetScopesOk returns a tuple with the Scopes field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *UsageMonDataLimit) GetScopesOk() (*map[string]UsageMonDataScope, bool) {
if o == nil || IsNil(o.Scopes) {
return nil, false
}
return o.Scopes, true
}
// HasScopes returns a boolean if a field has been set.
func (o *UsageMonDataLimit) HasScopes() bool {
if o != nil && !IsNil(o.Scopes) {
return true
}
return false
}
// SetScopes gets a reference to the given map[string]UsageMonDataScope and assigns it to the Scopes field.
func (o *UsageMonDataLimit) SetScopes(v map[string]UsageMonDataScope) {
o.Scopes = &v
}
// GetUmLevel returns the UmLevel field value if set, zero value otherwise.
func (o *UsageMonDataLimit) GetUmLevel() UsageMonLevel {
if o == nil || IsNil(o.UmLevel) {
var ret UsageMonLevel
return ret
}
return *o.UmLevel
}
// GetUmLevelOk returns a tuple with the UmLevel field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *UsageMonDataLimit) GetUmLevelOk() (*UsageMonLevel, bool) {
if o == nil || IsNil(o.UmLevel) {
return nil, false
}
return o.UmLevel, true
}
// HasUmLevel returns a boolean if a field has been set.
func (o *UsageMonDataLimit) HasUmLevel() bool {
if o != nil && !IsNil(o.UmLevel) {
return true
}
return false
}
// SetUmLevel gets a reference to the given UsageMonLevel and assigns it to the UmLevel field.
func (o *UsageMonDataLimit) SetUmLevel(v UsageMonLevel) {
o.UmLevel = &v
}
// GetStartDate returns the StartDate field value if set, zero value otherwise.
func (o *UsageMonDataLimit) GetStartDate() time.Time {
if o == nil || IsNil(o.StartDate) {
var ret time.Time
return ret
}
return *o.StartDate
}
// GetStartDateOk returns a tuple with the StartDate field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *UsageMonDataLimit) GetStartDateOk() (*time.Time, bool) {
if o == nil || IsNil(o.StartDate) {
return nil, false
}
return o.StartDate, true
}
// HasStartDate returns a boolean if a field has been set.
func (o *UsageMonDataLimit) HasStartDate() bool {
if o != nil && !IsNil(o.StartDate) {
return true
}
return false
}
// SetStartDate gets a reference to the given time.Time and assigns it to the StartDate field.
func (o *UsageMonDataLimit) SetStartDate(v time.Time) {
o.StartDate = &v
}
// GetEndDate returns the EndDate field value if set, zero value otherwise.
func (o *UsageMonDataLimit) GetEndDate() time.Time {
if o == nil || IsNil(o.EndDate) {
var ret time.Time
return ret
}
return *o.EndDate
}
// GetEndDateOk returns a tuple with the EndDate field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *UsageMonDataLimit) GetEndDateOk() (*time.Time, bool) {
if o == nil || IsNil(o.EndDate) {
return nil, false
}
return o.EndDate, true
}
// HasEndDate returns a boolean if a field has been set.
func (o *UsageMonDataLimit) HasEndDate() bool {
if o != nil && !IsNil(o.EndDate) {
return true
}
return false
}
// SetEndDate gets a reference to the given time.Time and assigns it to the EndDate field.
func (o *UsageMonDataLimit) SetEndDate(v time.Time) {
o.EndDate = &v
}
// GetUsageLimit returns the UsageLimit field value if set, zero value otherwise.
func (o *UsageMonDataLimit) GetUsageLimit() UsageThreshold {
if o == nil || IsNil(o.UsageLimit) {
var ret UsageThreshold
return ret
}
return *o.UsageLimit
}
// GetUsageLimitOk returns a tuple with the UsageLimit field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *UsageMonDataLimit) GetUsageLimitOk() (*UsageThreshold, bool) {
if o == nil || IsNil(o.UsageLimit) {
return nil, false
}
return o.UsageLimit, true
}
// HasUsageLimit returns a boolean if a field has been set.
func (o *UsageMonDataLimit) HasUsageLimit() bool {
if o != nil && !IsNil(o.UsageLimit) {
return true
}
return false
}
// SetUsageLimit gets a reference to the given UsageThreshold and assigns it to the UsageLimit field.
func (o *UsageMonDataLimit) SetUsageLimit(v UsageThreshold) {
o.UsageLimit = &v
}
// GetResetPeriod returns the ResetPeriod field value if set, zero value otherwise.
func (o *UsageMonDataLimit) GetResetPeriod() TimePeriod {
if o == nil || IsNil(o.ResetPeriod) {
var ret TimePeriod
return ret
}
return *o.ResetPeriod
}
// GetResetPeriodOk returns a tuple with the ResetPeriod field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *UsageMonDataLimit) GetResetPeriodOk() (*TimePeriod, bool) {
if o == nil || IsNil(o.ResetPeriod) {
return nil, false
}
return o.ResetPeriod, true
}
// HasResetPeriod returns a boolean if a field has been set.
func (o *UsageMonDataLimit) HasResetPeriod() bool {
if o != nil && !IsNil(o.ResetPeriod) {
return true
}
return false
}
// SetResetPeriod gets a reference to the given TimePeriod and assigns it to the ResetPeriod field.
func (o *UsageMonDataLimit) SetResetPeriod(v TimePeriod) {
o.ResetPeriod = &v
}
func (o UsageMonDataLimit) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o UsageMonDataLimit) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
toSerialize["limitId"] = o.LimitId
if !IsNil(o.Scopes) {
toSerialize["scopes"] = o.Scopes
}
if !IsNil(o.UmLevel) {
toSerialize["umLevel"] = o.UmLevel
}
if !IsNil(o.StartDate) {
toSerialize["startDate"] = o.StartDate
}
if !IsNil(o.EndDate) {
toSerialize["endDate"] = o.EndDate
}
if !IsNil(o.UsageLimit) {
toSerialize["usageLimit"] = o.UsageLimit
}
if !IsNil(o.ResetPeriod) {
toSerialize["resetPeriod"] = o.ResetPeriod
}
return toSerialize, nil
}
func (o *UsageMonDataLimit) 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{
"limitId",
}
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)
}
}
varUsageMonDataLimit := _UsageMonDataLimit{}
err = json.Unmarshal(bytes, &varUsageMonDataLimit)
if err != nil {
return err
}
*o = UsageMonDataLimit(varUsageMonDataLimit)
return err
}
type NullableUsageMonDataLimit struct {
value *UsageMonDataLimit
isSet bool
}
func (v NullableUsageMonDataLimit) Get() *UsageMonDataLimit {
return v.value
}
func (v *NullableUsageMonDataLimit) Set(val *UsageMonDataLimit) {
v.value = val
v.isSet = true
}
func (v NullableUsageMonDataLimit) IsSet() bool {
return v.isSet
}
func (v *NullableUsageMonDataLimit) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableUsageMonDataLimit(val *UsageMonDataLimit) *NullableUsageMonDataLimit {
return &NullableUsageMonDataLimit{value: val, isSet: true}
}
func (v NullableUsageMonDataLimit) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableUsageMonDataLimit) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。