Class UserProfile

java.lang.Object
com.hubspot.slack.client.models.users.UserProfile
All Implemented Interfaces:
UserProfileIF

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

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

  • Method Details

    • getUsername

      public Optional<String> getUsername()
      Specified by:
      getUsername in interface UserProfileIF
      Returns:
      The value of the username attribute
    • getUsernameNormalized

      public Optional<String> getUsernameNormalized()
      Specified by:
      getUsernameNormalized in interface UserProfileIF
      Returns:
      The value of the usernameNormalized attribute
    • getRealName

      public Optional<String> getRealName()
      Specified by:
      getRealName in interface UserProfileIF
      Returns:
      The value of the realName attribute
    • getRealNameNormalized

      public Optional<String> getRealNameNormalized()
      Specified by:
      getRealNameNormalized in interface UserProfileIF
      Returns:
      The value of the realNameNormalized attribute
    • getEmail

      public Optional<String> getEmail()
      Specified by:
      getEmail in interface UserProfileIF
      Returns:
      The value of the email attribute
    • getStatusText

      public Optional<String> getStatusText()
      Specified by:
      getStatusText in interface UserProfileIF
      Returns:
      The value of the statusText attribute
    • getStatusEmoji

      public Optional<String> getStatusEmoji()
      Specified by:
      getStatusEmoji in interface UserProfileIF
      Returns:
      The value of the statusEmoji attribute
    • getStatusExpiration

      public Optional<Long> getStatusExpiration()
      Specified by:
      getStatusExpiration in interface UserProfileIF
      Returns:
      The value of the statusExpiration attribute
    • getTitle

      public Optional<String> getTitle()
      Specified by:
      getTitle in interface UserProfileIF
      Returns:
      The value of the title attribute
    • getPhone

      public Optional<String> getPhone()
      Specified by:
      getPhone in interface UserProfileIF
      Returns:
      The value of the phone attribute
    • getSkype

      public Optional<String> getSkype()
      Specified by:
      getSkype in interface UserProfileIF
      Returns:
      The value of the skype attribute
    • getPronouns

      public Optional<String> getPronouns()
      Specified by:
      getPronouns in interface UserProfileIF
      Returns:
      The value of the pronouns attribute
    • getFields

      public Optional<Map<String,ProfileField>> getFields()
      Specified by:
      getFields in interface UserProfileIF
      Returns:
      The value of the fields attribute
    • getTeamId

      public Optional<String> getTeamId()
      Specified by:
      getTeamId in interface UserProfileIF
      Returns:
      The value of the teamId attribute
    • getAvatarHash

      public Optional<String> getAvatarHash()
      Specified by:
      getAvatarHash in interface UserProfileIF
      Returns:
      The value of the avatarHash attribute
    • getImageOriginal

      public Optional<String> getImageOriginal()
      Specified by:
      getImageOriginal in interface UserProfileIF
      Returns:
      The value of the imageOriginal attribute
    • getImage24

      public Optional<String> getImage24()
      Specified by:
      getImage24 in interface UserProfileIF
      Returns:
      The value of the image24 attribute
    • getImage32

      public Optional<String> getImage32()
      Specified by:
      getImage32 in interface UserProfileIF
      Returns:
      The value of the image32 attribute
    • getImage48

      public Optional<String> getImage48()
      Specified by:
      getImage48 in interface UserProfileIF
      Returns:
      The value of the image48 attribute
    • getImage72

      public Optional<String> getImage72()
      Specified by:
      getImage72 in interface UserProfileIF
      Returns:
      The value of the image72 attribute
    • getImage192

      public Optional<String> getImage192()
      Specified by:
      getImage192 in interface UserProfileIF
      Returns:
      The value of the image192 attribute
    • getImage512

      public Optional<String> getImage512()
      Specified by:
      getImage512 in interface UserProfileIF
      Returns:
      The value of the image512 attribute
    • getImage1024

      public Optional<String> getImage1024()
      Specified by:
      getImage1024 in interface UserProfileIF
      Returns:
      The value of the image1024 attribute
    • withUsername

      public final UserProfile withUsername(@Nullable String value)
      Copy the current immutable object by setting a present value for the optional username attribute.
      Parameters:
      value - The value for username, null is accepted as java.util.Optional.empty()
      Returns:
      A modified copy or this if not changed
    • withUsername

      public final UserProfile withUsername(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the username attribute. An equality check is used on inner value to prevent copying of the same value by returning this.
      Parameters:
      optional - An optional value for username
      Returns:
      A modified copy or this if not changed
    • withUsernameNormalized

      public final UserProfile withUsernameNormalized(@Nullable String value)
      Copy the current immutable object by setting a present value for the optional usernameNormalized attribute.
      Parameters:
      value - The value for usernameNormalized, null is accepted as java.util.Optional.empty()
      Returns:
      A modified copy or this if not changed
    • withUsernameNormalized

      public final UserProfile withUsernameNormalized(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the usernameNormalized attribute. An equality check is used on inner value to prevent copying of the same value by returning this.
      Parameters:
      optional - An optional value for usernameNormalized
      Returns:
      A modified copy or this if not changed
    • withRealName

      public final UserProfile withRealName(@Nullable String value)
      Copy the current immutable object by setting a present value for the optional realName attribute.
      Parameters:
      value - The value for realName, null is accepted as java.util.Optional.empty()
      Returns:
      A modified copy or this if not changed
    • withRealName

      public final UserProfile withRealName(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the realName attribute. An equality check is used on inner value to prevent copying of the same value by returning this.
      Parameters:
      optional - An optional value for realName
      Returns:
      A modified copy or this if not changed
    • withRealNameNormalized

      public final UserProfile withRealNameNormalized(@Nullable String value)
      Copy the current immutable object by setting a present value for the optional realNameNormalized attribute.
      Parameters:
      value - The value for realNameNormalized, null is accepted as java.util.Optional.empty()
      Returns:
      A modified copy or this if not changed
    • withRealNameNormalized

      public final UserProfile withRealNameNormalized(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the realNameNormalized attribute. An equality check is used on inner value to prevent copying of the same value by returning this.
      Parameters:
      optional - An optional value for realNameNormalized
      Returns:
      A modified copy or this if not changed
    • withEmail

      public final UserProfile withEmail(@Nullable String value)
      Copy the current immutable object by setting a present value for the optional email attribute.
      Parameters:
      value - The value for email, null is accepted as java.util.Optional.empty()
      Returns:
      A modified copy or this if not changed
    • withEmail

      public final UserProfile withEmail(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the email attribute. An equality check is used on inner value to prevent copying of the same value by returning this.
      Parameters:
      optional - An optional value for email
      Returns:
      A modified copy or this if not changed
    • withStatusText

      public final UserProfile withStatusText(@Nullable String value)
      Copy the current immutable object by setting a present value for the optional statusText attribute.
      Parameters:
      value - The value for statusText, null is accepted as java.util.Optional.empty()
      Returns:
      A modified copy or this if not changed
    • withStatusText

      public final UserProfile withStatusText(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the statusText attribute. An equality check is used on inner value to prevent copying of the same value by returning this.
      Parameters:
      optional - An optional value for statusText
      Returns:
      A modified copy or this if not changed
    • withStatusEmoji

      public final UserProfile withStatusEmoji(@Nullable String value)
      Copy the current immutable object by setting a present value for the optional statusEmoji attribute.
      Parameters:
      value - The value for statusEmoji, null is accepted as java.util.Optional.empty()
      Returns:
      A modified copy or this if not changed
    • withStatusEmoji

      public final UserProfile withStatusEmoji(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the statusEmoji attribute. An equality check is used on inner value to prevent copying of the same value by returning this.
      Parameters:
      optional - An optional value for statusEmoji
      Returns:
      A modified copy or this if not changed
    • withStatusExpiration

      public final UserProfile withStatusExpiration(@Nullable Long value)
      Copy the current immutable object by setting a present value for the optional statusExpiration attribute.
      Parameters:
      value - The value for statusExpiration, null is accepted as java.util.Optional.empty()
      Returns:
      A modified copy or this if not changed
    • withStatusExpiration

      public final UserProfile withStatusExpiration(Optional<Long> optional)
      Copy the current immutable object by setting an optional value for the statusExpiration attribute. An equality check is used on inner value to prevent copying of the same value by returning this.
      Parameters:
      optional - An optional value for statusExpiration
      Returns:
      A modified copy or this if not changed
    • withTitle

      public final UserProfile withTitle(@Nullable String value)
      Copy the current immutable object by setting a present value for the optional title attribute.
      Parameters:
      value - The value for title, null is accepted as java.util.Optional.empty()
      Returns:
      A modified copy or this if not changed
    • withTitle

      public final UserProfile withTitle(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the title attribute. An equality check is used on inner value to prevent copying of the same value by returning this.
      Parameters:
      optional - An optional value for title
      Returns:
      A modified copy or this if not changed
    • withPhone

      public final UserProfile withPhone(@Nullable String value)
      Copy the current immutable object by setting a present value for the optional phone attribute.
      Parameters:
      value - The value for phone, null is accepted as java.util.Optional.empty()
      Returns:
      A modified copy or this if not changed
    • withPhone

      public final UserProfile withPhone(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the phone attribute. An equality check is used on inner value to prevent copying of the same value by returning this.
      Parameters:
      optional - An optional value for phone
      Returns:
      A modified copy or this if not changed
    • withSkype

      public final UserProfile withSkype(@Nullable String value)
      Copy the current immutable object by setting a present value for the optional skype attribute.
      Parameters:
      value - The value for skype, null is accepted as java.util.Optional.empty()
      Returns:
      A modified copy or this if not changed
    • withSkype

      public final UserProfile withSkype(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the skype attribute. An equality check is used on inner value to prevent copying of the same value by returning this.
      Parameters:
      optional - An optional value for skype
      Returns:
      A modified copy or this if not changed
    • withPronouns

      public final UserProfile withPronouns(@Nullable String value)
      Copy the current immutable object by setting a present value for the optional pronouns attribute.
      Parameters:
      value - The value for pronouns, null is accepted as java.util.Optional.empty()
      Returns:
      A modified copy or this if not changed
    • withPronouns

      public final UserProfile withPronouns(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the pronouns attribute. An equality check is used on inner value to prevent copying of the same value by returning this.
      Parameters:
      optional - An optional value for pronouns
      Returns:
      A modified copy or this if not changed
    • withFields

      public final UserProfile withFields(@Nullable Map<String,ProfileField> value)
      Copy the current immutable object by setting a present value for the optional fields attribute.
      Parameters:
      value - The value for fields, null is accepted as java.util.Optional.empty()
      Returns:
      A modified copy or this if not changed
    • withFields

      public final UserProfile withFields(Optional<? extends Map<String,ProfileField>> optional)
      Copy the current immutable object by setting an optional value for the fields attribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returning this.
      Parameters:
      optional - An optional value for fields
      Returns:
      A modified copy or this if not changed
    • withTeamId

      public final UserProfile withTeamId(@Nullable String value)
      Copy the current immutable object by setting a present value for the optional teamId attribute.
      Parameters:
      value - The value for teamId, null is accepted as java.util.Optional.empty()
      Returns:
      A modified copy or this if not changed
    • withTeamId

      public final UserProfile withTeamId(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the teamId attribute. An equality check is used on inner value to prevent copying of the same value by returning this.
      Parameters:
      optional - An optional value for teamId
      Returns:
      A modified copy or this if not changed
    • withAvatarHash

      public final UserProfile withAvatarHash(@Nullable String value)
      Copy the current immutable object by setting a present value for the optional avatarHash attribute.
      Parameters:
      value - The value for avatarHash, null is accepted as java.util.Optional.empty()
      Returns:
      A modified copy or this if not changed
    • withAvatarHash

      public final UserProfile withAvatarHash(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the avatarHash attribute. An equality check is used on inner value to prevent copying of the same value by returning this.
      Parameters:
      optional - An optional value for avatarHash
      Returns:
      A modified copy or this if not changed
    • withImageOriginal

      public final UserProfile withImageOriginal(@Nullable String value)
      Copy the current immutable object by setting a present value for the optional imageOriginal attribute.
      Parameters:
      value - The value for imageOriginal, null is accepted as java.util.Optional.empty()
      Returns:
      A modified copy or this if not changed
    • withImageOriginal

      public final UserProfile withImageOriginal(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the imageOriginal attribute. An equality check is used on inner value to prevent copying of the same value by returning this.
      Parameters:
      optional - An optional value for imageOriginal
      Returns:
      A modified copy or this if not changed
    • withImage24

      public final UserProfile withImage24(@Nullable String value)
      Copy the current immutable object by setting a present value for the optional image24 attribute.
      Parameters:
      value - The value for image24, null is accepted as java.util.Optional.empty()
      Returns:
      A modified copy or this if not changed
    • withImage24

      public final UserProfile withImage24(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the image24 attribute. An equality check is used on inner value to prevent copying of the same value by returning this.
      Parameters:
      optional - An optional value for image24
      Returns:
      A modified copy or this if not changed
    • withImage32

      public final UserProfile withImage32(@Nullable String value)
      Copy the current immutable object by setting a present value for the optional image32 attribute.
      Parameters:
      value - The value for image32, null is accepted as java.util.Optional.empty()
      Returns:
      A modified copy or this if not changed
    • withImage32

      public final UserProfile withImage32(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the image32 attribute. An equality check is used on inner value to prevent copying of the same value by returning this.
      Parameters:
      optional - An optional value for image32
      Returns:
      A modified copy or this if not changed
    • withImage48

      public final UserProfile withImage48(@Nullable String value)
      Copy the current immutable object by setting a present value for the optional image48 attribute.
      Parameters:
      value - The value for image48, null is accepted as java.util.Optional.empty()
      Returns:
      A modified copy or this if not changed
    • withImage48

      public final UserProfile withImage48(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the image48 attribute. An equality check is used on inner value to prevent copying of the same value by returning this.
      Parameters:
      optional - An optional value for image48
      Returns:
      A modified copy or this if not changed
    • withImage72

      public final UserProfile withImage72(@Nullable String value)
      Copy the current immutable object by setting a present value for the optional image72 attribute.
      Parameters:
      value - The value for image72, null is accepted as java.util.Optional.empty()
      Returns:
      A modified copy or this if not changed
    • withImage72

      public final UserProfile withImage72(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the image72 attribute. An equality check is used on inner value to prevent copying of the same value by returning this.
      Parameters:
      optional - An optional value for image72
      Returns:
      A modified copy or this if not changed
    • withImage192

      public final UserProfile withImage192(@Nullable String value)
      Copy the current immutable object by setting a present value for the optional image192 attribute.
      Parameters:
      value - The value for image192, null is accepted as java.util.Optional.empty()
      Returns:
      A modified copy or this if not changed
    • withImage192

      public final UserProfile withImage192(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the image192 attribute. An equality check is used on inner value to prevent copying of the same value by returning this.
      Parameters:
      optional - An optional value for image192
      Returns:
      A modified copy or this if not changed
    • withImage512

      public final UserProfile withImage512(@Nullable String value)
      Copy the current immutable object by setting a present value for the optional image512 attribute.
      Parameters:
      value - The value for image512, null is accepted as java.util.Optional.empty()
      Returns:
      A modified copy or this if not changed
    • withImage512

      public final UserProfile withImage512(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the image512 attribute. An equality check is used on inner value to prevent copying of the same value by returning this.
      Parameters:
      optional - An optional value for image512
      Returns:
      A modified copy or this if not changed
    • withImage1024

      public final UserProfile withImage1024(@Nullable String value)
      Copy the current immutable object by setting a present value for the optional image1024 attribute.
      Parameters:
      value - The value for image1024, null is accepted as java.util.Optional.empty()
      Returns:
      A modified copy or this if not changed
    • withImage1024

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

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of UserProfile 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: username, usernameNormalized, realName, realNameNormalized, email, statusText, statusEmoji, statusExpiration, title, phone, skype, pronouns, fields, teamId, avatarHash, imageOriginal, image24, image32, image48, image72, image192, image512, image1024.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

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

      public static UserProfile.Builder builder()
      Creates a builder for UserProfile.
       UserProfile.builder()
          .setUsername(Optional<String>) // optional username
          .setUsernameNormalized(Optional<String>) // optional usernameNormalized
          .setRealName(Optional<String>) // optional realName
          .setRealNameNormalized(Optional<String>) // optional realNameNormalized
          .setEmail(Optional<String>) // optional email
          .setStatusText(Optional<String>) // optional statusText
          .setStatusEmoji(Optional<String>) // optional statusEmoji
          .setStatusExpiration(Optional<Long>) // optional statusExpiration
          .setTitle(Optional<String>) // optional title
          .setPhone(Optional<String>) // optional phone
          .setSkype(Optional<String>) // optional skype
          .setPronouns(Optional<String>) // optional pronouns
          .setFields(Optional<Map<String, ProfileField>>) // optional fields
          .setTeamId(Optional<String>) // optional teamId
          .setAvatarHash(Optional<String>) // optional avatarHash
          .setImageOriginal(Optional<String>) // optional imageOriginal
          .setImage24(Optional<String>) // optional image24
          .setImage32(Optional<String>) // optional image32
          .setImage48(Optional<String>) // optional image48
          .setImage72(Optional<String>) // optional image72
          .setImage192(Optional<String>) // optional image192
          .setImage512(Optional<String>) // optional image512
          .setImage1024(Optional<String>) // optional image1024
          .build();
       
      Returns:
      A new UserProfile builder