TrafficWeight Class

  • java.lang.Object
    • com.azure.resourcemanager.appservice.models.TrafficWeight

Implements

public final class TrafficWeight
implements JsonSerializable<TrafficWeight>

Traffic weight assigned to a revision.

Constructor Summary

Constructor Description
TrafficWeight()

Creates an instance of TrafficWeight class.

Method Summary

Modifier and Type Method and Description
static TrafficWeight fromJson(JsonReader jsonReader)

Reads an instance of TrafficWeight from the JsonReader.

Boolean latestRevision()

Get the latestRevision property: Indicates that the traffic weight belongs to a latest stable revision.

String revisionName()

Get the revisionName property: Name of a revision.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

Integer weight()

Get the weight property: Traffic weight assigned to a revision.

TrafficWeight withLatestRevision(Boolean latestRevision)

Set the latestRevision property: Indicates that the traffic weight belongs to a latest stable revision.

TrafficWeight withRevisionName(String revisionName)

Set the revisionName property: Name of a revision.

TrafficWeight withWeight(Integer weight)

Set the weight property: Traffic weight assigned to a revision.

Methods inherited from java.lang.Object

Constructor Details

TrafficWeight

public TrafficWeight()

Creates an instance of TrafficWeight class.

Method Details

fromJson

public static TrafficWeight fromJson(JsonReader jsonReader)

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.

latestRevision

public Boolean latestRevision()

Get the latestRevision property: Indicates that the traffic weight belongs to a latest stable revision.

Returns:

the latestRevision value.

revisionName

public String revisionName()

Get the revisionName property: Name of a revision.

Returns:

the revisionName value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

weight

public Integer weight()

Get the weight property: Traffic weight assigned to a revision.

Returns:

the weight value.

withLatestRevision

public TrafficWeight withLatestRevision(Boolean latestRevision)

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.

withRevisionName

public TrafficWeight withRevisionName(String revisionName)

Set the revisionName property: Name of a revision.

Parameters:

revisionName - the revisionName value to set.

Returns:

the TrafficWeight object itself.

withWeight

public TrafficWeight withWeight(Integer weight)

Set the weight property: Traffic weight assigned to a revision.

Parameters:

weight - the weight value to set.

Returns:

the TrafficWeight object itself.

Applies to