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

public final class OrderBy extends Object implements com.azure.json.JsonSerializable<OrderBy>
Describes a column to sort.
  • Constructor Details

    • OrderBy

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

    • field

      public String field()
      Get the field property: Describes the actual column name to sort by.
      Returns:
      the field value.
    • withField

      public OrderBy withField(String field)
      Set the field property: Describes the actual column name to sort by.
      Parameters:
      field - the field value to set.
      Returns:
      the OrderBy object itself.
    • order

      Get the order property: Describes if results should be in ascending/descending order.
      Returns:
      the order value.
    • withOrder

      public OrderBy withOrder(FirewallPolicyIdpsQuerySortOrder order)
      Set the order property: Describes if results should be in ascending/descending order.
      Parameters:
      order - the order value to set.
      Returns:
      the OrderBy 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<OrderBy>
      Throws:
      IOException
    • fromJson

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