Offer Class
- java.
lang. Object - Serializable
- JsonSerializable
- Resource
- com.
microsoft. azure. documentdb. Offer
- 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(JSONObject jsonObject) |
Initialize an offer object from json 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. |
Method Summary
Modifier and Type | Method and Description |
---|---|
JSONObject |
getContent()
Gets the content object that contains the details of the offer. |
String |
getOfferResourceId()
Sets the target resource id of a resource to which this offer applies. |
String |
getOfferType()
Gets the OfferType for the resource offer. |
String |
getOfferVersion()
Gets the version of the current offer. |
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 OfferType for the resource offer. |
void |
setOfferVersion(String offerVersion)
Sets the offer version. |
Inherited Members
Constructor Details
Offer
public Offer()
Initialize an offer object.
Offer
public Offer(JSONObject jsonObject)
Initialize an offer object from json object.
Parameters:
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:
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