/*
 * Subset of Influx API covered by Influx CLI
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * API version: 2.0.0
 */

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

package api

import (
	"encoding/json"
)

// PostRestoreKVResponse struct for PostRestoreKVResponse
type PostRestoreKVResponse struct {
	// token is the root token for the instance after restore (this is overwritten during the restore)
	Token *string `json:"token,omitempty" yaml:"token,omitempty"`
}

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

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

// GetToken returns the Token field value if set, zero value otherwise.
func (o *PostRestoreKVResponse) GetToken() string {
	if o == nil || o.Token == nil {
		var ret string
		return ret
	}
	return *o.Token
}

// GetTokenOk returns a tuple with the Token field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PostRestoreKVResponse) GetTokenOk() (*string, bool) {
	if o == nil || o.Token == nil {
		return nil, false
	}
	return o.Token, true
}

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

	return false
}

// SetToken gets a reference to the given string and assigns it to the Token field.
func (o *PostRestoreKVResponse) SetToken(v string) {
	o.Token = &v
}

func (o PostRestoreKVResponse) MarshalJSON() ([]byte, error) {
	toSerialize := map[string]interface{}{}
	if o.Token != nil {
		toSerialize["token"] = o.Token
	}
	return json.Marshal(toSerialize)
}

type NullablePostRestoreKVResponse struct {
	value *PostRestoreKVResponse
	isSet bool
}

func (v NullablePostRestoreKVResponse) Get() *PostRestoreKVResponse {
	return v.value
}

func (v *NullablePostRestoreKVResponse) Set(val *PostRestoreKVResponse) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullablePostRestoreKVResponse(val *PostRestoreKVResponse) *NullablePostRestoreKVResponse {
	return &NullablePostRestoreKVResponse{value: val, isSet: true}
}

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

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