Class ImmutableNetworkConfiguration.AgentNetworkConfiguration.Builder
java.lang.Object
fr.enedis.chutney.agent.domain.configure.ImmutableNetworkConfiguration.AgentNetworkConfiguration.Builder
- Enclosing class:
ImmutableNetworkConfiguration.AgentNetworkConfiguration
@Generated(from="NetworkConfiguration.AgentNetworkConfiguration",
generator="Immutables")
@NotThreadSafe
public static final class ImmutableNetworkConfiguration.AgentNetworkConfiguration.Builder
extends Object
Builds instances of type
AgentNetworkConfiguration.
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 TypeMethodDescriptionaddAgentInfos(NamedHostAndPort element) Adds one element toagentInfosset.addAgentInfos(NamedHostAndPort... elements) Adds elements toagentInfosset.addAllAgentInfos(Iterable<? extends NamedHostAndPort> elements) Adds elements toagentInfosset.agentInfos(Iterable<? extends NamedHostAndPort> elements) Sets or replaces all elements foragentInfosset.build()Builds a newAgentNetworkConfiguration.Fill a builder with attribute values from the providedAgentNetworkConfigurationinstance.
-
Method Details
-
from
@CanIgnoreReturnValue public final ImmutableNetworkConfiguration.AgentNetworkConfiguration.Builder from(NetworkConfiguration.AgentNetworkConfiguration instance) Fill a builder with attribute values from the providedAgentNetworkConfigurationinstance. 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
-
addAgentInfos
@CanIgnoreReturnValue public final ImmutableNetworkConfiguration.AgentNetworkConfiguration.Builder addAgentInfos(NamedHostAndPort element) Adds one element toagentInfosset.- Parameters:
element- A agentInfos element- Returns:
thisbuilder for use in a chained invocation
-
addAgentInfos
@CanIgnoreReturnValue public final ImmutableNetworkConfiguration.AgentNetworkConfiguration.Builder addAgentInfos(NamedHostAndPort... elements) Adds elements toagentInfosset.- Parameters:
elements- An array of agentInfos elements- Returns:
thisbuilder for use in a chained invocation
-
agentInfos
@CanIgnoreReturnValue public final ImmutableNetworkConfiguration.AgentNetworkConfiguration.Builder agentInfos(Iterable<? extends NamedHostAndPort> elements) Sets or replaces all elements foragentInfosset.- Parameters:
elements- An iterable of agentInfos elements- Returns:
thisbuilder for use in a chained invocation
-
addAllAgentInfos
@CanIgnoreReturnValue public final ImmutableNetworkConfiguration.AgentNetworkConfiguration.Builder addAllAgentInfos(Iterable<? extends NamedHostAndPort> elements) Adds elements toagentInfosset.- Parameters:
elements- An iterable of agentInfos elements- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newAgentNetworkConfiguration.- Returns:
- An immutable instance of AgentNetworkConfiguration
- Throws:
IllegalStateException- if any required attributes are missing
-