代码拉取完成,页面将自动刷新
/*
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"
)
// checks if the LocationReportingConfiguration type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &LocationReportingConfiguration{}
// LocationReportingConfiguration struct for LocationReportingConfiguration
type LocationReportingConfiguration struct {
CurrentLocation bool `json:"currentLocation"`
OneTime *bool `json:"oneTime,omitempty"`
Accuracy *LocationAccuracy `json:"accuracy,omitempty"`
N3gppAccuracy *LocationAccuracy `json:"n3gppAccuracy,omitempty"`
}
type _LocationReportingConfiguration LocationReportingConfiguration
// NewLocationReportingConfiguration instantiates a new LocationReportingConfiguration 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 NewLocationReportingConfiguration(currentLocation bool) *LocationReportingConfiguration {
this := LocationReportingConfiguration{}
this.CurrentLocation = currentLocation
return &this
}
// NewLocationReportingConfigurationWithDefaults instantiates a new LocationReportingConfiguration 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 NewLocationReportingConfigurationWithDefaults() *LocationReportingConfiguration {
this := LocationReportingConfiguration{}
return &this
}
// GetCurrentLocation returns the CurrentLocation field value
func (o *LocationReportingConfiguration) GetCurrentLocation() bool {
if o == nil {
var ret bool
return ret
}
return o.CurrentLocation
}
// GetCurrentLocationOk returns a tuple with the CurrentLocation field value
// and a boolean to check if the value has been set.
func (o *LocationReportingConfiguration) GetCurrentLocationOk() (*bool, bool) {
if o == nil {
return nil, false
}
return &o.CurrentLocation, true
}
// SetCurrentLocation sets field value
func (o *LocationReportingConfiguration) SetCurrentLocation(v bool) {
o.CurrentLocation = v
}
// GetOneTime returns the OneTime field value if set, zero value otherwise.
func (o *LocationReportingConfiguration) GetOneTime() bool {
if o == nil || IsNil(o.OneTime) {
var ret bool
return ret
}
return *o.OneTime
}
// GetOneTimeOk returns a tuple with the OneTime field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *LocationReportingConfiguration) GetOneTimeOk() (*bool, bool) {
if o == nil || IsNil(o.OneTime) {
return nil, false
}
return o.OneTime, true
}
// HasOneTime returns a boolean if a field has been set.
func (o *LocationReportingConfiguration) HasOneTime() bool {
if o != nil && !IsNil(o.OneTime) {
return true
}
return false
}
// SetOneTime gets a reference to the given bool and assigns it to the OneTime field.
func (o *LocationReportingConfiguration) SetOneTime(v bool) {
o.OneTime = &v
}
// GetAccuracy returns the Accuracy field value if set, zero value otherwise.
func (o *LocationReportingConfiguration) GetAccuracy() LocationAccuracy {
if o == nil || IsNil(o.Accuracy) {
var ret LocationAccuracy
return ret
}
return *o.Accuracy
}
// GetAccuracyOk returns a tuple with the Accuracy field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *LocationReportingConfiguration) GetAccuracyOk() (*LocationAccuracy, bool) {
if o == nil || IsNil(o.Accuracy) {
return nil, false
}
return o.Accuracy, true
}
// HasAccuracy returns a boolean if a field has been set.
func (o *LocationReportingConfiguration) HasAccuracy() bool {
if o != nil && !IsNil(o.Accuracy) {
return true
}
return false
}
// SetAccuracy gets a reference to the given LocationAccuracy and assigns it to the Accuracy field.
func (o *LocationReportingConfiguration) SetAccuracy(v LocationAccuracy) {
o.Accuracy = &v
}
// GetN3gppAccuracy returns the N3gppAccuracy field value if set, zero value otherwise.
func (o *LocationReportingConfiguration) GetN3gppAccuracy() LocationAccuracy {
if o == nil || IsNil(o.N3gppAccuracy) {
var ret LocationAccuracy
return ret
}
return *o.N3gppAccuracy
}
// GetN3gppAccuracyOk returns a tuple with the N3gppAccuracy field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *LocationReportingConfiguration) GetN3gppAccuracyOk() (*LocationAccuracy, bool) {
if o == nil || IsNil(o.N3gppAccuracy) {
return nil, false
}
return o.N3gppAccuracy, true
}
// HasN3gppAccuracy returns a boolean if a field has been set.
func (o *LocationReportingConfiguration) HasN3gppAccuracy() bool {
if o != nil && !IsNil(o.N3gppAccuracy) {
return true
}
return false
}
// SetN3gppAccuracy gets a reference to the given LocationAccuracy and assigns it to the N3gppAccuracy field.
func (o *LocationReportingConfiguration) SetN3gppAccuracy(v LocationAccuracy) {
o.N3gppAccuracy = &v
}
func (o LocationReportingConfiguration) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o LocationReportingConfiguration) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
toSerialize["currentLocation"] = o.CurrentLocation
if !IsNil(o.OneTime) {
toSerialize["oneTime"] = o.OneTime
}
if !IsNil(o.Accuracy) {
toSerialize["accuracy"] = o.Accuracy
}
if !IsNil(o.N3gppAccuracy) {
toSerialize["n3gppAccuracy"] = o.N3gppAccuracy
}
return toSerialize, nil
}
func (o *LocationReportingConfiguration) 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{
"currentLocation",
}
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)
}
}
varLocationReportingConfiguration := _LocationReportingConfiguration{}
err = json.Unmarshal(bytes, &varLocationReportingConfiguration)
if err != nil {
return err
}
*o = LocationReportingConfiguration(varLocationReportingConfiguration)
return err
}
type NullableLocationReportingConfiguration struct {
value *LocationReportingConfiguration
isSet bool
}
func (v NullableLocationReportingConfiguration) Get() *LocationReportingConfiguration {
return v.value
}
func (v *NullableLocationReportingConfiguration) Set(val *LocationReportingConfiguration) {
v.value = val
v.isSet = true
}
func (v NullableLocationReportingConfiguration) IsSet() bool {
return v.isSet
}
func (v *NullableLocationReportingConfiguration) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableLocationReportingConfiguration(val *LocationReportingConfiguration) *NullableLocationReportingConfiguration {
return &NullableLocationReportingConfiguration{value: val, isSet: true}
}
func (v NullableLocationReportingConfiguration) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableLocationReportingConfiguration) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。