/** * @param json A JSON-bindable data structure * @return An immutable value type * @deprecated Do not use this method directly, it exists only for the <em>Jackson</em>-binding infrastructure */ @Deprecated @JsonCreator(mode = JsonCreator.Mode.DELEGATING) static Name fromJson(Json json) { Name.Builder builder = Name.builder(); if (json.familyName != null) { builder.familyName(json.familyName); } if (json.givenName != null) { builder.givenName(json.givenName); } return builder.build(); }
/** * Copy abstract value type {@code _Name} instance into builder. * @param instance The instance from which to copy values * @return {@code this} builder for use in a chained invocation */ final Builder from(_Name instance) { Objects.requireNonNull(instance, "instance"); String familyNameValue = instance.getFamilyName(); if (familyNameValue != null) { familyName(familyNameValue); } String givenNameValue = instance.getGivenName(); if (givenNameValue != null) { givenName(givenNameValue); } return this; }
private static Mono<CreateUserResponse> requestCreateUaaUser(UaaClient uaaClient, CreateUserRequest request) { return uaaClient.users() .create(org.cloudfoundry.uaa.users.CreateUserRequest.builder() .email(Email.builder() .primary(true) .value(request.getUsername()) .build()) .name(Name.builder() .familyName(request.getUsername()) .givenName(request.getUsername()) .build()) .origin(request.getOrigin()) .password(request.getPassword()) .userName(request.getUsername()) .build()); }
/** * Creates a builder for {@link Name Name}. * @return A new Name builder */ public static Name.Builder builder() { return new Name.Builder(); }
/** * Fill a builder with attribute values from the provided {@code Name} instance. * Regular attribute values will be replaced with those from the given instance. * Absent optional values will not replace present values. * @param instance The instance from which to copy values * @return {@code this} builder for use in a chained invocation */ public final Builder from(Name instance) { return from((_Name) instance); }