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 -
Method Summary
Modifier and TypeMethodDescriptionstatic BackendPoolItemfromJson(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.priority()Get the priority property: The priority of the backend entity in the backend pool.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.weight()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.withPriority(Integer priority) Set the priority property: The priority of the backend entity in the backend pool.withWeight(Integer weight) 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, waitMethods 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
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
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
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
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
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
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
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<BackendPoolItem>- Throws:
IOException
-
fromJson
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.
-