Class ImmutableNetworkConfiguration.AgentNetworkConfiguration

java.lang.Object
fr.enedis.chutney.agent.domain.configure.ImmutableNetworkConfiguration.AgentNetworkConfiguration
All Implemented Interfaces:
NetworkConfiguration.AgentNetworkConfiguration
Enclosing class:
ImmutableNetworkConfiguration

@Generated(from="NetworkConfiguration.AgentNetworkConfiguration", generator="Immutables") @Immutable @CheckReturnValue public static final class ImmutableNetworkConfiguration.AgentNetworkConfiguration extends Object implements NetworkConfiguration.AgentNetworkConfiguration
Immutable implementation of NetworkConfiguration.AgentNetworkConfiguration.

Use the builder to create immutable instances: ImmutableNetworkConfiguration.AgentNetworkConfiguration.builder(). Use the static factory method to create immutable instances: ImmutableNetworkConfiguration.AgentNetworkConfiguration.of().

  • Method Details

    • agentInfos

      public com.google.common.collect.ImmutableSet<fr.enedis.chutney.engine.domain.delegation.NamedHostAndPort> agentInfos()
      Specified by:
      agentInfos in interface NetworkConfiguration.AgentNetworkConfiguration
      Returns:
      The value of the agentInfos attribute
    • withAgentInfos

      public final ImmutableNetworkConfiguration.AgentNetworkConfiguration withAgentInfos(fr.enedis.chutney.engine.domain.delegation.NamedHostAndPort... elements)
      Copy the current immutable object with elements that replace the content of agentInfos.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withAgentInfos

      public final ImmutableNetworkConfiguration.AgentNetworkConfiguration withAgentInfos(Iterable<? extends fr.enedis.chutney.engine.domain.delegation.NamedHostAndPort> elements)
      Copy the current immutable object with elements that replace the content of agentInfos. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of agentInfos elements to set
      Returns:
      A modified copy or this if not changed
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of AgentNetworkConfiguration that have equal attribute values.
      Overrides:
      equals in class Object
      Returns:
      true if this is equal to another instance
    • hashCode

      public int hashCode()
      Computes a hash code from attributes: agentInfos.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

      public String toString()
      Prints the immutable value AgentNetworkConfiguration with attribute values.
      Overrides:
      toString in class Object
      Returns:
      A string representation of the value
    • of

      public static ImmutableNetworkConfiguration.AgentNetworkConfiguration of(Set<fr.enedis.chutney.engine.domain.delegation.NamedHostAndPort> agentInfos)
      Construct a new immutable AgentNetworkConfiguration instance.
      Parameters:
      agentInfos - The value for the agentInfos attribute
      Returns:
      An immutable AgentNetworkConfiguration instance
    • of

      public static ImmutableNetworkConfiguration.AgentNetworkConfiguration of(Iterable<? extends fr.enedis.chutney.engine.domain.delegation.NamedHostAndPort> agentInfos)
      Construct a new immutable AgentNetworkConfiguration instance.
      Parameters:
      agentInfos - The value for the agentInfos attribute
      Returns:
      An immutable AgentNetworkConfiguration instance
    • copyOf

      Creates an immutable copy of a NetworkConfiguration.AgentNetworkConfiguration value. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.
      Parameters:
      instance - The instance to copy
      Returns:
      A copied immutable AgentNetworkConfiguration instance
    • builder

      Creates a builder for AgentNetworkConfiguration.
       ImmutableNetworkConfiguration.AgentNetworkConfiguration.builder()
          .addAgentInfos|addAllAgentInfos(fr.enedis.chutney.engine.domain.delegation.NamedHostAndPort) // agentInfos elements
          .build();
       
      Returns:
      A new AgentNetworkConfiguration builder