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

public final class HubRoute extends Object implements com.azure.json.JsonSerializable<HubRoute>
RouteTable route.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates an instance of HubRoute class.
  • Method Summary

    Modifier and Type
    Method
    Description
    Get the destinations property: List of all destinations.
    Get the destinationType property: The type of destinations (eg: CIDR, ResourceId, Service).
    static HubRoute
    fromJson(com.azure.json.JsonReader jsonReader)
    Reads an instance of HubRoute from the JsonReader.
    Get the name property: The name of the Route that is unique within a RouteTable.
    Get the nextHop property: NextHop resource ID.
    Get the nextHopType property: The type of next hop (eg: ResourceId).
    com.azure.json.JsonWriter
    toJson(com.azure.json.JsonWriter jsonWriter)
    void
    Validates the instance.
    withDestinations(List<String> destinations)
    Set the destinations property: List of all destinations.
    withDestinationType(String destinationType)
    Set the destinationType property: The type of destinations (eg: CIDR, ResourceId, Service).
    Set the name property: The name of the Route that is unique within a RouteTable.
    Set the nextHop property: NextHop resource ID.
    withNextHopType(String nextHopType)
    Set the nextHopType property: The type of next hop (eg: ResourceId).

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.azure.json.JsonSerializable

    toJson, toJson, toJsonBytes, toJsonString
  • Constructor Details

    • HubRoute

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

    • name

      public String name()
      Get the name property: The name of the Route that is unique within a RouteTable. This name can be used to access this route.
      Returns:
      the name value.
    • withName

      public HubRoute withName(String name)
      Set the name property: The name of the Route that is unique within a RouteTable. This name can be used to access this route.
      Parameters:
      name - the name value to set.
      Returns:
      the HubRoute object itself.
    • destinationType

      public String destinationType()
      Get the destinationType property: The type of destinations (eg: CIDR, ResourceId, Service).
      Returns:
      the destinationType value.
    • withDestinationType

      public HubRoute withDestinationType(String destinationType)
      Set the destinationType property: The type of destinations (eg: CIDR, ResourceId, Service).
      Parameters:
      destinationType - the destinationType value to set.
      Returns:
      the HubRoute object itself.
    • destinations

      public List<String> destinations()
      Get the destinations property: List of all destinations.
      Returns:
      the destinations value.
    • withDestinations

      public HubRoute withDestinations(List<String> destinations)
      Set the destinations property: List of all destinations.
      Parameters:
      destinations - the destinations value to set.
      Returns:
      the HubRoute object itself.
    • nextHopType

      public String nextHopType()
      Get the nextHopType property: The type of next hop (eg: ResourceId).
      Returns:
      the nextHopType value.
    • withNextHopType

      public HubRoute withNextHopType(String nextHopType)
      Set the nextHopType property: The type of next hop (eg: ResourceId).
      Parameters:
      nextHopType - the nextHopType value to set.
      Returns:
      the HubRoute object itself.
    • nextHop

      public String nextHop()
      Get the nextHop property: NextHop resource ID.
      Returns:
      the nextHop value.
    • withNextHop

      public HubRoute withNextHop(String nextHop)
      Set the nextHop property: NextHop resource ID.
      Parameters:
      nextHop - the nextHop value to set.
      Returns:
      the HubRoute 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<HubRoute>
      Throws:
      IOException
    • fromJson

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