/*
 * In-Memory DB API
 *
 * API description for the IONOS In-Memory DB
 *
 * API version: 1.0.0
 * Contact: support@cloud.ionos.com
 */

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

package ionoscloud

import (
	"encoding/json"
)

// Restore A point in time snapshot of a In-Memory DB replica set.
type Restore struct {
	// The ID of the replica set the restore was applied on.
	ReplicasetId *string `json:"replicasetId"`
	// The human readable name of your snapshot.
	DisplayName *string `json:"displayName,omitempty"`
	// A description of the snapshot.
	Description *string `json:"description,omitempty"`
}

// NewRestore instantiates a new Restore 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 NewRestore(replicasetId string) *Restore {
	this := Restore{}

	this.ReplicasetId = &replicasetId

	return &this
}

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

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

	return o.ReplicasetId

}

// GetReplicasetIdOk returns a tuple with the ReplicasetId 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 *Restore) GetReplicasetIdOk() (*string, bool) {
	if o == nil {
		return nil, false
	}

	return o.ReplicasetId, true
}

// SetReplicasetId sets field value
func (o *Restore) SetReplicasetId(v string) {

	o.ReplicasetId = &v

}

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

	return false
}

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

	return o.DisplayName

}

// GetDisplayNameOk returns a tuple with the DisplayName 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 *Restore) GetDisplayNameOk() (*string, bool) {
	if o == nil {
		return nil, false
	}

	return o.DisplayName, true
}

// SetDisplayName sets field value
func (o *Restore) SetDisplayName(v string) {

	o.DisplayName = &v

}

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

	return false
}

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

	return o.Description

}

// GetDescriptionOk returns a tuple with the Description 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 *Restore) GetDescriptionOk() (*string, bool) {
	if o == nil {
		return nil, false
	}

	return o.Description, true
}

// SetDescription sets field value
func (o *Restore) SetDescription(v string) {

	o.Description = &v

}

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

	return false
}

func (o Restore) MarshalJSON() ([]byte, error) {
	toSerialize := map[string]interface{}{}
	if o.ReplicasetId != nil {
		toSerialize["replicasetId"] = o.ReplicasetId
	}

	if o.DisplayName != nil {
		toSerialize["displayName"] = o.DisplayName
	}

	if o.Description != nil {
		toSerialize["description"] = o.Description
	}

	return json.Marshal(toSerialize)
}

type NullableRestore struct {
	value *Restore
	isSet bool
}

func (v NullableRestore) Get() *Restore {
	return v.value
}

func (v *NullableRestore) Set(val *Restore) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableRestore(val *Restore) *NullableRestore {
	return &NullableRestore{value: val, isSet: true}
}

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

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