Class SlackUsergroup

java.lang.Object
com.hubspot.slack.client.models.usergroups.SlackUsergroup
All Implemented Interfaces:
SlackUsergroupIF

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

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

  • Method Details

    • getId

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

      public String getTeamId()
      Specified by:
      getTeamId in interface SlackUsergroupIF
      Returns:
      The value of the teamId attribute
    • isUsergroup

      public boolean isUsergroup()
      Specified by:
      isUsergroup in interface SlackUsergroupIF
      Returns:
      The value of the usergroup attribute
    • getName

      public String getName()
      Specified by:
      getName in interface SlackUsergroupIF
      Returns:
      The value of the name attribute
    • getDescription

      public Optional<String> getDescription()
      Specified by:
      getDescription in interface SlackUsergroupIF
      Returns:
      The value of the description attribute
    • getHandle

      public String getHandle()
      Specified by:
      getHandle in interface SlackUsergroupIF
      Returns:
      The value of the handle attribute
    • isExternal

      public boolean isExternal()
      Specified by:
      isExternal in interface SlackUsergroupIF
      Returns:
      The value of the external attribute
    • getDateCreatedEpochSeconds

      public int getDateCreatedEpochSeconds()
      Specified by:
      getDateCreatedEpochSeconds in interface SlackUsergroupIF
      Returns:
      The value of the dateCreatedEpochSeconds attribute
    • getDateUpdatedEpochSeconds

      public int getDateUpdatedEpochSeconds()
      Specified by:
      getDateUpdatedEpochSeconds in interface SlackUsergroupIF
      Returns:
      The value of the dateUpdatedEpochSeconds attribute
    • getDateDeletedEpochSeconds

      public int getDateDeletedEpochSeconds()
      Specified by:
      getDateDeletedEpochSeconds in interface SlackUsergroupIF
      Returns:
      The value of the dateDeletedEpochSeconds attribute
    • getAutoType

      public Optional<String> getAutoType()
      Specified by:
      getAutoType in interface SlackUsergroupIF
      Returns:
      The value of the autoType attribute
    • getCreatedBy

      public Optional<String> getCreatedBy()
      Specified by:
      getCreatedBy in interface SlackUsergroupIF
      Returns:
      The value of the createdBy attribute
    • getUpdatedBy

      public Optional<String> getUpdatedBy()
      Specified by:
      getUpdatedBy in interface SlackUsergroupIF
      Returns:
      The value of the updatedBy attribute
    • getDeletedBy

      public Optional<String> getDeletedBy()
      Specified by:
      getDeletedBy in interface SlackUsergroupIF
      Returns:
      The value of the deletedBy attribute
    • isDeleted

      public boolean isDeleted()
      Specified by:
      isDeleted in interface SlackUsergroupIF
      Returns:
      The computed-at-construction value of the deleted attribute
    • getPreferences

      public UsergroupPreferences getPreferences()
      Specified by:
      getPreferences in interface SlackUsergroupIF
      Returns:
      The value of the preferences attribute
    • getUserIdsInGroup

      public List<String> getUserIdsInGroup()
      Specified by:
      getUserIdsInGroup in interface SlackUsergroupIF
      Returns:
      The value of the userIdsInGroup attribute
    • getUserCount

      public Optional<Integer> getUserCount()
      Specified by:
      getUserCount in interface SlackUsergroupIF
      Returns:
      The value of the userCount attribute
    • withId

      public final SlackUsergroup 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 or the this object
    • withTeamId

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

      public final SlackUsergroup withUsergroup(boolean value)
      Copy the current immutable object by setting a value for the usergroup attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for usergroup
      Returns:
      A modified copy or the this object
    • withName

      public final SlackUsergroup withName(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
      Returns:
      A modified copy or the this object
    • withDescription

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

      public final SlackUsergroup withDescription(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the description 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 description
      Returns:
      A modified copy or this if not changed
    • withHandle

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

      public final SlackUsergroup withExternal(boolean value)
      Copy the current immutable object by setting a value for the external attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for external
      Returns:
      A modified copy or the this object
    • withDateCreatedEpochSeconds

      public final SlackUsergroup withDateCreatedEpochSeconds(int value)
      Copy the current immutable object by setting a value for the dateCreatedEpochSeconds attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for dateCreatedEpochSeconds
      Returns:
      A modified copy or the this object
    • withDateUpdatedEpochSeconds

      public final SlackUsergroup withDateUpdatedEpochSeconds(int value)
      Copy the current immutable object by setting a value for the dateUpdatedEpochSeconds attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for dateUpdatedEpochSeconds
      Returns:
      A modified copy or the this object
    • withDateDeletedEpochSeconds

      public final SlackUsergroup withDateDeletedEpochSeconds(int value)
      Copy the current immutable object by setting a value for the dateDeletedEpochSeconds attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for dateDeletedEpochSeconds
      Returns:
      A modified copy or the this object
    • withAutoType

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

      public final SlackUsergroup withAutoType(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the autoType 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 autoType
      Returns:
      A modified copy or this if not changed
    • withCreatedBy

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

      public final SlackUsergroup withCreatedBy(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the createdBy 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 createdBy
      Returns:
      A modified copy or this if not changed
    • withUpdatedBy

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

      public final SlackUsergroup withUpdatedBy(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the updatedBy 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 updatedBy
      Returns:
      A modified copy or this if not changed
    • withDeletedBy

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

      public final SlackUsergroup withDeletedBy(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the deletedBy 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 deletedBy
      Returns:
      A modified copy or this if not changed
    • withPreferences

      public final SlackUsergroup withPreferences(UsergroupPreferences value)
      Copy the current immutable object by setting a value for the preferences attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for preferences
      Returns:
      A modified copy or the this object
    • withUserIdsInGroup

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

      public final SlackUsergroup withUserIdsInGroup(Iterable<String> elements)
      Copy the current immutable object with elements that replace the content of userIdsInGroup. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of userIdsInGroup elements to set
      Returns:
      A modified copy or this if not changed
    • withUserCount

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

      public final SlackUsergroup withUserCount(Optional<Integer> optional)
      Copy the current immutable object by setting an optional value for the userCount 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 userCount
      Returns:
      A modified copy or this if not changed
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of SlackUsergroup 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, teamId, usergroup, name, description, handle, external, dateCreatedEpochSeconds, dateUpdatedEpochSeconds, dateDeletedEpochSeconds, autoType, createdBy, updatedBy, deletedBy, deleted, preferences, userIdsInGroup, userCount.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

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

      public static SlackUsergroup.Builder builder()
      Creates a builder for SlackUsergroup.
       SlackUsergroup.builder()
          .setId(String) // required id
          .setTeamId(String) // required teamId
          .setUsergroup(boolean) // required usergroup
          .setName(String) // required name
          .setDescription(Optional<String>) // optional description
          .setHandle(String) // required handle
          .setExternal(boolean) // required external
          .setDateCreatedEpochSeconds(int) // required dateCreatedEpochSeconds
          .setDateUpdatedEpochSeconds(int) // required dateUpdatedEpochSeconds
          .setDateDeletedEpochSeconds(int) // required dateDeletedEpochSeconds
          .setAutoType(Optional<String>) // optional autoType
          .setCreatedBy(Optional<String>) // optional createdBy
          .setUpdatedBy(Optional<String>) // optional updatedBy
          .setDeletedBy(Optional<String>) // optional deletedBy
          .setPreferences(com.hubspot.slack.client.models.usergroups.UsergroupPreferences) // required preferences
          .addUserIdsInGroup|addAllUserIdsInGroup(String) // userIdsInGroup elements
          .setUserCount(Optional<Integer>) // optional userCount
          .build();
       
      Returns:
      A new SlackUsergroup builder