Files
sdk/model_studio_thread.go

376 lines
9.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 StudioThread type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &StudioThread{}
// StudioThread struct for StudioThread
type StudioThread struct {
Created *string `json:"created,omitempty"`
Creator *string `json:"creator,omitempty"`
Id *string `json:"id,omitempty"`
Messages []StudioMessage `json:"messages,omitempty"`
Org *string `json:"org,omitempty"`
Title *string `json:"title,omitempty"`
Updated *string `json:"updated,omitempty"`
AdditionalProperties map[string]interface{}
}
type _StudioThread StudioThread
// NewStudioThread instantiates a new StudioThread 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 NewStudioThread() *StudioThread {
this := StudioThread{}
return &this
}
// NewStudioThreadWithDefaults instantiates a new StudioThread 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 NewStudioThreadWithDefaults() *StudioThread {
this := StudioThread{}
return &this
}
// GetCreated returns the Created field value if set, zero value otherwise.
func (o *StudioThread) GetCreated() string {
if o == nil || IsNil(o.Created) {
var ret string
return ret
}
return *o.Created
}
// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *StudioThread) GetCreatedOk() (*string, bool) {
if o == nil || IsNil(o.Created) {
return nil, false
}
return o.Created, true
}
// HasCreated returns a boolean if a field has been set.
func (o *StudioThread) HasCreated() bool {
if o != nil && !IsNil(o.Created) {
return true
}
return false
}
// SetCreated gets a reference to the given string and assigns it to the Created field.
func (o *StudioThread) SetCreated(v string) {
o.Created = &v
}
// GetCreator returns the Creator field value if set, zero value otherwise.
func (o *StudioThread) GetCreator() string {
if o == nil || IsNil(o.Creator) {
var ret string
return ret
}
return *o.Creator
}
// GetCreatorOk returns a tuple with the Creator field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *StudioThread) GetCreatorOk() (*string, bool) {
if o == nil || IsNil(o.Creator) {
return nil, false
}
return o.Creator, true
}
// HasCreator returns a boolean if a field has been set.
func (o *StudioThread) HasCreator() bool {
if o != nil && !IsNil(o.Creator) {
return true
}
return false
}
// SetCreator gets a reference to the given string and assigns it to the Creator field.
func (o *StudioThread) SetCreator(v string) {
o.Creator = &v
}
// GetId returns the Id field value if set, zero value otherwise.
func (o *StudioThread) 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 *StudioThread) 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 *StudioThread) 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 *StudioThread) SetId(v string) {
o.Id = &v
}
// GetMessages returns the Messages field value if set, zero value otherwise.
func (o *StudioThread) GetMessages() []StudioMessage {
if o == nil || IsNil(o.Messages) {
var ret []StudioMessage
return ret
}
return o.Messages
}
// GetMessagesOk returns a tuple with the Messages field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *StudioThread) GetMessagesOk() ([]StudioMessage, bool) {
if o == nil || IsNil(o.Messages) {
return nil, false
}
return o.Messages, true
}
// HasMessages returns a boolean if a field has been set.
func (o *StudioThread) HasMessages() bool {
if o != nil && !IsNil(o.Messages) {
return true
}
return false
}
// SetMessages gets a reference to the given []StudioMessage and assigns it to the Messages field.
func (o *StudioThread) SetMessages(v []StudioMessage) {
o.Messages = v
}
// GetOrg returns the Org field value if set, zero value otherwise.
func (o *StudioThread) GetOrg() string {
if o == nil || IsNil(o.Org) {
var ret string
return ret
}
return *o.Org
}
// GetOrgOk returns a tuple with the Org field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *StudioThread) GetOrgOk() (*string, bool) {
if o == nil || IsNil(o.Org) {
return nil, false
}
return o.Org, true
}
// HasOrg returns a boolean if a field has been set.
func (o *StudioThread) HasOrg() bool {
if o != nil && !IsNil(o.Org) {
return true
}
return false
}
// SetOrg gets a reference to the given string and assigns it to the Org field.
func (o *StudioThread) SetOrg(v string) {
o.Org = &v
}
// GetTitle returns the Title field value if set, zero value otherwise.
func (o *StudioThread) GetTitle() string {
if o == nil || IsNil(o.Title) {
var ret string
return ret
}
return *o.Title
}
// GetTitleOk returns a tuple with the Title field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *StudioThread) GetTitleOk() (*string, bool) {
if o == nil || IsNil(o.Title) {
return nil, false
}
return o.Title, true
}
// HasTitle returns a boolean if a field has been set.
func (o *StudioThread) HasTitle() bool {
if o != nil && !IsNil(o.Title) {
return true
}
return false
}
// SetTitle gets a reference to the given string and assigns it to the Title field.
func (o *StudioThread) SetTitle(v string) {
o.Title = &v
}
// GetUpdated returns the Updated field value if set, zero value otherwise.
func (o *StudioThread) GetUpdated() string {
if o == nil || IsNil(o.Updated) {
var ret string
return ret
}
return *o.Updated
}
// GetUpdatedOk returns a tuple with the Updated field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *StudioThread) GetUpdatedOk() (*string, bool) {
if o == nil || IsNil(o.Updated) {
return nil, false
}
return o.Updated, true
}
// HasUpdated returns a boolean if a field has been set.
func (o *StudioThread) HasUpdated() bool {
if o != nil && !IsNil(o.Updated) {
return true
}
return false
}
// SetUpdated gets a reference to the given string and assigns it to the Updated field.
func (o *StudioThread) SetUpdated(v string) {
o.Updated = &v
}
func (o StudioThread) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o StudioThread) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Created) {
toSerialize["created"] = o.Created
}
if !IsNil(o.Creator) {
toSerialize["creator"] = o.Creator
}
if !IsNil(o.Id) {
toSerialize["id"] = o.Id
}
if !IsNil(o.Messages) {
toSerialize["messages"] = o.Messages
}
if !IsNil(o.Org) {
toSerialize["org"] = o.Org
}
if !IsNil(o.Title) {
toSerialize["title"] = o.Title
}
if !IsNil(o.Updated) {
toSerialize["updated"] = o.Updated
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *StudioThread) UnmarshalJSON(data []byte) (err error) {
varStudioThread := _StudioThread{}
err = json.Unmarshal(data, &varStudioThread)
if err != nil {
return err
}
*o = StudioThread(varStudioThread)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "created")
delete(additionalProperties, "creator")
delete(additionalProperties, "id")
delete(additionalProperties, "messages")
delete(additionalProperties, "org")
delete(additionalProperties, "title")
delete(additionalProperties, "updated")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableStudioThread struct {
value *StudioThread
isSet bool
}
func (v NullableStudioThread) Get() *StudioThread {
return v.value
}
func (v *NullableStudioThread) Set(val *StudioThread) {
v.value = val
v.isSet = true
}
func (v NullableStudioThread) IsSet() bool {
return v.isSet
}
func (v *NullableStudioThread) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableStudioThread(val *StudioThread) *NullableStudioThread {
return &NullableStudioThread{value: val, isSet: true}
}
func (v NullableStudioThread) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableStudioThread) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}