Class CompleteUploadExternalResponse

java.lang.Object
com.hubspot.slack.client.models.response.files.CompleteUploadExternalResponse
All Implemented Interfaces:
CompleteUploadExternalResponseIF, SlackResponse

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

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

  • Method Details

    • isOk

      public boolean isOk()
      Specified by:
      isOk in interface SlackResponse
      Returns:
      The value of the ok attribute
    • getResponseMetadata

      public Optional<ResponseMetadata> getResponseMetadata()
      Specified by:
      getResponseMetadata in interface SlackResponse
      Returns:
      The value of the responseMetadata attribute
    • getFiles

      public List<SlackFile> getFiles()
      Specified by:
      getFiles in interface CompleteUploadExternalResponseIF
      Returns:
      The value of the files attribute
    • withOk

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

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

      public final CompleteUploadExternalResponse withResponseMetadata(Optional<? extends ResponseMetadata> optional)
      Copy the current immutable object by setting an optional value for the responseMetadata 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 responseMetadata
      Returns:
      A modified copy or this if not changed
    • withFiles

      public final CompleteUploadExternalResponse withFiles(SlackFile... elements)
      Copy the current immutable object with elements that replace the content of files.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withFiles

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

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

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

      Creates an immutable copy of a CompleteUploadExternalResponseIF 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 CompleteUploadExternalResponse instance
    • builder

      public static CompleteUploadExternalResponse.Builder builder()
      Creates a builder for CompleteUploadExternalResponse.
       CompleteUploadExternalResponse.builder()
          .setOk(boolean) // required ok
          .setResponseMetadata(Optional<ResponseMetadata>) // optional responseMetadata
          .addFiles|addAllFiles(com.hubspot.slack.client.models.files.SlackFile) // files elements
          .build();
       
      Returns:
      A new CompleteUploadExternalResponse builder