Class UsergroupCreateParams

java.lang.Object
com.hubspot.slack.client.methods.params.usergroups.UsergroupCreateParams
All Implemented Interfaces:
HasCommaSeperatedChannelIds, UsergroupCreateParamsIF

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

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

  • Method Details

    • getRawChannelIds

      public List<String> getRawChannelIds()
      Specified by:
      getRawChannelIds in interface HasCommaSeperatedChannelIds
      Returns:
      The value of the rawChannelIds attribute
    • getEncodedChannels

      public Optional<String> getEncodedChannels()
      Specified by:
      getEncodedChannels in interface HasCommaSeperatedChannelIds
      Returns:
      The computed-at-construction value of the encodedChannels attribute
    • getName

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

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

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

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

      public final UsergroupCreateParams 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 UsergroupCreateParams 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
    • withName

      public final UsergroupCreateParams 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 UsergroupCreateParams 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 UsergroupCreateParams 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 UsergroupCreateParams 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 UsergroupCreateParams 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 UsergroupCreateParams 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 UsergroupCreateParams 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 UsergroupCreateParams 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, name, description, handle, includeCount.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

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

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