package models

import (
	"encoding/json"
)

type MfaDevice struct {
	Active          *bool   `json:"active,omitempty"`
	Default         *bool   `json:"default,omitempty"`
	StateToken      *string `json:"state_token,omitempty"`
	AuthFactorName  *string `json:"auth_factor_name,omitempty"`
	PhoneNumber     *string `json:"phone_number,omitempty"`
	TypeDisplayName *string `json:"type_display_name,omitempty"`
	NeedsTrigger    *bool   `json:"needs_trigger,omitempty"`
	UserDisplayName *string `json:"user_display_name,omitempty"`
	Id              *int32  `json:"id,omitempty"`
}

func NewMfaDevice() *MfaDevice {
	this := MfaDevice{}
	return &this
}

func NewMfaDeviceWithDefaults() *MfaDevice {
	this := MfaDevice{}
	return &this
}

func (o *MfaDevice) GetActive() bool {
	if o == nil || o.Active == nil {
		var ret bool
		return ret
	}
	return *o.Active
}

func (o *MfaDevice) GetActiveOk() (*bool, bool) {
	if o == nil || o.Active == nil {
		return nil, false
	}
	return o.Active, true
}

func (o *MfaDevice) HasActive() bool {
	if o != nil && o.Active != nil {
		return true
	}

	return false
}

func (o *MfaDevice) SetActive(v bool) {
	o.Active = &v
}

func (o *MfaDevice) GetDefault() bool {
	if o == nil || o.Default == nil {
		var ret bool
		return ret
	}
	return *o.Default
}

func (o *MfaDevice) GetDefaultOk() (*bool, bool) {
	if o == nil || o.Default == nil {
		return nil, false
	}
	return o.Default, true
}

func (o *MfaDevice) HasDefault() bool {
	if o != nil && o.Default != nil {
		return true
	}

	return false
}

func (o *MfaDevice) SetDefault(v bool) {
	o.Default = &v
}

func (o *MfaDevice) GetStateToken() string {
	if o == nil || o.StateToken == nil {
		var ret string
		return ret
	}
	return *o.StateToken
}

func (o *MfaDevice) GetStateTokenOk() (*string, bool) {
	if o == nil || o.StateToken == nil {
		return nil, false
	}
	return o.StateToken, true
}

func (o *MfaDevice) HasStateToken() bool {
	if o != nil && o.StateToken != nil {
		return true
	}

	return false
}

func (o *MfaDevice) SetStateToken(v string) {
	o.StateToken = &v
}

func (o *MfaDevice) GetAuthFactorName() string {
	if o == nil || o.AuthFactorName == nil {
		var ret string
		return ret
	}
	return *o.AuthFactorName
}

func (o *MfaDevice) GetAuthFactorNameOk() (*string, bool) {
	if o == nil || o.AuthFactorName == nil {
		return nil, false
	}
	return o.AuthFactorName, true
}

func (o *MfaDevice) HasAuthFactorName() bool {
	if o != nil && o.AuthFactorName != nil {
		return true
	}

	return false
}

func (o *MfaDevice) SetAuthFactorName(v string) {
	o.AuthFactorName = &v
}

func (o *MfaDevice) GetPhoneNumber() string {
	if o == nil || o.PhoneNumber == nil {
		var ret string
		return ret
	}
	return *o.PhoneNumber
}

func (o *MfaDevice) GetPhoneNumberOk() (*string, bool) {
	if o == nil || o.PhoneNumber == nil {
		return nil, false
	}
	return o.PhoneNumber, true
}

func (o *MfaDevice) HasPhoneNumber() bool {
	if o != nil && o.PhoneNumber != nil {
		return true
	}

	return false
}

func (o *MfaDevice) SetPhoneNumber(v string) {
	o.PhoneNumber = &v
}

func (o *MfaDevice) GetTypeDisplayName() string {
	if o == nil || o.TypeDisplayName == nil {
		var ret string
		return ret
	}
	return *o.TypeDisplayName
}

func (o *MfaDevice) GetTypeDisplayNameOk() (*string, bool) {
	if o == nil || o.TypeDisplayName == nil {
		return nil, false
	}
	return o.TypeDisplayName, true
}

func (o *MfaDevice) HasTypeDisplayName() bool {
	if o != nil && o.TypeDisplayName != nil {
		return true
	}

	return false
}

func (o *MfaDevice) SetTypeDisplayName(v string) {
	o.TypeDisplayName = &v
}

func (o *MfaDevice) GetNeedsTrigger() bool {
	if o == nil || o.NeedsTrigger == nil {
		var ret bool
		return ret
	}
	return *o.NeedsTrigger
}

func (o *MfaDevice) GetNeedsTriggerOk() (*bool, bool) {
	if o == nil || o.NeedsTrigger == nil {
		return nil, false
	}
	return o.NeedsTrigger, true
}

func (o *MfaDevice) HasNeedsTrigger() bool {
	if o != nil && o.NeedsTrigger != nil {
		return true
	}

	return false
}

func (o *MfaDevice) SetNeedsTrigger(v bool) {
	o.NeedsTrigger = &v
}

func (o *MfaDevice) GetUserDisplayName() string {
	if o == nil || o.UserDisplayName == nil {
		var ret string
		return ret
	}
	return *o.UserDisplayName
}

func (o *MfaDevice) GetUserDisplayNameOk() (*string, bool) {
	if o == nil || o.UserDisplayName == nil {
		return nil, false
	}
	return o.UserDisplayName, true
}

func (o *MfaDevice) HasUserDisplayName() bool {
	if o != nil && o.UserDisplayName != nil {
		return true
	}

	return false
}

func (o *MfaDevice) SetUserDisplayName(v string) {
	o.UserDisplayName = &v
}

func (o *MfaDevice) GetId() int32 {
	if o == nil || o.Id == nil {
		var ret int32
		return ret
	}
	return *o.Id
}

func (o *MfaDevice) GetIdOk() (*int32, bool) {
	if o == nil || o.Id == nil {
		return nil, false
	}
	return o.Id, true
}

func (o *MfaDevice) HasId() bool {
	if o != nil && o.Id != nil {
		return true
	}

	return false
}

func (o *MfaDevice) SetId(v int32) {
	o.Id = &v
}

func (o MfaDevice) MarshalJSON() ([]byte, error) {
	toSerialize := map[string]interface{}{}
	if o.Active != nil {
		toSerialize["active"] = o.Active
	}
	if o.Default != nil {
		toSerialize["default"] = o.Default
	}
	if o.StateToken != nil {
		toSerialize["state_token"] = o.StateToken
	}
	if o.AuthFactorName != nil {
		toSerialize["auth_factor_name"] = o.AuthFactorName
	}
	if o.PhoneNumber != nil {
		toSerialize["phone_number"] = o.PhoneNumber
	}
	if o.TypeDisplayName != nil {
		toSerialize["type_display_name"] = o.TypeDisplayName
	}
	if o.NeedsTrigger != nil {
		toSerialize["needs_trigger"] = o.NeedsTrigger
	}
	if o.UserDisplayName != nil {
		toSerialize["user_display_name"] = o.UserDisplayName
	}
	if o.Id != nil {
		toSerialize["id"] = o.Id
	}
	return json.Marshal(toSerialize)
}

type NullableMfaDevice struct {
	value *MfaDevice
	isSet bool
}

func (v NullableMfaDevice) Get() *MfaDevice {
	return v.value
}

func (v *NullableMfaDevice) Set(val *MfaDevice) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableMfaDevice(val *MfaDevice) *NullableMfaDevice {
	return &NullableMfaDevice{value: val, isSet: true}
}

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

func (v *NullableMfaDevice) UnmarshalJSON(src []byte) error {
	v.isSet = true
	return json.Unmarshal(src, &v.value)
}
// Code generated by "openapi-codegen"; DO NOT EDIT.
/*
 * OneLogin API
 *
 * This is an administrative API for OneLogin customers
 *
 * API version: 1.1.0-oas3
 * Generated by: OpenAPI Generator (https://openapi-generator.tech)
 */

package models

import (
	"encoding/json"
)

// MfaDevice struct for MfaDevice
type MfaDevice struct {
	Active          *bool   `json:"active,omitempty"`
	Default         *bool   `json:"default,omitempty"`
	StateToken      *string `json:"state_token,omitempty"`
	AuthFactorName  *string `json:"auth_factor_name,omitempty"`
	PhoneNumber     *string `json:"phone_number,omitempty"`
	TypeDisplayName *string `json:"type_display_name,omitempty"`
	NeedsTrigger    *bool   `json:"needs_trigger,omitempty"`
	UserDisplayName *string `json:"user_display_name,omitempty"`
	Id              *int32  `json:"id,omitempty"`
}

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

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

// GetActive returns the Active field value if set, zero value otherwise.
func (o *MfaDevice) GetActive() bool {
	if o == nil || o.Active == nil {
		var ret bool
		return ret
	}
	return *o.Active
}

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

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

	return false
}

// SetActive gets a reference to the given bool and assigns it to the Active field.
func (o *MfaDevice) SetActive(v bool) {
	o.Active = &v
}

// GetDefault returns the Default field value if set, zero value otherwise.
func (o *MfaDevice) GetDefault() bool {
	if o == nil || o.Default == nil {
		var ret bool
		return ret
	}
	return *o.Default
}

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

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

	return false
}

// SetDefault gets a reference to the given bool and assigns it to the Default field.
func (o *MfaDevice) SetDefault(v bool) {
	o.Default = &v
}

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

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

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

	return false
}

// SetStateToken gets a reference to the given string and assigns it to the StateToken field.
func (o *MfaDevice) SetStateToken(v string) {
	o.StateToken = &v
}

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

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

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

	return false
}

// SetAuthFactorName gets a reference to the given string and assigns it to the AuthFactorName field.
func (o *MfaDevice) SetAuthFactorName(v string) {
	o.AuthFactorName = &v
}

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

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

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

	return false
}

// SetPhoneNumber gets a reference to the given string and assigns it to the PhoneNumber field.
func (o *MfaDevice) SetPhoneNumber(v string) {
	o.PhoneNumber = &v
}

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

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

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

	return false
}

// SetTypeDisplayName gets a reference to the given string and assigns it to the TypeDisplayName field.
func (o *MfaDevice) SetTypeDisplayName(v string) {
	o.TypeDisplayName = &v
}

// GetNeedsTrigger returns the NeedsTrigger field value if set, zero value otherwise.
func (o *MfaDevice) GetNeedsTrigger() bool {
	if o == nil || o.NeedsTrigger == nil {
		var ret bool
		return ret
	}
	return *o.NeedsTrigger
}

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

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

	return false
}

// SetNeedsTrigger gets a reference to the given bool and assigns it to the NeedsTrigger field.
func (o *MfaDevice) SetNeedsTrigger(v bool) {
	o.NeedsTrigger = &v
}

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

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

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

	return false
}

// SetUserDisplayName gets a reference to the given string and assigns it to the UserDisplayName field.
func (o *MfaDevice) SetUserDisplayName(v string) {
	o.UserDisplayName = &v
}

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

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

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

	return false
}

// SetId gets a reference to the given int32 and assigns it to the Id field.
func (o *MfaDevice) SetId(v int32) {
	o.Id = &v
}

func (o MfaDevice) MarshalJSON() ([]byte, error) {
	toSerialize := map[string]interface{}{}
	if o.Active != nil {
		toSerialize["active"] = o.Active
	}
	if o.Default != nil {
		toSerialize["default"] = o.Default
	}
	if o.StateToken != nil {
		toSerialize["state_token"] = o.StateToken
	}
	if o.AuthFactorName != nil {
		toSerialize["auth_factor_name"] = o.AuthFactorName
	}
	if o.PhoneNumber != nil {
		toSerialize["phone_number"] = o.PhoneNumber
	}
	if o.TypeDisplayName != nil {
		toSerialize["type_display_name"] = o.TypeDisplayName
	}
	if o.NeedsTrigger != nil {
		toSerialize["needs_trigger"] = o.NeedsTrigger
	}
	if o.UserDisplayName != nil {
		toSerialize["user_display_name"] = o.UserDisplayName
	}
	if o.Id != nil {
		toSerialize["id"] = o.Id
	}
	return json.Marshal(toSerialize)
}

type NullableMfaDevice struct {
	value *MfaDevice
	isSet bool
}

func (v NullableMfaDevice) Get() *MfaDevice {
	return v.value
}

func (v *NullableMfaDevice) Set(val *MfaDevice) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableMfaDevice(val *MfaDevice) *NullableMfaDevice {
	return &NullableMfaDevice{value: val, isSet: true}
}

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

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