mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
193 lines
4.8 KiB
Go
193 lines
4.8 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 FunctionPointView type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &FunctionPointView{}
|
|
|
|
// FunctionPointView struct for FunctionPointView
|
|
type FunctionPointView struct {
|
|
// the bucket's start, RFC3339 (UTC)
|
|
T *string `json:"t,omitempty"`
|
|
// how many invocations fell in it — a real count, never interpolated
|
|
V *int64 `json:"v,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _FunctionPointView FunctionPointView
|
|
|
|
// NewFunctionPointView instantiates a new FunctionPointView 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 NewFunctionPointView() *FunctionPointView {
|
|
this := FunctionPointView{}
|
|
return &this
|
|
}
|
|
|
|
// NewFunctionPointViewWithDefaults instantiates a new FunctionPointView 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 NewFunctionPointViewWithDefaults() *FunctionPointView {
|
|
this := FunctionPointView{}
|
|
return &this
|
|
}
|
|
|
|
// GetT returns the T field value if set, zero value otherwise.
|
|
func (o *FunctionPointView) 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 *FunctionPointView) 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 *FunctionPointView) 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 *FunctionPointView) SetT(v string) {
|
|
o.T = &v
|
|
}
|
|
|
|
// GetV returns the V field value if set, zero value otherwise.
|
|
func (o *FunctionPointView) 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 *FunctionPointView) 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 *FunctionPointView) 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 *FunctionPointView) SetV(v int64) {
|
|
o.V = &v
|
|
}
|
|
|
|
func (o FunctionPointView) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o FunctionPointView) 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 *FunctionPointView) UnmarshalJSON(data []byte) (err error) {
|
|
varFunctionPointView := _FunctionPointView{}
|
|
|
|
err = json.Unmarshal(data, &varFunctionPointView)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = FunctionPointView(varFunctionPointView)
|
|
|
|
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 NullableFunctionPointView struct {
|
|
value *FunctionPointView
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableFunctionPointView) Get() *FunctionPointView {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableFunctionPointView) Set(val *FunctionPointView) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableFunctionPointView) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableFunctionPointView) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableFunctionPointView(val *FunctionPointView) *NullableFunctionPointView {
|
|
return &NullableFunctionPointView{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableFunctionPointView) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableFunctionPointView) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|