OfferV2 Class

public class OfferV2 extends Offer

Represents an offer version 2 in the Azure Cosmos DB database service.

Constructor Summary

Constructor Description
OfferV2(int offerThroughput)

Initialize an new instance of the OfferV2 object.

OfferV2(int offerThroughput, boolean offerEnableRUPerMinuteThroughput)

Initialize an new instance of the OfferV2 object.

OfferV2(Offer otherOffer)

Initialize an new instance of the OfferV2 object, copy the base properties from another Offer object and set the throughput value.

Method Summary

Modifier and Type Method and Description
boolean getOfferEnableRUPerMinuteThroughput()

Gets Request Units(RU)/Minute throughput is enabled/disabled for collection in the Azure Cosmos DB database service.

int getOfferThroughput()

Gets the offer throughput for this offer.

void setOfferEnableRUPerMinuteThroughput(boolean offerEnableRUPerMinuteThroughput)

Sets Request Units(RU)/Minute throughput enabled/disabled for collection in the Azure Cosmos DB database service.

void setOfferThroughput(int throughput)

Sets the offer throughput for this offer.

Inherited Members

JsonSerializable.get(String propertyName) JsonSerializable.getBoolean(String propertyName) JsonSerializable.getCollection(String propertyName) Offer.getContent() JsonSerializable.getDouble(String propertyName) Resource.getETag() JsonSerializable.getHashMap() Resource.getId() JsonSerializable.getInt(String propertyName) JsonSerializable.getLogger() JsonSerializable.getLong(String propertyName) JsonSerializable.getMapper() JsonSerializable.getObject(String propertyName) JsonSerializable.getObjectByPath(Collection<String> propertyNames) Offer.getOfferResourceId() Offer.getOfferType() Offer.getOfferVersion() Resource.getResourceId() Offer.getResourceLink() Resource.getSelfLink() JsonSerializable.getString(String propertyName) Resource.getTimestamp() JsonSerializable.has(String propertyName) JsonSerializable.JsonSerializable() JsonSerializable.JsonSerializable(String jsonString, ObjectMapper objectMapper) JsonSerializable.JsonSerializable(String jsonString) JsonSerializable.JsonSerializable(JSONObject jsonObject) Offer.Offer() Offer.Offer(Offer otherOffer) Offer.Offer(String jsonString) Offer.Offer(JSONObject jsonObject) JsonSerializable.remove(String propertyName) Resource.Resource() Resource.Resource(String jsonString, ObjectMapper objectMapper) Resource.Resource(String jsonString) Resource.Resource(JSONObject jsonObject) Offer.setContent(JSONObject offerContent) Resource.setId(String id) Offer.setOfferType(String offerType) Offer.setOfferVersion(String offerVersion) Resource.setResourceId(String resourceId) JsonSerializable.toJson() JsonSerializable.toJson(SerializationFormattingPolicy formattingPolicy) JsonSerializable.toString() JsonSerializable.toString(int indentFactor)

Constructor Details

OfferV2

public OfferV2(int offerThroughput)

Initialize an new instance of the OfferV2 object.

Parameters:

offerThroughput - the throughput value for this offer.

OfferV2

public OfferV2(int offerThroughput, boolean offerEnableRUPerMinuteThroughput)

Initialize an new instance of the OfferV2 object.

Parameters:

offerThroughput - the throughput value for this offer.
offerEnableRUPerMinuteThroughput - if RU Per Minute throughput is enabled

OfferV2

public OfferV2(Offer otherOffer)

Initialize an new instance of the OfferV2 object, copy the base properties from another Offer object and set the throughput value.

Parameters:

otherOffer - the Offer object whose base properties are to be copied.

Method Details

getOfferEnableRUPerMinuteThroughput

public boolean getOfferEnableRUPerMinuteThroughput()

Gets Request Units(RU)/Minute throughput is enabled/disabled for collection in the Azure Cosmos DB database service.

Returns:

true if RUPerMin is enabled; otherwise false.

getOfferThroughput

public int getOfferThroughput()

Gets the offer throughput for this offer.

Returns:

the offer throughput.

setOfferEnableRUPerMinuteThroughput

public void setOfferEnableRUPerMinuteThroughput(boolean offerEnableRUPerMinuteThroughput)

Sets Request Units(RU)/Minute throughput enabled/disabled for collection in the Azure Cosmos DB database service.

Parameters:

offerEnableRUPerMinuteThroughput - used for enabling or disabling option.

setOfferThroughput

public void setOfferThroughput(int throughput)

Sets the offer throughput for this offer.

Parameters:

throughput - the throughput of this offer.

Applies to