/*
1Backend

AI-native microservices platform.

API version: 0.8.2
Contact: sales@singulatron.com
*/

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

package openapi

import (
	"encoding/json"
)

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

// UserSvcExchangeTokenRequest struct for UserSvcExchangeTokenRequest
type UserSvcExchangeTokenRequest struct {
	// NewApp is the app of the new token that will be returned by this endpoint.
	NewAppHost *string `json:"newAppHost,omitempty"`
	NewAppId *string `json:"newAppId,omitempty"`
	// NewDevice. If not provided, the device of the original token will be used.
	NewDevice *string `json:"newDevice,omitempty"`
}

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

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

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

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

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

	return false
}

// SetNewAppHost gets a reference to the given string and assigns it to the NewAppHost field.
func (o *UserSvcExchangeTokenRequest) SetNewAppHost(v string) {
	o.NewAppHost = &v
}

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

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

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

	return false
}

// SetNewAppId gets a reference to the given string and assigns it to the NewAppId field.
func (o *UserSvcExchangeTokenRequest) SetNewAppId(v string) {
	o.NewAppId = &v
}

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

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

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

	return false
}

// SetNewDevice gets a reference to the given string and assigns it to the NewDevice field.
func (o *UserSvcExchangeTokenRequest) SetNewDevice(v string) {
	o.NewDevice = &v
}

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

func (o UserSvcExchangeTokenRequest) ToMap() (map[string]interface{}, error) {
	toSerialize := map[string]interface{}{}
	if !IsNil(o.NewAppHost) {
		toSerialize["newAppHost"] = o.NewAppHost
	}
	if !IsNil(o.NewAppId) {
		toSerialize["newAppId"] = o.NewAppId
	}
	if !IsNil(o.NewDevice) {
		toSerialize["newDevice"] = o.NewDevice
	}
	return toSerialize, nil
}

type NullableUserSvcExchangeTokenRequest struct {
	value *UserSvcExchangeTokenRequest
	isSet bool
}

func (v NullableUserSvcExchangeTokenRequest) Get() *UserSvcExchangeTokenRequest {
	return v.value
}

func (v *NullableUserSvcExchangeTokenRequest) Set(val *UserSvcExchangeTokenRequest) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableUserSvcExchangeTokenRequest(val *UserSvcExchangeTokenRequest) *NullableUserSvcExchangeTokenRequest {
	return &NullableUserSvcExchangeTokenRequest{value: val, isSet: true}
}

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

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


