Class TrafficSelectorPolicy

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

public final class TrafficSelectorPolicy extends Object implements com.azure.json.JsonSerializable<TrafficSelectorPolicy>
An traffic selector policy for a virtual network gateway connection.
  • Constructor Details

    • TrafficSelectorPolicy

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

    • localAddressRanges

      public List<String> localAddressRanges()
      Get the localAddressRanges property: A collection of local address spaces in CIDR format.
      Returns:
      the localAddressRanges value.
    • withLocalAddressRanges

      public TrafficSelectorPolicy withLocalAddressRanges(List<String> localAddressRanges)
      Set the localAddressRanges property: A collection of local address spaces in CIDR format.
      Parameters:
      localAddressRanges - the localAddressRanges value to set.
      Returns:
      the TrafficSelectorPolicy object itself.
    • remoteAddressRanges

      public List<String> remoteAddressRanges()
      Get the remoteAddressRanges property: A collection of remote address spaces in CIDR format.
      Returns:
      the remoteAddressRanges value.
    • withRemoteAddressRanges

      public TrafficSelectorPolicy withRemoteAddressRanges(List<String> remoteAddressRanges)
      Set the remoteAddressRanges property: A collection of remote address spaces in CIDR format.
      Parameters:
      remoteAddressRanges - the remoteAddressRanges value to set.
      Returns:
      the TrafficSelectorPolicy 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<TrafficSelectorPolicy>
      Throws:
      IOException
    • fromJson

      public static TrafficSelectorPolicy fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of TrafficSelectorPolicy from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of TrafficSelectorPolicy 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 TrafficSelectorPolicy.