Class File.Builder

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

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

      public final File.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 File.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 File.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
    • setExternalId

      public final File.Builder setExternalId(String externalId)
      Initializes the value for the externalId attribute.
      Parameters:
      externalId - The value for externalId
      Returns:
      this builder for use in a chained invocation
    • setSource

      public final File.Builder setSource(String source)
      Initializes the value for the source attribute.
      Parameters:
      source - The value for source
      Returns:
      this builder for use in a chained invocation
    • build

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