Class ImmutableFileItem.Builder

  • Enclosing class:
    ImmutableFileItem

    @NotThreadSafe
    public static final class ImmutableFileItem.Builder
    extends Object
    Builds instances of type ImmutableFileItem. 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 ImmutableFileItem.Builder from​(FileItem instance)
        Fill a builder with attribute values from the provided FileItem instance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values.
        Parameters:
        instance - The instance from which to copy values
        Returns:
        this builder for use in a chained invocation
      • sha

        @CanIgnoreReturnValue
        public final ImmutableFileItem.Builder sha​(String sha)
        Initializes the value for the sha attribute.
        Parameters:
        sha - The value for sha
        Returns:
        this builder for use in a chained invocation
      • filename

        @CanIgnoreReturnValue
        public final ImmutableFileItem.Builder filename​(String filename)
        Initializes the value for the filename attribute.
        Parameters:
        filename - The value for filename
        Returns:
        this builder for use in a chained invocation
      • status

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

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

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

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

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

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

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

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