Class ImmutableDataSetDto.Builder

  • Enclosing class:
    ImmutableDataSetDto

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

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

        @CanIgnoreReturnValue
        public final ImmutableDataSetDto.Builder id​(Optional<String> id)
        Initializes the optional value id to id.
        Parameters:
        id - The value for id
        Returns:
        this builder for use in a chained invocation
      • name

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

        @CanIgnoreReturnValue
        public final ImmutableDataSetDto.Builder version​(Integer version)
        Initializes the value for the version attribute.

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

        Parameters:
        version - The value for version
        Returns:
        this builder for use in a chained invocation
      • description

        @CanIgnoreReturnValue
        public final ImmutableDataSetDto.Builder description​(String description)
        Initializes the value for the description attribute.

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

        Parameters:
        description - The value for description
        Returns:
        this builder for use in a chained invocation
      • lastUpdated

        @CanIgnoreReturnValue
        public final ImmutableDataSetDto.Builder lastUpdated​(Instant lastUpdated)
        Initializes the value for the lastUpdated attribute.

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

        Parameters:
        lastUpdated - The value for lastUpdated
        Returns:
        this builder for use in a chained invocation
      • addTags

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

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

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

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

        @CanIgnoreReturnValue
        public final ImmutableDataSetDto.Builder addConstants​(KeyValue element)
        Adds one element to constants list.
        Parameters:
        element - A constants element
        Returns:
        this builder for use in a chained invocation
      • addConstants

        @CanIgnoreReturnValue
        public final ImmutableDataSetDto.Builder addConstants​(KeyValue... elements)
        Adds elements to constants list.
        Parameters:
        elements - An array of constants elements
        Returns:
        this builder for use in a chained invocation
      • constants

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

        @CanIgnoreReturnValue
        public final ImmutableDataSetDto.Builder addAllConstants​(Iterable<? extends KeyValue> elements)
        Adds elements to constants list.
        Parameters:
        elements - An iterable of constants elements
        Returns:
        this builder for use in a chained invocation
      • addDatatable

        @CanIgnoreReturnValue
        public final ImmutableDataSetDto.Builder addDatatable​(List<KeyValue> element)
        Adds one element to datatable list.
        Parameters:
        element - A datatable element
        Returns:
        this builder for use in a chained invocation
      • datatable

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

        @CanIgnoreReturnValue
        public final ImmutableDataSetDto.Builder addAllDatatable​(Iterable<? extends List<KeyValue>> elements)
        Adds elements to datatable list.
        Parameters:
        elements - An iterable of datatable elements
        Returns:
        this builder for use in a chained invocation