influx-cli/api/model_metadata_backup.gen.go

166 lines
3.8 KiB
Go

/*
* 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"
"os"
)
// MetadataBackup struct for MetadataBackup
type MetadataBackup struct {
Kv *os.File `json:"kv" yaml:"kv"`
Sql *os.File `json:"sql" yaml:"sql"`
Buckets []BucketMetadataManifest `json:"buckets" yaml:"buckets"`
}
// NewMetadataBackup instantiates a new MetadataBackup 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 NewMetadataBackup(kv *os.File, sql *os.File, buckets []BucketMetadataManifest) *MetadataBackup {
this := MetadataBackup{}
this.Kv = kv
this.Sql = sql
this.Buckets = buckets
return &this
}
// NewMetadataBackupWithDefaults instantiates a new MetadataBackup 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 NewMetadataBackupWithDefaults() *MetadataBackup {
this := MetadataBackup{}
return &this
}
// GetKv returns the Kv field value
func (o *MetadataBackup) GetKv() *os.File {
if o == nil {
var ret *os.File
return ret
}
return o.Kv
}
// GetKvOk returns a tuple with the Kv field value
// and a boolean to check if the value has been set.
func (o *MetadataBackup) GetKvOk() (**os.File, bool) {
if o == nil {
return nil, false
}
return &o.Kv, true
}
// SetKv sets field value
func (o *MetadataBackup) SetKv(v *os.File) {
o.Kv = v
}
// GetSql returns the Sql field value
func (o *MetadataBackup) GetSql() *os.File {
if o == nil {
var ret *os.File
return ret
}
return o.Sql
}
// GetSqlOk returns a tuple with the Sql field value
// and a boolean to check if the value has been set.
func (o *MetadataBackup) GetSqlOk() (**os.File, bool) {
if o == nil {
return nil, false
}
return &o.Sql, true
}
// SetSql sets field value
func (o *MetadataBackup) SetSql(v *os.File) {
o.Sql = v
}
// GetBuckets returns the Buckets field value
func (o *MetadataBackup) GetBuckets() []BucketMetadataManifest {
if o == nil {
var ret []BucketMetadataManifest
return ret
}
return o.Buckets
}
// GetBucketsOk returns a tuple with the Buckets field value
// and a boolean to check if the value has been set.
func (o *MetadataBackup) GetBucketsOk() (*[]BucketMetadataManifest, bool) {
if o == nil {
return nil, false
}
return &o.Buckets, true
}
// SetBuckets sets field value
func (o *MetadataBackup) SetBuckets(v []BucketMetadataManifest) {
o.Buckets = v
}
func (o MetadataBackup) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if true {
toSerialize["kv"] = o.Kv
}
if true {
toSerialize["sql"] = o.Sql
}
if true {
toSerialize["buckets"] = o.Buckets
}
return json.Marshal(toSerialize)
}
type NullableMetadataBackup struct {
value *MetadataBackup
isSet bool
}
func (v NullableMetadataBackup) Get() *MetadataBackup {
return v.value
}
func (v *NullableMetadataBackup) Set(val *MetadataBackup) {
v.value = val
v.isSet = true
}
func (v NullableMetadataBackup) IsSet() bool {
return v.isSet
}
func (v *NullableMetadataBackup) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableMetadataBackup(val *MetadataBackup) *NullableMetadataBackup {
return &NullableMetadataBackup{value: val, isSet: true}
}
func (v NullableMetadataBackup) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableMetadataBackup) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}