Files
sdk/model_agent_series_point.go

193 lines
4.7 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 AgentSeriesPoint type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &AgentSeriesPoint{}
// AgentSeriesPoint struct for AgentSeriesPoint
type AgentSeriesPoint struct {
// bucket start, RFC3339 UTC
T *string `json:"t,omitempty"`
// real invocation count in the bucket
V *int64 `json:"v,omitempty"`
AdditionalProperties map[string]interface{}
}
type _AgentSeriesPoint AgentSeriesPoint
// NewAgentSeriesPoint instantiates a new AgentSeriesPoint 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 NewAgentSeriesPoint() *AgentSeriesPoint {
this := AgentSeriesPoint{}
return &this
}
// NewAgentSeriesPointWithDefaults instantiates a new AgentSeriesPoint 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 NewAgentSeriesPointWithDefaults() *AgentSeriesPoint {
this := AgentSeriesPoint{}
return &this
}
// GetT returns the T field value if set, zero value otherwise.
func (o *AgentSeriesPoint) GetT() string {
if o == nil || IsNil(o.T) {
var ret string
return ret
}
return *o.T
}
// GetTOk returns a tuple with the T field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AgentSeriesPoint) GetTOk() (*string, bool) {
if o == nil || IsNil(o.T) {
return nil, false
}
return o.T, true
}
// HasT returns a boolean if a field has been set.
func (o *AgentSeriesPoint) HasT() bool {
if o != nil && !IsNil(o.T) {
return true
}
return false
}
// SetT gets a reference to the given string and assigns it to the T field.
func (o *AgentSeriesPoint) SetT(v string) {
o.T = &v
}
// GetV returns the V field value if set, zero value otherwise.
func (o *AgentSeriesPoint) GetV() int64 {
if o == nil || IsNil(o.V) {
var ret int64
return ret
}
return *o.V
}
// GetVOk returns a tuple with the V field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AgentSeriesPoint) GetVOk() (*int64, bool) {
if o == nil || IsNil(o.V) {
return nil, false
}
return o.V, true
}
// HasV returns a boolean if a field has been set.
func (o *AgentSeriesPoint) HasV() bool {
if o != nil && !IsNil(o.V) {
return true
}
return false
}
// SetV gets a reference to the given int64 and assigns it to the V field.
func (o *AgentSeriesPoint) SetV(v int64) {
o.V = &v
}
func (o AgentSeriesPoint) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o AgentSeriesPoint) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.T) {
toSerialize["t"] = o.T
}
if !IsNil(o.V) {
toSerialize["v"] = o.V
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *AgentSeriesPoint) UnmarshalJSON(data []byte) (err error) {
varAgentSeriesPoint := _AgentSeriesPoint{}
err = json.Unmarshal(data, &varAgentSeriesPoint)
if err != nil {
return err
}
*o = AgentSeriesPoint(varAgentSeriesPoint)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "t")
delete(additionalProperties, "v")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableAgentSeriesPoint struct {
value *AgentSeriesPoint
isSet bool
}
func (v NullableAgentSeriesPoint) Get() *AgentSeriesPoint {
return v.value
}
func (v *NullableAgentSeriesPoint) Set(val *AgentSeriesPoint) {
v.value = val
v.isSet = true
}
func (v NullableAgentSeriesPoint) IsSet() bool {
return v.isSet
}
func (v *NullableAgentSeriesPoint) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableAgentSeriesPoint(val *AgentSeriesPoint) *NullableAgentSeriesPoint {
return &NullableAgentSeriesPoint{value: val, isSet: true}
}
func (v NullableAgentSeriesPoint) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableAgentSeriesPoint) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}