你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Offer Class
- java.
lang. Object - com.
microsoft. azure. documentdb. JsonSerializable - com.
microsoft. azure. documentdb. Resource - com.
microsoft. azure. documentdb. Offer
- com.
- com.
- com.
public class Offer
extends Resource
Represents the offer for a resource in the Azure Cosmos DB database service.
Constructor Summary
Constructor | Description |
---|---|
Offer() |
Initialize an offer object. |
Offer(Offer otherOffer) |
Initialize an offer object and copy all properties from the other offer. |
Offer(String jsonString) |
Initialize an offer object from json string. |
Offer(JSONObject jsonObject) |
Initialize an offer object from json object. |
Method Summary
Modifier and Type | Method and Description |
---|---|
org.json.JSONObject |
getContent()
Gets the content object that contains the details of the offer. |
java.lang.String |
getOfferResourceId()
Sets the target resource id of a resource to which this offer applies. |
java.lang.String |
getOfferType()
Gets the Offer |
java.lang.String |
getOfferVersion()
Gets the version of the current offer. |
java.lang.String |
getResourceLink()
Gets the self-link of a resource to which the resource offer applies. |
void |
setContent(JSONObject offerContent)
Sets the offer content that contains the details of the offer. |
void |
setOfferType(String offerType)
Sets the Offer |
void |
setOfferVersion(String offerVersion)
Sets the offer version. |
Methods inherited from JsonSerializable
Methods inherited from Resource
Methods inherited from java.lang.Object
Constructor Details
Offer
public Offer()
Initialize an offer object.
Offer
public Offer(Offer otherOffer)
Initialize an offer object and copy all properties from the other offer.
Parameters:
Offer
public Offer(String jsonString)
Initialize an offer object from json string.
Parameters:
Offer
public Offer(JSONObject jsonObject)
Initialize an offer object from json object.
Parameters:
Method Details
getContent
public JSONObject getContent()
Gets the content object that contains the details of the offer.
Returns:
getOfferResourceId
public String getOfferResourceId()
Sets the target resource id of a resource to which this offer applies.
Returns:
getOfferType
public String getOfferType()
Gets the OfferType for the resource offer.
Returns:
getOfferVersion
public String getOfferVersion()
Gets the version of the current offer.
Returns:
getResourceLink
public String getResourceLink()
Gets the self-link of a resource to which the resource offer applies.
Returns:
setContent
public void setContent(JSONObject offerContent)
Sets the offer content that contains the details of the offer.
Parameters:
setOfferType
public void setOfferType(String offerType)
Sets the OfferType for the resource offer.
Parameters:
setOfferVersion
public void setOfferVersion(String offerVersion)
Sets the offer version.
Parameters: