Class ImmutableNetworkConfiguration.EnvironmentConfiguration.Builder
java.lang.Object
fr.enedis.chutney.agent.domain.configure.ImmutableNetworkConfiguration.EnvironmentConfiguration.Builder
- Enclosing class:
ImmutableNetworkConfiguration.EnvironmentConfiguration
@Generated(from="NetworkConfiguration.EnvironmentConfiguration",
generator="Immutables")
@NotThreadSafe
public static final class ImmutableNetworkConfiguration.EnvironmentConfiguration.Builder
extends Object
Builds instances of type
EnvironmentConfiguration.
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 Summary
Modifier and TypeMethodDescriptionaddAllEnvironments(Iterable<? extends EnvironmentDto> elements) Adds elements toenvironmentsset.addEnvironments(EnvironmentDto element) Adds one element toenvironmentsset.addEnvironments(EnvironmentDto... elements) Adds elements toenvironmentsset.build()Builds a newEnvironmentConfiguration.environments(Iterable<? extends EnvironmentDto> elements) Sets or replaces all elements forenvironmentsset.Fill a builder with attribute values from the providedEnvironmentConfigurationinstance.
-
Method Details
-
from
@CanIgnoreReturnValue public final ImmutableNetworkConfiguration.EnvironmentConfiguration.Builder from(NetworkConfiguration.EnvironmentConfiguration instance) Fill a builder with attribute values from the providedEnvironmentConfigurationinstance. 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:
thisbuilder for use in a chained invocation
-
addEnvironments
@CanIgnoreReturnValue public final ImmutableNetworkConfiguration.EnvironmentConfiguration.Builder addEnvironments(EnvironmentDto element) Adds one element toenvironmentsset.- Parameters:
element- A environments element- Returns:
thisbuilder for use in a chained invocation
-
addEnvironments
@CanIgnoreReturnValue public final ImmutableNetworkConfiguration.EnvironmentConfiguration.Builder addEnvironments(EnvironmentDto... elements) Adds elements toenvironmentsset.- Parameters:
elements- An array of environments elements- Returns:
thisbuilder for use in a chained invocation
-
environments
@CanIgnoreReturnValue public final ImmutableNetworkConfiguration.EnvironmentConfiguration.Builder environments(Iterable<? extends EnvironmentDto> elements) Sets or replaces all elements forenvironmentsset.- Parameters:
elements- An iterable of environments elements- Returns:
thisbuilder for use in a chained invocation
-
addAllEnvironments
@CanIgnoreReturnValue public final ImmutableNetworkConfiguration.EnvironmentConfiguration.Builder addAllEnvironments(Iterable<? extends EnvironmentDto> elements) Adds elements toenvironmentsset.- Parameters:
elements- An iterable of environments elements- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newEnvironmentConfiguration.- Returns:
- An immutable instance of EnvironmentConfiguration
- Throws:
IllegalStateException- if any required attributes are missing
-