influx-cli/api/model_buckets.gen.go

150 lines
3.5 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"
)
// Buckets struct for Buckets
type Buckets struct {
Links *Links `json:"links,omitempty" yaml:"links,omitempty"`
Buckets *[]Bucket `json:"buckets,omitempty" yaml:"buckets,omitempty"`
}
// NewBuckets instantiates a new Buckets 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 NewBuckets() *Buckets {
this := Buckets{}
return &this
}
// NewBucketsWithDefaults instantiates a new Buckets 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 NewBucketsWithDefaults() *Buckets {
this := Buckets{}
return &this
}
// GetLinks returns the Links field value if set, zero value otherwise.
func (o *Buckets) GetLinks() Links {
if o == nil || o.Links == nil {
var ret Links
return ret
}
return *o.Links
}
// GetLinksOk returns a tuple with the Links field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Buckets) GetLinksOk() (*Links, bool) {
if o == nil || o.Links == nil {
return nil, false
}
return o.Links, true
}
// HasLinks returns a boolean if a field has been set.
func (o *Buckets) HasLinks() bool {
if o != nil && o.Links != nil {
return true
}
return false
}
// SetLinks gets a reference to the given Links and assigns it to the Links field.
func (o *Buckets) SetLinks(v Links) {
o.Links = &v
}
// GetBuckets returns the Buckets field value if set, zero value otherwise.
func (o *Buckets) GetBuckets() []Bucket {
if o == nil || o.Buckets == nil {
var ret []Bucket
return ret
}
return *o.Buckets
}
// GetBucketsOk returns a tuple with the Buckets field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Buckets) GetBucketsOk() (*[]Bucket, bool) {
if o == nil || o.Buckets == nil {
return nil, false
}
return o.Buckets, true
}
// HasBuckets returns a boolean if a field has been set.
func (o *Buckets) HasBuckets() bool {
if o != nil && o.Buckets != nil {
return true
}
return false
}
// SetBuckets gets a reference to the given []Bucket and assigns it to the Buckets field.
func (o *Buckets) SetBuckets(v []Bucket) {
o.Buckets = &v
}
func (o Buckets) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if o.Links != nil {
toSerialize["links"] = o.Links
}
if o.Buckets != nil {
toSerialize["buckets"] = o.Buckets
}
return json.Marshal(toSerialize)
}
type NullableBuckets struct {
value *Buckets
isSet bool
}
func (v NullableBuckets) Get() *Buckets {
return v.value
}
func (v *NullableBuckets) Set(val *Buckets) {
v.value = val
v.isSet = true
}
func (v NullableBuckets) IsSet() bool {
return v.isSet
}
func (v *NullableBuckets) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableBuckets(val *Buckets) *NullableBuckets {
return &NullableBuckets{value: val, isSet: true}
}
func (v NullableBuckets) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableBuckets) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}