mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
376 lines
11 KiB
Go
376 lines
11 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 AiModelPricingInfo type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &AiModelPricingInfo{}
|
|
|
|
// AiModelPricingInfo struct for AiModelPricingInfo
|
|
type AiModelPricingInfo struct {
|
|
Completion *string `json:"completion,omitempty"`
|
|
InputPerMillion *float32 `json:"input_per_million,omitempty"`
|
|
OutputPerMillion *float32 `json:"output_per_million,omitempty"`
|
|
Overrides []map[string]interface{} `json:"overrides,omitempty"`
|
|
Prompt *string `json:"prompt,omitempty"`
|
|
Rates map[string]string `json:"rates,omitempty"`
|
|
Variable *bool `json:"variable,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _AiModelPricingInfo AiModelPricingInfo
|
|
|
|
// NewAiModelPricingInfo instantiates a new AiModelPricingInfo 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 NewAiModelPricingInfo() *AiModelPricingInfo {
|
|
this := AiModelPricingInfo{}
|
|
return &this
|
|
}
|
|
|
|
// NewAiModelPricingInfoWithDefaults instantiates a new AiModelPricingInfo 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 NewAiModelPricingInfoWithDefaults() *AiModelPricingInfo {
|
|
this := AiModelPricingInfo{}
|
|
return &this
|
|
}
|
|
|
|
// GetCompletion returns the Completion field value if set, zero value otherwise.
|
|
func (o *AiModelPricingInfo) GetCompletion() string {
|
|
if o == nil || IsNil(o.Completion) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Completion
|
|
}
|
|
|
|
// GetCompletionOk returns a tuple with the Completion field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AiModelPricingInfo) GetCompletionOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Completion) {
|
|
return nil, false
|
|
}
|
|
return o.Completion, true
|
|
}
|
|
|
|
// HasCompletion returns a boolean if a field has been set.
|
|
func (o *AiModelPricingInfo) HasCompletion() bool {
|
|
if o != nil && !IsNil(o.Completion) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetCompletion gets a reference to the given string and assigns it to the Completion field.
|
|
func (o *AiModelPricingInfo) SetCompletion(v string) {
|
|
o.Completion = &v
|
|
}
|
|
|
|
// GetInputPerMillion returns the InputPerMillion field value if set, zero value otherwise.
|
|
func (o *AiModelPricingInfo) GetInputPerMillion() float32 {
|
|
if o == nil || IsNil(o.InputPerMillion) {
|
|
var ret float32
|
|
return ret
|
|
}
|
|
return *o.InputPerMillion
|
|
}
|
|
|
|
// GetInputPerMillionOk returns a tuple with the InputPerMillion field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AiModelPricingInfo) GetInputPerMillionOk() (*float32, bool) {
|
|
if o == nil || IsNil(o.InputPerMillion) {
|
|
return nil, false
|
|
}
|
|
return o.InputPerMillion, true
|
|
}
|
|
|
|
// HasInputPerMillion returns a boolean if a field has been set.
|
|
func (o *AiModelPricingInfo) HasInputPerMillion() bool {
|
|
if o != nil && !IsNil(o.InputPerMillion) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetInputPerMillion gets a reference to the given float32 and assigns it to the InputPerMillion field.
|
|
func (o *AiModelPricingInfo) SetInputPerMillion(v float32) {
|
|
o.InputPerMillion = &v
|
|
}
|
|
|
|
// GetOutputPerMillion returns the OutputPerMillion field value if set, zero value otherwise.
|
|
func (o *AiModelPricingInfo) GetOutputPerMillion() float32 {
|
|
if o == nil || IsNil(o.OutputPerMillion) {
|
|
var ret float32
|
|
return ret
|
|
}
|
|
return *o.OutputPerMillion
|
|
}
|
|
|
|
// GetOutputPerMillionOk returns a tuple with the OutputPerMillion field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AiModelPricingInfo) GetOutputPerMillionOk() (*float32, bool) {
|
|
if o == nil || IsNil(o.OutputPerMillion) {
|
|
return nil, false
|
|
}
|
|
return o.OutputPerMillion, true
|
|
}
|
|
|
|
// HasOutputPerMillion returns a boolean if a field has been set.
|
|
func (o *AiModelPricingInfo) HasOutputPerMillion() bool {
|
|
if o != nil && !IsNil(o.OutputPerMillion) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetOutputPerMillion gets a reference to the given float32 and assigns it to the OutputPerMillion field.
|
|
func (o *AiModelPricingInfo) SetOutputPerMillion(v float32) {
|
|
o.OutputPerMillion = &v
|
|
}
|
|
|
|
// GetOverrides returns the Overrides field value if set, zero value otherwise.
|
|
func (o *AiModelPricingInfo) GetOverrides() []map[string]interface{} {
|
|
if o == nil || IsNil(o.Overrides) {
|
|
var ret []map[string]interface{}
|
|
return ret
|
|
}
|
|
return o.Overrides
|
|
}
|
|
|
|
// GetOverridesOk returns a tuple with the Overrides field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AiModelPricingInfo) GetOverridesOk() ([]map[string]interface{}, bool) {
|
|
if o == nil || IsNil(o.Overrides) {
|
|
return nil, false
|
|
}
|
|
return o.Overrides, true
|
|
}
|
|
|
|
// HasOverrides returns a boolean if a field has been set.
|
|
func (o *AiModelPricingInfo) HasOverrides() bool {
|
|
if o != nil && !IsNil(o.Overrides) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetOverrides gets a reference to the given []map[string]interface{} and assigns it to the Overrides field.
|
|
func (o *AiModelPricingInfo) SetOverrides(v []map[string]interface{}) {
|
|
o.Overrides = v
|
|
}
|
|
|
|
// GetPrompt returns the Prompt field value if set, zero value otherwise.
|
|
func (o *AiModelPricingInfo) GetPrompt() string {
|
|
if o == nil || IsNil(o.Prompt) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Prompt
|
|
}
|
|
|
|
// GetPromptOk returns a tuple with the Prompt field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AiModelPricingInfo) GetPromptOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Prompt) {
|
|
return nil, false
|
|
}
|
|
return o.Prompt, true
|
|
}
|
|
|
|
// HasPrompt returns a boolean if a field has been set.
|
|
func (o *AiModelPricingInfo) HasPrompt() bool {
|
|
if o != nil && !IsNil(o.Prompt) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetPrompt gets a reference to the given string and assigns it to the Prompt field.
|
|
func (o *AiModelPricingInfo) SetPrompt(v string) {
|
|
o.Prompt = &v
|
|
}
|
|
|
|
// GetRates returns the Rates field value if set, zero value otherwise.
|
|
func (o *AiModelPricingInfo) GetRates() map[string]string {
|
|
if o == nil || IsNil(o.Rates) {
|
|
var ret map[string]string
|
|
return ret
|
|
}
|
|
return o.Rates
|
|
}
|
|
|
|
// GetRatesOk returns a tuple with the Rates field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AiModelPricingInfo) GetRatesOk() (map[string]string, bool) {
|
|
if o == nil || IsNil(o.Rates) {
|
|
return map[string]string{}, false
|
|
}
|
|
return o.Rates, true
|
|
}
|
|
|
|
// HasRates returns a boolean if a field has been set.
|
|
func (o *AiModelPricingInfo) HasRates() bool {
|
|
if o != nil && !IsNil(o.Rates) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetRates gets a reference to the given map[string]string and assigns it to the Rates field.
|
|
func (o *AiModelPricingInfo) SetRates(v map[string]string) {
|
|
o.Rates = v
|
|
}
|
|
|
|
// GetVariable returns the Variable field value if set, zero value otherwise.
|
|
func (o *AiModelPricingInfo) GetVariable() bool {
|
|
if o == nil || IsNil(o.Variable) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.Variable
|
|
}
|
|
|
|
// GetVariableOk returns a tuple with the Variable field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AiModelPricingInfo) GetVariableOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.Variable) {
|
|
return nil, false
|
|
}
|
|
return o.Variable, true
|
|
}
|
|
|
|
// HasVariable returns a boolean if a field has been set.
|
|
func (o *AiModelPricingInfo) HasVariable() bool {
|
|
if o != nil && !IsNil(o.Variable) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetVariable gets a reference to the given bool and assigns it to the Variable field.
|
|
func (o *AiModelPricingInfo) SetVariable(v bool) {
|
|
o.Variable = &v
|
|
}
|
|
|
|
func (o AiModelPricingInfo) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o AiModelPricingInfo) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Completion) {
|
|
toSerialize["completion"] = o.Completion
|
|
}
|
|
if !IsNil(o.InputPerMillion) {
|
|
toSerialize["input_per_million"] = o.InputPerMillion
|
|
}
|
|
if !IsNil(o.OutputPerMillion) {
|
|
toSerialize["output_per_million"] = o.OutputPerMillion
|
|
}
|
|
if !IsNil(o.Overrides) {
|
|
toSerialize["overrides"] = o.Overrides
|
|
}
|
|
if !IsNil(o.Prompt) {
|
|
toSerialize["prompt"] = o.Prompt
|
|
}
|
|
if !IsNil(o.Rates) {
|
|
toSerialize["rates"] = o.Rates
|
|
}
|
|
if !IsNil(o.Variable) {
|
|
toSerialize["variable"] = o.Variable
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *AiModelPricingInfo) UnmarshalJSON(data []byte) (err error) {
|
|
varAiModelPricingInfo := _AiModelPricingInfo{}
|
|
|
|
err = json.Unmarshal(data, &varAiModelPricingInfo)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = AiModelPricingInfo(varAiModelPricingInfo)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "completion")
|
|
delete(additionalProperties, "input_per_million")
|
|
delete(additionalProperties, "output_per_million")
|
|
delete(additionalProperties, "overrides")
|
|
delete(additionalProperties, "prompt")
|
|
delete(additionalProperties, "rates")
|
|
delete(additionalProperties, "variable")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableAiModelPricingInfo struct {
|
|
value *AiModelPricingInfo
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableAiModelPricingInfo) Get() *AiModelPricingInfo {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableAiModelPricingInfo) Set(val *AiModelPricingInfo) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableAiModelPricingInfo) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableAiModelPricingInfo) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableAiModelPricingInfo(val *AiModelPricingInfo) *NullableAiModelPricingInfo {
|
|
return &NullableAiModelPricingInfo{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableAiModelPricingInfo) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableAiModelPricingInfo) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|