Class ImmutableStatusEvent.Builder

  • Enclosing class:
    ImmutableStatusEvent

    @NotThreadSafe
    public static final class ImmutableStatusEvent.Builder
    extends Object
    Builds instances of type ImmutableStatusEvent. 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 ImmutableStatusEvent.Builder from​(BaseEvent instance)
        Fill a builder with attribute values from the provided com.spotify.github.v3.activity.events.BaseEvent instance.
        Parameters:
        instance - The instance from which to copy values
        Returns:
        this builder for use in a chained invocation
      • from

        @CanIgnoreReturnValue
        public final ImmutableStatusEvent.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
      • from

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

        @CanIgnoreReturnValue
        public final ImmutableStatusEvent.Builder repository​(@Nullable
                                                             Repository repository)
        Initializes the value for the repository attribute.
        Parameters:
        repository - The value for repository (can be null)
        Returns:
        this builder for use in a chained invocation
      • sender

        @CanIgnoreReturnValue
        public final ImmutableStatusEvent.Builder sender​(@Nullable
                                                         User sender)
        Initializes the value for the sender attribute.
        Parameters:
        sender - The value for sender (can be null)
        Returns:
        this builder for use in a chained invocation
      • eventInstallation

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

        @CanIgnoreReturnValue
        public final ImmutableStatusEvent.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 ImmutableStatusEvent.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 ImmutableStatusEvent.Builder id​(@Nullable
                                                     Long 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
      • sha

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

        @CanIgnoreReturnValue
        public final ImmutableStatusEvent.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
      • targetUrl

        @CanIgnoreReturnValue
        public final ImmutableStatusEvent.Builder targetUrl​(URI targetUrl)
        Initializes the optional value targetUrl to targetUrl.
        Parameters:
        targetUrl - The value for targetUrl
        Returns:
        this builder for chained invocation
      • targetUrl

        @CanIgnoreReturnValue
        public final ImmutableStatusEvent.Builder targetUrl​(Optional<? extends URI> targetUrl)
        Initializes the optional value targetUrl to targetUrl.
        Parameters:
        targetUrl - The value for targetUrl
        Returns:
        this builder for use in a chained invocation
      • context

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

        @CanIgnoreReturnValue
        public final ImmutableStatusEvent.Builder description​(@Nullable
                                                              Optional<String> description)
        Initializes the value for the description attribute.
        Parameters:
        description - The value for description (can be null)
        Returns:
        this builder for use in a chained invocation
      • state

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

        @CanIgnoreReturnValue
        public final ImmutableStatusEvent.Builder commit​(@Nullable
                                                         CommitItem commit)
        Initializes the value for the commit attribute.
        Parameters:
        commit - The value for commit (can be null)
        Returns:
        this builder for use in a chained invocation
      • addBranches

        @CanIgnoreReturnValue
        public final ImmutableStatusEvent.Builder addBranches​(Branch element)
        Adds one element to branches list.
        Parameters:
        element - A branches element
        Returns:
        this builder for use in a chained invocation
      • addBranches

        @CanIgnoreReturnValue
        public final ImmutableStatusEvent.Builder addBranches​(Branch... elements)
        Adds elements to branches list.
        Parameters:
        elements - An array of branches elements
        Returns:
        this builder for use in a chained invocation
      • branches

        @CanIgnoreReturnValue
        public final ImmutableStatusEvent.Builder branches​(@Nullable
                                                           Iterable<? extends Branch> elements)
        Sets or replaces all elements for branches list.
        Parameters:
        elements - An iterable of branches elements
        Returns:
        this builder for use in a chained invocation
      • addAllBranches

        @CanIgnoreReturnValue
        public final ImmutableStatusEvent.Builder addAllBranches​(Iterable<? extends Branch> elements)
        Adds elements to branches list.
        Parameters:
        elements - An iterable of branches elements
        Returns:
        this builder for use in a chained invocation