Class ImmutableWebhook.Builder

  • Enclosing class:
    ImmutableWebhook

    @NotThreadSafe
    public static final class ImmutableWebhook.Builder
    extends Object
    Builds instances of type ImmutableWebhook. 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 Detail

      • from

        @CanIgnoreReturnValue
        public final ImmutableWebhook.Builder from​(Webhook instance)
        Fill a builder with attribute values from the provided com.spotify.github.v3.hooks.Webhook instance.
        Parameters:
        instance - The instance from which to copy values
        Returns:
        this builder for use in a chained invocation
      • from

        @CanIgnoreReturnValue
        public final ImmutableWebhook.Builder from​(UpdateTracking instance)
        Fill a builder with attribute values from the provided com.spotify.github.UpdateTracking instance.
        Parameters:
        instance - The instance from which to copy values
        Returns:
        this builder for use in a chained invocation
      • createdAt

        @CanIgnoreReturnValue
        public final ImmutableWebhook.Builder createdAt​(@Nullable
                                                        GitHubInstant createdAt)
        Initializes the value for the createdAt attribute.
        Parameters:
        createdAt - The value for createdAt (can be null)
        Returns:
        this builder for use in a chained invocation
      • updatedAt

        @CanIgnoreReturnValue
        public final ImmutableWebhook.Builder updatedAt​(@Nullable
                                                        GitHubInstant updatedAt)
        Initializes the value for the updatedAt attribute.
        Parameters:
        updatedAt - The value for updatedAt (can be null)
        Returns:
        this builder for use in a chained invocation
      • id

        @CanIgnoreReturnValue
        public final ImmutableWebhook.Builder id​(@Nullable
                                                 Integer id)
        Initializes the value for the id attribute.
        Parameters:
        id - The value for id (can be null)
        Returns:
        this builder for use in a chained invocation
      • url

        @CanIgnoreReturnValue
        public final ImmutableWebhook.Builder url​(@Nullable
                                                  URI url)
        Initializes the value for the url attribute.
        Parameters:
        url - The value for url (can be null)
        Returns:
        this builder for use in a chained invocation
      • testUrl

        @CanIgnoreReturnValue
        public final ImmutableWebhook.Builder testUrl​(@Nullable
                                                      URI testUrl)
        Initializes the value for the testUrl attribute.
        Parameters:
        testUrl - The value for testUrl (can be null)
        Returns:
        this builder for use in a chained invocation
      • pingUrl

        @CanIgnoreReturnValue
        public final ImmutableWebhook.Builder pingUrl​(@Nullable
                                                      URI pingUrl)
        Initializes the value for the pingUrl attribute.
        Parameters:
        pingUrl - The value for pingUrl (can be null)
        Returns:
        this builder for use in a chained invocation
      • name

        @CanIgnoreReturnValue
        public final ImmutableWebhook.Builder name​(@Nullable
                                                   String name)
        Initializes the value for the name attribute.
        Parameters:
        name - The value for name (can be null)
        Returns:
        this builder for use in a chained invocation
      • addEvents

        @CanIgnoreReturnValue
        public final ImmutableWebhook.Builder addEvents​(String element)
        Adds one element to events list.
        Parameters:
        element - A events element
        Returns:
        this builder for use in a chained invocation
      • addEvents

        @CanIgnoreReturnValue
        public final ImmutableWebhook.Builder addEvents​(String... elements)
        Adds elements to events list.
        Parameters:
        elements - An array of events elements
        Returns:
        this builder for use in a chained invocation
      • events

        @CanIgnoreReturnValue
        public final ImmutableWebhook.Builder events​(@Nullable
                                                     Iterable<String> elements)
        Sets or replaces all elements for events list.
        Parameters:
        elements - An iterable of events elements
        Returns:
        this builder for use in a chained invocation
      • addAllEvents

        @CanIgnoreReturnValue
        public final ImmutableWebhook.Builder addAllEvents​(Iterable<String> elements)
        Adds elements to events list.
        Parameters:
        elements - An iterable of events elements
        Returns:
        this builder for use in a chained invocation
      • active

        @CanIgnoreReturnValue
        public final ImmutableWebhook.Builder active​(@Nullable
                                                     Boolean active)
        Initializes the value for the active attribute.
        Parameters:
        active - The value for active (can be null)
        Returns:
        this builder for use in a chained invocation
      • config

        @CanIgnoreReturnValue
        public final ImmutableWebhook.Builder config​(@Nullable
                                                     WebhookConfig config)
        Initializes the value for the config attribute.
        Parameters:
        config - The value for config (can be null)
        Returns:
        this builder for use in a chained invocation