Files
sdk/model_o11y_postable_deployments.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 O11yPostableDeployments type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &O11yPostableDeployments{}
// O11yPostableDeployments struct for O11yPostableDeployments
type O11yPostableDeployments 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 _O11yPostableDeployments O11yPostableDeployments
// NewO11yPostableDeployments instantiates a new O11yPostableDeployments 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 NewO11yPostableDeployments() *O11yPostableDeployments {
this := O11yPostableDeployments{}
return &this
}
// NewO11yPostableDeploymentsWithDefaults instantiates a new O11yPostableDeployments 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 NewO11yPostableDeploymentsWithDefaults() *O11yPostableDeployments {
this := O11yPostableDeployments{}
return &this
}
// GetEnd returns the End field value if set, zero value otherwise.
func (o *O11yPostableDeployments) 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 *O11yPostableDeployments) 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 *O11yPostableDeployments) 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 *O11yPostableDeployments) SetEnd(v int64) {
o.End = &v
}
// GetFilter returns the Filter field value if set, zero value otherwise.
func (o *O11yPostableDeployments) 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 *O11yPostableDeployments) 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 *O11yPostableDeployments) 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 *O11yPostableDeployments) SetFilter(v O11yFilter) {
o.Filter = &v
}
// GetGroupBy returns the GroupBy field value if set, zero value otherwise.
func (o *O11yPostableDeployments) 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 *O11yPostableDeployments) 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 *O11yPostableDeployments) 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 *O11yPostableDeployments) SetGroupBy(v []O11yGroupByKey) {
o.GroupBy = v
}
// GetLimit returns the Limit field value if set, zero value otherwise.
func (o *O11yPostableDeployments) 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 *O11yPostableDeployments) 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 *O11yPostableDeployments) 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 *O11yPostableDeployments) SetLimit(v int64) {
o.Limit = &v
}
// GetOffset returns the Offset field value if set, zero value otherwise.
func (o *O11yPostableDeployments) 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 *O11yPostableDeployments) 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 *O11yPostableDeployments) 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 *O11yPostableDeployments) SetOffset(v int64) {
o.Offset = &v
}
// GetOrderBy returns the OrderBy field value if set, zero value otherwise.
func (o *O11yPostableDeployments) 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 *O11yPostableDeployments) 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 *O11yPostableDeployments) 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 *O11yPostableDeployments) SetOrderBy(v O11yQuerybuildertypesv5OrderBy) {
o.OrderBy = &v
}
// GetStart returns the Start field value if set, zero value otherwise.
func (o *O11yPostableDeployments) 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 *O11yPostableDeployments) 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 *O11yPostableDeployments) 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 *O11yPostableDeployments) SetStart(v int64) {
o.Start = &v
}
func (o O11yPostableDeployments) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o O11yPostableDeployments) 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 *O11yPostableDeployments) UnmarshalJSON(data []byte) (err error) {
varO11yPostableDeployments := _O11yPostableDeployments{}
err = json.Unmarshal(data, &varO11yPostableDeployments)
if err != nil {
return err
}
*o = O11yPostableDeployments(varO11yPostableDeployments)
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 NullableO11yPostableDeployments struct {
value *O11yPostableDeployments
isSet bool
}
func (v NullableO11yPostableDeployments) Get() *O11yPostableDeployments {
return v.value
}
func (v *NullableO11yPostableDeployments) Set(val *O11yPostableDeployments) {
v.value = val
v.isSet = true
}
func (v NullableO11yPostableDeployments) IsSet() bool {
return v.isSet
}
func (v *NullableO11yPostableDeployments) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableO11yPostableDeployments(val *O11yPostableDeployments) *NullableO11yPostableDeployments {
return &NullableO11yPostableDeployments{value: val, isSet: true}
}
func (v NullableO11yPostableDeployments) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableO11yPostableDeployments) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}