Class CallsEndParams

java.lang.Object
com.hubspot.slack.client.methods.params.calls.CallsEndParams
All Implemented Interfaces:
CallsEndParamsIF

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

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

  • Method Details

    • getId

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

      public Optional<Duration> getDuration()
      Specified by:
      getDuration in interface CallsEndParamsIF
      Returns:
      The value of the duration attribute
    • getDurationSeconds

      public Optional<Integer> getDurationSeconds()
      Specified by:
      getDurationSeconds in interface CallsEndParamsIF
      Returns:
      The computed-at-construction value of the durationSeconds attribute
    • withId

      public final CallsEndParams 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
    • withDuration

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

      public final CallsEndParams withDuration(Optional<? extends Duration> optional)
      Copy the current immutable object by setting an optional value for the duration 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 duration
      Returns:
      A modified copy or this if not changed
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of CallsEndParams 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, duration, durationSeconds.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

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

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

      public static CallsEndParams.Builder builder()
      Creates a builder for CallsEndParams.
       CallsEndParams.builder()
          .setId(String) // required id
          .setDuration(Optional<java.time.Duration>) // optional duration
          .build();
       
      Returns:
      A new CallsEndParams builder