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

// ChatSvcSaveThreadResponse struct for ChatSvcSaveThreadResponse
type ChatSvcSaveThreadResponse struct {
	Thread *ChatSvcThread `json:"thread,omitempty"`
}

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

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

// GetThread returns the Thread field value if set, zero value otherwise.
func (o *ChatSvcSaveThreadResponse) GetThread() ChatSvcThread {
	if o == nil || IsNil(o.Thread) {
		var ret ChatSvcThread
		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 *ChatSvcSaveThreadResponse) GetThreadOk() (*ChatSvcThread, 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 *ChatSvcSaveThreadResponse) HasThread() bool {
	if o != nil && !IsNil(o.Thread) {
		return true
	}

	return false
}

// SetThread gets a reference to the given ChatSvcThread and assigns it to the Thread field.
func (o *ChatSvcSaveThreadResponse) SetThread(v ChatSvcThread) {
	o.Thread = &v
}

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

func (o ChatSvcSaveThreadResponse) ToMap() (map[string]interface{}, error) {
	toSerialize := map[string]interface{}{}
	if !IsNil(o.Thread) {
		toSerialize["thread"] = o.Thread
	}
	return toSerialize, nil
}

type NullableChatSvcSaveThreadResponse struct {
	value *ChatSvcSaveThreadResponse
	isSet bool
}

func (v NullableChatSvcSaveThreadResponse) Get() *ChatSvcSaveThreadResponse {
	return v.value
}

func (v *NullableChatSvcSaveThreadResponse) Set(val *ChatSvcSaveThreadResponse) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableChatSvcSaveThreadResponse(val *ChatSvcSaveThreadResponse) *NullableChatSvcSaveThreadResponse {
	return &NullableChatSvcSaveThreadResponse{value: val, isSet: true}
}

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

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


