Class ImmutableUserCreateRequest

java.lang.Object
com.iland.core.web.rest.request.user.ImmutableUserCreateRequest
All Implemented Interfaces:
UserCreateRequest

@Generated(from="UserCreateRequest", generator="Immutables") @ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableUserCreateRequest extends Object implements UserCreateRequest
Immutable implementation of UserCreateRequest.

Use the builder to create immutable instances: ImmutableUserCreateRequest.builder().

  • Method Details

    • domain

      public String domain()
      Get the domain that the user should be created in.
      Specified by:
      domain in interface UserCreateRequest
      Returns:
      String domain
    • fullname

      public String fullname()
      Get the user's full name.
      Specified by:
      fullname in interface UserCreateRequest
      Returns:
      String full name
    • username

      public String username()
      Get the username.
      Specified by:
      username in interface UserCreateRequest
      Returns:
      String username
    • email

      public String email()
      Get the email.
      Specified by:
      email in interface UserCreateRequest
      Returns:
      String email
    • roleUuid

      public Optional<String> roleUuid()
      Get the role the user should belong to.
      Specified by:
      roleUuid in interface UserCreateRequest
      Returns:
      Optional of String role uuid
    • sendInvitation

      public Optional<Boolean> sendInvitation()
      Whether to send an email invitation when creating a user.
      Specified by:
      sendInvitation in interface UserCreateRequest
      Returns:
      whether to send an email invention
    • password

      public Optional<String> password()
      Password of the newly created user. If this field is not passed then the user has to set their password upon first login.
      Specified by:
      password in interface UserCreateRequest
    • withDomain

      public final ImmutableUserCreateRequest withDomain(String value)
      Copy the current immutable object by setting a value for the domain attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for domain
      Returns:
      A modified copy of the this object
    • withFullname

      public final ImmutableUserCreateRequest withFullname(String value)
      Copy the current immutable object by setting a value for the fullname attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for fullname
      Returns:
      A modified copy of the this object
    • withUsername

      public final ImmutableUserCreateRequest withUsername(String value)
      Copy the current immutable object by setting a value for the username attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for username
      Returns:
      A modified copy of the this object
    • withEmail

      public final ImmutableUserCreateRequest withEmail(String value)
      Copy the current immutable object by setting a value for the email attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for email
      Returns:
      A modified copy of the this object
    • withRoleUuid

      public final ImmutableUserCreateRequest withRoleUuid(String value)
      Copy the current immutable object by setting a present value for the optional roleUuid attribute.
      Parameters:
      value - The value for roleUuid
      Returns:
      A modified copy of this object
    • withRoleUuid

      public final ImmutableUserCreateRequest withRoleUuid(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the roleUuid attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
      Parameters:
      optional - A value for roleUuid
      Returns:
      A modified copy of this object
    • withSendInvitation

      public final ImmutableUserCreateRequest withSendInvitation(boolean value)
      Copy the current immutable object by setting a present value for the optional sendInvitation attribute.
      Parameters:
      value - The value for sendInvitation
      Returns:
      A modified copy of this object
    • withSendInvitation

      public final ImmutableUserCreateRequest withSendInvitation(Optional<Boolean> optional)
      Copy the current immutable object by setting an optional value for the sendInvitation attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
      Parameters:
      optional - A value for sendInvitation
      Returns:
      A modified copy of this object
    • withPassword

      public final ImmutableUserCreateRequest withPassword(String value)
      Copy the current immutable object by setting a present value for the optional password attribute.
      Parameters:
      value - The value for password
      Returns:
      A modified copy of this object
    • withPassword

      public final ImmutableUserCreateRequest withPassword(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the password attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
      Parameters:
      optional - A value for password
      Returns:
      A modified copy of this object
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of ImmutableUserCreateRequest that have equal attribute values.
      Overrides:
      equals in class Object
      Returns:
      true if this is equal to another instance
    • hashCode

      public int hashCode()
      Computes a hash code from attributes: domain, fullname, username, email, roleUuid, sendInvitation, password.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

      public String toString()
      Prints the immutable value UserCreateRequest with attribute values.
      Overrides:
      toString in class Object
      Returns:
      A string representation of the value
    • copyOf

      public static ImmutableUserCreateRequest copyOf(UserCreateRequest instance)
      Creates an immutable copy of a UserCreateRequest value. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.
      Parameters:
      instance - The instance to copy
      Returns:
      A copied immutable UserCreateRequest instance
    • builder

      public static ImmutableUserCreateRequest.Builder builder()
      Creates a builder for ImmutableUserCreateRequest.
       ImmutableUserCreateRequest.builder()
          .domain(String) // required domain
          .fullname(String) // required fullname
          .username(String) // required username
          .email(String) // required email
          .roleUuid(String) // optional roleUuid
          .sendInvitation(Boolean) // optional sendInvitation
          .password(String) // optional password
          .build();
       
      Returns:
      A new ImmutableUserCreateRequest builder