Files
sdk/model_post_responses_200_response.go

937 lines
28 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 PostResponses200Response type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &PostResponses200Response{}
// PostResponses200Response struct for PostResponses200Response
type PostResponses200Response struct {
CreatedAt *int32 `json:"created_at,omitempty"`
Error interface{} `json:"error,omitempty"`
Id *string `json:"id,omitempty"`
IncompleteDetails interface{} `json:"incomplete_details,omitempty"`
Instructions *string `json:"instructions,omitempty"`
MaxOutputTokens *int32 `json:"max_output_tokens,omitempty"`
Metadata map[string]string `json:"metadata,omitempty"`
Model *string `json:"model,omitempty"`
Object *string `json:"object,omitempty"`
Output []interface{} `json:"output,omitempty"`
ParallelToolCalls *bool `json:"parallel_tool_calls,omitempty"`
PreviousResponseId interface{} `json:"previous_response_id,omitempty"`
Reasoning interface{} `json:"reasoning,omitempty"`
Status *string `json:"status,omitempty"`
Store *bool `json:"store,omitempty"`
Temperature *float32 `json:"temperature,omitempty"`
Text interface{} `json:"text,omitempty"`
ToolChoice interface{} `json:"tool_choice,omitempty"`
Tools []AiResponsesTool `json:"tools,omitempty"`
TopP *float32 `json:"top_p,omitempty"`
Usage *AiResponsesUsage `json:"usage,omitempty"`
Routing *PostChat200ResponseAllOfRouting `json:"routing,omitempty"`
AdditionalProperties map[string]interface{}
}
type _PostResponses200Response PostResponses200Response
// NewPostResponses200Response instantiates a new PostResponses200Response 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 NewPostResponses200Response() *PostResponses200Response {
this := PostResponses200Response{}
return &this
}
// NewPostResponses200ResponseWithDefaults instantiates a new PostResponses200Response 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 NewPostResponses200ResponseWithDefaults() *PostResponses200Response {
this := PostResponses200Response{}
return &this
}
// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise.
func (o *PostResponses200Response) GetCreatedAt() int32 {
if o == nil || IsNil(o.CreatedAt) {
var ret int32
return ret
}
return *o.CreatedAt
}
// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PostResponses200Response) GetCreatedAtOk() (*int32, bool) {
if o == nil || IsNil(o.CreatedAt) {
return nil, false
}
return o.CreatedAt, true
}
// HasCreatedAt returns a boolean if a field has been set.
func (o *PostResponses200Response) HasCreatedAt() bool {
if o != nil && !IsNil(o.CreatedAt) {
return true
}
return false
}
// SetCreatedAt gets a reference to the given int32 and assigns it to the CreatedAt field.
func (o *PostResponses200Response) SetCreatedAt(v int32) {
o.CreatedAt = &v
}
// GetError returns the Error field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *PostResponses200Response) GetError() interface{} {
if o == nil {
var ret interface{}
return ret
}
return o.Error
}
// GetErrorOk returns a tuple with the Error 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 *PostResponses200Response) GetErrorOk() (*interface{}, bool) {
if o == nil || IsNil(o.Error) {
return nil, false
}
return &o.Error, true
}
// HasError returns a boolean if a field has been set.
func (o *PostResponses200Response) HasError() bool {
if o != nil && !IsNil(o.Error) {
return true
}
return false
}
// SetError gets a reference to the given interface{} and assigns it to the Error field.
func (o *PostResponses200Response) SetError(v interface{}) {
o.Error = v
}
// GetId returns the Id field value if set, zero value otherwise.
func (o *PostResponses200Response) GetId() string {
if o == nil || IsNil(o.Id) {
var ret string
return ret
}
return *o.Id
}
// GetIdOk returns a tuple with the Id field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PostResponses200Response) GetIdOk() (*string, bool) {
if o == nil || IsNil(o.Id) {
return nil, false
}
return o.Id, true
}
// HasId returns a boolean if a field has been set.
func (o *PostResponses200Response) HasId() bool {
if o != nil && !IsNil(o.Id) {
return true
}
return false
}
// SetId gets a reference to the given string and assigns it to the Id field.
func (o *PostResponses200Response) SetId(v string) {
o.Id = &v
}
// GetIncompleteDetails returns the IncompleteDetails field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *PostResponses200Response) GetIncompleteDetails() interface{} {
if o == nil {
var ret interface{}
return ret
}
return o.IncompleteDetails
}
// GetIncompleteDetailsOk returns a tuple with the IncompleteDetails 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 *PostResponses200Response) GetIncompleteDetailsOk() (*interface{}, bool) {
if o == nil || IsNil(o.IncompleteDetails) {
return nil, false
}
return &o.IncompleteDetails, true
}
// HasIncompleteDetails returns a boolean if a field has been set.
func (o *PostResponses200Response) HasIncompleteDetails() bool {
if o != nil && !IsNil(o.IncompleteDetails) {
return true
}
return false
}
// SetIncompleteDetails gets a reference to the given interface{} and assigns it to the IncompleteDetails field.
func (o *PostResponses200Response) SetIncompleteDetails(v interface{}) {
o.IncompleteDetails = v
}
// GetInstructions returns the Instructions field value if set, zero value otherwise.
func (o *PostResponses200Response) GetInstructions() string {
if o == nil || IsNil(o.Instructions) {
var ret string
return ret
}
return *o.Instructions
}
// GetInstructionsOk returns a tuple with the Instructions field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PostResponses200Response) GetInstructionsOk() (*string, bool) {
if o == nil || IsNil(o.Instructions) {
return nil, false
}
return o.Instructions, true
}
// HasInstructions returns a boolean if a field has been set.
func (o *PostResponses200Response) HasInstructions() bool {
if o != nil && !IsNil(o.Instructions) {
return true
}
return false
}
// SetInstructions gets a reference to the given string and assigns it to the Instructions field.
func (o *PostResponses200Response) SetInstructions(v string) {
o.Instructions = &v
}
// GetMaxOutputTokens returns the MaxOutputTokens field value if set, zero value otherwise.
func (o *PostResponses200Response) GetMaxOutputTokens() int32 {
if o == nil || IsNil(o.MaxOutputTokens) {
var ret int32
return ret
}
return *o.MaxOutputTokens
}
// GetMaxOutputTokensOk returns a tuple with the MaxOutputTokens field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PostResponses200Response) GetMaxOutputTokensOk() (*int32, bool) {
if o == nil || IsNil(o.MaxOutputTokens) {
return nil, false
}
return o.MaxOutputTokens, true
}
// HasMaxOutputTokens returns a boolean if a field has been set.
func (o *PostResponses200Response) HasMaxOutputTokens() bool {
if o != nil && !IsNil(o.MaxOutputTokens) {
return true
}
return false
}
// SetMaxOutputTokens gets a reference to the given int32 and assigns it to the MaxOutputTokens field.
func (o *PostResponses200Response) SetMaxOutputTokens(v int32) {
o.MaxOutputTokens = &v
}
// GetMetadata returns the Metadata field value if set, zero value otherwise.
func (o *PostResponses200Response) GetMetadata() map[string]string {
if o == nil || IsNil(o.Metadata) {
var ret map[string]string
return ret
}
return o.Metadata
}
// GetMetadataOk returns a tuple with the Metadata field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PostResponses200Response) GetMetadataOk() (map[string]string, bool) {
if o == nil || IsNil(o.Metadata) {
return map[string]string{}, false
}
return o.Metadata, true
}
// HasMetadata returns a boolean if a field has been set.
func (o *PostResponses200Response) HasMetadata() bool {
if o != nil && !IsNil(o.Metadata) {
return true
}
return false
}
// SetMetadata gets a reference to the given map[string]string and assigns it to the Metadata field.
func (o *PostResponses200Response) SetMetadata(v map[string]string) {
o.Metadata = v
}
// GetModel returns the Model field value if set, zero value otherwise.
func (o *PostResponses200Response) 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 *PostResponses200Response) 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 *PostResponses200Response) 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 *PostResponses200Response) SetModel(v string) {
o.Model = &v
}
// GetObject returns the Object field value if set, zero value otherwise.
func (o *PostResponses200Response) 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 *PostResponses200Response) 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 *PostResponses200Response) 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 *PostResponses200Response) SetObject(v string) {
o.Object = &v
}
// GetOutput returns the Output field value if set, zero value otherwise.
func (o *PostResponses200Response) GetOutput() []interface{} {
if o == nil || IsNil(o.Output) {
var ret []interface{}
return ret
}
return o.Output
}
// GetOutputOk returns a tuple with the Output field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PostResponses200Response) GetOutputOk() ([]interface{}, bool) {
if o == nil || IsNil(o.Output) {
return nil, false
}
return o.Output, true
}
// HasOutput returns a boolean if a field has been set.
func (o *PostResponses200Response) HasOutput() bool {
if o != nil && !IsNil(o.Output) {
return true
}
return false
}
// SetOutput gets a reference to the given []interface{} and assigns it to the Output field.
func (o *PostResponses200Response) SetOutput(v []interface{}) {
o.Output = v
}
// GetParallelToolCalls returns the ParallelToolCalls field value if set, zero value otherwise.
func (o *PostResponses200Response) GetParallelToolCalls() bool {
if o == nil || IsNil(o.ParallelToolCalls) {
var ret bool
return ret
}
return *o.ParallelToolCalls
}
// GetParallelToolCallsOk returns a tuple with the ParallelToolCalls field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PostResponses200Response) GetParallelToolCallsOk() (*bool, bool) {
if o == nil || IsNil(o.ParallelToolCalls) {
return nil, false
}
return o.ParallelToolCalls, true
}
// HasParallelToolCalls returns a boolean if a field has been set.
func (o *PostResponses200Response) HasParallelToolCalls() bool {
if o != nil && !IsNil(o.ParallelToolCalls) {
return true
}
return false
}
// SetParallelToolCalls gets a reference to the given bool and assigns it to the ParallelToolCalls field.
func (o *PostResponses200Response) SetParallelToolCalls(v bool) {
o.ParallelToolCalls = &v
}
// GetPreviousResponseId returns the PreviousResponseId field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *PostResponses200Response) GetPreviousResponseId() interface{} {
if o == nil {
var ret interface{}
return ret
}
return o.PreviousResponseId
}
// GetPreviousResponseIdOk returns a tuple with the PreviousResponseId 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 *PostResponses200Response) GetPreviousResponseIdOk() (*interface{}, bool) {
if o == nil || IsNil(o.PreviousResponseId) {
return nil, false
}
return &o.PreviousResponseId, true
}
// HasPreviousResponseId returns a boolean if a field has been set.
func (o *PostResponses200Response) HasPreviousResponseId() bool {
if o != nil && !IsNil(o.PreviousResponseId) {
return true
}
return false
}
// SetPreviousResponseId gets a reference to the given interface{} and assigns it to the PreviousResponseId field.
func (o *PostResponses200Response) SetPreviousResponseId(v interface{}) {
o.PreviousResponseId = v
}
// GetReasoning returns the Reasoning field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *PostResponses200Response) GetReasoning() interface{} {
if o == nil {
var ret interface{}
return ret
}
return o.Reasoning
}
// GetReasoningOk returns a tuple with the Reasoning 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 *PostResponses200Response) GetReasoningOk() (*interface{}, bool) {
if o == nil || IsNil(o.Reasoning) {
return nil, false
}
return &o.Reasoning, true
}
// HasReasoning returns a boolean if a field has been set.
func (o *PostResponses200Response) HasReasoning() bool {
if o != nil && !IsNil(o.Reasoning) {
return true
}
return false
}
// SetReasoning gets a reference to the given interface{} and assigns it to the Reasoning field.
func (o *PostResponses200Response) SetReasoning(v interface{}) {
o.Reasoning = v
}
// GetStatus returns the Status field value if set, zero value otherwise.
func (o *PostResponses200Response) GetStatus() string {
if o == nil || IsNil(o.Status) {
var ret string
return ret
}
return *o.Status
}
// GetStatusOk returns a tuple with the Status field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PostResponses200Response) GetStatusOk() (*string, bool) {
if o == nil || IsNil(o.Status) {
return nil, false
}
return o.Status, true
}
// HasStatus returns a boolean if a field has been set.
func (o *PostResponses200Response) HasStatus() bool {
if o != nil && !IsNil(o.Status) {
return true
}
return false
}
// SetStatus gets a reference to the given string and assigns it to the Status field.
func (o *PostResponses200Response) SetStatus(v string) {
o.Status = &v
}
// GetStore returns the Store field value if set, zero value otherwise.
func (o *PostResponses200Response) GetStore() bool {
if o == nil || IsNil(o.Store) {
var ret bool
return ret
}
return *o.Store
}
// GetStoreOk returns a tuple with the Store field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PostResponses200Response) GetStoreOk() (*bool, bool) {
if o == nil || IsNil(o.Store) {
return nil, false
}
return o.Store, true
}
// HasStore returns a boolean if a field has been set.
func (o *PostResponses200Response) HasStore() bool {
if o != nil && !IsNil(o.Store) {
return true
}
return false
}
// SetStore gets a reference to the given bool and assigns it to the Store field.
func (o *PostResponses200Response) SetStore(v bool) {
o.Store = &v
}
// GetTemperature returns the Temperature field value if set, zero value otherwise.
func (o *PostResponses200Response) GetTemperature() float32 {
if o == nil || IsNil(o.Temperature) {
var ret float32
return ret
}
return *o.Temperature
}
// GetTemperatureOk returns a tuple with the Temperature field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PostResponses200Response) GetTemperatureOk() (*float32, bool) {
if o == nil || IsNil(o.Temperature) {
return nil, false
}
return o.Temperature, true
}
// HasTemperature returns a boolean if a field has been set.
func (o *PostResponses200Response) HasTemperature() bool {
if o != nil && !IsNil(o.Temperature) {
return true
}
return false
}
// SetTemperature gets a reference to the given float32 and assigns it to the Temperature field.
func (o *PostResponses200Response) SetTemperature(v float32) {
o.Temperature = &v
}
// GetText returns the Text field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *PostResponses200Response) GetText() interface{} {
if o == nil {
var ret interface{}
return ret
}
return o.Text
}
// GetTextOk returns a tuple with the Text 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 *PostResponses200Response) GetTextOk() (*interface{}, bool) {
if o == nil || IsNil(o.Text) {
return nil, false
}
return &o.Text, true
}
// HasText returns a boolean if a field has been set.
func (o *PostResponses200Response) HasText() bool {
if o != nil && !IsNil(o.Text) {
return true
}
return false
}
// SetText gets a reference to the given interface{} and assigns it to the Text field.
func (o *PostResponses200Response) SetText(v interface{}) {
o.Text = v
}
// GetToolChoice returns the ToolChoice field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *PostResponses200Response) GetToolChoice() interface{} {
if o == nil {
var ret interface{}
return ret
}
return o.ToolChoice
}
// GetToolChoiceOk returns a tuple with the ToolChoice 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 *PostResponses200Response) GetToolChoiceOk() (*interface{}, bool) {
if o == nil || IsNil(o.ToolChoice) {
return nil, false
}
return &o.ToolChoice, true
}
// HasToolChoice returns a boolean if a field has been set.
func (o *PostResponses200Response) HasToolChoice() bool {
if o != nil && !IsNil(o.ToolChoice) {
return true
}
return false
}
// SetToolChoice gets a reference to the given interface{} and assigns it to the ToolChoice field.
func (o *PostResponses200Response) SetToolChoice(v interface{}) {
o.ToolChoice = v
}
// GetTools returns the Tools field value if set, zero value otherwise.
func (o *PostResponses200Response) 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 *PostResponses200Response) 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 *PostResponses200Response) 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 *PostResponses200Response) SetTools(v []AiResponsesTool) {
o.Tools = v
}
// GetTopP returns the TopP field value if set, zero value otherwise.
func (o *PostResponses200Response) GetTopP() float32 {
if o == nil || IsNil(o.TopP) {
var ret float32
return ret
}
return *o.TopP
}
// GetTopPOk returns a tuple with the TopP field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PostResponses200Response) GetTopPOk() (*float32, bool) {
if o == nil || IsNil(o.TopP) {
return nil, false
}
return o.TopP, true
}
// HasTopP returns a boolean if a field has been set.
func (o *PostResponses200Response) HasTopP() bool {
if o != nil && !IsNil(o.TopP) {
return true
}
return false
}
// SetTopP gets a reference to the given float32 and assigns it to the TopP field.
func (o *PostResponses200Response) SetTopP(v float32) {
o.TopP = &v
}
// GetUsage returns the Usage field value if set, zero value otherwise.
func (o *PostResponses200Response) GetUsage() AiResponsesUsage {
if o == nil || IsNil(o.Usage) {
var ret AiResponsesUsage
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 *PostResponses200Response) GetUsageOk() (*AiResponsesUsage, 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 *PostResponses200Response) HasUsage() bool {
if o != nil && !IsNil(o.Usage) {
return true
}
return false
}
// SetUsage gets a reference to the given AiResponsesUsage and assigns it to the Usage field.
func (o *PostResponses200Response) SetUsage(v AiResponsesUsage) {
o.Usage = &v
}
// GetRouting returns the Routing field value if set, zero value otherwise.
func (o *PostResponses200Response) GetRouting() PostChat200ResponseAllOfRouting {
if o == nil || IsNil(o.Routing) {
var ret PostChat200ResponseAllOfRouting
return ret
}
return *o.Routing
}
// GetRoutingOk returns a tuple with the Routing field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PostResponses200Response) GetRoutingOk() (*PostChat200ResponseAllOfRouting, bool) {
if o == nil || IsNil(o.Routing) {
return nil, false
}
return o.Routing, true
}
// HasRouting returns a boolean if a field has been set.
func (o *PostResponses200Response) HasRouting() bool {
if o != nil && !IsNil(o.Routing) {
return true
}
return false
}
// SetRouting gets a reference to the given PostChat200ResponseAllOfRouting and assigns it to the Routing field.
func (o *PostResponses200Response) SetRouting(v PostChat200ResponseAllOfRouting) {
o.Routing = &v
}
func (o PostResponses200Response) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o PostResponses200Response) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.CreatedAt) {
toSerialize["created_at"] = o.CreatedAt
}
if o.Error != nil {
toSerialize["error"] = o.Error
}
if !IsNil(o.Id) {
toSerialize["id"] = o.Id
}
if o.IncompleteDetails != nil {
toSerialize["incomplete_details"] = o.IncompleteDetails
}
if !IsNil(o.Instructions) {
toSerialize["instructions"] = o.Instructions
}
if !IsNil(o.MaxOutputTokens) {
toSerialize["max_output_tokens"] = o.MaxOutputTokens
}
if !IsNil(o.Metadata) {
toSerialize["metadata"] = o.Metadata
}
if !IsNil(o.Model) {
toSerialize["model"] = o.Model
}
if !IsNil(o.Object) {
toSerialize["object"] = o.Object
}
if !IsNil(o.Output) {
toSerialize["output"] = o.Output
}
if !IsNil(o.ParallelToolCalls) {
toSerialize["parallel_tool_calls"] = o.ParallelToolCalls
}
if o.PreviousResponseId != nil {
toSerialize["previous_response_id"] = o.PreviousResponseId
}
if o.Reasoning != nil {
toSerialize["reasoning"] = o.Reasoning
}
if !IsNil(o.Status) {
toSerialize["status"] = o.Status
}
if !IsNil(o.Store) {
toSerialize["store"] = o.Store
}
if !IsNil(o.Temperature) {
toSerialize["temperature"] = o.Temperature
}
if o.Text != nil {
toSerialize["text"] = o.Text
}
if o.ToolChoice != nil {
toSerialize["tool_choice"] = o.ToolChoice
}
if !IsNil(o.Tools) {
toSerialize["tools"] = o.Tools
}
if !IsNil(o.TopP) {
toSerialize["top_p"] = o.TopP
}
if !IsNil(o.Usage) {
toSerialize["usage"] = o.Usage
}
if !IsNil(o.Routing) {
toSerialize["routing"] = o.Routing
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *PostResponses200Response) UnmarshalJSON(data []byte) (err error) {
varPostResponses200Response := _PostResponses200Response{}
err = json.Unmarshal(data, &varPostResponses200Response)
if err != nil {
return err
}
*o = PostResponses200Response(varPostResponses200Response)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "created_at")
delete(additionalProperties, "error")
delete(additionalProperties, "id")
delete(additionalProperties, "incomplete_details")
delete(additionalProperties, "instructions")
delete(additionalProperties, "max_output_tokens")
delete(additionalProperties, "metadata")
delete(additionalProperties, "model")
delete(additionalProperties, "object")
delete(additionalProperties, "output")
delete(additionalProperties, "parallel_tool_calls")
delete(additionalProperties, "previous_response_id")
delete(additionalProperties, "reasoning")
delete(additionalProperties, "status")
delete(additionalProperties, "store")
delete(additionalProperties, "temperature")
delete(additionalProperties, "text")
delete(additionalProperties, "tool_choice")
delete(additionalProperties, "tools")
delete(additionalProperties, "top_p")
delete(additionalProperties, "usage")
delete(additionalProperties, "routing")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullablePostResponses200Response struct {
value *PostResponses200Response
isSet bool
}
func (v NullablePostResponses200Response) Get() *PostResponses200Response {
return v.value
}
func (v *NullablePostResponses200Response) Set(val *PostResponses200Response) {
v.value = val
v.isSet = true
}
func (v NullablePostResponses200Response) IsSet() bool {
return v.isSet
}
func (v *NullablePostResponses200Response) Unset() {
v.value = nil
v.isSet = false
}
func NewNullablePostResponses200Response(val *PostResponses200Response) *NullablePostResponses200Response {
return &NullablePostResponses200Response{value: val, isSet: true}
}
func (v NullablePostResponses200Response) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullablePostResponses200Response) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}