Compartilhar via


ThroughputPolicyResource Class

  • java.lang.Object
    • com.azure.resourcemanager.cosmos.models.ThroughputPolicyResource

Implements

public final class ThroughputPolicyResource
implements JsonSerializable<ThroughputPolicyResource>

Cosmos DB resource throughput policy.

Constructor Summary

Constructor Description
ThroughputPolicyResource()

Creates an instance of ThroughputPolicyResource class.

Method Summary

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

Reads an instance of ThroughputPolicyResource from the JsonReader.

Integer incrementPercent()

Get the incrementPercent property: Represents the percentage by which throughput can increase every time throughput policy kicks in.

Boolean isEnabled()

Get the isEnabled property: Determines whether the ThroughputPolicy is active or not.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

ThroughputPolicyResource withIncrementPercent(Integer incrementPercent)

Set the incrementPercent property: Represents the percentage by which throughput can increase every time throughput policy kicks in.

ThroughputPolicyResource withIsEnabled(Boolean isEnabled)

Set the isEnabled property: Determines whether the ThroughputPolicy is active or not.

Methods inherited from java.lang.Object

Constructor Details

ThroughputPolicyResource

public ThroughputPolicyResource()

Creates an instance of ThroughputPolicyResource class.

Method Details

fromJson

public static ThroughputPolicyResource fromJson(JsonReader jsonReader)

Reads an instance of ThroughputPolicyResource from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of ThroughputPolicyResource 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 ThroughputPolicyResource.

incrementPercent

public Integer incrementPercent()

Get the incrementPercent property: Represents the percentage by which throughput can increase every time throughput policy kicks in.

Returns:

the incrementPercent value.

isEnabled

public Boolean isEnabled()

Get the isEnabled property: Determines whether the ThroughputPolicy is active or not.

Returns:

the isEnabled value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withIncrementPercent

public ThroughputPolicyResource withIncrementPercent(Integer incrementPercent)

Set the incrementPercent property: Represents the percentage by which throughput can increase every time throughput policy kicks in.

Parameters:

incrementPercent - the incrementPercent value to set.

Returns:

the ThroughputPolicyResource object itself.

withIsEnabled

public ThroughputPolicyResource withIsEnabled(Boolean isEnabled)

Set the isEnabled property: Determines whether the ThroughputPolicy is active or not.

Parameters:

isEnabled - the isEnabled value to set.

Returns:

the ThroughputPolicyResource object itself.

Applies to