Class ConnectionMonitorTestConfiguration

java.lang.Object
com.azure.resourcemanager.network.models.ConnectionMonitorTestConfiguration
All Implemented Interfaces:
com.azure.json.JsonSerializable<ConnectionMonitorTestConfiguration>

public final class ConnectionMonitorTestConfiguration extends Object implements com.azure.json.JsonSerializable<ConnectionMonitorTestConfiguration>
Describes a connection monitor test configuration.
  • Constructor Details

    • ConnectionMonitorTestConfiguration

      public ConnectionMonitorTestConfiguration()
      Creates an instance of ConnectionMonitorTestConfiguration class.
  • Method Details

    • name

      public String name()
      Get the name property: The name of the connection monitor test configuration.
      Returns:
      the name value.
    • withName

      Set the name property: The name of the connection monitor test configuration.
      Parameters:
      name - the name value to set.
      Returns:
      the ConnectionMonitorTestConfiguration object itself.
    • testFrequencySec

      public Integer testFrequencySec()
      Get the testFrequencySec property: The frequency of test evaluation, in seconds.
      Returns:
      the testFrequencySec value.
    • withTestFrequencySec

      public ConnectionMonitorTestConfiguration withTestFrequencySec(Integer testFrequencySec)
      Set the testFrequencySec property: The frequency of test evaluation, in seconds.
      Parameters:
      testFrequencySec - the testFrequencySec value to set.
      Returns:
      the ConnectionMonitorTestConfiguration object itself.
    • protocol

      Get the protocol property: The protocol to use in test evaluation.
      Returns:
      the protocol value.
    • withProtocol

      Set the protocol property: The protocol to use in test evaluation.
      Parameters:
      protocol - the protocol value to set.
      Returns:
      the ConnectionMonitorTestConfiguration object itself.
    • preferredIpVersion

      public PreferredIpVersion preferredIpVersion()
      Get the preferredIpVersion property: The preferred IP version to use in test evaluation. The connection monitor may choose to use a different version depending on other parameters.
      Returns:
      the preferredIpVersion value.
    • withPreferredIpVersion

      public ConnectionMonitorTestConfiguration withPreferredIpVersion(PreferredIpVersion preferredIpVersion)
      Set the preferredIpVersion property: The preferred IP version to use in test evaluation. The connection monitor may choose to use a different version depending on other parameters.
      Parameters:
      preferredIpVersion - the preferredIpVersion value to set.
      Returns:
      the ConnectionMonitorTestConfiguration object itself.
    • httpConfiguration

      public ConnectionMonitorHttpConfiguration httpConfiguration()
      Get the httpConfiguration property: The parameters used to perform test evaluation over HTTP.
      Returns:
      the httpConfiguration value.
    • withHttpConfiguration

      public ConnectionMonitorTestConfiguration withHttpConfiguration(ConnectionMonitorHttpConfiguration httpConfiguration)
      Set the httpConfiguration property: The parameters used to perform test evaluation over HTTP.
      Parameters:
      httpConfiguration - the httpConfiguration value to set.
      Returns:
      the ConnectionMonitorTestConfiguration object itself.
    • tcpConfiguration

      public ConnectionMonitorTcpConfiguration tcpConfiguration()
      Get the tcpConfiguration property: The parameters used to perform test evaluation over TCP.
      Returns:
      the tcpConfiguration value.
    • withTcpConfiguration

      public ConnectionMonitorTestConfiguration withTcpConfiguration(ConnectionMonitorTcpConfiguration tcpConfiguration)
      Set the tcpConfiguration property: The parameters used to perform test evaluation over TCP.
      Parameters:
      tcpConfiguration - the tcpConfiguration value to set.
      Returns:
      the ConnectionMonitorTestConfiguration object itself.
    • icmpConfiguration

      public ConnectionMonitorIcmpConfiguration icmpConfiguration()
      Get the icmpConfiguration property: The parameters used to perform test evaluation over ICMP.
      Returns:
      the icmpConfiguration value.
    • withIcmpConfiguration

      public ConnectionMonitorTestConfiguration withIcmpConfiguration(ConnectionMonitorIcmpConfiguration icmpConfiguration)
      Set the icmpConfiguration property: The parameters used to perform test evaluation over ICMP.
      Parameters:
      icmpConfiguration - the icmpConfiguration value to set.
      Returns:
      the ConnectionMonitorTestConfiguration object itself.
    • successThreshold

      public ConnectionMonitorSuccessThreshold successThreshold()
      Get the successThreshold property: The threshold for declaring a test successful.
      Returns:
      the successThreshold value.
    • withSuccessThreshold

      public ConnectionMonitorTestConfiguration withSuccessThreshold(ConnectionMonitorSuccessThreshold successThreshold)
      Set the successThreshold property: The threshold for declaring a test successful.
      Parameters:
      successThreshold - the successThreshold value to set.
      Returns:
      the ConnectionMonitorTestConfiguration object itself.
    • validate

      public void validate()
      Validates the instance.
      Throws:
      IllegalArgumentException - thrown if the instance is not valid.
    • toJson

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.azure.json.JsonSerializable<ConnectionMonitorTestConfiguration>
      Throws:
      IOException
    • fromJson

      public static ConnectionMonitorTestConfiguration fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of ConnectionMonitorTestConfiguration from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of ConnectionMonitorTestConfiguration if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
      Throws:
      IllegalStateException - If the deserialized JSON object was missing any required properties.
      IOException - If an error occurs while reading the ConnectionMonitorTestConfiguration.