Class Image.Builder

java.lang.Object
com.hubspot.slack.client.models.blocks.Image.Builder
Enclosing class:
Image

@Generated(from="ImageIF", generator="Immutables") @NotThreadSafe public static final class Image.Builder extends Object
Builds instances of type Image. 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 Image.Builder from(ImageIF instance)
      Fill a builder with attribute values from the provided com.hubspot.slack.client.models.blocks.ImageIF instance.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • from

      public final Image.Builder from(Block instance)
      Fill a builder with attribute values from the provided com.hubspot.slack.client.models.blocks.Block instance.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • setBlockId

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

      public final Image.Builder setBlockId(Optional<String> blockId)
      Initializes the optional value blockId to blockId.
      Parameters:
      blockId - The value for blockId
      Returns:
      this builder for use in a chained invocation
    • setImageUrl

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

      public final Image.Builder setImageUrl(Optional<String> imageUrl)
      Initializes the optional value imageUrl to imageUrl.
      Parameters:
      imageUrl - The value for imageUrl
      Returns:
      this builder for use in a chained invocation
    • setAltText

      public final Image.Builder setAltText(String altText)
      Initializes the value for the altText attribute.
      Parameters:
      altText - The value for altText
      Returns:
      this builder for use in a chained invocation
    • setTitle

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

      public final Image.Builder setTitle(Optional<? extends Text> title)
      Initializes the optional value title to title.
      Parameters:
      title - The value for title
      Returns:
      this builder for use in a chained invocation
    • setSlackFile

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

      public final Image.Builder setSlackFile(Optional<? extends SlackFileObject> slackFile)
      Initializes the optional value slackFile to slackFile.
      Parameters:
      slackFile - The value for slackFile
      Returns:
      this builder for use in a chained invocation
    • build

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