1 Star 0 Fork 0

MrCoder/openapi

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
model_consumption_reporting_configuration.go 7.62 KB
一键复制 编辑 原始数据 按行查看 历史
MrCoder 提交于 2023-12-22 15:27 +08:00 . update
/*
M1_ConsumptionReportingProvisioning
5GMS AF M1 Consumption Reporting Provisioning API © 2023, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
API version: 2.0.1
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package OpenAPI_M1_ConsumptionReportingProvisioning
import (
"encoding/json"
)
// checks if the ConsumptionReportingConfiguration type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &ConsumptionReportingConfiguration{}
// ConsumptionReportingConfiguration A representation of a Consumption Reporting Configuration resource.
type ConsumptionReportingConfiguration struct {
// indicating a time in seconds.
ReportingInterval *int32 `json:"reportingInterval,omitempty"`
SamplePercentage *float32 `json:"samplePercentage,omitempty"`
LocationReporting *bool `json:"locationReporting,omitempty"`
AccessReporting *bool `json:"accessReporting,omitempty"`
}
// NewConsumptionReportingConfiguration instantiates a new ConsumptionReportingConfiguration 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 NewConsumptionReportingConfiguration() *ConsumptionReportingConfiguration {
this := ConsumptionReportingConfiguration{}
return &this
}
// NewConsumptionReportingConfigurationWithDefaults instantiates a new ConsumptionReportingConfiguration 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 NewConsumptionReportingConfigurationWithDefaults() *ConsumptionReportingConfiguration {
this := ConsumptionReportingConfiguration{}
return &this
}
// GetReportingInterval returns the ReportingInterval field value if set, zero value otherwise.
func (o *ConsumptionReportingConfiguration) GetReportingInterval() int32 {
if o == nil || IsNil(o.ReportingInterval) {
var ret int32
return ret
}
return *o.ReportingInterval
}
// GetReportingIntervalOk returns a tuple with the ReportingInterval field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ConsumptionReportingConfiguration) GetReportingIntervalOk() (*int32, bool) {
if o == nil || IsNil(o.ReportingInterval) {
return nil, false
}
return o.ReportingInterval, true
}
// HasReportingInterval returns a boolean if a field has been set.
func (o *ConsumptionReportingConfiguration) HasReportingInterval() bool {
if o != nil && !IsNil(o.ReportingInterval) {
return true
}
return false
}
// SetReportingInterval gets a reference to the given int32 and assigns it to the ReportingInterval field.
func (o *ConsumptionReportingConfiguration) SetReportingInterval(v int32) {
o.ReportingInterval = &v
}
// GetSamplePercentage returns the SamplePercentage field value if set, zero value otherwise.
func (o *ConsumptionReportingConfiguration) GetSamplePercentage() float32 {
if o == nil || IsNil(o.SamplePercentage) {
var ret float32
return ret
}
return *o.SamplePercentage
}
// GetSamplePercentageOk returns a tuple with the SamplePercentage field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ConsumptionReportingConfiguration) GetSamplePercentageOk() (*float32, bool) {
if o == nil || IsNil(o.SamplePercentage) {
return nil, false
}
return o.SamplePercentage, true
}
// HasSamplePercentage returns a boolean if a field has been set.
func (o *ConsumptionReportingConfiguration) HasSamplePercentage() bool {
if o != nil && !IsNil(o.SamplePercentage) {
return true
}
return false
}
// SetSamplePercentage gets a reference to the given float32 and assigns it to the SamplePercentage field.
func (o *ConsumptionReportingConfiguration) SetSamplePercentage(v float32) {
o.SamplePercentage = &v
}
// GetLocationReporting returns the LocationReporting field value if set, zero value otherwise.
func (o *ConsumptionReportingConfiguration) GetLocationReporting() bool {
if o == nil || IsNil(o.LocationReporting) {
var ret bool
return ret
}
return *o.LocationReporting
}
// GetLocationReportingOk returns a tuple with the LocationReporting field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ConsumptionReportingConfiguration) GetLocationReportingOk() (*bool, bool) {
if o == nil || IsNil(o.LocationReporting) {
return nil, false
}
return o.LocationReporting, true
}
// HasLocationReporting returns a boolean if a field has been set.
func (o *ConsumptionReportingConfiguration) HasLocationReporting() bool {
if o != nil && !IsNil(o.LocationReporting) {
return true
}
return false
}
// SetLocationReporting gets a reference to the given bool and assigns it to the LocationReporting field.
func (o *ConsumptionReportingConfiguration) SetLocationReporting(v bool) {
o.LocationReporting = &v
}
// GetAccessReporting returns the AccessReporting field value if set, zero value otherwise.
func (o *ConsumptionReportingConfiguration) GetAccessReporting() bool {
if o == nil || IsNil(o.AccessReporting) {
var ret bool
return ret
}
return *o.AccessReporting
}
// GetAccessReportingOk returns a tuple with the AccessReporting field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ConsumptionReportingConfiguration) GetAccessReportingOk() (*bool, bool) {
if o == nil || IsNil(o.AccessReporting) {
return nil, false
}
return o.AccessReporting, true
}
// HasAccessReporting returns a boolean if a field has been set.
func (o *ConsumptionReportingConfiguration) HasAccessReporting() bool {
if o != nil && !IsNil(o.AccessReporting) {
return true
}
return false
}
// SetAccessReporting gets a reference to the given bool and assigns it to the AccessReporting field.
func (o *ConsumptionReportingConfiguration) SetAccessReporting(v bool) {
o.AccessReporting = &v
}
func (o ConsumptionReportingConfiguration) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o ConsumptionReportingConfiguration) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.ReportingInterval) {
toSerialize["reportingInterval"] = o.ReportingInterval
}
if !IsNil(o.SamplePercentage) {
toSerialize["samplePercentage"] = o.SamplePercentage
}
if !IsNil(o.LocationReporting) {
toSerialize["locationReporting"] = o.LocationReporting
}
if !IsNil(o.AccessReporting) {
toSerialize["accessReporting"] = o.AccessReporting
}
return toSerialize, nil
}
type NullableConsumptionReportingConfiguration struct {
value *ConsumptionReportingConfiguration
isSet bool
}
func (v NullableConsumptionReportingConfiguration) Get() *ConsumptionReportingConfiguration {
return v.value
}
func (v *NullableConsumptionReportingConfiguration) Set(val *ConsumptionReportingConfiguration) {
v.value = val
v.isSet = true
}
func (v NullableConsumptionReportingConfiguration) IsSet() bool {
return v.isSet
}
func (v *NullableConsumptionReportingConfiguration) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableConsumptionReportingConfiguration(val *ConsumptionReportingConfiguration) *NullableConsumptionReportingConfiguration {
return &NullableConsumptionReportingConfiguration{value: val, isSet: true}
}
func (v NullableConsumptionReportingConfiguration) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableConsumptionReportingConfiguration) 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

搜索帮助