Class HttpConfiguration

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

public final class HttpConfiguration extends Object implements com.azure.json.JsonSerializable<HttpConfiguration>
HTTP configuration of the connectivity check.
  • Constructor Details

    • HttpConfiguration

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

    • method

      public HttpMethod method()
      Get the method property: HTTP method.
      Returns:
      the method value.
    • withMethod

      public HttpConfiguration withMethod(HttpMethod method)
      Set the method property: HTTP method.
      Parameters:
      method - the method value to set.
      Returns:
      the HttpConfiguration object itself.
    • headers

      public List<HttpHeader> headers()
      Get the headers property: List of HTTP headers.
      Returns:
      the headers value.
    • withHeaders

      public HttpConfiguration withHeaders(List<HttpHeader> headers)
      Set the headers property: List of HTTP headers.
      Parameters:
      headers - the headers value to set.
      Returns:
      the HttpConfiguration object itself.
    • validStatusCodes

      public List<Integer> validStatusCodes()
      Get the validStatusCodes property: Valid status codes.
      Returns:
      the validStatusCodes value.
    • withValidStatusCodes

      public HttpConfiguration withValidStatusCodes(List<Integer> validStatusCodes)
      Set the validStatusCodes property: Valid status codes.
      Parameters:
      validStatusCodes - the validStatusCodes value to set.
      Returns:
      the HttpConfiguration 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<HttpConfiguration>
      Throws:
      IOException
    • fromJson

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