Class UsergroupUpdateParams

java.lang.Object
com.hubspot.slack.client.methods.params.usergroups.AbstractUsergroupUpdateParams
com.hubspot.slack.client.methods.params.usergroups.UsergroupUpdateParams
All Implemented Interfaces:
HasCommaSeperatedChannelIds, HasUsergroup

@Generated(from="AbstractUsergroupUpdateParams", generator="Immutables") @ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable public final class UsergroupUpdateParams extends AbstractUsergroupUpdateParams
Immutable implementation of AbstractUsergroupUpdateParams.

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

  • Method Details

    • getRawChannelIds

      public List<String> getRawChannelIds()
      Returns:
      The value of the rawChannelIds attribute
    • getEncodedChannels

      public Optional<String> getEncodedChannels()
      Returns:
      The computed-at-construction value of the encodedChannels attribute
    • getUsergroupId

      public String getUsergroupId()
      Specified by:
      getUsergroupId in interface HasUsergroup
      Specified by:
      getUsergroupId in class AbstractUsergroupUpdateParams
      Returns:
      The value of the usergroupId attribute
    • getName

      public Optional<String> getName()
      Specified by:
      getName in class AbstractUsergroupUpdateParams
      Returns:
      The value of the name attribute
    • getDescription

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

      public Optional<String> getHandle()
      Specified by:
      getHandle in class AbstractUsergroupUpdateParams
      Returns:
      The value of the handle attribute
    • getIncludeCount

      public Optional<Boolean> getIncludeCount()
      Specified by:
      getIncludeCount in class AbstractUsergroupUpdateParams
      Returns:
      The value of the includeCount attribute
    • withRawChannelIds

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

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

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

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

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

      public final UsergroupUpdateParams 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 UsergroupUpdateParams 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 UsergroupUpdateParams withHandle(@Nullable String value)
      Copy the current immutable object by setting a present value for the optional handle attribute.
      Parameters:
      value - The value for handle, null is accepted as java.util.Optional.empty()
      Returns:
      A modified copy or this if not changed
    • withHandle

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

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

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

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of UsergroupUpdateParams 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: rawChannelIds, encodedChannels, usergroupId, name, description, handle, includeCount.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

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

      public static UsergroupUpdateParams.Builder builder()
      Creates a builder for UsergroupUpdateParams.
       UsergroupUpdateParams.builder()
          .addRawChannelIds|addAllRawChannelIds(String) // rawChannelIds elements
          .setUsergroupId(String) // required usergroupId
          .setName(Optional<String>) // optional name
          .setDescription(Optional<String>) // optional description
          .setHandle(Optional<String>) // optional handle
          .setIncludeCount(Optional<Boolean>) // optional includeCount
          .build();
       
      Returns:
      A new UsergroupUpdateParams builder