Class SlackCall.Builder

java.lang.Object
com.hubspot.slack.client.models.calls.SlackCall.Builder
Enclosing class:
SlackCall

@Generated(from="SlackCallIF", generator="Immutables") @NotThreadSafe public static final class SlackCall.Builder extends Object
Builds instances of type SlackCall. 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 SlackCall.Builder from(SlackCallIF instance)
      Fill a builder with attribute values from the provided SlackCallIF instance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values. Collection elements and entries will be added, not replaced.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • setExternalUniqueId

      public final SlackCall.Builder setExternalUniqueId(String externalUniqueId)
      Initializes the value for the externalUniqueId attribute.
      Parameters:
      externalUniqueId - The value for externalUniqueId
      Returns:
      this builder for use in a chained invocation
    • setId

      public final SlackCall.Builder setId(String id)
      Initializes the value for the id attribute.
      Parameters:
      id - The value for id
      Returns:
      this builder for use in a chained invocation
    • setStartDateEpochSeconds

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

      public final SlackCall.Builder setStartDateEpochSeconds(Optional<Integer> startDateEpochSeconds)
      Initializes the optional value startDateEpochSeconds to startDateEpochSeconds.
      Parameters:
      startDateEpochSeconds - The value for startDateEpochSeconds
      Returns:
      this builder for use in a chained invocation
    • setDesktopAppJoinUrl

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

      public final SlackCall.Builder setDesktopAppJoinUrl(Optional<String> desktopAppJoinUrl)
      Initializes the optional value desktopAppJoinUrl to desktopAppJoinUrl.
      Parameters:
      desktopAppJoinUrl - The value for desktopAppJoinUrl
      Returns:
      this builder for use in a chained invocation
    • setExternalDisplayId

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

      public final SlackCall.Builder setExternalDisplayId(Optional<String> externalDisplayId)
      Initializes the optional value externalDisplayId to externalDisplayId.
      Parameters:
      externalDisplayId - The value for externalDisplayId
      Returns:
      this builder for use in a chained invocation
    • setTitle

      public final SlackCall.Builder setTitle(@Nullable String 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 SlackCall.Builder setTitle(Optional<String> title)
      Initializes the optional value title to title.
      Parameters:
      title - The value for title
      Returns:
      this builder for use in a chained invocation
    • addUsers

      public final SlackCall.Builder addUsers(SlackInternalOrExternalUser element)
      Adds one element to users list.
      Parameters:
      element - A users element
      Returns:
      this builder for use in a chained invocation
    • addUsers

      public final SlackCall.Builder addUsers(SlackInternalOrExternalUser... elements)
      Adds elements to users list.
      Parameters:
      elements - An array of users elements
      Returns:
      this builder for use in a chained invocation
    • setUsers

      public final SlackCall.Builder setUsers(Iterable<? extends SlackInternalOrExternalUser> elements)
      Sets or replaces all elements for users list.
      Parameters:
      elements - An iterable of users elements
      Returns:
      this builder for use in a chained invocation
    • addAllUsers

      public final SlackCall.Builder addAllUsers(Iterable<? extends SlackInternalOrExternalUser> elements)
      Adds elements to users list.
      Parameters:
      elements - An iterable of users elements
      Returns:
      this builder for use in a chained invocation
    • build

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