/*
1Backend

AI-native microservices platform.

API version: 0.8.2
Contact: sales@singulatron.com
*/

// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.

package openapi

import (
	"encoding/json"
)

// checks if the ChatSvcSaveMessageRequest type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &ChatSvcSaveMessageRequest{}

// ChatSvcSaveMessageRequest struct for ChatSvcSaveMessageRequest
type ChatSvcSaveMessageRequest struct {
	// FileIds defines the file attachments the message has.
	FileIds []string `json:"fileIds,omitempty"`
	Id *string `json:"id,omitempty"`
	Meta map[string]interface{} `json:"meta,omitempty"`
	// Text content of the message eg. \"Hi, what's up?\"
	Text *string `json:"text,omitempty"`
	// ThreadId of the message.
	ThreadId *string `json:"threadId,omitempty"`
	// UserId is the id of the user who wrote the message. For AI messages this field is empty.
	UserId *string `json:"userId,omitempty"`
}

// NewChatSvcSaveMessageRequest instantiates a new ChatSvcSaveMessageRequest 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 NewChatSvcSaveMessageRequest() *ChatSvcSaveMessageRequest {
	this := ChatSvcSaveMessageRequest{}
	return &this
}

// NewChatSvcSaveMessageRequestWithDefaults instantiates a new ChatSvcSaveMessageRequest 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 NewChatSvcSaveMessageRequestWithDefaults() *ChatSvcSaveMessageRequest {
	this := ChatSvcSaveMessageRequest{}
	return &this
}

// GetFileIds returns the FileIds field value if set, zero value otherwise.
func (o *ChatSvcSaveMessageRequest) GetFileIds() []string {
	if o == nil || IsNil(o.FileIds) {
		var ret []string
		return ret
	}
	return o.FileIds
}

// GetFileIdsOk returns a tuple with the FileIds field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ChatSvcSaveMessageRequest) GetFileIdsOk() ([]string, bool) {
	if o == nil || IsNil(o.FileIds) {
		return nil, false
	}
	return o.FileIds, true
}

// HasFileIds returns a boolean if a field has been set.
func (o *ChatSvcSaveMessageRequest) HasFileIds() bool {
	if o != nil && !IsNil(o.FileIds) {
		return true
	}

	return false
}

// SetFileIds gets a reference to the given []string and assigns it to the FileIds field.
func (o *ChatSvcSaveMessageRequest) SetFileIds(v []string) {
	o.FileIds = v
}

// GetId returns the Id field value if set, zero value otherwise.
func (o *ChatSvcSaveMessageRequest) 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 *ChatSvcSaveMessageRequest) 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 *ChatSvcSaveMessageRequest) 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 *ChatSvcSaveMessageRequest) SetId(v string) {
	o.Id = &v
}

// GetMeta returns the Meta field value if set, zero value otherwise.
func (o *ChatSvcSaveMessageRequest) GetMeta() map[string]interface{} {
	if o == nil || IsNil(o.Meta) {
		var ret map[string]interface{}
		return ret
	}
	return o.Meta
}

// GetMetaOk returns a tuple with the Meta field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ChatSvcSaveMessageRequest) GetMetaOk() (map[string]interface{}, bool) {
	if o == nil || IsNil(o.Meta) {
		return map[string]interface{}{}, false
	}
	return o.Meta, true
}

// HasMeta returns a boolean if a field has been set.
func (o *ChatSvcSaveMessageRequest) HasMeta() bool {
	if o != nil && !IsNil(o.Meta) {
		return true
	}

	return false
}

// SetMeta gets a reference to the given map[string]interface{} and assigns it to the Meta field.
func (o *ChatSvcSaveMessageRequest) SetMeta(v map[string]interface{}) {
	o.Meta = v
}

// GetText returns the Text field value if set, zero value otherwise.
func (o *ChatSvcSaveMessageRequest) GetText() string {
	if o == nil || IsNil(o.Text) {
		var ret string
		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.
func (o *ChatSvcSaveMessageRequest) GetTextOk() (*string, 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 *ChatSvcSaveMessageRequest) HasText() bool {
	if o != nil && !IsNil(o.Text) {
		return true
	}

	return false
}

// SetText gets a reference to the given string and assigns it to the Text field.
func (o *ChatSvcSaveMessageRequest) SetText(v string) {
	o.Text = &v
}

// GetThreadId returns the ThreadId field value if set, zero value otherwise.
func (o *ChatSvcSaveMessageRequest) GetThreadId() string {
	if o == nil || IsNil(o.ThreadId) {
		var ret string
		return ret
	}
	return *o.ThreadId
}

// GetThreadIdOk returns a tuple with the ThreadId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ChatSvcSaveMessageRequest) GetThreadIdOk() (*string, bool) {
	if o == nil || IsNil(o.ThreadId) {
		return nil, false
	}
	return o.ThreadId, true
}

// HasThreadId returns a boolean if a field has been set.
func (o *ChatSvcSaveMessageRequest) HasThreadId() bool {
	if o != nil && !IsNil(o.ThreadId) {
		return true
	}

	return false
}

// SetThreadId gets a reference to the given string and assigns it to the ThreadId field.
func (o *ChatSvcSaveMessageRequest) SetThreadId(v string) {
	o.ThreadId = &v
}

// GetUserId returns the UserId field value if set, zero value otherwise.
func (o *ChatSvcSaveMessageRequest) GetUserId() string {
	if o == nil || IsNil(o.UserId) {
		var ret string
		return ret
	}
	return *o.UserId
}

// GetUserIdOk returns a tuple with the UserId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ChatSvcSaveMessageRequest) GetUserIdOk() (*string, bool) {
	if o == nil || IsNil(o.UserId) {
		return nil, false
	}
	return o.UserId, true
}

// HasUserId returns a boolean if a field has been set.
func (o *ChatSvcSaveMessageRequest) HasUserId() bool {
	if o != nil && !IsNil(o.UserId) {
		return true
	}

	return false
}

// SetUserId gets a reference to the given string and assigns it to the UserId field.
func (o *ChatSvcSaveMessageRequest) SetUserId(v string) {
	o.UserId = &v
}

func (o ChatSvcSaveMessageRequest) MarshalJSON() ([]byte, error) {
	toSerialize,err := o.ToMap()
	if err != nil {
		return []byte{}, err
	}
	return json.Marshal(toSerialize)
}

func (o ChatSvcSaveMessageRequest) ToMap() (map[string]interface{}, error) {
	toSerialize := map[string]interface{}{}
	if !IsNil(o.FileIds) {
		toSerialize["fileIds"] = o.FileIds
	}
	if !IsNil(o.Id) {
		toSerialize["id"] = o.Id
	}
	if !IsNil(o.Meta) {
		toSerialize["meta"] = o.Meta
	}
	if !IsNil(o.Text) {
		toSerialize["text"] = o.Text
	}
	if !IsNil(o.ThreadId) {
		toSerialize["threadId"] = o.ThreadId
	}
	if !IsNil(o.UserId) {
		toSerialize["userId"] = o.UserId
	}
	return toSerialize, nil
}

type NullableChatSvcSaveMessageRequest struct {
	value *ChatSvcSaveMessageRequest
	isSet bool
}

func (v NullableChatSvcSaveMessageRequest) Get() *ChatSvcSaveMessageRequest {
	return v.value
}

func (v *NullableChatSvcSaveMessageRequest) Set(val *ChatSvcSaveMessageRequest) {
	v.value = val
	v.isSet = true
}

func (v NullableChatSvcSaveMessageRequest) IsSet() bool {
	return v.isSet
}

func (v *NullableChatSvcSaveMessageRequest) Unset() {
	v.value = nil
	v.isSet = false
}

func NewNullableChatSvcSaveMessageRequest(val *ChatSvcSaveMessageRequest) *NullableChatSvcSaveMessageRequest {
	return &NullableChatSvcSaveMessageRequest{value: val, isSet: true}
}

func (v NullableChatSvcSaveMessageRequest) MarshalJSON() ([]byte, error) {
	return json.Marshal(v.value)
}

func (v *NullableChatSvcSaveMessageRequest) UnmarshalJSON(src []byte) error {
	v.isSet = true
	return json.Unmarshal(src, &v.value)
}


