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

// ChatSvcListThreadsResponse struct for ChatSvcListThreadsResponse
type ChatSvcListThreadsResponse struct {
	Threads []ChatSvcThread `json:"threads,omitempty"`
}

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

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

// GetThreads returns the Threads field value if set, zero value otherwise.
func (o *ChatSvcListThreadsResponse) GetThreads() []ChatSvcThread {
	if o == nil || IsNil(o.Threads) {
		var ret []ChatSvcThread
		return ret
	}
	return o.Threads
}

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

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

	return false
}

// SetThreads gets a reference to the given []ChatSvcThread and assigns it to the Threads field.
func (o *ChatSvcListThreadsResponse) SetThreads(v []ChatSvcThread) {
	o.Threads = v
}

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

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

type NullableChatSvcListThreadsResponse struct {
	value *ChatSvcListThreadsResponse
	isSet bool
}

func (v NullableChatSvcListThreadsResponse) Get() *ChatSvcListThreadsResponse {
	return v.value
}

func (v *NullableChatSvcListThreadsResponse) Set(val *ChatSvcListThreadsResponse) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableChatSvcListThreadsResponse(val *ChatSvcListThreadsResponse) *NullableChatSvcListThreadsResponse {
	return &NullableChatSvcListThreadsResponse{value: val, isSet: true}
}

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

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


