public ImportUserRecord build()

in src/main/java/com/google/firebase/auth/ImportUserRecord.java [252:301]


    public ImportUserRecord build() {
      Map<String, Object> properties = new HashMap<>();
      UserRecord.checkUid(uid);
      properties.put("localId", uid);

      if (!Strings.isNullOrEmpty(email)) {
        UserRecord.checkEmail(email);
        properties.put("email", email);
      }
      if (!Strings.isNullOrEmpty(photoUrl)) {
        UserRecord.checkUrl(photoUrl);
        properties.put("photoUrl", photoUrl);
      }
      if (!Strings.isNullOrEmpty(phoneNumber)) {
        UserRecord.checkPhoneNumber(phoneNumber);
        properties.put("phoneNumber", phoneNumber);
      }
      if (!Strings.isNullOrEmpty(displayName)) {
        properties.put("displayName", displayName);
      }
      if (userMetadata != null) {
        if (userMetadata.getCreationTimestamp() > 0) {
          properties.put("createdAt", userMetadata.getCreationTimestamp());
        }
        if (userMetadata.getLastSignInTimestamp() > 0) {
          properties.put("lastLoginAt", userMetadata.getLastSignInTimestamp());
        }
      }
      if (passwordHash != null) {
        properties.put("passwordHash", BaseEncoding.base64Url().encode(passwordHash));
      }
      if (passwordSalt != null) {
        properties.put("salt", BaseEncoding.base64Url().encode(passwordSalt));
      }
      if (userProviders.size() > 0) {
        properties.put("providerUserInfo", ImmutableList.copyOf(userProviders));
      }
      if (customClaims.size() > 0) {
        ImmutableMap<String, Object> mergedClaims = ImmutableMap.copyOf(customClaims);
        UserRecord.checkCustomClaims(mergedClaims);
        properties.put(UserRecord.CUSTOM_ATTRIBUTES, mergedClaims);
      }
      if (emailVerified != null) {
        properties.put("emailVerified", emailVerified);
      }
      if (disabled != null) {
        properties.put("disabled", disabled);
      }
      return new ImportUserRecord(properties);
    }