Class ImmutableLogResponse.Builder

  • Enclosing class:
    ImmutableLogResponse

    @NotThreadSafe
    public static final class ImmutableLogResponse.Builder
    extends Object
    Builds instances of type ImmutableLogResponse. 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 ImmutableLogResponse.Builder from​(LogResponse instance)
        Fill a builder with attribute values from the provided org.projectnessie.model.LogResponse instance.
        Parameters:
        instance - The instance from which to copy values
        Returns:
        this builder for use in a chained invocation
      • from

        @CanIgnoreReturnValue
        public final ImmutableLogResponse.Builder from​(PaginatedResponse instance)
        Fill a builder with attribute values from the provided org.projectnessie.model.PaginatedResponse instance.
        Parameters:
        instance - The instance from which to copy values
        Returns:
        this builder for use in a chained invocation
      • hasMore

        @CanIgnoreReturnValue
        public final ImmutableLogResponse.Builder hasMore​(boolean hasMore)
        Initializes the value for the hasMore attribute.

        If not set, this attribute will have a default value as returned by the initializer of hasMore.

        Parameters:
        hasMore - The value for hasMore
        Returns:
        this builder for use in a chained invocation
      • token

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

        @CanIgnoreReturnValue
        public final ImmutableLogResponse.Builder addOperations​(CommitMeta element)
        Adds one element to operations list.
        Parameters:
        element - A operations element
        Returns:
        this builder for use in a chained invocation
      • addOperations

        @CanIgnoreReturnValue
        public final ImmutableLogResponse.Builder addOperations​(CommitMeta... elements)
        Adds elements to operations list.
        Parameters:
        elements - An array of operations elements
        Returns:
        this builder for use in a chained invocation
      • operations

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

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