Files
sdk/model_chat.go

1042 lines
26 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 Chat type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &Chat{}
// Chat struct for Chat
type Chat struct {
Category *string `json:"category,omitempty"`
ClientIp *string `json:"clientIp,omitempty"`
ClientIpDesc *string `json:"clientIpDesc,omitempty"`
CreatedTime *string `json:"createdTime,omitempty"`
Currency *string `json:"currency,omitempty"`
DisplayName *string `json:"displayName,omitempty"`
IsDeleted *bool `json:"isDeleted,omitempty"`
IsHidden *bool `json:"isHidden,omitempty"`
MessageCount *int32 `json:"messageCount,omitempty"`
ModelProvider *string `json:"modelProvider,omitempty"`
Name *string `json:"name,omitempty"`
NeedTitle *bool `json:"needTitle,omitempty"`
Organization *string `json:"organization,omitempty"`
Owner *string `json:"owner,omitempty"`
Price *float32 `json:"price,omitempty"`
Store *string `json:"store,omitempty"`
TokenCount *int32 `json:"tokenCount,omitempty"`
Type *string `json:"type,omitempty"`
UpdatedTime *string `json:"updatedTime,omitempty"`
User *string `json:"user,omitempty"`
User1 *string `json:"user1,omitempty"`
User2 *string `json:"user2,omitempty"`
UserAgent *string `json:"userAgent,omitempty"`
UserAgentDesc *string `json:"userAgentDesc,omitempty"`
Users []string `json:"users,omitempty"`
AdditionalProperties map[string]interface{}
}
type _Chat Chat
// NewChat instantiates a new Chat 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 NewChat() *Chat {
this := Chat{}
return &this
}
// NewChatWithDefaults instantiates a new Chat 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 NewChatWithDefaults() *Chat {
this := Chat{}
return &this
}
// GetCategory returns the Category field value if set, zero value otherwise.
func (o *Chat) GetCategory() string {
if o == nil || IsNil(o.Category) {
var ret string
return ret
}
return *o.Category
}
// GetCategoryOk returns a tuple with the Category field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Chat) GetCategoryOk() (*string, bool) {
if o == nil || IsNil(o.Category) {
return nil, false
}
return o.Category, true
}
// HasCategory returns a boolean if a field has been set.
func (o *Chat) HasCategory() bool {
if o != nil && !IsNil(o.Category) {
return true
}
return false
}
// SetCategory gets a reference to the given string and assigns it to the Category field.
func (o *Chat) SetCategory(v string) {
o.Category = &v
}
// GetClientIp returns the ClientIp field value if set, zero value otherwise.
func (o *Chat) GetClientIp() string {
if o == nil || IsNil(o.ClientIp) {
var ret string
return ret
}
return *o.ClientIp
}
// GetClientIpOk returns a tuple with the ClientIp field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Chat) GetClientIpOk() (*string, bool) {
if o == nil || IsNil(o.ClientIp) {
return nil, false
}
return o.ClientIp, true
}
// HasClientIp returns a boolean if a field has been set.
func (o *Chat) HasClientIp() bool {
if o != nil && !IsNil(o.ClientIp) {
return true
}
return false
}
// SetClientIp gets a reference to the given string and assigns it to the ClientIp field.
func (o *Chat) SetClientIp(v string) {
o.ClientIp = &v
}
// GetClientIpDesc returns the ClientIpDesc field value if set, zero value otherwise.
func (o *Chat) GetClientIpDesc() string {
if o == nil || IsNil(o.ClientIpDesc) {
var ret string
return ret
}
return *o.ClientIpDesc
}
// GetClientIpDescOk returns a tuple with the ClientIpDesc field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Chat) GetClientIpDescOk() (*string, bool) {
if o == nil || IsNil(o.ClientIpDesc) {
return nil, false
}
return o.ClientIpDesc, true
}
// HasClientIpDesc returns a boolean if a field has been set.
func (o *Chat) HasClientIpDesc() bool {
if o != nil && !IsNil(o.ClientIpDesc) {
return true
}
return false
}
// SetClientIpDesc gets a reference to the given string and assigns it to the ClientIpDesc field.
func (o *Chat) SetClientIpDesc(v string) {
o.ClientIpDesc = &v
}
// GetCreatedTime returns the CreatedTime field value if set, zero value otherwise.
func (o *Chat) GetCreatedTime() string {
if o == nil || IsNil(o.CreatedTime) {
var ret string
return ret
}
return *o.CreatedTime
}
// GetCreatedTimeOk returns a tuple with the CreatedTime field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Chat) GetCreatedTimeOk() (*string, bool) {
if o == nil || IsNil(o.CreatedTime) {
return nil, false
}
return o.CreatedTime, true
}
// HasCreatedTime returns a boolean if a field has been set.
func (o *Chat) HasCreatedTime() bool {
if o != nil && !IsNil(o.CreatedTime) {
return true
}
return false
}
// SetCreatedTime gets a reference to the given string and assigns it to the CreatedTime field.
func (o *Chat) SetCreatedTime(v string) {
o.CreatedTime = &v
}
// GetCurrency returns the Currency field value if set, zero value otherwise.
func (o *Chat) GetCurrency() string {
if o == nil || IsNil(o.Currency) {
var ret string
return ret
}
return *o.Currency
}
// GetCurrencyOk returns a tuple with the Currency field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Chat) GetCurrencyOk() (*string, bool) {
if o == nil || IsNil(o.Currency) {
return nil, false
}
return o.Currency, true
}
// HasCurrency returns a boolean if a field has been set.
func (o *Chat) HasCurrency() bool {
if o != nil && !IsNil(o.Currency) {
return true
}
return false
}
// SetCurrency gets a reference to the given string and assigns it to the Currency field.
func (o *Chat) SetCurrency(v string) {
o.Currency = &v
}
// GetDisplayName returns the DisplayName field value if set, zero value otherwise.
func (o *Chat) GetDisplayName() string {
if o == nil || IsNil(o.DisplayName) {
var ret string
return ret
}
return *o.DisplayName
}
// GetDisplayNameOk returns a tuple with the DisplayName field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Chat) GetDisplayNameOk() (*string, bool) {
if o == nil || IsNil(o.DisplayName) {
return nil, false
}
return o.DisplayName, true
}
// HasDisplayName returns a boolean if a field has been set.
func (o *Chat) HasDisplayName() bool {
if o != nil && !IsNil(o.DisplayName) {
return true
}
return false
}
// SetDisplayName gets a reference to the given string and assigns it to the DisplayName field.
func (o *Chat) SetDisplayName(v string) {
o.DisplayName = &v
}
// GetIsDeleted returns the IsDeleted field value if set, zero value otherwise.
func (o *Chat) GetIsDeleted() bool {
if o == nil || IsNil(o.IsDeleted) {
var ret bool
return ret
}
return *o.IsDeleted
}
// GetIsDeletedOk returns a tuple with the IsDeleted field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Chat) GetIsDeletedOk() (*bool, bool) {
if o == nil || IsNil(o.IsDeleted) {
return nil, false
}
return o.IsDeleted, true
}
// HasIsDeleted returns a boolean if a field has been set.
func (o *Chat) HasIsDeleted() bool {
if o != nil && !IsNil(o.IsDeleted) {
return true
}
return false
}
// SetIsDeleted gets a reference to the given bool and assigns it to the IsDeleted field.
func (o *Chat) SetIsDeleted(v bool) {
o.IsDeleted = &v
}
// GetIsHidden returns the IsHidden field value if set, zero value otherwise.
func (o *Chat) GetIsHidden() bool {
if o == nil || IsNil(o.IsHidden) {
var ret bool
return ret
}
return *o.IsHidden
}
// GetIsHiddenOk returns a tuple with the IsHidden field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Chat) GetIsHiddenOk() (*bool, bool) {
if o == nil || IsNil(o.IsHidden) {
return nil, false
}
return o.IsHidden, true
}
// HasIsHidden returns a boolean if a field has been set.
func (o *Chat) HasIsHidden() bool {
if o != nil && !IsNil(o.IsHidden) {
return true
}
return false
}
// SetIsHidden gets a reference to the given bool and assigns it to the IsHidden field.
func (o *Chat) SetIsHidden(v bool) {
o.IsHidden = &v
}
// GetMessageCount returns the MessageCount field value if set, zero value otherwise.
func (o *Chat) GetMessageCount() int32 {
if o == nil || IsNil(o.MessageCount) {
var ret int32
return ret
}
return *o.MessageCount
}
// GetMessageCountOk returns a tuple with the MessageCount field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Chat) GetMessageCountOk() (*int32, bool) {
if o == nil || IsNil(o.MessageCount) {
return nil, false
}
return o.MessageCount, true
}
// HasMessageCount returns a boolean if a field has been set.
func (o *Chat) HasMessageCount() bool {
if o != nil && !IsNil(o.MessageCount) {
return true
}
return false
}
// SetMessageCount gets a reference to the given int32 and assigns it to the MessageCount field.
func (o *Chat) SetMessageCount(v int32) {
o.MessageCount = &v
}
// GetModelProvider returns the ModelProvider field value if set, zero value otherwise.
func (o *Chat) GetModelProvider() string {
if o == nil || IsNil(o.ModelProvider) {
var ret string
return ret
}
return *o.ModelProvider
}
// GetModelProviderOk returns a tuple with the ModelProvider field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Chat) GetModelProviderOk() (*string, bool) {
if o == nil || IsNil(o.ModelProvider) {
return nil, false
}
return o.ModelProvider, true
}
// HasModelProvider returns a boolean if a field has been set.
func (o *Chat) HasModelProvider() bool {
if o != nil && !IsNil(o.ModelProvider) {
return true
}
return false
}
// SetModelProvider gets a reference to the given string and assigns it to the ModelProvider field.
func (o *Chat) SetModelProvider(v string) {
o.ModelProvider = &v
}
// GetName returns the Name field value if set, zero value otherwise.
func (o *Chat) 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 *Chat) 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 *Chat) 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 *Chat) SetName(v string) {
o.Name = &v
}
// GetNeedTitle returns the NeedTitle field value if set, zero value otherwise.
func (o *Chat) GetNeedTitle() bool {
if o == nil || IsNil(o.NeedTitle) {
var ret bool
return ret
}
return *o.NeedTitle
}
// GetNeedTitleOk returns a tuple with the NeedTitle field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Chat) GetNeedTitleOk() (*bool, bool) {
if o == nil || IsNil(o.NeedTitle) {
return nil, false
}
return o.NeedTitle, true
}
// HasNeedTitle returns a boolean if a field has been set.
func (o *Chat) HasNeedTitle() bool {
if o != nil && !IsNil(o.NeedTitle) {
return true
}
return false
}
// SetNeedTitle gets a reference to the given bool and assigns it to the NeedTitle field.
func (o *Chat) SetNeedTitle(v bool) {
o.NeedTitle = &v
}
// GetOrganization returns the Organization field value if set, zero value otherwise.
func (o *Chat) GetOrganization() string {
if o == nil || IsNil(o.Organization) {
var ret string
return ret
}
return *o.Organization
}
// GetOrganizationOk returns a tuple with the Organization field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Chat) GetOrganizationOk() (*string, bool) {
if o == nil || IsNil(o.Organization) {
return nil, false
}
return o.Organization, true
}
// HasOrganization returns a boolean if a field has been set.
func (o *Chat) HasOrganization() bool {
if o != nil && !IsNil(o.Organization) {
return true
}
return false
}
// SetOrganization gets a reference to the given string and assigns it to the Organization field.
func (o *Chat) SetOrganization(v string) {
o.Organization = &v
}
// GetOwner returns the Owner field value if set, zero value otherwise.
func (o *Chat) GetOwner() string {
if o == nil || IsNil(o.Owner) {
var ret string
return ret
}
return *o.Owner
}
// GetOwnerOk returns a tuple with the Owner field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Chat) GetOwnerOk() (*string, bool) {
if o == nil || IsNil(o.Owner) {
return nil, false
}
return o.Owner, true
}
// HasOwner returns a boolean if a field has been set.
func (o *Chat) HasOwner() bool {
if o != nil && !IsNil(o.Owner) {
return true
}
return false
}
// SetOwner gets a reference to the given string and assigns it to the Owner field.
func (o *Chat) SetOwner(v string) {
o.Owner = &v
}
// GetPrice returns the Price field value if set, zero value otherwise.
func (o *Chat) GetPrice() float32 {
if o == nil || IsNil(o.Price) {
var ret float32
return ret
}
return *o.Price
}
// GetPriceOk returns a tuple with the Price field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Chat) GetPriceOk() (*float32, bool) {
if o == nil || IsNil(o.Price) {
return nil, false
}
return o.Price, true
}
// HasPrice returns a boolean if a field has been set.
func (o *Chat) HasPrice() bool {
if o != nil && !IsNil(o.Price) {
return true
}
return false
}
// SetPrice gets a reference to the given float32 and assigns it to the Price field.
func (o *Chat) SetPrice(v float32) {
o.Price = &v
}
// GetStore returns the Store field value if set, zero value otherwise.
func (o *Chat) GetStore() string {
if o == nil || IsNil(o.Store) {
var ret string
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 *Chat) GetStoreOk() (*string, 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 *Chat) HasStore() bool {
if o != nil && !IsNil(o.Store) {
return true
}
return false
}
// SetStore gets a reference to the given string and assigns it to the Store field.
func (o *Chat) SetStore(v string) {
o.Store = &v
}
// GetTokenCount returns the TokenCount field value if set, zero value otherwise.
func (o *Chat) GetTokenCount() int32 {
if o == nil || IsNil(o.TokenCount) {
var ret int32
return ret
}
return *o.TokenCount
}
// GetTokenCountOk returns a tuple with the TokenCount field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Chat) GetTokenCountOk() (*int32, bool) {
if o == nil || IsNil(o.TokenCount) {
return nil, false
}
return o.TokenCount, true
}
// HasTokenCount returns a boolean if a field has been set.
func (o *Chat) HasTokenCount() bool {
if o != nil && !IsNil(o.TokenCount) {
return true
}
return false
}
// SetTokenCount gets a reference to the given int32 and assigns it to the TokenCount field.
func (o *Chat) SetTokenCount(v int32) {
o.TokenCount = &v
}
// GetType returns the Type field value if set, zero value otherwise.
func (o *Chat) 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 *Chat) 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 *Chat) 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 *Chat) SetType(v string) {
o.Type = &v
}
// GetUpdatedTime returns the UpdatedTime field value if set, zero value otherwise.
func (o *Chat) GetUpdatedTime() string {
if o == nil || IsNil(o.UpdatedTime) {
var ret string
return ret
}
return *o.UpdatedTime
}
// GetUpdatedTimeOk returns a tuple with the UpdatedTime field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Chat) GetUpdatedTimeOk() (*string, bool) {
if o == nil || IsNil(o.UpdatedTime) {
return nil, false
}
return o.UpdatedTime, true
}
// HasUpdatedTime returns a boolean if a field has been set.
func (o *Chat) HasUpdatedTime() bool {
if o != nil && !IsNil(o.UpdatedTime) {
return true
}
return false
}
// SetUpdatedTime gets a reference to the given string and assigns it to the UpdatedTime field.
func (o *Chat) SetUpdatedTime(v string) {
o.UpdatedTime = &v
}
// GetUser returns the User field value if set, zero value otherwise.
func (o *Chat) GetUser() string {
if o == nil || IsNil(o.User) {
var ret string
return ret
}
return *o.User
}
// GetUserOk returns a tuple with the User field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Chat) GetUserOk() (*string, bool) {
if o == nil || IsNil(o.User) {
return nil, false
}
return o.User, true
}
// HasUser returns a boolean if a field has been set.
func (o *Chat) HasUser() bool {
if o != nil && !IsNil(o.User) {
return true
}
return false
}
// SetUser gets a reference to the given string and assigns it to the User field.
func (o *Chat) SetUser(v string) {
o.User = &v
}
// GetUser1 returns the User1 field value if set, zero value otherwise.
func (o *Chat) GetUser1() string {
if o == nil || IsNil(o.User1) {
var ret string
return ret
}
return *o.User1
}
// GetUser1Ok returns a tuple with the User1 field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Chat) GetUser1Ok() (*string, bool) {
if o == nil || IsNil(o.User1) {
return nil, false
}
return o.User1, true
}
// HasUser1 returns a boolean if a field has been set.
func (o *Chat) HasUser1() bool {
if o != nil && !IsNil(o.User1) {
return true
}
return false
}
// SetUser1 gets a reference to the given string and assigns it to the User1 field.
func (o *Chat) SetUser1(v string) {
o.User1 = &v
}
// GetUser2 returns the User2 field value if set, zero value otherwise.
func (o *Chat) GetUser2() string {
if o == nil || IsNil(o.User2) {
var ret string
return ret
}
return *o.User2
}
// GetUser2Ok returns a tuple with the User2 field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Chat) GetUser2Ok() (*string, bool) {
if o == nil || IsNil(o.User2) {
return nil, false
}
return o.User2, true
}
// HasUser2 returns a boolean if a field has been set.
func (o *Chat) HasUser2() bool {
if o != nil && !IsNil(o.User2) {
return true
}
return false
}
// SetUser2 gets a reference to the given string and assigns it to the User2 field.
func (o *Chat) SetUser2(v string) {
o.User2 = &v
}
// GetUserAgent returns the UserAgent field value if set, zero value otherwise.
func (o *Chat) GetUserAgent() string {
if o == nil || IsNil(o.UserAgent) {
var ret string
return ret
}
return *o.UserAgent
}
// GetUserAgentOk returns a tuple with the UserAgent field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Chat) GetUserAgentOk() (*string, bool) {
if o == nil || IsNil(o.UserAgent) {
return nil, false
}
return o.UserAgent, true
}
// HasUserAgent returns a boolean if a field has been set.
func (o *Chat) HasUserAgent() bool {
if o != nil && !IsNil(o.UserAgent) {
return true
}
return false
}
// SetUserAgent gets a reference to the given string and assigns it to the UserAgent field.
func (o *Chat) SetUserAgent(v string) {
o.UserAgent = &v
}
// GetUserAgentDesc returns the UserAgentDesc field value if set, zero value otherwise.
func (o *Chat) GetUserAgentDesc() string {
if o == nil || IsNil(o.UserAgentDesc) {
var ret string
return ret
}
return *o.UserAgentDesc
}
// GetUserAgentDescOk returns a tuple with the UserAgentDesc field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Chat) GetUserAgentDescOk() (*string, bool) {
if o == nil || IsNil(o.UserAgentDesc) {
return nil, false
}
return o.UserAgentDesc, true
}
// HasUserAgentDesc returns a boolean if a field has been set.
func (o *Chat) HasUserAgentDesc() bool {
if o != nil && !IsNil(o.UserAgentDesc) {
return true
}
return false
}
// SetUserAgentDesc gets a reference to the given string and assigns it to the UserAgentDesc field.
func (o *Chat) SetUserAgentDesc(v string) {
o.UserAgentDesc = &v
}
// GetUsers returns the Users field value if set, zero value otherwise.
func (o *Chat) GetUsers() []string {
if o == nil || IsNil(o.Users) {
var ret []string
return ret
}
return o.Users
}
// GetUsersOk returns a tuple with the Users field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Chat) GetUsersOk() ([]string, bool) {
if o == nil || IsNil(o.Users) {
return nil, false
}
return o.Users, true
}
// HasUsers returns a boolean if a field has been set.
func (o *Chat) HasUsers() bool {
if o != nil && !IsNil(o.Users) {
return true
}
return false
}
// SetUsers gets a reference to the given []string and assigns it to the Users field.
func (o *Chat) SetUsers(v []string) {
o.Users = v
}
func (o Chat) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o Chat) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Category) {
toSerialize["category"] = o.Category
}
if !IsNil(o.ClientIp) {
toSerialize["clientIp"] = o.ClientIp
}
if !IsNil(o.ClientIpDesc) {
toSerialize["clientIpDesc"] = o.ClientIpDesc
}
if !IsNil(o.CreatedTime) {
toSerialize["createdTime"] = o.CreatedTime
}
if !IsNil(o.Currency) {
toSerialize["currency"] = o.Currency
}
if !IsNil(o.DisplayName) {
toSerialize["displayName"] = o.DisplayName
}
if !IsNil(o.IsDeleted) {
toSerialize["isDeleted"] = o.IsDeleted
}
if !IsNil(o.IsHidden) {
toSerialize["isHidden"] = o.IsHidden
}
if !IsNil(o.MessageCount) {
toSerialize["messageCount"] = o.MessageCount
}
if !IsNil(o.ModelProvider) {
toSerialize["modelProvider"] = o.ModelProvider
}
if !IsNil(o.Name) {
toSerialize["name"] = o.Name
}
if !IsNil(o.NeedTitle) {
toSerialize["needTitle"] = o.NeedTitle
}
if !IsNil(o.Organization) {
toSerialize["organization"] = o.Organization
}
if !IsNil(o.Owner) {
toSerialize["owner"] = o.Owner
}
if !IsNil(o.Price) {
toSerialize["price"] = o.Price
}
if !IsNil(o.Store) {
toSerialize["store"] = o.Store
}
if !IsNil(o.TokenCount) {
toSerialize["tokenCount"] = o.TokenCount
}
if !IsNil(o.Type) {
toSerialize["type"] = o.Type
}
if !IsNil(o.UpdatedTime) {
toSerialize["updatedTime"] = o.UpdatedTime
}
if !IsNil(o.User) {
toSerialize["user"] = o.User
}
if !IsNil(o.User1) {
toSerialize["user1"] = o.User1
}
if !IsNil(o.User2) {
toSerialize["user2"] = o.User2
}
if !IsNil(o.UserAgent) {
toSerialize["userAgent"] = o.UserAgent
}
if !IsNil(o.UserAgentDesc) {
toSerialize["userAgentDesc"] = o.UserAgentDesc
}
if !IsNil(o.Users) {
toSerialize["users"] = o.Users
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *Chat) UnmarshalJSON(data []byte) (err error) {
varChat := _Chat{}
err = json.Unmarshal(data, &varChat)
if err != nil {
return err
}
*o = Chat(varChat)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "category")
delete(additionalProperties, "clientIp")
delete(additionalProperties, "clientIpDesc")
delete(additionalProperties, "createdTime")
delete(additionalProperties, "currency")
delete(additionalProperties, "displayName")
delete(additionalProperties, "isDeleted")
delete(additionalProperties, "isHidden")
delete(additionalProperties, "messageCount")
delete(additionalProperties, "modelProvider")
delete(additionalProperties, "name")
delete(additionalProperties, "needTitle")
delete(additionalProperties, "organization")
delete(additionalProperties, "owner")
delete(additionalProperties, "price")
delete(additionalProperties, "store")
delete(additionalProperties, "tokenCount")
delete(additionalProperties, "type")
delete(additionalProperties, "updatedTime")
delete(additionalProperties, "user")
delete(additionalProperties, "user1")
delete(additionalProperties, "user2")
delete(additionalProperties, "userAgent")
delete(additionalProperties, "userAgentDesc")
delete(additionalProperties, "users")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableChat struct {
value *Chat
isSet bool
}
func (v NullableChat) Get() *Chat {
return v.value
}
func (v *NullableChat) Set(val *Chat) {
v.value = val
v.isSet = true
}
func (v NullableChat) IsSet() bool {
return v.isSet
}
func (v *NullableChat) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableChat(val *Chat) *NullableChat {
return &NullableChat{value: val, isSet: true}
}
func (v NullableChat) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableChat) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}