Class: Zitadel::Client::Models::SettingsServiceSecondFactorType

Inherits:
Object
  • Object
show all
Defined in:
lib/zitadel/client/models/settings_service_second_factor_type.rb

Constant Summary collapse

SECOND_FACTOR_TYPE_UNSPECIFIED =
"SECOND_FACTOR_TYPE_UNSPECIFIED".freeze
SECOND_FACTOR_TYPE_OTP =
"SECOND_FACTOR_TYPE_OTP".freeze
SECOND_FACTOR_TYPE_U2_F =
"SECOND_FACTOR_TYPE_U2F".freeze
SECOND_FACTOR_TYPE_OTP_EMAIL =
"SECOND_FACTOR_TYPE_OTP_EMAIL".freeze
SECOND_FACTOR_TYPE_OTP_SMS =
"SECOND_FACTOR_TYPE_OTP_SMS".freeze

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.all_varsObject



24
25
26
# File 'lib/zitadel/client/models/settings_service_second_factor_type.rb', line 24

def self.all_vars
  @all_vars ||= [SECOND_FACTOR_TYPE_UNSPECIFIED, SECOND_FACTOR_TYPE_OTP, SECOND_FACTOR_TYPE_U2_F, SECOND_FACTOR_TYPE_OTP_EMAIL, SECOND_FACTOR_TYPE_OTP_SMS].freeze
end

.build_from_hash(value) ⇒ String

Builds the enum from string

Parameters:

  • The (String)

    enum value in the form of the string

Returns:

  • (String)

    The enum value



31
32
33
# File 'lib/zitadel/client/models/settings_service_second_factor_type.rb', line 31

def self.build_from_hash(value)
  new.build_from_hash(value)
end

Instance Method Details

#build_from_hash(value) ⇒ String

Builds the enum from string

Parameters:

  • The (String)

    enum value in the form of the string

Returns:

  • (String)

    The enum value



38
39
40
41
# File 'lib/zitadel/client/models/settings_service_second_factor_type.rb', line 38

def build_from_hash(value)
  return value if SettingsServiceSecondFactorType.all_vars.include?(value)
  raise "Invalid ENUM value #{value} for class #Zitadel::Client::Models::SettingsServiceSecondFactorType"
end