Files
sdk/model_ai_responses_tool.go

378 lines
9.9 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 AiResponsesTool type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &AiResponsesTool{}
// AiResponsesTool struct for AiResponsesTool
type AiResponsesTool struct {
Description *string `json:"description,omitempty"`
Format interface{} `json:"format,omitempty"`
Name *string `json:"name,omitempty"`
Parameters interface{} `json:"parameters,omitempty"`
Strict *bool `json:"strict,omitempty"`
Tools []AiResponsesTool `json:"tools,omitempty"`
Type *string `json:"type,omitempty"`
AdditionalProperties map[string]interface{}
}
type _AiResponsesTool AiResponsesTool
// NewAiResponsesTool instantiates a new AiResponsesTool 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 NewAiResponsesTool() *AiResponsesTool {
this := AiResponsesTool{}
return &this
}
// NewAiResponsesToolWithDefaults instantiates a new AiResponsesTool 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 NewAiResponsesToolWithDefaults() *AiResponsesTool {
this := AiResponsesTool{}
return &this
}
// GetDescription returns the Description field value if set, zero value otherwise.
func (o *AiResponsesTool) GetDescription() string {
if o == nil || IsNil(o.Description) {
var ret string
return ret
}
return *o.Description
}
// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AiResponsesTool) GetDescriptionOk() (*string, bool) {
if o == nil || IsNil(o.Description) {
return nil, false
}
return o.Description, true
}
// HasDescription returns a boolean if a field has been set.
func (o *AiResponsesTool) HasDescription() bool {
if o != nil && !IsNil(o.Description) {
return true
}
return false
}
// SetDescription gets a reference to the given string and assigns it to the Description field.
func (o *AiResponsesTool) SetDescription(v string) {
o.Description = &v
}
// GetFormat returns the Format field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *AiResponsesTool) GetFormat() interface{} {
if o == nil {
var ret interface{}
return ret
}
return o.Format
}
// GetFormatOk returns a tuple with the Format field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *AiResponsesTool) GetFormatOk() (*interface{}, bool) {
if o == nil || IsNil(o.Format) {
return nil, false
}
return &o.Format, true
}
// HasFormat returns a boolean if a field has been set.
func (o *AiResponsesTool) HasFormat() bool {
if o != nil && !IsNil(o.Format) {
return true
}
return false
}
// SetFormat gets a reference to the given interface{} and assigns it to the Format field.
func (o *AiResponsesTool) SetFormat(v interface{}) {
o.Format = v
}
// GetName returns the Name field value if set, zero value otherwise.
func (o *AiResponsesTool) GetName() string {
if o == nil || IsNil(o.Name) {
var ret string
return ret
}
return *o.Name
}
// GetNameOk returns a tuple with the Name field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AiResponsesTool) GetNameOk() (*string, bool) {
if o == nil || IsNil(o.Name) {
return nil, false
}
return o.Name, true
}
// HasName returns a boolean if a field has been set.
func (o *AiResponsesTool) HasName() bool {
if o != nil && !IsNil(o.Name) {
return true
}
return false
}
// SetName gets a reference to the given string and assigns it to the Name field.
func (o *AiResponsesTool) SetName(v string) {
o.Name = &v
}
// GetParameters returns the Parameters field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *AiResponsesTool) GetParameters() interface{} {
if o == nil {
var ret interface{}
return ret
}
return o.Parameters
}
// GetParametersOk returns a tuple with the Parameters field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *AiResponsesTool) GetParametersOk() (*interface{}, bool) {
if o == nil || IsNil(o.Parameters) {
return nil, false
}
return &o.Parameters, true
}
// HasParameters returns a boolean if a field has been set.
func (o *AiResponsesTool) HasParameters() bool {
if o != nil && !IsNil(o.Parameters) {
return true
}
return false
}
// SetParameters gets a reference to the given interface{} and assigns it to the Parameters field.
func (o *AiResponsesTool) SetParameters(v interface{}) {
o.Parameters = v
}
// GetStrict returns the Strict field value if set, zero value otherwise.
func (o *AiResponsesTool) GetStrict() bool {
if o == nil || IsNil(o.Strict) {
var ret bool
return ret
}
return *o.Strict
}
// GetStrictOk returns a tuple with the Strict field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AiResponsesTool) GetStrictOk() (*bool, bool) {
if o == nil || IsNil(o.Strict) {
return nil, false
}
return o.Strict, true
}
// HasStrict returns a boolean if a field has been set.
func (o *AiResponsesTool) HasStrict() bool {
if o != nil && !IsNil(o.Strict) {
return true
}
return false
}
// SetStrict gets a reference to the given bool and assigns it to the Strict field.
func (o *AiResponsesTool) SetStrict(v bool) {
o.Strict = &v
}
// GetTools returns the Tools field value if set, zero value otherwise.
func (o *AiResponsesTool) GetTools() []AiResponsesTool {
if o == nil || IsNil(o.Tools) {
var ret []AiResponsesTool
return ret
}
return o.Tools
}
// GetToolsOk returns a tuple with the Tools field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AiResponsesTool) GetToolsOk() ([]AiResponsesTool, bool) {
if o == nil || IsNil(o.Tools) {
return nil, false
}
return o.Tools, true
}
// HasTools returns a boolean if a field has been set.
func (o *AiResponsesTool) HasTools() bool {
if o != nil && !IsNil(o.Tools) {
return true
}
return false
}
// SetTools gets a reference to the given []AiResponsesTool and assigns it to the Tools field.
func (o *AiResponsesTool) SetTools(v []AiResponsesTool) {
o.Tools = v
}
// GetType returns the Type field value if set, zero value otherwise.
func (o *AiResponsesTool) GetType() string {
if o == nil || IsNil(o.Type) {
var ret string
return ret
}
return *o.Type
}
// GetTypeOk returns a tuple with the Type field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AiResponsesTool) GetTypeOk() (*string, bool) {
if o == nil || IsNil(o.Type) {
return nil, false
}
return o.Type, true
}
// HasType returns a boolean if a field has been set.
func (o *AiResponsesTool) HasType() bool {
if o != nil && !IsNil(o.Type) {
return true
}
return false
}
// SetType gets a reference to the given string and assigns it to the Type field.
func (o *AiResponsesTool) SetType(v string) {
o.Type = &v
}
func (o AiResponsesTool) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o AiResponsesTool) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Description) {
toSerialize["description"] = o.Description
}
if o.Format != nil {
toSerialize["format"] = o.Format
}
if !IsNil(o.Name) {
toSerialize["name"] = o.Name
}
if o.Parameters != nil {
toSerialize["parameters"] = o.Parameters
}
if !IsNil(o.Strict) {
toSerialize["strict"] = o.Strict
}
if !IsNil(o.Tools) {
toSerialize["tools"] = o.Tools
}
if !IsNil(o.Type) {
toSerialize["type"] = o.Type
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *AiResponsesTool) UnmarshalJSON(data []byte) (err error) {
varAiResponsesTool := _AiResponsesTool{}
err = json.Unmarshal(data, &varAiResponsesTool)
if err != nil {
return err
}
*o = AiResponsesTool(varAiResponsesTool)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "description")
delete(additionalProperties, "format")
delete(additionalProperties, "name")
delete(additionalProperties, "parameters")
delete(additionalProperties, "strict")
delete(additionalProperties, "tools")
delete(additionalProperties, "type")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableAiResponsesTool struct {
value *AiResponsesTool
isSet bool
}
func (v NullableAiResponsesTool) Get() *AiResponsesTool {
return v.value
}
func (v *NullableAiResponsesTool) Set(val *AiResponsesTool) {
v.value = val
v.isSet = true
}
func (v NullableAiResponsesTool) IsSet() bool {
return v.isSet
}
func (v *NullableAiResponsesTool) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableAiResponsesTool(val *AiResponsesTool) *NullableAiResponsesTool {
return &NullableAiResponsesTool{value: val, isSet: true}
}
func (v NullableAiResponsesTool) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableAiResponsesTool) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}