mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
265 lines
6.4 KiB
Go
265 lines
6.4 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 AiRanking type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &AiRanking{}
|
|
|
|
// AiRanking struct for AiRanking
|
|
type AiRanking struct {
|
|
Model *string `json:"model,omitempty"`
|
|
Object *string `json:"object,omitempty"`
|
|
Results []AiRankedDoc `json:"results,omitempty"`
|
|
Usage *AiRankUsage `json:"usage,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _AiRanking AiRanking
|
|
|
|
// NewAiRanking instantiates a new AiRanking 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 NewAiRanking() *AiRanking {
|
|
this := AiRanking{}
|
|
return &this
|
|
}
|
|
|
|
// NewAiRankingWithDefaults instantiates a new AiRanking 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 NewAiRankingWithDefaults() *AiRanking {
|
|
this := AiRanking{}
|
|
return &this
|
|
}
|
|
|
|
// GetModel returns the Model field value if set, zero value otherwise.
|
|
func (o *AiRanking) GetModel() string {
|
|
if o == nil || IsNil(o.Model) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Model
|
|
}
|
|
|
|
// GetModelOk returns a tuple with the Model field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AiRanking) GetModelOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Model) {
|
|
return nil, false
|
|
}
|
|
return o.Model, true
|
|
}
|
|
|
|
// HasModel returns a boolean if a field has been set.
|
|
func (o *AiRanking) HasModel() bool {
|
|
if o != nil && !IsNil(o.Model) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetModel gets a reference to the given string and assigns it to the Model field.
|
|
func (o *AiRanking) SetModel(v string) {
|
|
o.Model = &v
|
|
}
|
|
|
|
// GetObject returns the Object field value if set, zero value otherwise.
|
|
func (o *AiRanking) GetObject() string {
|
|
if o == nil || IsNil(o.Object) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Object
|
|
}
|
|
|
|
// GetObjectOk returns a tuple with the Object field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AiRanking) GetObjectOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Object) {
|
|
return nil, false
|
|
}
|
|
return o.Object, true
|
|
}
|
|
|
|
// HasObject returns a boolean if a field has been set.
|
|
func (o *AiRanking) HasObject() bool {
|
|
if o != nil && !IsNil(o.Object) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetObject gets a reference to the given string and assigns it to the Object field.
|
|
func (o *AiRanking) SetObject(v string) {
|
|
o.Object = &v
|
|
}
|
|
|
|
// GetResults returns the Results field value if set, zero value otherwise.
|
|
func (o *AiRanking) GetResults() []AiRankedDoc {
|
|
if o == nil || IsNil(o.Results) {
|
|
var ret []AiRankedDoc
|
|
return ret
|
|
}
|
|
return o.Results
|
|
}
|
|
|
|
// GetResultsOk returns a tuple with the Results field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AiRanking) GetResultsOk() ([]AiRankedDoc, bool) {
|
|
if o == nil || IsNil(o.Results) {
|
|
return nil, false
|
|
}
|
|
return o.Results, true
|
|
}
|
|
|
|
// HasResults returns a boolean if a field has been set.
|
|
func (o *AiRanking) HasResults() bool {
|
|
if o != nil && !IsNil(o.Results) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetResults gets a reference to the given []AiRankedDoc and assigns it to the Results field.
|
|
func (o *AiRanking) SetResults(v []AiRankedDoc) {
|
|
o.Results = v
|
|
}
|
|
|
|
// GetUsage returns the Usage field value if set, zero value otherwise.
|
|
func (o *AiRanking) GetUsage() AiRankUsage {
|
|
if o == nil || IsNil(o.Usage) {
|
|
var ret AiRankUsage
|
|
return ret
|
|
}
|
|
return *o.Usage
|
|
}
|
|
|
|
// GetUsageOk returns a tuple with the Usage field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AiRanking) GetUsageOk() (*AiRankUsage, bool) {
|
|
if o == nil || IsNil(o.Usage) {
|
|
return nil, false
|
|
}
|
|
return o.Usage, true
|
|
}
|
|
|
|
// HasUsage returns a boolean if a field has been set.
|
|
func (o *AiRanking) HasUsage() bool {
|
|
if o != nil && !IsNil(o.Usage) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetUsage gets a reference to the given AiRankUsage and assigns it to the Usage field.
|
|
func (o *AiRanking) SetUsage(v AiRankUsage) {
|
|
o.Usage = &v
|
|
}
|
|
|
|
func (o AiRanking) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o AiRanking) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Model) {
|
|
toSerialize["model"] = o.Model
|
|
}
|
|
if !IsNil(o.Object) {
|
|
toSerialize["object"] = o.Object
|
|
}
|
|
if !IsNil(o.Results) {
|
|
toSerialize["results"] = o.Results
|
|
}
|
|
if !IsNil(o.Usage) {
|
|
toSerialize["usage"] = o.Usage
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *AiRanking) UnmarshalJSON(data []byte) (err error) {
|
|
varAiRanking := _AiRanking{}
|
|
|
|
err = json.Unmarshal(data, &varAiRanking)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = AiRanking(varAiRanking)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "model")
|
|
delete(additionalProperties, "object")
|
|
delete(additionalProperties, "results")
|
|
delete(additionalProperties, "usage")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableAiRanking struct {
|
|
value *AiRanking
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableAiRanking) Get() *AiRanking {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableAiRanking) Set(val *AiRanking) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableAiRanking) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableAiRanking) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableAiRanking(val *AiRanking) *NullableAiRanking {
|
|
return &NullableAiRanking{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableAiRanking) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableAiRanking) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|