1 Star 0 Fork 0

MrCoder/openapi

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
model_data_sampling_rule.go 4.58 KB
一键复制 编辑 原始数据 按行查看 历史
MrCoder 提交于 2年前 . update
/*
3gpp-data-reporting
API for 3GPP Data Reporting. © 2022, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
API version: 1.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package OpenAPI_DataReporting
import (
"encoding/json"
)
// checks if the DataSamplingRule type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &DataSamplingRule{}
// DataSamplingRule Instructions on how UE data is to be sampled by the data collection client.
type DataSamplingRule struct {
// string with format 'float' as defined in OpenAPI.
SamplingPeriod *float32 `json:"samplingPeriod,omitempty"`
LocationFilter *LocationArea5G `json:"locationFilter,omitempty"`
}
// NewDataSamplingRule instantiates a new DataSamplingRule 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 NewDataSamplingRule() *DataSamplingRule {
this := DataSamplingRule{}
return &this
}
// NewDataSamplingRuleWithDefaults instantiates a new DataSamplingRule 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 NewDataSamplingRuleWithDefaults() *DataSamplingRule {
this := DataSamplingRule{}
return &this
}
// GetSamplingPeriod returns the SamplingPeriod field value if set, zero value otherwise.
func (o *DataSamplingRule) GetSamplingPeriod() float32 {
if o == nil || IsNil(o.SamplingPeriod) {
var ret float32
return ret
}
return *o.SamplingPeriod
}
// GetSamplingPeriodOk returns a tuple with the SamplingPeriod field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DataSamplingRule) GetSamplingPeriodOk() (*float32, bool) {
if o == nil || IsNil(o.SamplingPeriod) {
return nil, false
}
return o.SamplingPeriod, true
}
// HasSamplingPeriod returns a boolean if a field has been set.
func (o *DataSamplingRule) HasSamplingPeriod() bool {
if o != nil && !IsNil(o.SamplingPeriod) {
return true
}
return false
}
// SetSamplingPeriod gets a reference to the given float32 and assigns it to the SamplingPeriod field.
func (o *DataSamplingRule) SetSamplingPeriod(v float32) {
o.SamplingPeriod = &v
}
// GetLocationFilter returns the LocationFilter field value if set, zero value otherwise.
func (o *DataSamplingRule) GetLocationFilter() LocationArea5G {
if o == nil || IsNil(o.LocationFilter) {
var ret LocationArea5G
return ret
}
return *o.LocationFilter
}
// GetLocationFilterOk returns a tuple with the LocationFilter field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DataSamplingRule) GetLocationFilterOk() (*LocationArea5G, bool) {
if o == nil || IsNil(o.LocationFilter) {
return nil, false
}
return o.LocationFilter, true
}
// HasLocationFilter returns a boolean if a field has been set.
func (o *DataSamplingRule) HasLocationFilter() bool {
if o != nil && !IsNil(o.LocationFilter) {
return true
}
return false
}
// SetLocationFilter gets a reference to the given LocationArea5G and assigns it to the LocationFilter field.
func (o *DataSamplingRule) SetLocationFilter(v LocationArea5G) {
o.LocationFilter = &v
}
func (o DataSamplingRule) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o DataSamplingRule) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.SamplingPeriod) {
toSerialize["samplingPeriod"] = o.SamplingPeriod
}
if !IsNil(o.LocationFilter) {
toSerialize["locationFilter"] = o.LocationFilter
}
return toSerialize, nil
}
type NullableDataSamplingRule struct {
value *DataSamplingRule
isSet bool
}
func (v NullableDataSamplingRule) Get() *DataSamplingRule {
return v.value
}
func (v *NullableDataSamplingRule) Set(val *DataSamplingRule) {
v.value = val
v.isSet = true
}
func (v NullableDataSamplingRule) IsSet() bool {
return v.isSet
}
func (v *NullableDataSamplingRule) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableDataSamplingRule(val *DataSamplingRule) *NullableDataSamplingRule {
return &NullableDataSamplingRule{value: val, isSet: true}
}
func (v NullableDataSamplingRule) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableDataSamplingRule) 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

搜索帮助