1 Star 0 Fork 0

MrCoder / openapi

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
model_m1_eas_relocation_requirements.go 8.43 KB
一键复制 编辑 原始数据 按行查看 历史
MrCoder 提交于 2023-12-22 15:27 . update
/*
M1_EdgeResourcesProvisioning
5GMS AF M1 Edge Resources Provisioning API © 2023, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
API version: 2.1.2
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package OpenAPI_M1_EdgeResourcesProvisioning
import (
"encoding/json"
"fmt"
)
// checks if the M1EASRelocationRequirements type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &M1EASRelocationRequirements{}
// M1EASRelocationRequirements Relocation requirements of an EAS.
type M1EASRelocationRequirements struct {
Tolerance EASRelocationTolerance `json:"tolerance"`
// Unsigned Integer, i.e. only value 0 and integers above 0 are permissible with the OpenAPI 'nullable: true' property.
MaxInterruptionDuration NullableInt32 `json:"maxInterruptionDuration,omitempty"`
// Unsigned Integer, i.e. only value 0 and integers above 0 are permissible with the OpenAPI 'nullable: true' property.
MaxResponseTimeDifference NullableInt32 `json:"maxResponseTimeDifference,omitempty"`
}
type _M1EASRelocationRequirements M1EASRelocationRequirements
// NewM1EASRelocationRequirements instantiates a new M1EASRelocationRequirements 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 NewM1EASRelocationRequirements(tolerance EASRelocationTolerance) *M1EASRelocationRequirements {
this := M1EASRelocationRequirements{}
this.Tolerance = tolerance
return &this
}
// NewM1EASRelocationRequirementsWithDefaults instantiates a new M1EASRelocationRequirements 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 NewM1EASRelocationRequirementsWithDefaults() *M1EASRelocationRequirements {
this := M1EASRelocationRequirements{}
return &this
}
// GetTolerance returns the Tolerance field value
func (o *M1EASRelocationRequirements) GetTolerance() EASRelocationTolerance {
if o == nil {
var ret EASRelocationTolerance
return ret
}
return o.Tolerance
}
// GetToleranceOk returns a tuple with the Tolerance field value
// and a boolean to check if the value has been set.
func (o *M1EASRelocationRequirements) GetToleranceOk() (*EASRelocationTolerance, bool) {
if o == nil {
return nil, false
}
return &o.Tolerance, true
}
// SetTolerance sets field value
func (o *M1EASRelocationRequirements) SetTolerance(v EASRelocationTolerance) {
o.Tolerance = v
}
// GetMaxInterruptionDuration returns the MaxInterruptionDuration field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *M1EASRelocationRequirements) GetMaxInterruptionDuration() int32 {
if o == nil || IsNil(o.MaxInterruptionDuration.Get()) {
var ret int32
return ret
}
return *o.MaxInterruptionDuration.Get()
}
// GetMaxInterruptionDurationOk returns a tuple with the MaxInterruptionDuration 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 *M1EASRelocationRequirements) GetMaxInterruptionDurationOk() (*int32, bool) {
if o == nil {
return nil, false
}
return o.MaxInterruptionDuration.Get(), o.MaxInterruptionDuration.IsSet()
}
// HasMaxInterruptionDuration returns a boolean if a field has been set.
func (o *M1EASRelocationRequirements) HasMaxInterruptionDuration() bool {
if o != nil && o.MaxInterruptionDuration.IsSet() {
return true
}
return false
}
// SetMaxInterruptionDuration gets a reference to the given NullableInt32 and assigns it to the MaxInterruptionDuration field.
func (o *M1EASRelocationRequirements) SetMaxInterruptionDuration(v int32) {
o.MaxInterruptionDuration.Set(&v)
}
// SetMaxInterruptionDurationNil sets the value for MaxInterruptionDuration to be an explicit nil
func (o *M1EASRelocationRequirements) SetMaxInterruptionDurationNil() {
o.MaxInterruptionDuration.Set(nil)
}
// UnsetMaxInterruptionDuration ensures that no value is present for MaxInterruptionDuration, not even an explicit nil
func (o *M1EASRelocationRequirements) UnsetMaxInterruptionDuration() {
o.MaxInterruptionDuration.Unset()
}
// GetMaxResponseTimeDifference returns the MaxResponseTimeDifference field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *M1EASRelocationRequirements) GetMaxResponseTimeDifference() int32 {
if o == nil || IsNil(o.MaxResponseTimeDifference.Get()) {
var ret int32
return ret
}
return *o.MaxResponseTimeDifference.Get()
}
// GetMaxResponseTimeDifferenceOk returns a tuple with the MaxResponseTimeDifference 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 *M1EASRelocationRequirements) GetMaxResponseTimeDifferenceOk() (*int32, bool) {
if o == nil {
return nil, false
}
return o.MaxResponseTimeDifference.Get(), o.MaxResponseTimeDifference.IsSet()
}
// HasMaxResponseTimeDifference returns a boolean if a field has been set.
func (o *M1EASRelocationRequirements) HasMaxResponseTimeDifference() bool {
if o != nil && o.MaxResponseTimeDifference.IsSet() {
return true
}
return false
}
// SetMaxResponseTimeDifference gets a reference to the given NullableInt32 and assigns it to the MaxResponseTimeDifference field.
func (o *M1EASRelocationRequirements) SetMaxResponseTimeDifference(v int32) {
o.MaxResponseTimeDifference.Set(&v)
}
// SetMaxResponseTimeDifferenceNil sets the value for MaxResponseTimeDifference to be an explicit nil
func (o *M1EASRelocationRequirements) SetMaxResponseTimeDifferenceNil() {
o.MaxResponseTimeDifference.Set(nil)
}
// UnsetMaxResponseTimeDifference ensures that no value is present for MaxResponseTimeDifference, not even an explicit nil
func (o *M1EASRelocationRequirements) UnsetMaxResponseTimeDifference() {
o.MaxResponseTimeDifference.Unset()
}
func (o M1EASRelocationRequirements) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o M1EASRelocationRequirements) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
toSerialize["tolerance"] = o.Tolerance
if o.MaxInterruptionDuration.IsSet() {
toSerialize["maxInterruptionDuration"] = o.MaxInterruptionDuration.Get()
}
if o.MaxResponseTimeDifference.IsSet() {
toSerialize["maxResponseTimeDifference"] = o.MaxResponseTimeDifference.Get()
}
return toSerialize, nil
}
func (o *M1EASRelocationRequirements) 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{
"tolerance",
}
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)
}
}
varM1EASRelocationRequirements := _M1EASRelocationRequirements{}
err = json.Unmarshal(bytes, &varM1EASRelocationRequirements)
if err != nil {
return err
}
*o = M1EASRelocationRequirements(varM1EASRelocationRequirements)
return err
}
type NullableM1EASRelocationRequirements struct {
value *M1EASRelocationRequirements
isSet bool
}
func (v NullableM1EASRelocationRequirements) Get() *M1EASRelocationRequirements {
return v.value
}
func (v *NullableM1EASRelocationRequirements) Set(val *M1EASRelocationRequirements) {
v.value = val
v.isSet = true
}
func (v NullableM1EASRelocationRequirements) IsSet() bool {
return v.isSet
}
func (v *NullableM1EASRelocationRequirements) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableM1EASRelocationRequirements(val *M1EASRelocationRequirements) *NullableM1EASRelocationRequirements {
return &NullableM1EASRelocationRequirements{value: val, isSet: true}
}
func (v NullableM1EASRelocationRequirements) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableM1EASRelocationRequirements) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}
Go
1
https://gitee.com/konglinglong/openapi.git
git@gitee.com:konglinglong/openapi.git
konglinglong
openapi
openapi
e403a3c726a4

搜索帮助