Class BackendPoolItem

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

public final class BackendPoolItem extends Object implements com.azure.json.JsonSerializable<BackendPoolItem>
Backend pool service information.
  • Constructor Summary

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

    Modifier and Type
    Method
    Description
    fromJson(com.azure.json.JsonReader jsonReader)
    Reads an instance of BackendPoolItem from the JsonReader.
    id()
    Get the id property: The unique ARM id of the backend entity.
    Get the priority property: The priority of the backend entity in the backend pool.
    com.azure.json.JsonWriter
    toJson(com.azure.json.JsonWriter jsonWriter)
    void
    Validates the instance.
    Get the weight property: The weight of the backend entity in the backend pool.
    Set the id property: The unique ARM id of the backend entity.
    Set the priority property: The priority of the backend entity in the backend pool.
    Set the weight property: The weight of the backend entity in the backend pool.

    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

    • BackendPoolItem

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

    • id

      public String id()
      Get the id property: The unique ARM id of the backend entity. The ARM id should refer to an already existing backend entity.
      Returns:
      the id value.
    • withId

      public BackendPoolItem withId(String id)
      Set the id property: The unique ARM id of the backend entity. The ARM id should refer to an already existing backend entity.
      Parameters:
      id - the id value to set.
      Returns:
      the BackendPoolItem object itself.
    • weight

      public Integer weight()
      Get the weight property: The weight of the backend entity in the backend pool. Must be between 0 and 100. It can be also null if the value not specified.
      Returns:
      the weight value.
    • withWeight

      public BackendPoolItem withWeight(Integer weight)
      Set the weight property: The weight of the backend entity in the backend pool. Must be between 0 and 100. It can be also null if the value not specified.
      Parameters:
      weight - the weight value to set.
      Returns:
      the BackendPoolItem object itself.
    • priority

      public Integer priority()
      Get the priority property: The priority of the backend entity in the backend pool. Must be between 0 and 100. It can be also null if the value not specified.
      Returns:
      the priority value.
    • withPriority

      public BackendPoolItem withPriority(Integer priority)
      Set the priority property: The priority of the backend entity in the backend pool. Must be between 0 and 100. It can be also null if the value not specified.
      Parameters:
      priority - the priority value to set.
      Returns:
      the BackendPoolItem 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<BackendPoolItem>
      Throws:
      IOException
    • fromJson

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