Class UsergroupDisableParams

java.lang.Object
com.hubspot.slack.client.methods.params.usergroups.AbstractUsergroupDisableParams
com.hubspot.slack.client.methods.params.usergroups.UsergroupDisableParams
All Implemented Interfaces:
HasUsergroup

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

Use the builder to create immutable instances: UsergroupDisableParams.builder(). Use the static factory method to create immutable instances: UsergroupDisableParams.of().

  • Method Details

    • getUsergroupId

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

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

      public final UsergroupDisableParams 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
    • withIncludeCount

      public final UsergroupDisableParams 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 UsergroupDisableParams 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 UsergroupDisableParams 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: usergroupId, includeCount.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

      public static UsergroupDisableParams of(String usergroupId)
      Construct a new immutable UsergroupDisableParams instance.
      Parameters:
      usergroupId - The value for the usergroupId attribute
      Returns:
      An immutable UsergroupDisableParams instance
    • copyOf

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

      public static UsergroupDisableParams.Builder builder()
      Creates a builder for UsergroupDisableParams.
       UsergroupDisableParams.builder()
          .setUsergroupId(String) // required usergroupId
          .setIncludeCount(Optional<Boolean>) // optional includeCount
          .build();
       
      Returns:
      A new UsergroupDisableParams builder