Class: AWSCDK::Cognito::AttributeMapping
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Cognito::AttributeMapping
- Defined in:
- cognito/attribute_mapping.rb
Overview
The mapping of user pool attributes to the attributes provided by the identity providers.
Instance Attribute Summary collapse
-
#address ⇒ AWSCDK::Cognito::ProviderAttribute?
readonly
The user's postal address is a required attribute.
-
#birthdate ⇒ AWSCDK::Cognito::ProviderAttribute?
readonly
The user's birthday.
-
#custom ⇒ Hash{String => AWSCDK::Cognito::ProviderAttribute}?
readonly
Specify custom attribute mapping here and mapping for any standard attributes not supported yet.
-
#email ⇒ AWSCDK::Cognito::ProviderAttribute?
readonly
The user's e-mail address.
-
#email_verified ⇒ AWSCDK::Cognito::ProviderAttribute?
readonly
The user's e-mail address is verification.
-
#family_name ⇒ AWSCDK::Cognito::ProviderAttribute?
readonly
The surname or last name of user.
-
#fullname ⇒ AWSCDK::Cognito::ProviderAttribute?
readonly
The user's full name in displayable form.
-
#gender ⇒ AWSCDK::Cognito::ProviderAttribute?
readonly
The user's gender.
-
#given_name ⇒ AWSCDK::Cognito::ProviderAttribute?
readonly
The user's first name or give name.
-
#last_update_time ⇒ AWSCDK::Cognito::ProviderAttribute?
readonly
Time, the user's information was last updated.
-
#locale ⇒ AWSCDK::Cognito::ProviderAttribute?
readonly
The user's locale.
-
#middle_name ⇒ AWSCDK::Cognito::ProviderAttribute?
readonly
The user's middle name.
-
#nickname ⇒ AWSCDK::Cognito::ProviderAttribute?
readonly
The user's nickname or casual name.
-
#phone_number ⇒ AWSCDK::Cognito::ProviderAttribute?
readonly
The user's telephone number.
-
#preferred_username ⇒ AWSCDK::Cognito::ProviderAttribute?
readonly
The user's preferred username.
-
#profile_page ⇒ AWSCDK::Cognito::ProviderAttribute?
readonly
The URL to the user's profile page.
-
#profile_picture ⇒ AWSCDK::Cognito::ProviderAttribute?
readonly
The URL to the user's profile picture.
-
#timezone ⇒ AWSCDK::Cognito::ProviderAttribute?
readonly
The user's time zone.
-
#website ⇒ AWSCDK::Cognito::ProviderAttribute?
readonly
The URL to the user's web page or blog.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(address: nil, birthdate: nil, custom: nil, email: nil, email_verified: nil, family_name: nil, fullname: nil, gender: nil, given_name: nil, last_update_time: nil, locale: nil, middle_name: nil, nickname: nil, phone_number: nil, preferred_username: nil, profile_page: nil, profile_picture: nil, timezone: nil, website: nil) ⇒ AttributeMapping
constructor
A new instance of AttributeMapping.
- #to_jsii ⇒ Object
Constructor Details
#initialize(address: nil, birthdate: nil, custom: nil, email: nil, email_verified: nil, family_name: nil, fullname: nil, gender: nil, given_name: nil, last_update_time: nil, locale: nil, middle_name: nil, nickname: nil, phone_number: nil, preferred_username: nil, profile_page: nil, profile_picture: nil, timezone: nil, website: nil) ⇒ AttributeMapping
Returns a new instance of AttributeMapping.
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 |
# File 'cognito/attribute_mapping.rb', line 26 def initialize(address: nil, birthdate: nil, custom: nil, email: nil, email_verified: nil, family_name: nil, fullname: nil, gender: nil, given_name: nil, last_update_time: nil, locale: nil, middle_name: nil, nickname: nil, phone_number: nil, preferred_username: nil, profile_page: nil, profile_picture: nil, timezone: nil, website: nil) @address = address Jsii::Type.check_type(@address, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29nbml0by5Qcm92aWRlckF0dHJpYnV0ZSJ9")), "address") unless @address.nil? @birthdate = birthdate Jsii::Type.check_type(@birthdate, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29nbml0by5Qcm92aWRlckF0dHJpYnV0ZSJ9")), "birthdate") unless @birthdate.nil? @custom = custom Jsii::Type.check_type(@custom, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19jb2duaXRvLlByb3ZpZGVyQXR0cmlidXRlIn0sImtpbmQiOiJtYXAifX0=")), "custom") unless @custom.nil? @email = email Jsii::Type.check_type(@email, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29nbml0by5Qcm92aWRlckF0dHJpYnV0ZSJ9")), "email") unless @email.nil? @email_verified = email_verified Jsii::Type.check_type(@email_verified, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29nbml0by5Qcm92aWRlckF0dHJpYnV0ZSJ9")), "emailVerified") unless @email_verified.nil? @family_name = family_name Jsii::Type.check_type(@family_name, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29nbml0by5Qcm92aWRlckF0dHJpYnV0ZSJ9")), "familyName") unless @family_name.nil? @fullname = fullname Jsii::Type.check_type(@fullname, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29nbml0by5Qcm92aWRlckF0dHJpYnV0ZSJ9")), "fullname") unless @fullname.nil? @gender = gender Jsii::Type.check_type(@gender, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29nbml0by5Qcm92aWRlckF0dHJpYnV0ZSJ9")), "gender") unless @gender.nil? @given_name = given_name Jsii::Type.check_type(@given_name, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29nbml0by5Qcm92aWRlckF0dHJpYnV0ZSJ9")), "givenName") unless @given_name.nil? @last_update_time = last_update_time Jsii::Type.check_type(@last_update_time, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29nbml0by5Qcm92aWRlckF0dHJpYnV0ZSJ9")), "lastUpdateTime") unless @last_update_time.nil? @locale = locale Jsii::Type.check_type(@locale, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29nbml0by5Qcm92aWRlckF0dHJpYnV0ZSJ9")), "locale") unless @locale.nil? @middle_name = middle_name Jsii::Type.check_type(@middle_name, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29nbml0by5Qcm92aWRlckF0dHJpYnV0ZSJ9")), "middleName") unless @middle_name.nil? @nickname = nickname Jsii::Type.check_type(@nickname, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29nbml0by5Qcm92aWRlckF0dHJpYnV0ZSJ9")), "nickname") unless @nickname.nil? @phone_number = phone_number Jsii::Type.check_type(@phone_number, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29nbml0by5Qcm92aWRlckF0dHJpYnV0ZSJ9")), "phoneNumber") unless @phone_number.nil? @preferred_username = preferred_username Jsii::Type.check_type(@preferred_username, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29nbml0by5Qcm92aWRlckF0dHJpYnV0ZSJ9")), "preferredUsername") unless @preferred_username.nil? @profile_page = profile_page Jsii::Type.check_type(@profile_page, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29nbml0by5Qcm92aWRlckF0dHJpYnV0ZSJ9")), "profilePage") unless @profile_page.nil? @profile_picture = profile_picture Jsii::Type.check_type(@profile_picture, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29nbml0by5Qcm92aWRlckF0dHJpYnV0ZSJ9")), "profilePicture") unless @profile_picture.nil? @timezone = timezone Jsii::Type.check_type(@timezone, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29nbml0by5Qcm92aWRlckF0dHJpYnV0ZSJ9")), "timezone") unless @timezone.nil? @website = website Jsii::Type.check_type(@website, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29nbml0by5Qcm92aWRlckF0dHJpYnV0ZSJ9")), "website") unless @website.nil? end |
Instance Attribute Details
#address ⇒ AWSCDK::Cognito::ProviderAttribute? (readonly)
Default: - not mapped
The user's postal address is a required attribute.
71 72 73 |
# File 'cognito/attribute_mapping.rb', line 71 def address @address end |
#birthdate ⇒ AWSCDK::Cognito::ProviderAttribute? (readonly)
Default: - not mapped
The user's birthday.
76 77 78 |
# File 'cognito/attribute_mapping.rb', line 76 def birthdate @birthdate end |
#custom ⇒ Hash{String => AWSCDK::Cognito::ProviderAttribute}? (readonly)
Default: - no custom attribute mapping
Specify custom attribute mapping here and mapping for any standard attributes not supported yet.
81 82 83 |
# File 'cognito/attribute_mapping.rb', line 81 def custom @custom end |
#email ⇒ AWSCDK::Cognito::ProviderAttribute? (readonly)
Default: - not mapped
The user's e-mail address.
86 87 88 |
# File 'cognito/attribute_mapping.rb', line 86 def email @email end |
#email_verified ⇒ AWSCDK::Cognito::ProviderAttribute? (readonly)
Default: - not mapped
The user's e-mail address is verification.
91 92 93 |
# File 'cognito/attribute_mapping.rb', line 91 def email_verified @email_verified end |
#family_name ⇒ AWSCDK::Cognito::ProviderAttribute? (readonly)
Default: - not mapped
The surname or last name of user.
96 97 98 |
# File 'cognito/attribute_mapping.rb', line 96 def family_name @family_name end |
#fullname ⇒ AWSCDK::Cognito::ProviderAttribute? (readonly)
Default: - not mapped
The user's full name in displayable form.
101 102 103 |
# File 'cognito/attribute_mapping.rb', line 101 def fullname @fullname end |
#gender ⇒ AWSCDK::Cognito::ProviderAttribute? (readonly)
Default: - not mapped
The user's gender.
106 107 108 |
# File 'cognito/attribute_mapping.rb', line 106 def gender @gender end |
#given_name ⇒ AWSCDK::Cognito::ProviderAttribute? (readonly)
Default: - not mapped
The user's first name or give name.
111 112 113 |
# File 'cognito/attribute_mapping.rb', line 111 def given_name @given_name end |
#last_update_time ⇒ AWSCDK::Cognito::ProviderAttribute? (readonly)
Default: - not mapped
Time, the user's information was last updated.
116 117 118 |
# File 'cognito/attribute_mapping.rb', line 116 def last_update_time @last_update_time end |
#locale ⇒ AWSCDK::Cognito::ProviderAttribute? (readonly)
Default: - not mapped
The user's locale.
121 122 123 |
# File 'cognito/attribute_mapping.rb', line 121 def locale @locale end |
#middle_name ⇒ AWSCDK::Cognito::ProviderAttribute? (readonly)
Default: - not mapped
The user's middle name.
126 127 128 |
# File 'cognito/attribute_mapping.rb', line 126 def middle_name @middle_name end |
#nickname ⇒ AWSCDK::Cognito::ProviderAttribute? (readonly)
Default: - not mapped
The user's nickname or casual name.
131 132 133 |
# File 'cognito/attribute_mapping.rb', line 131 def nickname @nickname end |
#phone_number ⇒ AWSCDK::Cognito::ProviderAttribute? (readonly)
Default: - not mapped
The user's telephone number.
136 137 138 |
# File 'cognito/attribute_mapping.rb', line 136 def phone_number @phone_number end |
#preferred_username ⇒ AWSCDK::Cognito::ProviderAttribute? (readonly)
Default: - not mapped
The user's preferred username.
141 142 143 |
# File 'cognito/attribute_mapping.rb', line 141 def preferred_username @preferred_username end |
#profile_page ⇒ AWSCDK::Cognito::ProviderAttribute? (readonly)
Default: - not mapped
The URL to the user's profile page.
146 147 148 |
# File 'cognito/attribute_mapping.rb', line 146 def profile_page @profile_page end |
#profile_picture ⇒ AWSCDK::Cognito::ProviderAttribute? (readonly)
Default: - not mapped
The URL to the user's profile picture.
151 152 153 |
# File 'cognito/attribute_mapping.rb', line 151 def profile_picture @profile_picture end |
#timezone ⇒ AWSCDK::Cognito::ProviderAttribute? (readonly)
Default: - not mapped
The user's time zone.
156 157 158 |
# File 'cognito/attribute_mapping.rb', line 156 def timezone @timezone end |
#website ⇒ AWSCDK::Cognito::ProviderAttribute? (readonly)
Default: - not mapped
The URL to the user's web page or blog.
161 162 163 |
# File 'cognito/attribute_mapping.rb', line 161 def website @website end |
Class Method Details
.jsii_properties ⇒ Object
163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 |
# File 'cognito/attribute_mapping.rb', line 163 def self.jsii_properties { :address => "address", :birthdate => "birthdate", :custom => "custom", :email => "email", :email_verified => "emailVerified", :family_name => "familyName", :fullname => "fullname", :gender => "gender", :given_name => "givenName", :last_update_time => "lastUpdateTime", :locale => "locale", :middle_name => "middleName", :nickname => "nickname", :phone_number => "phoneNumber", :preferred_username => "preferredUsername", :profile_page => "profilePage", :profile_picture => "profilePicture", :timezone => "timezone", :website => "website", } end |
Instance Method Details
#to_jsii ⇒ Object
187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 |
# File 'cognito/attribute_mapping.rb', line 187 def to_jsii result = {} result.merge!({ "address" => @address, "birthdate" => @birthdate, "custom" => @custom, "email" => @email, "emailVerified" => @email_verified, "familyName" => @family_name, "fullname" => @fullname, "gender" => @gender, "givenName" => @given_name, "lastUpdateTime" => @last_update_time, "locale" => @locale, "middleName" => @middle_name, "nickname" => @nickname, "phoneNumber" => @phone_number, "preferredUsername" => @preferred_username, "profilePage" => @profile_page, "profilePicture" => @profile_picture, "timezone" => @timezone, "website" => @website, }) result.compact end |