/*
AutoGlue API

API for managing K3s clusters across cloud providers

API version: 1.0
*/

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

package autoglue

import (
	"encoding/json"
)

// checks if the DtoLogoutRequest type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &DtoLogoutRequest{}

// DtoLogoutRequest struct for DtoLogoutRequest
type DtoLogoutRequest struct {
	RefreshToken *string `json:"refresh_token,omitempty"`
}

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

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

// GetRefreshToken returns the RefreshToken field value if set, zero value otherwise.
func (o *DtoLogoutRequest) GetRefreshToken() string {
	if o == nil || IsNil(o.RefreshToken) {
		var ret string
		return ret
	}
	return *o.RefreshToken
}

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

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

	return false
}

// SetRefreshToken gets a reference to the given string and assigns it to the RefreshToken field.
func (o *DtoLogoutRequest) SetRefreshToken(v string) {
	o.RefreshToken = &v
}

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

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

type NullableDtoLogoutRequest struct {
	value *DtoLogoutRequest
	isSet bool
}

func (v NullableDtoLogoutRequest) Get() *DtoLogoutRequest {
	return v.value
}

func (v *NullableDtoLogoutRequest) Set(val *DtoLogoutRequest) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableDtoLogoutRequest(val *DtoLogoutRequest) *NullableDtoLogoutRequest {
	return &NullableDtoLogoutRequest{value: val, isSet: true}
}

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

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