Class ImmutableUaaUser

  • All Implemented Interfaces:
    UaaEntity, UaaUser

    @ParametersAreNonnullByDefault
    @Generated("org.immutables.processor.ProxyProcessor")
    @Immutable
    public final class ImmutableUaaUser
    extends Object
    implements UaaUser
    Immutable implementation of UaaUser.

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

    • Method Detail

      • getId

        public String getId()
        Specified by:
        getId in interface UaaEntity
        Returns:
        The value of the id attribute
      • getMeta

        public UaaMeta getMeta()
        Specified by:
        getMeta in interface UaaUser
        Returns:
        The value of the meta attribute
      • getExternalId

        public String getExternalId()
        Specified by:
        getExternalId in interface UaaUser
        Returns:
        The value of the externalId attribute
      • getUserName

        public String getUserName()
        Specified by:
        getUserName in interface UaaUser
        Returns:
        The value of the userName attribute
      • getActive

        public Boolean getActive()
        Specified by:
        getActive in interface UaaUser
        Returns:
        The value of the active attribute
      • getVerified

        public Boolean getVerified()
        Specified by:
        getVerified in interface UaaUser
        Returns:
        The value of the verified attribute
      • getOrigin

        public String getOrigin()
        Specified by:
        getOrigin in interface UaaUser
        Returns:
        The value of the origin attribute
      • getZoneId

        public String getZoneId()
        Specified by:
        getZoneId in interface UaaUser
        Returns:
        The value of the zoneId attribute
      • getPreviousLogonTime

        public Long getPreviousLogonTime()
        Specified by:
        getPreviousLogonTime in interface UaaUser
        Returns:
        The value of the previousLogonTime attribute
      • getLastLogonTime

        public Long getLastLogonTime()
        Specified by:
        getLastLogonTime in interface UaaUser
        Returns:
        The value of the lastLogonTime attribute
      • withId

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

        public final ImmutableUaaUser withSchemas​(String... elements)
        Copy the current immutable object with elements that replace the content of schemas.
        Parameters:
        elements - The elements to set
        Returns:
        A modified copy of this object
      • withSchemas

        public final ImmutableUaaUser withSchemas​(Iterable<String> elements)
        Copy the current immutable object with elements that replace the content of schemas. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        elements - An iterable of schemas elements to set
        Returns:
        A modified copy of this object
      • withMeta

        public final ImmutableUaaUser withMeta​(UaaMeta value)
        Copy the current immutable object by setting a value for the meta attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for meta (can be null)
        Returns:
        A modified copy of the this object
      • withName

        public final ImmutableUaaUser withName​(UaaUser.Name value)
        Copy the current immutable object by setting a value for the name attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for name (can be null)
        Returns:
        A modified copy of the this object
      • withEmails

        public final ImmutableUaaUser withEmails​(UaaUser.Email... elements)
        Copy the current immutable object with elements that replace the content of emails.
        Parameters:
        elements - The elements to set
        Returns:
        A modified copy of this object
      • withEmails

        public final ImmutableUaaUser withEmails​(Iterable<? extends UaaUser.Email> elements)
        Copy the current immutable object with elements that replace the content of emails. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        elements - An iterable of emails elements to set
        Returns:
        A modified copy of this object
      • withExternalId

        public final ImmutableUaaUser withExternalId​(String value)
        Copy the current immutable object by setting a value for the externalId attribute. An equals check used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for externalId (can be null)
        Returns:
        A modified copy of the this object
      • withUserName

        public final ImmutableUaaUser 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 (can be null)
        Returns:
        A modified copy of the this object
      • withGroups

        public final ImmutableUaaUser withGroups​(UaaUser.Group... elements)
        Copy the current immutable object with elements that replace the content of groups.
        Parameters:
        elements - The elements to set
        Returns:
        A modified copy of this object
      • withGroups

        public final ImmutableUaaUser withGroups​(Iterable<? extends UaaUser.Group> elements)
        Copy the current immutable object with elements that replace the content of groups. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        elements - An iterable of groups elements to set
        Returns:
        A modified copy of this object
      • withApprovals

        public final ImmutableUaaUser withApprovals​(UaaUser.Approval... elements)
        Copy the current immutable object with elements that replace the content of approvals.
        Parameters:
        elements - The elements to set
        Returns:
        A modified copy of this object
      • withApprovals

        public final ImmutableUaaUser withApprovals​(Iterable<? extends UaaUser.Approval> elements)
        Copy the current immutable object with elements that replace the content of approvals. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        elements - An iterable of approvals elements to set
        Returns:
        A modified copy of this object
      • withActive

        public final ImmutableUaaUser withActive​(Boolean value)
        Copy the current immutable object by setting a value for the active attribute. An equals check used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for active (can be null)
        Returns:
        A modified copy of the this object
      • withVerified

        public final ImmutableUaaUser withVerified​(Boolean value)
        Copy the current immutable object by setting a value for the verified attribute. An equals check used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for verified (can be null)
        Returns:
        A modified copy of the this object
      • withOrigin

        public final ImmutableUaaUser withOrigin​(String value)
        Copy the current immutable object by setting a value for the origin attribute. An equals check used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for origin (can be null)
        Returns:
        A modified copy of the this object
      • withZoneId

        public final ImmutableUaaUser withZoneId​(String value)
        Copy the current immutable object by setting a value for the zoneId attribute. An equals check used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for zoneId (can be null)
        Returns:
        A modified copy of the this object
      • withPasswordLastModified

        public final ImmutableUaaUser withPasswordLastModified​(OffsetDateTime value)
        Copy the current immutable object by setting a value for the passwordLastModified attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for passwordLastModified (can be null)
        Returns:
        A modified copy of the this object
      • withPreviousLogonTime

        public final ImmutableUaaUser withPreviousLogonTime​(Long value)
        Copy the current immutable object by setting a value for the previousLogonTime attribute. An equals check used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for previousLogonTime (can be null)
        Returns:
        A modified copy of the this object
      • withLastLogonTime

        public final ImmutableUaaUser withLastLogonTime​(Long value)
        Copy the current immutable object by setting a value for the lastLogonTime attribute. An equals check used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for lastLogonTime (can be null)
        Returns:
        A modified copy of the this object
      • equals

        public boolean equals​(@Nullable
                              Object another)
        This instance is equal to all instances of ImmutableUaaUser 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: id, schemas, meta, name, emails, externalId, userName, groups, approvals, active, verified, origin, zoneId, passwordLastModified, previousLogonTime, lastLogonTime.
        Overrides:
        hashCode in class Object
        Returns:
        hashCode value
      • toString

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

        public static ImmutableUaaUser copyOf​(UaaUser instance)
        Creates an immutable copy of a UaaUser 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 UaaUser instance
      • builder

        public static ImmutableUaaUser.Builder builder()
        Creates a builder for ImmutableUaaUser.
         ImmutableUaaUser.builder()
            .id(String) // required id
            .addSchemas|addAllSchemas(String) // schemas elements
            .meta(io.dialob.security.uaa.spi.model.UaaMeta | null) // nullable meta
            .name(io.dialob.security.uaa.spi.model.UaaUser.Name | null) // nullable name
            .addEmails|addAllEmails(io.dialob.security.uaa.spi.model.UaaUser.Email) // emails elements
            .externalId(String | null) // nullable externalId
            .userName(String | null) // nullable userName
            .addGroups|addAllGroups(io.dialob.security.uaa.spi.model.UaaUser.Group) // groups elements
            .addApprovals|addAllApprovals(io.dialob.security.uaa.spi.model.UaaUser.Approval) // approvals elements
            .active(Boolean | null) // nullable active
            .verified(Boolean | null) // nullable verified
            .origin(String | null) // nullable origin
            .zoneId(String | null) // nullable zoneId
            .passwordLastModified(java.time.OffsetDateTime | null) // nullable passwordLastModified
            .previousLogonTime(Long | null) // nullable previousLogonTime
            .lastLogonTime(Long | null) // nullable lastLogonTime
            .build();
         
        Returns:
        A new ImmutableUaaUser builder