/*
 * IONOS DBaaS MongoDB REST API
 *
 * With IONOS Cloud Database as a Service, you have the ability to quickly set up and manage a MongoDB database. You can also delete clusters, manage backups and users via the API.  MongoDB is an open source, cross-platform, document-oriented database program. Classified as a NoSQL database program, it uses JSON-like documents with optional schemas.  The MongoDB API allows you to create additional database clusters or modify existing ones. Both tools, the Data Center Designer (DCD) and the API use the same concepts consistently and are well suited for smooth and intuitive use.
 *
 * API version: 1.0.0
 */

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

package ionoscloud

import (
	"encoding/json"
	"time"
)

// ClusterLogsInstancesMessages struct for ClusterLogsInstancesMessages
type ClusterLogsInstancesMessages struct {
	Time    *IonosTime `json:"time,omitempty"`
	Message *string    `json:"message,omitempty"`
}

// NewClusterLogsInstancesMessages instantiates a new ClusterLogsInstancesMessages 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 NewClusterLogsInstancesMessages() *ClusterLogsInstancesMessages {
	this := ClusterLogsInstancesMessages{}

	return &this
}

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

// GetTime returns the Time field value
// If the value is explicit nil, the zero value for time.Time will be returned
func (o *ClusterLogsInstancesMessages) GetTime() *time.Time {
	if o == nil {
		return nil
	}

	if o.Time == nil {
		return nil
	}
	return &o.Time.Time

}

// GetTimeOk returns a tuple with the Time field value
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *ClusterLogsInstancesMessages) GetTimeOk() (*time.Time, bool) {
	if o == nil {
		return nil, false
	}

	if o.Time == nil {
		return nil, false
	}
	return &o.Time.Time, true

}

// SetTime sets field value
func (o *ClusterLogsInstancesMessages) SetTime(v time.Time) {

	o.Time = &IonosTime{v}

}

// HasTime returns a boolean if a field has been set.
func (o *ClusterLogsInstancesMessages) HasTime() bool {
	if o != nil && o.Time != nil {
		return true
	}

	return false
}

// GetMessage returns the Message field value
// If the value is explicit nil, the zero value for string will be returned
func (o *ClusterLogsInstancesMessages) GetMessage() *string {
	if o == nil {
		return nil
	}

	return o.Message

}

// GetMessageOk returns a tuple with the Message field value
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *ClusterLogsInstancesMessages) GetMessageOk() (*string, bool) {
	if o == nil {
		return nil, false
	}

	return o.Message, true
}

// SetMessage sets field value
func (o *ClusterLogsInstancesMessages) SetMessage(v string) {

	o.Message = &v

}

// HasMessage returns a boolean if a field has been set.
func (o *ClusterLogsInstancesMessages) HasMessage() bool {
	if o != nil && o.Message != nil {
		return true
	}

	return false
}

func (o ClusterLogsInstancesMessages) MarshalJSON() ([]byte, error) {
	toSerialize := map[string]interface{}{}
	if o.Time != nil {
		toSerialize["time"] = o.Time
	}
	if o.Message != nil {
		toSerialize["message"] = o.Message
	}
	return json.Marshal(toSerialize)
}

type NullableClusterLogsInstancesMessages struct {
	value *ClusterLogsInstancesMessages
	isSet bool
}

func (v NullableClusterLogsInstancesMessages) Get() *ClusterLogsInstancesMessages {
	return v.value
}

func (v *NullableClusterLogsInstancesMessages) Set(val *ClusterLogsInstancesMessages) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableClusterLogsInstancesMessages(val *ClusterLogsInstancesMessages) *NullableClusterLogsInstancesMessages {
	return &NullableClusterLogsInstancesMessages{value: val, isSet: true}
}

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

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