mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
307 lines
7.8 KiB
Go
307 lines
7.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 EvalBoardPoint type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &EvalBoardPoint{}
|
|
|
|
// EvalBoardPoint struct for EvalBoardPoint
|
|
type EvalBoardPoint struct {
|
|
// what this bucket cost, in cents
|
|
CostCents *int64 `json:"costCents,omitempty"`
|
|
// calls in this bucket that did not succeed
|
|
Errors *int64 `json:"errors,omitempty"`
|
|
// model calls in this bucket
|
|
Generations *int64 `json:"generations,omitempty"`
|
|
// RFC3339 (UTC) bucket start
|
|
T *string `json:"t,omitempty"`
|
|
// tokens in this bucket
|
|
TotalTokens *int64 `json:"totalTokens,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _EvalBoardPoint EvalBoardPoint
|
|
|
|
// NewEvalBoardPoint instantiates a new EvalBoardPoint 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 NewEvalBoardPoint() *EvalBoardPoint {
|
|
this := EvalBoardPoint{}
|
|
return &this
|
|
}
|
|
|
|
// NewEvalBoardPointWithDefaults instantiates a new EvalBoardPoint 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 NewEvalBoardPointWithDefaults() *EvalBoardPoint {
|
|
this := EvalBoardPoint{}
|
|
return &this
|
|
}
|
|
|
|
// GetCostCents returns the CostCents field value if set, zero value otherwise.
|
|
func (o *EvalBoardPoint) GetCostCents() int64 {
|
|
if o == nil || IsNil(o.CostCents) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.CostCents
|
|
}
|
|
|
|
// GetCostCentsOk returns a tuple with the CostCents field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *EvalBoardPoint) GetCostCentsOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.CostCents) {
|
|
return nil, false
|
|
}
|
|
return o.CostCents, true
|
|
}
|
|
|
|
// HasCostCents returns a boolean if a field has been set.
|
|
func (o *EvalBoardPoint) HasCostCents() bool {
|
|
if o != nil && !IsNil(o.CostCents) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetCostCents gets a reference to the given int64 and assigns it to the CostCents field.
|
|
func (o *EvalBoardPoint) SetCostCents(v int64) {
|
|
o.CostCents = &v
|
|
}
|
|
|
|
// GetErrors returns the Errors field value if set, zero value otherwise.
|
|
func (o *EvalBoardPoint) GetErrors() int64 {
|
|
if o == nil || IsNil(o.Errors) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Errors
|
|
}
|
|
|
|
// GetErrorsOk returns a tuple with the Errors field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *EvalBoardPoint) GetErrorsOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Errors) {
|
|
return nil, false
|
|
}
|
|
return o.Errors, true
|
|
}
|
|
|
|
// HasErrors returns a boolean if a field has been set.
|
|
func (o *EvalBoardPoint) HasErrors() bool {
|
|
if o != nil && !IsNil(o.Errors) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetErrors gets a reference to the given int64 and assigns it to the Errors field.
|
|
func (o *EvalBoardPoint) SetErrors(v int64) {
|
|
o.Errors = &v
|
|
}
|
|
|
|
// GetGenerations returns the Generations field value if set, zero value otherwise.
|
|
func (o *EvalBoardPoint) GetGenerations() int64 {
|
|
if o == nil || IsNil(o.Generations) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Generations
|
|
}
|
|
|
|
// GetGenerationsOk returns a tuple with the Generations field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *EvalBoardPoint) GetGenerationsOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Generations) {
|
|
return nil, false
|
|
}
|
|
return o.Generations, true
|
|
}
|
|
|
|
// HasGenerations returns a boolean if a field has been set.
|
|
func (o *EvalBoardPoint) HasGenerations() bool {
|
|
if o != nil && !IsNil(o.Generations) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetGenerations gets a reference to the given int64 and assigns it to the Generations field.
|
|
func (o *EvalBoardPoint) SetGenerations(v int64) {
|
|
o.Generations = &v
|
|
}
|
|
|
|
// GetT returns the T field value if set, zero value otherwise.
|
|
func (o *EvalBoardPoint) 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 *EvalBoardPoint) 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 *EvalBoardPoint) 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 *EvalBoardPoint) SetT(v string) {
|
|
o.T = &v
|
|
}
|
|
|
|
// GetTotalTokens returns the TotalTokens field value if set, zero value otherwise.
|
|
func (o *EvalBoardPoint) GetTotalTokens() int64 {
|
|
if o == nil || IsNil(o.TotalTokens) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.TotalTokens
|
|
}
|
|
|
|
// GetTotalTokensOk returns a tuple with the TotalTokens field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *EvalBoardPoint) GetTotalTokensOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.TotalTokens) {
|
|
return nil, false
|
|
}
|
|
return o.TotalTokens, true
|
|
}
|
|
|
|
// HasTotalTokens returns a boolean if a field has been set.
|
|
func (o *EvalBoardPoint) HasTotalTokens() bool {
|
|
if o != nil && !IsNil(o.TotalTokens) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetTotalTokens gets a reference to the given int64 and assigns it to the TotalTokens field.
|
|
func (o *EvalBoardPoint) SetTotalTokens(v int64) {
|
|
o.TotalTokens = &v
|
|
}
|
|
|
|
func (o EvalBoardPoint) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o EvalBoardPoint) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.CostCents) {
|
|
toSerialize["costCents"] = o.CostCents
|
|
}
|
|
if !IsNil(o.Errors) {
|
|
toSerialize["errors"] = o.Errors
|
|
}
|
|
if !IsNil(o.Generations) {
|
|
toSerialize["generations"] = o.Generations
|
|
}
|
|
if !IsNil(o.T) {
|
|
toSerialize["t"] = o.T
|
|
}
|
|
if !IsNil(o.TotalTokens) {
|
|
toSerialize["totalTokens"] = o.TotalTokens
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *EvalBoardPoint) UnmarshalJSON(data []byte) (err error) {
|
|
varEvalBoardPoint := _EvalBoardPoint{}
|
|
|
|
err = json.Unmarshal(data, &varEvalBoardPoint)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = EvalBoardPoint(varEvalBoardPoint)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "costCents")
|
|
delete(additionalProperties, "errors")
|
|
delete(additionalProperties, "generations")
|
|
delete(additionalProperties, "t")
|
|
delete(additionalProperties, "totalTokens")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableEvalBoardPoint struct {
|
|
value *EvalBoardPoint
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableEvalBoardPoint) Get() *EvalBoardPoint {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableEvalBoardPoint) Set(val *EvalBoardPoint) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableEvalBoardPoint) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableEvalBoardPoint) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableEvalBoardPoint(val *EvalBoardPoint) *NullableEvalBoardPoint {
|
|
return &NullableEvalBoardPoint{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableEvalBoardPoint) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableEvalBoardPoint) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|