Class ImmutableInsightUser

java.lang.Object
io.riada.insight.model.InsightUser
io.riada.insight.model.ImmutableInsightUser

@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableInsightUser extends InsightUser
Immutable implementation of InsightUser.

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

  • Method Details

    • getKey

      public String getKey()
      The Assets user key represent the way to uniquely identify this user. In different contexts this value will mean different things e.g. in Assets for Jira cloud this value will be the Atlassian account id
      Specified by:
      getKey in class InsightUser
    • getName

      @Nullable public String getName()
      Specified by:
      getName in class InsightUser
      Returns:
      The value of the name attribute
    • getDisplayName

      @Nullable public String getDisplayName()
      Specified by:
      getDisplayName in class InsightUser
      Returns:
      The value of the displayName attribute
    • getEmailAddress

      @Nullable public String getEmailAddress()
      Specified by:
      getEmailAddress in class InsightUser
      Returns:
      The value of the emailAddress attribute
    • getLastSeenVersion

      @Nullable public String getLastSeenVersion()
      Specified by:
      getLastSeenVersion in class InsightUser
      Returns:
      The value of the lastSeenVersion attribute
    • externalId

      @Nullable public String externalId()
      Specified by:
      externalId in class InsightUser
      Returns:
      The value of the externalId attribute
    • insightRoles

      @Nullable public Collection<InsightRole> insightRoles()
      Specified by:
      insightRoles in class InsightUser
      Returns:
      The value of the insightRoles attribute
    • withKey

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

      public final ImmutableInsightUser withName(@Nullable String value)
      Copy the current immutable object by setting a value for the name attribute. An equals check 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
    • withDisplayName

      public final ImmutableInsightUser withDisplayName(@Nullable String value)
      Copy the current immutable object by setting a value for the displayName attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for displayName (can be null)
      Returns:
      A modified copy of the this object
    • withEmailAddress

      public final ImmutableInsightUser withEmailAddress(@Nullable String value)
      Copy the current immutable object by setting a value for the emailAddress attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for emailAddress (can be null)
      Returns:
      A modified copy of the this object
    • withLastSeenVersion

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

      public final ImmutableInsightUser withExternalId(@Nullable 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
    • withInsightRoles

      public final ImmutableInsightUser withInsightRoles(@Nullable Collection<InsightRole> value)
      Copy the current immutable object by setting a value for the insightRoles attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for insightRoles (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 ImmutableInsightUser 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: key, name, displayName, emailAddress, lastSeenVersion, externalId, insightRoles.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

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

      public static ImmutableInsightUser.Builder builder()
      Creates a builder for ImmutableInsightUser.
       ImmutableInsightUser.builder()
          .setKey(String) // required key
          .setName(String | null) // nullable name
          .setDisplayName(String | null) // nullable displayName
          .setEmailAddress(String | null) // nullable emailAddress
          .setLastSeenVersion(String | null) // nullable lastSeenVersion
          .setExternalId(String | null) // nullable externalId
          .setInsightRoles(Collection&lt;io.riada.insight.model.InsightRole&gt; | null) // nullable insightRoles
          .build();
       
      Returns:
      A new ImmutableInsightUser builder