/*
xpan

xpanapi

API version: 0.1
*/

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

package openapi

import (
	"encoding/json"
)

// OauthTokenDeviceCodeResponse struct for OauthTokenDeviceCodeResponse
type OauthTokenDeviceCodeResponse struct {
	DeviceCode *string `json:"device_code,omitempty"`
	UserCode *string `json:"user_code,omitempty"`
	VerificationUrl *string `json:"verification_url,omitempty"`
	QrcodeUrl *string `json:"qrcode_url,omitempty"`
	ExpiresIn *int32 `json:"expires_in,omitempty"`
	Interval *int32 `json:"interval,omitempty"`
}

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

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

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

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

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

	return false
}

// SetDeviceCode gets a reference to the given string and assigns it to the DeviceCode field.
func (o *OauthTokenDeviceCodeResponse) SetDeviceCode(v string) {
	o.DeviceCode = &v
}

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

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

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

	return false
}

// SetUserCode gets a reference to the given string and assigns it to the UserCode field.
func (o *OauthTokenDeviceCodeResponse) SetUserCode(v string) {
	o.UserCode = &v
}

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

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

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

	return false
}

// SetVerificationUrl gets a reference to the given string and assigns it to the VerificationUrl field.
func (o *OauthTokenDeviceCodeResponse) SetVerificationUrl(v string) {
	o.VerificationUrl = &v
}

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

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

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

	return false
}

// SetQrcodeUrl gets a reference to the given string and assigns it to the QrcodeUrl field.
func (o *OauthTokenDeviceCodeResponse) SetQrcodeUrl(v string) {
	o.QrcodeUrl = &v
}

// GetExpiresIn returns the ExpiresIn field value if set, zero value otherwise.
func (o *OauthTokenDeviceCodeResponse) GetExpiresIn() int32 {
	if o == nil || o.ExpiresIn == nil {
		var ret int32
		return ret
	}
	return *o.ExpiresIn
}

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

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

	return false
}

// SetExpiresIn gets a reference to the given int32 and assigns it to the ExpiresIn field.
func (o *OauthTokenDeviceCodeResponse) SetExpiresIn(v int32) {
	o.ExpiresIn = &v
}

// GetInterval returns the Interval field value if set, zero value otherwise.
func (o *OauthTokenDeviceCodeResponse) GetInterval() int32 {
	if o == nil || o.Interval == nil {
		var ret int32
		return ret
	}
	return *o.Interval
}

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

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

	return false
}

// SetInterval gets a reference to the given int32 and assigns it to the Interval field.
func (o *OauthTokenDeviceCodeResponse) SetInterval(v int32) {
	o.Interval = &v
}

func (o OauthTokenDeviceCodeResponse) MarshalJSON() ([]byte, error) {
	toSerialize := map[string]interface{}{}
	if o.DeviceCode != nil {
		toSerialize["device_code"] = o.DeviceCode
	}
	if o.UserCode != nil {
		toSerialize["user_code"] = o.UserCode
	}
	if o.VerificationUrl != nil {
		toSerialize["verification_url"] = o.VerificationUrl
	}
	if o.QrcodeUrl != nil {
		toSerialize["qrcode_url"] = o.QrcodeUrl
	}
	if o.ExpiresIn != nil {
		toSerialize["expires_in"] = o.ExpiresIn
	}
	if o.Interval != nil {
		toSerialize["interval"] = o.Interval
	}
	return json.Marshal(toSerialize)
}

type NullableOauthTokenDeviceCodeResponse struct {
	value *OauthTokenDeviceCodeResponse
	isSet bool
}

func (v NullableOauthTokenDeviceCodeResponse) Get() *OauthTokenDeviceCodeResponse {
	return v.value
}

func (v *NullableOauthTokenDeviceCodeResponse) Set(val *OauthTokenDeviceCodeResponse) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableOauthTokenDeviceCodeResponse(val *OauthTokenDeviceCodeResponse) *NullableOauthTokenDeviceCodeResponse {
	return &NullableOauthTokenDeviceCodeResponse{value: val, isSet: true}
}

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

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


