java.lang.Object
com.hubspot.slack.client.methods.params.chat.workobject.entity.fullsizepreview.FullSizePreview
All Implemented Interfaces:
FullSizePreviewIF

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

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

  • Method Details

    • isSupported

      public boolean isSupported()
      Specified by:
      isSupported in interface FullSizePreviewIF
      Returns:
      The value of the supported attribute
    • getPreviewUrl

      public Optional<String> getPreviewUrl()
      Specified by:
      getPreviewUrl in interface FullSizePreviewIF
      Returns:
      The value of the previewUrl attribute
    • getMimeType

      public Optional<String> getMimeType()
      Specified by:
      getMimeType in interface FullSizePreviewIF
      Returns:
      The value of the mimeType attribute
    • getError

      public Optional<FullSizePreviewError> getError()
      Specified by:
      getError in interface FullSizePreviewIF
      Returns:
      The value of the error attribute
    • withSupported

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

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

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

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

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

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

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

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

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

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

      public static FullSizePreview.Builder builder()
      Creates a builder for FullSizePreview.
       FullSizePreview.builder()
          .setSupported(boolean) // required supported
          .setPreviewUrl(Optional<String>) // optional previewUrl
          .setMimeType(Optional<String>) // optional mimeType
          .setError(Optional<FullSizePreviewError>) // optional error
          .build();
       
      Returns:
      A new FullSizePreview builder