Class IpTraffic

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

public final class IpTraffic extends Object implements com.azure.json.JsonSerializable<IpTraffic>
IP traffic information.
  • Constructor Details

    • IpTraffic

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

    • sourceIps

      public List<String> sourceIps()
      Get the sourceIps property: List of source IP addresses of the traffic..
      Returns:
      the sourceIps value.
    • withSourceIps

      public IpTraffic withSourceIps(List<String> sourceIps)
      Set the sourceIps property: List of source IP addresses of the traffic..
      Parameters:
      sourceIps - the sourceIps value to set.
      Returns:
      the IpTraffic object itself.
    • destinationIps

      public List<String> destinationIps()
      Get the destinationIps property: List of destination IP addresses of the traffic..
      Returns:
      the destinationIps value.
    • withDestinationIps

      public IpTraffic withDestinationIps(List<String> destinationIps)
      Set the destinationIps property: List of destination IP addresses of the traffic..
      Parameters:
      destinationIps - the destinationIps value to set.
      Returns:
      the IpTraffic object itself.
    • sourcePorts

      public List<String> sourcePorts()
      Get the sourcePorts property: The source ports of the traffic.
      Returns:
      the sourcePorts value.
    • withSourcePorts

      public IpTraffic withSourcePorts(List<String> sourcePorts)
      Set the sourcePorts property: The source ports of the traffic.
      Parameters:
      sourcePorts - the sourcePorts value to set.
      Returns:
      the IpTraffic object itself.
    • destinationPorts

      public List<String> destinationPorts()
      Get the destinationPorts property: The destination ports of the traffic.
      Returns:
      the destinationPorts value.
    • withDestinationPorts

      public IpTraffic withDestinationPorts(List<String> destinationPorts)
      Set the destinationPorts property: The destination ports of the traffic.
      Parameters:
      destinationPorts - the destinationPorts value to set.
      Returns:
      the IpTraffic object itself.
    • protocols

      public List<NetworkProtocol> protocols()
      Get the protocols property: The protocols property.
      Returns:
      the protocols value.
    • withProtocols

      public IpTraffic withProtocols(List<NetworkProtocol> protocols)
      Set the protocols property: The protocols property.
      Parameters:
      protocols - the protocols value to set.
      Returns:
      the IpTraffic 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<IpTraffic>
      Throws:
      IOException
    • fromJson

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