Class ImmutableDataSetDto.Builder

java.lang.Object
fr.enedis.chutney.dataset.api.ImmutableDataSetDto.Builder
Enclosing class:
ImmutableDataSetDto

@Generated(from="DataSetDto", generator="Immutables") @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 Details

    • 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
    • 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
    • addDatatable

      @CanIgnoreReturnValue @SafeVarargs public final ImmutableDataSetDto.Builder addDatatable(List<KeyValue>... elements)
      Adds elements to datatable list.
      Parameters:
      elements - An array of datatable elements
      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
    • addScenarioUsage

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

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

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

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

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

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

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

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

      @CanIgnoreReturnValue public final ImmutableDataSetDto.Builder putScenarioInCampaignUsage(String key, Set<String> value)
      Put one entry to the scenarioInCampaignUsage map.
      Parameters:
      key - The key in the scenarioInCampaignUsage map
      value - The associated value in the scenarioInCampaignUsage map
      Returns:
      this builder for use in a chained invocation
    • putScenarioInCampaignUsage

      @CanIgnoreReturnValue public final ImmutableDataSetDto.Builder putScenarioInCampaignUsage(Map.Entry<String,? extends Set<String>> entry)
      Put one entry to the scenarioInCampaignUsage map. Nulls are not permitted
      Parameters:
      entry - The key and value entry
      Returns:
      this builder for use in a chained invocation
    • scenarioInCampaignUsage

      @CanIgnoreReturnValue public final ImmutableDataSetDto.Builder scenarioInCampaignUsage(Map<String,? extends Set<String>> entries)
      Sets or replaces all mappings from the specified map as entries for the scenarioInCampaignUsage map. Nulls are not permitted
      Parameters:
      entries - The entries that will be added to the scenarioInCampaignUsage map
      Returns:
      this builder for use in a chained invocation
    • putAllScenarioInCampaignUsage

      @CanIgnoreReturnValue public final ImmutableDataSetDto.Builder putAllScenarioInCampaignUsage(Map<String,? extends Set<String>> entries)
      Put all mappings from the specified map as entries to scenarioInCampaignUsage map. Nulls are not permitted
      Parameters:
      entries - The entries that will be added to the scenarioInCampaignUsage map
      Returns:
      this builder for use in a chained invocation
    • build

      public ImmutableDataSetDto build()
      Builds a new ImmutableDataSetDto.
      Returns:
      An immutable instance of DataSetDto
      Throws:
      IllegalStateException - if any required attributes are missing