Class RoutingRuleNextHop

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

public final class RoutingRuleNextHop extends Object implements com.azure.json.JsonSerializable<RoutingRuleNextHop>
Next hop.
  • Constructor Details

    • RoutingRuleNextHop

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

    • nextHopType

      public RoutingRuleNextHopType nextHopType()
      Get the nextHopType property: Next hop type.
      Returns:
      the nextHopType value.
    • withNextHopType

      public RoutingRuleNextHop withNextHopType(RoutingRuleNextHopType nextHopType)
      Set the nextHopType property: Next hop type.
      Parameters:
      nextHopType - the nextHopType value to set.
      Returns:
      the RoutingRuleNextHop object itself.
    • nextHopAddress

      public String nextHopAddress()
      Get the nextHopAddress property: Next hop address. Only required if the next hop type is VirtualAppliance.
      Returns:
      the nextHopAddress value.
    • withNextHopAddress

      public RoutingRuleNextHop withNextHopAddress(String nextHopAddress)
      Set the nextHopAddress property: Next hop address. Only required if the next hop type is VirtualAppliance.
      Parameters:
      nextHopAddress - the nextHopAddress value to set.
      Returns:
      the RoutingRuleNextHop 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<RoutingRuleNextHop>
      Throws:
      IOException
    • fromJson

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