Offer Class

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:

jsonObject - the json object that represents the offer.

Offer

public Offer(Offer otherOffer)

Initialize an offer object and copy all properties from the other offer.

Parameters:

otherOffer - the Offer object whose properties to copy over.

Offer

public Offer(String jsonString)

Initialize an offer object from json string.

Parameters:

jsonString - the json string that represents the offer.

Method Details

getContent

public JSONObject getContent()

Gets the content object that contains the details of the offer.

Returns:

the offer content.

getOfferResourceId

public String getOfferResourceId()

Sets the target resource id of a resource to which this offer applies.

Returns:

the resource id.

getOfferType

public String getOfferType()

Gets the OfferType for the resource offer.

Returns:

the offer type.

getOfferVersion

public String getOfferVersion()

Gets the version of the current offer.

Returns:

the offer version.

getResourceLink

public String getResourceLink()

Gets the self-link of a resource to which the resource offer applies.

Returns:

the resource link.

setContent

public void setContent(JSONObject offerContent)

Sets the offer content that contains the details of the offer.

Parameters:

offerContent - the content object.

setOfferType

public void setOfferType(String offerType)

Sets the OfferType for the resource offer.

Parameters:

offerType - the offer type.

setOfferVersion

public void setOfferVersion(String offerVersion)

Sets the offer version.

Parameters:

offerVersion - the version of the offer.

Applies to