mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
265 lines
8.0 KiB
Go
265 lines
8.0 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 O11yGettableFlamegraphTrace type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &O11yGettableFlamegraphTrace{}
|
|
|
|
// O11yGettableFlamegraphTrace struct for O11yGettableFlamegraphTrace
|
|
type O11yGettableFlamegraphTrace struct {
|
|
EndTimestampMillis *int64 `json:"endTimestampMillis,omitempty"`
|
|
HasMore *bool `json:"hasMore,omitempty"`
|
|
Spans [][]O11yFlamegraphSpan `json:"spans,omitempty"`
|
|
StartTimestampMillis *int64 `json:"startTimestampMillis,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _O11yGettableFlamegraphTrace O11yGettableFlamegraphTrace
|
|
|
|
// NewO11yGettableFlamegraphTrace instantiates a new O11yGettableFlamegraphTrace 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 NewO11yGettableFlamegraphTrace() *O11yGettableFlamegraphTrace {
|
|
this := O11yGettableFlamegraphTrace{}
|
|
return &this
|
|
}
|
|
|
|
// NewO11yGettableFlamegraphTraceWithDefaults instantiates a new O11yGettableFlamegraphTrace 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 NewO11yGettableFlamegraphTraceWithDefaults() *O11yGettableFlamegraphTrace {
|
|
this := O11yGettableFlamegraphTrace{}
|
|
return &this
|
|
}
|
|
|
|
// GetEndTimestampMillis returns the EndTimestampMillis field value if set, zero value otherwise.
|
|
func (o *O11yGettableFlamegraphTrace) GetEndTimestampMillis() int64 {
|
|
if o == nil || IsNil(o.EndTimestampMillis) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.EndTimestampMillis
|
|
}
|
|
|
|
// GetEndTimestampMillisOk returns a tuple with the EndTimestampMillis field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *O11yGettableFlamegraphTrace) GetEndTimestampMillisOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.EndTimestampMillis) {
|
|
return nil, false
|
|
}
|
|
return o.EndTimestampMillis, true
|
|
}
|
|
|
|
// HasEndTimestampMillis returns a boolean if a field has been set.
|
|
func (o *O11yGettableFlamegraphTrace) HasEndTimestampMillis() bool {
|
|
if o != nil && !IsNil(o.EndTimestampMillis) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetEndTimestampMillis gets a reference to the given int64 and assigns it to the EndTimestampMillis field.
|
|
func (o *O11yGettableFlamegraphTrace) SetEndTimestampMillis(v int64) {
|
|
o.EndTimestampMillis = &v
|
|
}
|
|
|
|
// GetHasMore returns the HasMore field value if set, zero value otherwise.
|
|
func (o *O11yGettableFlamegraphTrace) GetHasMore() bool {
|
|
if o == nil || IsNil(o.HasMore) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.HasMore
|
|
}
|
|
|
|
// GetHasMoreOk returns a tuple with the HasMore field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *O11yGettableFlamegraphTrace) GetHasMoreOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.HasMore) {
|
|
return nil, false
|
|
}
|
|
return o.HasMore, true
|
|
}
|
|
|
|
// HasHasMore returns a boolean if a field has been set.
|
|
func (o *O11yGettableFlamegraphTrace) HasHasMore() bool {
|
|
if o != nil && !IsNil(o.HasMore) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetHasMore gets a reference to the given bool and assigns it to the HasMore field.
|
|
func (o *O11yGettableFlamegraphTrace) SetHasMore(v bool) {
|
|
o.HasMore = &v
|
|
}
|
|
|
|
// GetSpans returns the Spans field value if set, zero value otherwise.
|
|
func (o *O11yGettableFlamegraphTrace) GetSpans() [][]O11yFlamegraphSpan {
|
|
if o == nil || IsNil(o.Spans) {
|
|
var ret [][]O11yFlamegraphSpan
|
|
return ret
|
|
}
|
|
return o.Spans
|
|
}
|
|
|
|
// GetSpansOk returns a tuple with the Spans field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *O11yGettableFlamegraphTrace) GetSpansOk() ([][]O11yFlamegraphSpan, bool) {
|
|
if o == nil || IsNil(o.Spans) {
|
|
return nil, false
|
|
}
|
|
return o.Spans, true
|
|
}
|
|
|
|
// HasSpans returns a boolean if a field has been set.
|
|
func (o *O11yGettableFlamegraphTrace) HasSpans() bool {
|
|
if o != nil && !IsNil(o.Spans) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetSpans gets a reference to the given [][]O11yFlamegraphSpan and assigns it to the Spans field.
|
|
func (o *O11yGettableFlamegraphTrace) SetSpans(v [][]O11yFlamegraphSpan) {
|
|
o.Spans = v
|
|
}
|
|
|
|
// GetStartTimestampMillis returns the StartTimestampMillis field value if set, zero value otherwise.
|
|
func (o *O11yGettableFlamegraphTrace) GetStartTimestampMillis() int64 {
|
|
if o == nil || IsNil(o.StartTimestampMillis) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.StartTimestampMillis
|
|
}
|
|
|
|
// GetStartTimestampMillisOk returns a tuple with the StartTimestampMillis field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *O11yGettableFlamegraphTrace) GetStartTimestampMillisOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.StartTimestampMillis) {
|
|
return nil, false
|
|
}
|
|
return o.StartTimestampMillis, true
|
|
}
|
|
|
|
// HasStartTimestampMillis returns a boolean if a field has been set.
|
|
func (o *O11yGettableFlamegraphTrace) HasStartTimestampMillis() bool {
|
|
if o != nil && !IsNil(o.StartTimestampMillis) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetStartTimestampMillis gets a reference to the given int64 and assigns it to the StartTimestampMillis field.
|
|
func (o *O11yGettableFlamegraphTrace) SetStartTimestampMillis(v int64) {
|
|
o.StartTimestampMillis = &v
|
|
}
|
|
|
|
func (o O11yGettableFlamegraphTrace) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o O11yGettableFlamegraphTrace) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.EndTimestampMillis) {
|
|
toSerialize["endTimestampMillis"] = o.EndTimestampMillis
|
|
}
|
|
if !IsNil(o.HasMore) {
|
|
toSerialize["hasMore"] = o.HasMore
|
|
}
|
|
if !IsNil(o.Spans) {
|
|
toSerialize["spans"] = o.Spans
|
|
}
|
|
if !IsNil(o.StartTimestampMillis) {
|
|
toSerialize["startTimestampMillis"] = o.StartTimestampMillis
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *O11yGettableFlamegraphTrace) UnmarshalJSON(data []byte) (err error) {
|
|
varO11yGettableFlamegraphTrace := _O11yGettableFlamegraphTrace{}
|
|
|
|
err = json.Unmarshal(data, &varO11yGettableFlamegraphTrace)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = O11yGettableFlamegraphTrace(varO11yGettableFlamegraphTrace)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "endTimestampMillis")
|
|
delete(additionalProperties, "hasMore")
|
|
delete(additionalProperties, "spans")
|
|
delete(additionalProperties, "startTimestampMillis")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableO11yGettableFlamegraphTrace struct {
|
|
value *O11yGettableFlamegraphTrace
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableO11yGettableFlamegraphTrace) Get() *O11yGettableFlamegraphTrace {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableO11yGettableFlamegraphTrace) Set(val *O11yGettableFlamegraphTrace) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableO11yGettableFlamegraphTrace) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableO11yGettableFlamegraphTrace) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableO11yGettableFlamegraphTrace(val *O11yGettableFlamegraphTrace) *NullableO11yGettableFlamegraphTrace {
|
|
return &NullableO11yGettableFlamegraphTrace{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableO11yGettableFlamegraphTrace) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableO11yGettableFlamegraphTrace) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|