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

// ChatSvcListMessagesResponse struct for ChatSvcListMessagesResponse
type ChatSvcListMessagesResponse struct {
	Messages []ChatSvcMessage `json:"messages,omitempty"`
}

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

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

// GetMessages returns the Messages field value if set, zero value otherwise.
func (o *ChatSvcListMessagesResponse) GetMessages() []ChatSvcMessage {
	if o == nil || IsNil(o.Messages) {
		var ret []ChatSvcMessage
		return ret
	}
	return o.Messages
}

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

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

	return false
}

// SetMessages gets a reference to the given []ChatSvcMessage and assigns it to the Messages field.
func (o *ChatSvcListMessagesResponse) SetMessages(v []ChatSvcMessage) {
	o.Messages = v
}

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

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

type NullableChatSvcListMessagesResponse struct {
	value *ChatSvcListMessagesResponse
	isSet bool
}

func (v NullableChatSvcListMessagesResponse) Get() *ChatSvcListMessagesResponse {
	return v.value
}

func (v *NullableChatSvcListMessagesResponse) Set(val *ChatSvcListMessagesResponse) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableChatSvcListMessagesResponse(val *ChatSvcListMessagesResponse) *NullableChatSvcListMessagesResponse {
	return &NullableChatSvcListMessagesResponse{value: val, isSet: true}
}

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

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


