Class ImmutableCreateEvent.Builder

  • Enclosing class:
    ImmutableCreateEvent

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

        @CanIgnoreReturnValue
        public final ImmutableCreateEvent.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
      • repository

        @CanIgnoreReturnValue
        public final ImmutableCreateEvent.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 ImmutableCreateEvent.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 ImmutableCreateEvent.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
      • ref

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

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

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

        @CanIgnoreReturnValue
        public final ImmutableCreateEvent.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
      • pusherType

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