Class ImmutableNetworkConfiguration.Builder
java.lang.Object
com.chutneytesting.agent.domain.configure.ImmutableNetworkConfiguration.Builder
- Enclosing class:
- ImmutableNetworkConfiguration
Builds instances of type
ImmutableNetworkConfiguration.
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 TypeMethodDescriptionagentNetworkConfiguration(NetworkConfiguration.AgentNetworkConfiguration agentNetworkConfiguration) Initializes the value for theagentNetworkConfigurationattribute.build()Builds a newImmutableNetworkConfiguration.creationDate(Instant creationDate) Initializes the value for thecreationDateattribute.environmentConfiguration(NetworkConfiguration.EnvironmentConfiguration environmentConfiguration) Initializes the value for theenvironmentConfigurationattribute.from(NetworkConfiguration instance) Fill a builder with attribute values from the providedNetworkConfigurationinstance.
-
Method Details
-
from
@CanIgnoreReturnValue public final ImmutableNetworkConfiguration.Builder from(NetworkConfiguration instance) Fill a builder with attribute values from the providedNetworkConfigurationinstance. 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:
thisbuilder for use in a chained invocation
-
creationDate
@CanIgnoreReturnValue public final ImmutableNetworkConfiguration.Builder creationDate(Instant creationDate) Initializes the value for thecreationDateattribute.- Parameters:
creationDate- The value for creationDate- Returns:
thisbuilder for use in a chained invocation
-
agentNetworkConfiguration
@CanIgnoreReturnValue public final ImmutableNetworkConfiguration.Builder agentNetworkConfiguration(NetworkConfiguration.AgentNetworkConfiguration agentNetworkConfiguration) Initializes the value for theagentNetworkConfigurationattribute.- Parameters:
agentNetworkConfiguration- The value for agentNetworkConfiguration- Returns:
thisbuilder for use in a chained invocation
-
environmentConfiguration
@CanIgnoreReturnValue public final ImmutableNetworkConfiguration.Builder environmentConfiguration(NetworkConfiguration.EnvironmentConfiguration environmentConfiguration) Initializes the value for theenvironmentConfigurationattribute.- Parameters:
environmentConfiguration- The value for environmentConfiguration- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newImmutableNetworkConfiguration.- Returns:
- An immutable instance of NetworkConfiguration
- Throws:
IllegalStateException- if any required attributes are missing
-