Class TrafficWeight
java.lang.Object
com.azure.resourcemanager.appservice.models.TrafficWeight
- All Implemented Interfaces:
com.azure.json.JsonSerializable<TrafficWeight>
public final class TrafficWeight
extends Object
implements com.azure.json.JsonSerializable<TrafficWeight>
Traffic weight assigned to a revision.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic TrafficWeight
fromJson
(com.azure.json.JsonReader jsonReader) Reads an instance of TrafficWeight from the JsonReader.Get the latestRevision property: Indicates that the traffic weight belongs to a latest stable revision.Get the revisionName property: Name of a revision.com.azure.json.JsonWriter
toJson
(com.azure.json.JsonWriter jsonWriter) void
validate()
Validates the instance.weight()
Get the weight property: Traffic weight assigned to a revision.withLatestRevision
(Boolean latestRevision) Set the latestRevision property: Indicates that the traffic weight belongs to a latest stable revision.withRevisionName
(String revisionName) Set the revisionName property: Name of a revision.withWeight
(Integer weight) Set the weight property: Traffic weight assigned to a revision.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
-
TrafficWeight
public TrafficWeight()Creates an instance of TrafficWeight class.
-
-
Method Details
-
revisionName
Get the revisionName property: Name of a revision.- Returns:
- the revisionName value.
-
withRevisionName
Set the revisionName property: Name of a revision.- Parameters:
revisionName
- the revisionName value to set.- Returns:
- the TrafficWeight object itself.
-
weight
Get the weight property: Traffic weight assigned to a revision.- Returns:
- the weight value.
-
withWeight
Set the weight property: Traffic weight assigned to a revision.- Parameters:
weight
- the weight value to set.- Returns:
- the TrafficWeight object itself.
-
latestRevision
Get the latestRevision property: Indicates that the traffic weight belongs to a latest stable revision.- Returns:
- the latestRevision value.
-
withLatestRevision
Set the latestRevision property: Indicates that the traffic weight belongs to a latest stable revision.- Parameters:
latestRevision
- the latestRevision value to set.- Returns:
- the TrafficWeight object itself.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException
- thrown if the instance is not valid.
-
toJson
- Specified by:
toJson
in interfacecom.azure.json.JsonSerializable<TrafficWeight>
- Throws:
IOException
-
fromJson
Reads an instance of TrafficWeight from the JsonReader.- Parameters:
jsonReader
- The JsonReader being read.- Returns:
- An instance of TrafficWeight 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 TrafficWeight.
-