/*
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 UserSvcRevokeTokensRequest type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &UserSvcRevokeTokensRequest{}

// UserSvcRevokeTokensRequest struct for UserSvcRevokeTokensRequest
type UserSvcRevokeTokensRequest struct {
	// If true, all tokens for the user will be revoked.
	AllTokens *bool `json:"allTokens,omitempty"`
	Device *string `json:"device,omitempty"`
	// Only used by admins (or whoever has the `user-svc:token:revoke` permission revoke tokens for other users
	UserId *string `json:"userId,omitempty"`
}

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

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

// GetAllTokens returns the AllTokens field value if set, zero value otherwise.
func (o *UserSvcRevokeTokensRequest) GetAllTokens() bool {
	if o == nil || IsNil(o.AllTokens) {
		var ret bool
		return ret
	}
	return *o.AllTokens
}

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

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

	return false
}

// SetAllTokens gets a reference to the given bool and assigns it to the AllTokens field.
func (o *UserSvcRevokeTokensRequest) SetAllTokens(v bool) {
	o.AllTokens = &v
}

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

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

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

	return false
}

// SetDevice gets a reference to the given string and assigns it to the Device field.
func (o *UserSvcRevokeTokensRequest) SetDevice(v string) {
	o.Device = &v
}

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

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

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

	return false
}

// SetUserId gets a reference to the given string and assigns it to the UserId field.
func (o *UserSvcRevokeTokensRequest) SetUserId(v string) {
	o.UserId = &v
}

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

func (o UserSvcRevokeTokensRequest) ToMap() (map[string]interface{}, error) {
	toSerialize := map[string]interface{}{}
	if !IsNil(o.AllTokens) {
		toSerialize["allTokens"] = o.AllTokens
	}
	if !IsNil(o.Device) {
		toSerialize["device"] = o.Device
	}
	if !IsNil(o.UserId) {
		toSerialize["userId"] = o.UserId
	}
	return toSerialize, nil
}

type NullableUserSvcRevokeTokensRequest struct {
	value *UserSvcRevokeTokensRequest
	isSet bool
}

func (v NullableUserSvcRevokeTokensRequest) Get() *UserSvcRevokeTokensRequest {
	return v.value
}

func (v *NullableUserSvcRevokeTokensRequest) Set(val *UserSvcRevokeTokensRequest) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableUserSvcRevokeTokensRequest(val *UserSvcRevokeTokensRequest) *NullableUserSvcRevokeTokensRequest {
	return &NullableUserSvcRevokeTokensRequest{value: val, isSet: true}
}

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

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


