Files
sdk/model_o11y_postable_clusters.go

376 lines
10 KiB
Go

/*
Hanzo Cloud API
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
API version: v1
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package hanzoai
import (
"encoding/json"
)
// checks if the O11yPostableClusters type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &O11yPostableClusters{}
// O11yPostableClusters struct for O11yPostableClusters
type O11yPostableClusters struct {
End *int64 `json:"end,omitempty"`
Filter *O11yFilter `json:"filter,omitempty"`
GroupBy []O11yGroupByKey `json:"groupBy,omitempty"`
Limit *int64 `json:"limit,omitempty"`
Offset *int64 `json:"offset,omitempty"`
OrderBy *O11yQuerybuildertypesv5OrderBy `json:"orderBy,omitempty"`
Start *int64 `json:"start,omitempty"`
AdditionalProperties map[string]interface{}
}
type _O11yPostableClusters O11yPostableClusters
// NewO11yPostableClusters instantiates a new O11yPostableClusters 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 NewO11yPostableClusters() *O11yPostableClusters {
this := O11yPostableClusters{}
return &this
}
// NewO11yPostableClustersWithDefaults instantiates a new O11yPostableClusters 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 NewO11yPostableClustersWithDefaults() *O11yPostableClusters {
this := O11yPostableClusters{}
return &this
}
// GetEnd returns the End field value if set, zero value otherwise.
func (o *O11yPostableClusters) GetEnd() int64 {
if o == nil || IsNil(o.End) {
var ret int64
return ret
}
return *o.End
}
// GetEndOk returns a tuple with the End field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *O11yPostableClusters) GetEndOk() (*int64, bool) {
if o == nil || IsNil(o.End) {
return nil, false
}
return o.End, true
}
// HasEnd returns a boolean if a field has been set.
func (o *O11yPostableClusters) HasEnd() bool {
if o != nil && !IsNil(o.End) {
return true
}
return false
}
// SetEnd gets a reference to the given int64 and assigns it to the End field.
func (o *O11yPostableClusters) SetEnd(v int64) {
o.End = &v
}
// GetFilter returns the Filter field value if set, zero value otherwise.
func (o *O11yPostableClusters) GetFilter() O11yFilter {
if o == nil || IsNil(o.Filter) {
var ret O11yFilter
return ret
}
return *o.Filter
}
// GetFilterOk returns a tuple with the Filter field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *O11yPostableClusters) GetFilterOk() (*O11yFilter, bool) {
if o == nil || IsNil(o.Filter) {
return nil, false
}
return o.Filter, true
}
// HasFilter returns a boolean if a field has been set.
func (o *O11yPostableClusters) HasFilter() bool {
if o != nil && !IsNil(o.Filter) {
return true
}
return false
}
// SetFilter gets a reference to the given O11yFilter and assigns it to the Filter field.
func (o *O11yPostableClusters) SetFilter(v O11yFilter) {
o.Filter = &v
}
// GetGroupBy returns the GroupBy field value if set, zero value otherwise.
func (o *O11yPostableClusters) GetGroupBy() []O11yGroupByKey {
if o == nil || IsNil(o.GroupBy) {
var ret []O11yGroupByKey
return ret
}
return o.GroupBy
}
// GetGroupByOk returns a tuple with the GroupBy field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *O11yPostableClusters) GetGroupByOk() ([]O11yGroupByKey, bool) {
if o == nil || IsNil(o.GroupBy) {
return nil, false
}
return o.GroupBy, true
}
// HasGroupBy returns a boolean if a field has been set.
func (o *O11yPostableClusters) HasGroupBy() bool {
if o != nil && !IsNil(o.GroupBy) {
return true
}
return false
}
// SetGroupBy gets a reference to the given []O11yGroupByKey and assigns it to the GroupBy field.
func (o *O11yPostableClusters) SetGroupBy(v []O11yGroupByKey) {
o.GroupBy = v
}
// GetLimit returns the Limit field value if set, zero value otherwise.
func (o *O11yPostableClusters) GetLimit() int64 {
if o == nil || IsNil(o.Limit) {
var ret int64
return ret
}
return *o.Limit
}
// GetLimitOk returns a tuple with the Limit field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *O11yPostableClusters) GetLimitOk() (*int64, bool) {
if o == nil || IsNil(o.Limit) {
return nil, false
}
return o.Limit, true
}
// HasLimit returns a boolean if a field has been set.
func (o *O11yPostableClusters) HasLimit() bool {
if o != nil && !IsNil(o.Limit) {
return true
}
return false
}
// SetLimit gets a reference to the given int64 and assigns it to the Limit field.
func (o *O11yPostableClusters) SetLimit(v int64) {
o.Limit = &v
}
// GetOffset returns the Offset field value if set, zero value otherwise.
func (o *O11yPostableClusters) GetOffset() int64 {
if o == nil || IsNil(o.Offset) {
var ret int64
return ret
}
return *o.Offset
}
// GetOffsetOk returns a tuple with the Offset field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *O11yPostableClusters) GetOffsetOk() (*int64, bool) {
if o == nil || IsNil(o.Offset) {
return nil, false
}
return o.Offset, true
}
// HasOffset returns a boolean if a field has been set.
func (o *O11yPostableClusters) HasOffset() bool {
if o != nil && !IsNil(o.Offset) {
return true
}
return false
}
// SetOffset gets a reference to the given int64 and assigns it to the Offset field.
func (o *O11yPostableClusters) SetOffset(v int64) {
o.Offset = &v
}
// GetOrderBy returns the OrderBy field value if set, zero value otherwise.
func (o *O11yPostableClusters) GetOrderBy() O11yQuerybuildertypesv5OrderBy {
if o == nil || IsNil(o.OrderBy) {
var ret O11yQuerybuildertypesv5OrderBy
return ret
}
return *o.OrderBy
}
// GetOrderByOk returns a tuple with the OrderBy field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *O11yPostableClusters) GetOrderByOk() (*O11yQuerybuildertypesv5OrderBy, bool) {
if o == nil || IsNil(o.OrderBy) {
return nil, false
}
return o.OrderBy, true
}
// HasOrderBy returns a boolean if a field has been set.
func (o *O11yPostableClusters) HasOrderBy() bool {
if o != nil && !IsNil(o.OrderBy) {
return true
}
return false
}
// SetOrderBy gets a reference to the given O11yQuerybuildertypesv5OrderBy and assigns it to the OrderBy field.
func (o *O11yPostableClusters) SetOrderBy(v O11yQuerybuildertypesv5OrderBy) {
o.OrderBy = &v
}
// GetStart returns the Start field value if set, zero value otherwise.
func (o *O11yPostableClusters) GetStart() int64 {
if o == nil || IsNil(o.Start) {
var ret int64
return ret
}
return *o.Start
}
// GetStartOk returns a tuple with the Start field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *O11yPostableClusters) GetStartOk() (*int64, bool) {
if o == nil || IsNil(o.Start) {
return nil, false
}
return o.Start, true
}
// HasStart returns a boolean if a field has been set.
func (o *O11yPostableClusters) HasStart() bool {
if o != nil && !IsNil(o.Start) {
return true
}
return false
}
// SetStart gets a reference to the given int64 and assigns it to the Start field.
func (o *O11yPostableClusters) SetStart(v int64) {
o.Start = &v
}
func (o O11yPostableClusters) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o O11yPostableClusters) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.End) {
toSerialize["end"] = o.End
}
if !IsNil(o.Filter) {
toSerialize["filter"] = o.Filter
}
if !IsNil(o.GroupBy) {
toSerialize["groupBy"] = o.GroupBy
}
if !IsNil(o.Limit) {
toSerialize["limit"] = o.Limit
}
if !IsNil(o.Offset) {
toSerialize["offset"] = o.Offset
}
if !IsNil(o.OrderBy) {
toSerialize["orderBy"] = o.OrderBy
}
if !IsNil(o.Start) {
toSerialize["start"] = o.Start
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *O11yPostableClusters) UnmarshalJSON(data []byte) (err error) {
varO11yPostableClusters := _O11yPostableClusters{}
err = json.Unmarshal(data, &varO11yPostableClusters)
if err != nil {
return err
}
*o = O11yPostableClusters(varO11yPostableClusters)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "end")
delete(additionalProperties, "filter")
delete(additionalProperties, "groupBy")
delete(additionalProperties, "limit")
delete(additionalProperties, "offset")
delete(additionalProperties, "orderBy")
delete(additionalProperties, "start")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableO11yPostableClusters struct {
value *O11yPostableClusters
isSet bool
}
func (v NullableO11yPostableClusters) Get() *O11yPostableClusters {
return v.value
}
func (v *NullableO11yPostableClusters) Set(val *O11yPostableClusters) {
v.value = val
v.isSet = true
}
func (v NullableO11yPostableClusters) IsSet() bool {
return v.isSet
}
func (v *NullableO11yPostableClusters) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableO11yPostableClusters(val *O11yPostableClusters) *NullableO11yPostableClusters {
return &NullableO11yPostableClusters{value: val, isSet: true}
}
func (v NullableO11yPostableClusters) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableO11yPostableClusters) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}