Class Promotion
- java.lang.Object
- 
- com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel
- 
- com.oracle.bmc.tenantmanagercontrolplane.model.Promotion
 
 
- 
 @Generated(value="OracleSDKGenerator", comments="API Version: 20230401") public final class Promotion extends com.oracle.bmc.http.client.internal.ExplicitlySetBmcModelPromotion information for a subscription.
 Note: Objects should always be created or deserialized using thePromotion.Builder. This model distinguishes fields that are null because they are unset from fields that are explicitly set to null. This is done in the setter methods of thePromotion.Builder, which maintain a set of all explicitly set fields calledPromotion.Builder.__explicitlySet__. ThehashCode()andequals(Object)methods are implemented to take the explicitly set fields into account. The constructor, on the other hand, does not take the explicitly set fields into account (since the constructor cannot distinguish explicit null from unset null).
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classPromotion.Builderstatic classPromotion.StatusIf a subscription is present, indicates the current status of the subscription promotion.
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Promotion.Builderbuilder()Create a new builder.booleanequals(Object o)FloatgetAmount()If a subscription is present, indicates the total amount of promotional subscription credits.StringgetCurrencyUnit()Currency unit associated with the promotion.IntegergetDuration()Specifies how long the promotion related to the subscription, if any, is valid in duration units.StringgetDurationUnit()Unit for the duration.BooleangetIsIntentToPay()Speficies whether or not the customer intends to pay after the promotion has expired.Promotion.StatusgetStatus()If a subscription is present, indicates the current status of the subscription promotion.DategetTimeExpired()Date and time when the promotion ends.DategetTimeStarted()Date and time when the promotion starts.inthashCode()Promotion.BuildertoBuilder()StringtoString()StringtoString(boolean includeByteArrayContents)Return a string representation of the object.
 
- 
- 
- 
Constructor Detail- 
Promotion@Deprecated @ConstructorProperties({"duration","durationUnit","amount","status","isIntentToPay","currencyUnit","timeStarted","timeExpired"}) public Promotion(Integer duration, String durationUnit, Float amount, Promotion.Status status, Boolean isIntentToPay, String currencyUnit, Date timeStarted, Date timeExpired) Deprecated.
 
- 
 - 
Method Detail- 
builderpublic static Promotion.Builder builder() Create a new builder.
 - 
toBuilderpublic Promotion.Builder toBuilder() 
 - 
getDurationpublic Integer getDuration() Specifies how long the promotion related to the subscription, if any, is valid in duration units.- Returns:
- the value
 
 - 
getDurationUnitpublic String getDurationUnit() Unit for the duration.- Returns:
- the value
 
 - 
getAmountpublic Float getAmount() If a subscription is present, indicates the total amount of promotional subscription credits.- Returns:
- the value
 
 - 
getStatuspublic Promotion.Status getStatus() If a subscription is present, indicates the current status of the subscription promotion.- Returns:
- the value
 
 - 
getIsIntentToPaypublic Boolean getIsIntentToPay() Speficies whether or not the customer intends to pay after the promotion has expired.- Returns:
- the value
 
 - 
getCurrencyUnitpublic String getCurrencyUnit() Currency unit associated with the promotion.- Returns:
- the value
 
 - 
getTimeStartedpublic Date getTimeStarted() Date and time when the promotion starts.- Returns:
- the value
 
 - 
getTimeExpiredpublic Date getTimeExpired() Date and time when the promotion ends.- Returns:
- the value
 
 - 
toStringpublic String toString() - Overrides:
- toStringin class- com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel
 
 - 
toStringpublic String toString(boolean includeByteArrayContents) Return a string representation of the object.- Parameters:
- includeByteArrayContents- true to include the full contents of byte arrays
- Returns:
- string representation
 
 - 
equalspublic boolean equals(Object o) - Overrides:
- equalsin class- com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel
 
 - 
hashCodepublic int hashCode() - Overrides:
- hashCodein class- com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel
 
 
- 
 
-