/*
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 ChatSvcSaveThreadRequest type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &ChatSvcSaveThreadRequest{}

// ChatSvcSaveThreadRequest struct for ChatSvcSaveThreadRequest
type ChatSvcSaveThreadRequest struct {
	Id *string `json:"id,omitempty"`
	// Title of the thread.
	Title *string `json:"title,omitempty"`
	// TopicIds defines which topics the thread belongs to. Topics can roughly be thought of as tags for threads.
	TopicIds []string `json:"topicIds,omitempty"`
	// UserIds the ids of the users who can see this thread.
	UserIds []string `json:"userIds,omitempty"`
}

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

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

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

// GetTitle returns the Title field value if set, zero value otherwise.
func (o *ChatSvcSaveThreadRequest) 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 *ChatSvcSaveThreadRequest) 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 *ChatSvcSaveThreadRequest) 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 *ChatSvcSaveThreadRequest) SetTitle(v string) {
	o.Title = &v
}

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

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

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

	return false
}

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

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

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

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

	return false
}

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

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

func (o ChatSvcSaveThreadRequest) ToMap() (map[string]interface{}, error) {
	toSerialize := map[string]interface{}{}
	if !IsNil(o.Id) {
		toSerialize["id"] = o.Id
	}
	if !IsNil(o.Title) {
		toSerialize["title"] = o.Title
	}
	if !IsNil(o.TopicIds) {
		toSerialize["topicIds"] = o.TopicIds
	}
	if !IsNil(o.UserIds) {
		toSerialize["userIds"] = o.UserIds
	}
	return toSerialize, nil
}

type NullableChatSvcSaveThreadRequest struct {
	value *ChatSvcSaveThreadRequest
	isSet bool
}

func (v NullableChatSvcSaveThreadRequest) Get() *ChatSvcSaveThreadRequest {
	return v.value
}

func (v *NullableChatSvcSaveThreadRequest) Set(val *ChatSvcSaveThreadRequest) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableChatSvcSaveThreadRequest(val *ChatSvcSaveThreadRequest) *NullableChatSvcSaveThreadRequest {
	return &NullableChatSvcSaveThreadRequest{value: val, isSet: true}
}

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

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


