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:
Applies to
Azure SDK for Java