Class EntityPayloadAttributes.Builder

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

@Generated(from="EntityPayloadAttributesIF", generator="Immutables") @NotThreadSafe public static final class EntityPayloadAttributes.Builder extends Object
Builds instances of type EntityPayloadAttributes. 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

      Fill a builder with attribute values from the provided EntityPayloadAttributesIF 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
    • setTitle

      Initializes the value for the title attribute.
      Parameters:
      title - The value for title
      Returns:
      this builder for use in a chained invocation
    • setDisplayId

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

      public final EntityPayloadAttributes.Builder setDisplayId(Optional<String> displayId)
      Initializes the optional value displayId to displayId.
      Parameters:
      displayId - The value for displayId
      Returns:
      this builder for use in a chained invocation
    • setDisplayType

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

      public final EntityPayloadAttributes.Builder setDisplayType(Optional<String> displayType)
      Initializes the optional value displayType to displayType.
      Parameters:
      displayType - The value for displayType
      Returns:
      this builder for use in a chained invocation
    • setProductName

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

      public final EntityPayloadAttributes.Builder setProductName(Optional<String> productName)
      Initializes the optional value productName to productName.
      Parameters:
      productName - The value for productName
      Returns:
      this builder for use in a chained invocation
    • setProductIcon

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

      public final EntityPayloadAttributes.Builder setProductIcon(Optional<? extends Icon> productIcon)
      Initializes the optional value productIcon to productIcon.
      Parameters:
      productIcon - The value for productIcon
      Returns:
      this builder for use in a chained invocation
    • setLocale

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

      public final EntityPayloadAttributes.Builder setLocale(Optional<String> locale)
      Initializes the optional value locale to locale.
      Parameters:
      locale - The value for locale
      Returns:
      this builder for use in a chained invocation
    • setFullSizePreview

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

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

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