mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
302 lines
7.2 KiB
Go
302 lines
7.2 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 ChatTurn type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &ChatTurn{}
|
|
|
|
// ChatTurn struct for ChatTurn
|
|
type ChatTurn struct {
|
|
Assets []string `json:"assets,omitempty"`
|
|
Brand *string `json:"brand,omitempty"`
|
|
Message *string `json:"message,omitempty"`
|
|
Model *string `json:"model,omitempty"`
|
|
Thread *string `json:"thread,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _ChatTurn ChatTurn
|
|
|
|
// NewChatTurn instantiates a new ChatTurn 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 NewChatTurn() *ChatTurn {
|
|
this := ChatTurn{}
|
|
return &this
|
|
}
|
|
|
|
// NewChatTurnWithDefaults instantiates a new ChatTurn 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 NewChatTurnWithDefaults() *ChatTurn {
|
|
this := ChatTurn{}
|
|
return &this
|
|
}
|
|
|
|
// GetAssets returns the Assets field value if set, zero value otherwise.
|
|
func (o *ChatTurn) GetAssets() []string {
|
|
if o == nil || IsNil(o.Assets) {
|
|
var ret []string
|
|
return ret
|
|
}
|
|
return o.Assets
|
|
}
|
|
|
|
// GetAssetsOk returns a tuple with the Assets field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ChatTurn) GetAssetsOk() ([]string, bool) {
|
|
if o == nil || IsNil(o.Assets) {
|
|
return nil, false
|
|
}
|
|
return o.Assets, true
|
|
}
|
|
|
|
// HasAssets returns a boolean if a field has been set.
|
|
func (o *ChatTurn) HasAssets() bool {
|
|
if o != nil && !IsNil(o.Assets) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetAssets gets a reference to the given []string and assigns it to the Assets field.
|
|
func (o *ChatTurn) SetAssets(v []string) {
|
|
o.Assets = v
|
|
}
|
|
|
|
// GetBrand returns the Brand field value if set, zero value otherwise.
|
|
func (o *ChatTurn) GetBrand() string {
|
|
if o == nil || IsNil(o.Brand) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Brand
|
|
}
|
|
|
|
// GetBrandOk returns a tuple with the Brand field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ChatTurn) GetBrandOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Brand) {
|
|
return nil, false
|
|
}
|
|
return o.Brand, true
|
|
}
|
|
|
|
// HasBrand returns a boolean if a field has been set.
|
|
func (o *ChatTurn) HasBrand() bool {
|
|
if o != nil && !IsNil(o.Brand) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetBrand gets a reference to the given string and assigns it to the Brand field.
|
|
func (o *ChatTurn) SetBrand(v string) {
|
|
o.Brand = &v
|
|
}
|
|
|
|
// GetMessage returns the Message field value if set, zero value otherwise.
|
|
func (o *ChatTurn) GetMessage() string {
|
|
if o == nil || IsNil(o.Message) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Message
|
|
}
|
|
|
|
// GetMessageOk returns a tuple with the Message field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ChatTurn) GetMessageOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Message) {
|
|
return nil, false
|
|
}
|
|
return o.Message, true
|
|
}
|
|
|
|
// HasMessage returns a boolean if a field has been set.
|
|
func (o *ChatTurn) HasMessage() bool {
|
|
if o != nil && !IsNil(o.Message) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetMessage gets a reference to the given string and assigns it to the Message field.
|
|
func (o *ChatTurn) SetMessage(v string) {
|
|
o.Message = &v
|
|
}
|
|
|
|
// GetModel returns the Model field value if set, zero value otherwise.
|
|
func (o *ChatTurn) 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 *ChatTurn) 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 *ChatTurn) 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 *ChatTurn) SetModel(v string) {
|
|
o.Model = &v
|
|
}
|
|
|
|
// GetThread returns the Thread field value if set, zero value otherwise.
|
|
func (o *ChatTurn) GetThread() string {
|
|
if o == nil || IsNil(o.Thread) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Thread
|
|
}
|
|
|
|
// GetThreadOk returns a tuple with the Thread field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ChatTurn) GetThreadOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Thread) {
|
|
return nil, false
|
|
}
|
|
return o.Thread, true
|
|
}
|
|
|
|
// HasThread returns a boolean if a field has been set.
|
|
func (o *ChatTurn) HasThread() bool {
|
|
if o != nil && !IsNil(o.Thread) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetThread gets a reference to the given string and assigns it to the Thread field.
|
|
func (o *ChatTurn) SetThread(v string) {
|
|
o.Thread = &v
|
|
}
|
|
|
|
func (o ChatTurn) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o ChatTurn) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Assets) {
|
|
toSerialize["assets"] = o.Assets
|
|
}
|
|
if !IsNil(o.Brand) {
|
|
toSerialize["brand"] = o.Brand
|
|
}
|
|
if !IsNil(o.Message) {
|
|
toSerialize["message"] = o.Message
|
|
}
|
|
if !IsNil(o.Model) {
|
|
toSerialize["model"] = o.Model
|
|
}
|
|
if !IsNil(o.Thread) {
|
|
toSerialize["thread"] = o.Thread
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *ChatTurn) UnmarshalJSON(data []byte) (err error) {
|
|
varChatTurn := _ChatTurn{}
|
|
|
|
err = json.Unmarshal(data, &varChatTurn)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = ChatTurn(varChatTurn)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "assets")
|
|
delete(additionalProperties, "brand")
|
|
delete(additionalProperties, "message")
|
|
delete(additionalProperties, "model")
|
|
delete(additionalProperties, "thread")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableChatTurn struct {
|
|
value *ChatTurn
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableChatTurn) Get() *ChatTurn {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableChatTurn) Set(val *ChatTurn) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableChatTurn) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableChatTurn) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableChatTurn(val *ChatTurn) *NullableChatTurn {
|
|
return &NullableChatTurn{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableChatTurn) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableChatTurn) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|