Files
sdk/model_o11y_host_list_request.go

378 lines
9.9 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 O11yHostListRequest type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &O11yHostListRequest{}
// O11yHostListRequest struct for O11yHostListRequest
type O11yHostListRequest struct {
// epoch time in ms
End *int64 `json:"end,omitempty"`
Filters *O11yFilterSet `json:"filters,omitempty"`
GroupBy []O11yAttributeKey `json:"groupBy,omitempty"`
Limit *int64 `json:"limit,omitempty"`
Offset *int64 `json:"offset,omitempty"`
OrderBy *O11yOrderBy `json:"orderBy,omitempty"`
// epoch time in ms
Start *int64 `json:"start,omitempty"`
AdditionalProperties map[string]interface{}
}
type _O11yHostListRequest O11yHostListRequest
// NewO11yHostListRequest instantiates a new O11yHostListRequest 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 NewO11yHostListRequest() *O11yHostListRequest {
this := O11yHostListRequest{}
return &this
}
// NewO11yHostListRequestWithDefaults instantiates a new O11yHostListRequest 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 NewO11yHostListRequestWithDefaults() *O11yHostListRequest {
this := O11yHostListRequest{}
return &this
}
// GetEnd returns the End field value if set, zero value otherwise.
func (o *O11yHostListRequest) 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 *O11yHostListRequest) 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 *O11yHostListRequest) 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 *O11yHostListRequest) SetEnd(v int64) {
o.End = &v
}
// GetFilters returns the Filters field value if set, zero value otherwise.
func (o *O11yHostListRequest) GetFilters() O11yFilterSet {
if o == nil || IsNil(o.Filters) {
var ret O11yFilterSet
return ret
}
return *o.Filters
}
// GetFiltersOk returns a tuple with the Filters field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *O11yHostListRequest) GetFiltersOk() (*O11yFilterSet, bool) {
if o == nil || IsNil(o.Filters) {
return nil, false
}
return o.Filters, true
}
// HasFilters returns a boolean if a field has been set.
func (o *O11yHostListRequest) HasFilters() bool {
if o != nil && !IsNil(o.Filters) {
return true
}
return false
}
// SetFilters gets a reference to the given O11yFilterSet and assigns it to the Filters field.
func (o *O11yHostListRequest) SetFilters(v O11yFilterSet) {
o.Filters = &v
}
// GetGroupBy returns the GroupBy field value if set, zero value otherwise.
func (o *O11yHostListRequest) GetGroupBy() []O11yAttributeKey {
if o == nil || IsNil(o.GroupBy) {
var ret []O11yAttributeKey
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 *O11yHostListRequest) GetGroupByOk() ([]O11yAttributeKey, 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 *O11yHostListRequest) HasGroupBy() bool {
if o != nil && !IsNil(o.GroupBy) {
return true
}
return false
}
// SetGroupBy gets a reference to the given []O11yAttributeKey and assigns it to the GroupBy field.
func (o *O11yHostListRequest) SetGroupBy(v []O11yAttributeKey) {
o.GroupBy = v
}
// GetLimit returns the Limit field value if set, zero value otherwise.
func (o *O11yHostListRequest) 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 *O11yHostListRequest) 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 *O11yHostListRequest) 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 *O11yHostListRequest) SetLimit(v int64) {
o.Limit = &v
}
// GetOffset returns the Offset field value if set, zero value otherwise.
func (o *O11yHostListRequest) 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 *O11yHostListRequest) 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 *O11yHostListRequest) 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 *O11yHostListRequest) SetOffset(v int64) {
o.Offset = &v
}
// GetOrderBy returns the OrderBy field value if set, zero value otherwise.
func (o *O11yHostListRequest) GetOrderBy() O11yOrderBy {
if o == nil || IsNil(o.OrderBy) {
var ret O11yOrderBy
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 *O11yHostListRequest) GetOrderByOk() (*O11yOrderBy, 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 *O11yHostListRequest) HasOrderBy() bool {
if o != nil && !IsNil(o.OrderBy) {
return true
}
return false
}
// SetOrderBy gets a reference to the given O11yOrderBy and assigns it to the OrderBy field.
func (o *O11yHostListRequest) SetOrderBy(v O11yOrderBy) {
o.OrderBy = &v
}
// GetStart returns the Start field value if set, zero value otherwise.
func (o *O11yHostListRequest) 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 *O11yHostListRequest) 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 *O11yHostListRequest) 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 *O11yHostListRequest) SetStart(v int64) {
o.Start = &v
}
func (o O11yHostListRequest) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o O11yHostListRequest) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.End) {
toSerialize["end"] = o.End
}
if !IsNil(o.Filters) {
toSerialize["filters"] = o.Filters
}
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 *O11yHostListRequest) UnmarshalJSON(data []byte) (err error) {
varO11yHostListRequest := _O11yHostListRequest{}
err = json.Unmarshal(data, &varO11yHostListRequest)
if err != nil {
return err
}
*o = O11yHostListRequest(varO11yHostListRequest)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "end")
delete(additionalProperties, "filters")
delete(additionalProperties, "groupBy")
delete(additionalProperties, "limit")
delete(additionalProperties, "offset")
delete(additionalProperties, "orderBy")
delete(additionalProperties, "start")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableO11yHostListRequest struct {
value *O11yHostListRequest
isSet bool
}
func (v NullableO11yHostListRequest) Get() *O11yHostListRequest {
return v.value
}
func (v *NullableO11yHostListRequest) Set(val *O11yHostListRequest) {
v.value = val
v.isSet = true
}
func (v NullableO11yHostListRequest) IsSet() bool {
return v.isSet
}
func (v *NullableO11yHostListRequest) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableO11yHostListRequest(val *O11yHostListRequest) *NullableO11yHostListRequest {
return &NullableO11yHostListRequest{value: val, isSet: true}
}
func (v NullableO11yHostListRequest) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableO11yHostListRequest) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}