/* * Subset of Influx API covered by Influx CLI * * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * API version: 2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package api import ( "encoding/json" ) // BucketShardMapping struct for BucketShardMapping type BucketShardMapping struct { OldId *int64 `json:"oldId,omitempty"` NewId *int64 `json:"newId,omitempty"` } // NewBucketShardMapping instantiates a new BucketShardMapping 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 NewBucketShardMapping() *BucketShardMapping { this := BucketShardMapping{} return &this } // NewBucketShardMappingWithDefaults instantiates a new BucketShardMapping 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 NewBucketShardMappingWithDefaults() *BucketShardMapping { this := BucketShardMapping{} return &this } // GetOldId returns the OldId field value if set, zero value otherwise. func (o *BucketShardMapping) GetOldId() int64 { if o == nil || o.OldId == nil { var ret int64 return ret } return *o.OldId } // GetOldIdOk returns a tuple with the OldId field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *BucketShardMapping) GetOldIdOk() (*int64, bool) { if o == nil || o.OldId == nil { return nil, false } return o.OldId, true } // HasOldId returns a boolean if a field has been set. func (o *BucketShardMapping) HasOldId() bool { if o != nil && o.OldId != nil { return true } return false } // SetOldId gets a reference to the given int64 and assigns it to the OldId field. func (o *BucketShardMapping) SetOldId(v int64) { o.OldId = &v } // GetNewId returns the NewId field value if set, zero value otherwise. func (o *BucketShardMapping) GetNewId() int64 { if o == nil || o.NewId == nil { var ret int64 return ret } return *o.NewId } // GetNewIdOk returns a tuple with the NewId field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *BucketShardMapping) GetNewIdOk() (*int64, bool) { if o == nil || o.NewId == nil { return nil, false } return o.NewId, true } // HasNewId returns a boolean if a field has been set. func (o *BucketShardMapping) HasNewId() bool { if o != nil && o.NewId != nil { return true } return false } // SetNewId gets a reference to the given int64 and assigns it to the NewId field. func (o *BucketShardMapping) SetNewId(v int64) { o.NewId = &v } func (o BucketShardMapping) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.OldId != nil { toSerialize["oldId"] = o.OldId } if o.NewId != nil { toSerialize["newId"] = o.NewId } return json.Marshal(toSerialize) } type NullableBucketShardMapping struct { value *BucketShardMapping isSet bool } func (v NullableBucketShardMapping) Get() *BucketShardMapping { return v.value } func (v *NullableBucketShardMapping) Set(val *BucketShardMapping) { v.value = val v.isSet = true } func (v NullableBucketShardMapping) IsSet() bool { return v.isSet } func (v *NullableBucketShardMapping) Unset() { v.value = nil v.isSet = false } func NewNullableBucketShardMapping(val *BucketShardMapping) *NullableBucketShardMapping { return &NullableBucketShardMapping{value: val, isSet: true} } func (v NullableBucketShardMapping) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableBucketShardMapping) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) }