java.lang.Object
com.hubspot.slack.client.methods.params.chat.workobject.entity.fullsizepreview.FullSizePreview.Builder
Enclosing class:
FullSizePreview

@Generated(from="FullSizePreviewIF", generator="Immutables") @NotThreadSafe public static final class FullSizePreview.Builder extends Object
Builds instances of type FullSizePreview. Initialize attributes and then invoke the build() method to create an immutable instance.

Builder is not thread-safe and generally should not be stored in a field or collection, but instead used immediately to create instances.

  • Method Details

    • from

      public final FullSizePreview.Builder from(FullSizePreviewIF instance)
      Fill a builder with attribute values from the provided FullSizePreviewIF instance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • setSupported

      public final FullSizePreview.Builder setSupported(boolean supported)
      Initializes the value for the supported attribute.
      Parameters:
      supported - The value for supported
      Returns:
      this builder for use in a chained invocation
    • setPreviewUrl

      public final FullSizePreview.Builder setPreviewUrl(@Nullable String previewUrl)
      Initializes the optional value previewUrl to previewUrl.
      Parameters:
      previewUrl - The value for previewUrl, null is accepted as java.util.Optional.empty()
      Returns:
      this builder for chained invocation
    • setPreviewUrl

      public final FullSizePreview.Builder setPreviewUrl(Optional<String> previewUrl)
      Initializes the optional value previewUrl to previewUrl.
      Parameters:
      previewUrl - The value for previewUrl
      Returns:
      this builder for use in a chained invocation
    • setMimeType

      public final FullSizePreview.Builder setMimeType(@Nullable String mimeType)
      Initializes the optional value mimeType to mimeType.
      Parameters:
      mimeType - The value for mimeType, null is accepted as java.util.Optional.empty()
      Returns:
      this builder for chained invocation
    • setMimeType

      public final FullSizePreview.Builder setMimeType(Optional<String> mimeType)
      Initializes the optional value mimeType to mimeType.
      Parameters:
      mimeType - The value for mimeType
      Returns:
      this builder for use in a chained invocation
    • setError

      public final FullSizePreview.Builder setError(@Nullable FullSizePreviewError error)
      Initializes the optional value error to error.
      Parameters:
      error - The value for error, null is accepted as java.util.Optional.empty()
      Returns:
      this builder for chained invocation
    • setError

      public final FullSizePreview.Builder setError(Optional<? extends FullSizePreviewError> error)
      Initializes the optional value error to error.
      Parameters:
      error - The value for error
      Returns:
      this builder for use in a chained invocation
    • build

      public FullSizePreview build()
      Builds a new FullSizePreview.
      Returns:
      An immutable instance of FullSizePreview
      Throws:
      com.hubspot.immutables.validation.InvalidImmutableStateException - if any required attributes are missing