internal Request(ImportUserRecordArgs args)
            {
                this.Uid         = UserRecordArgs.CheckUid(args.Uid, true);
                this.Email       = UserRecordArgs.CheckEmail(args.Email);
                this.PhotoUrl    = UserRecordArgs.CheckPhotoUrl(args.PhotoUrl);
                this.PhoneNumber = UserRecordArgs.CheckPhoneNumber(args.PhoneNumber);

                if (!string.IsNullOrEmpty(args.DisplayName))
                {
                    this.DisplayName = args.DisplayName;
                }

                if (args.UserMetadata != null)
                {
                    this.CreatedAt   = args.UserMetadata.CreationTimestamp;
                    this.LastLoginAt = args.UserMetadata.LastSignInTimestamp;
                }

                if (args.PasswordHash != null)
                {
                    this.PasswordHash = JwtUtils.UrlSafeBase64Encode(args.PasswordHash);
                }

                if (args.PasswordSalt != null)
                {
                    this.PasswordSalt = JwtUtils.UrlSafeBase64Encode(args.PasswordSalt);
                }

                if (args.UserProviders != null && args.UserProviders.Count() > 0)
                {
                    this.ProviderUserInfo = new List <UserProvider.Request>(
                        args.UserProviders.Select(userProvider => userProvider.ToRequest()));
                }

                if (args.CustomClaims != null && args.CustomClaims.Count > 0)
                {
                    var serialized = UserRecordArgs.CheckCustomClaims(args.CustomClaims);
                    this.CustomAttributes = serialized;
                }

                this.EmailVerified = args.EmailVerified;
                this.Disabled      = args.Disabled;
            }
 /// <summary>
 /// Initializes a new instance of the <see cref="PhoneIdentifier"/> class.
 /// </summary>
 /// <param name="phoneNumber">The phoneNumber.</param>
 public PhoneIdentifier(string phoneNumber)
 {
     this.phoneNumber = UserRecordArgs.CheckPhoneNumber(phoneNumber, required: true);
 }