Class: AWSCDK::Cognito::KeepOriginalAttrs

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
cognito/keep_original_attrs.rb

Overview

Attributes that will be kept until the user verifies the changed attribute.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(email: nil, phone: nil) ⇒ KeepOriginalAttrs

Returns a new instance of KeepOriginalAttrs.

Parameters:

  • email (Boolean, nil) (defaults to: nil)

    Whether the email address of the user should remain the original value until the new email address is verified.

  • phone (Boolean, nil) (defaults to: nil)

    Whether the phone number of the user should remain the original value until the new phone number is verified.



9
10
11
12
13
14
# File 'cognito/keep_original_attrs.rb', line 9

def initialize(email: nil, phone: nil)
  @email = email
  Jsii::Type.check_type(@email, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "email") unless @email.nil?
  @phone = phone
  Jsii::Type.check_type(@phone, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "phone") unless @phone.nil?
end

Instance Attribute Details

#emailBoolean? (readonly)

Note:

Default: - false

Whether the email address of the user should remain the original value until the new email address is verified.

Returns:

  • (Boolean, nil)


20
21
22
# File 'cognito/keep_original_attrs.rb', line 20

def email
  @email
end

#phoneBoolean? (readonly)

Note:

Default: - false

Whether the phone number of the user should remain the original value until the new phone number is verified.

Returns:

  • (Boolean, nil)


25
26
27
# File 'cognito/keep_original_attrs.rb', line 25

def phone
  @phone
end

Class Method Details

.jsii_propertiesObject



27
28
29
30
31
32
# File 'cognito/keep_original_attrs.rb', line 27

def self.jsii_properties
  {
    :email => "email",
    :phone => "phone",
  }
end

Instance Method Details

#to_jsiiObject



34
35
36
37
38
39
40
41
# File 'cognito/keep_original_attrs.rb', line 34

def to_jsii
  result = {}
  result.merge!({
    "email" => @email,
    "phone" => @phone,
  })
  result.compact
end