Class PlanOptions

java.lang.Object
software.amazon.awssdk.services.appmonetization.model.PlanOptions
All Implemented Interfaces:
Serializable, SdkPojo, ToCopyableBuilder<PlanOptions.Builder,PlanOptions>

@Generated("software.amazon.awssdk:codegen") public final class PlanOptions extends Object implements SdkPojo, Serializable, ToCopyableBuilder<PlanOptions.Builder,PlanOptions>

The pricing model and optional plans to consider, prices to evaluate, and the developer's own price. The response's planOptions.freeTier and planOptions.maxTier report the outcome of the inclusion members. A per-use price has no Free, Max or Annual plan, so freeTierInclusion, maxTierInclusion or annualPlanInclusion INCLUDE together with a pricingModelPreference of PER_USE or PER_USE_SPLIT is rejected. A Free plan makes a flat price tiered, so freeTierInclusion INCLUDE with FLAT is rejected too: TIERED with freeTierInclusion INCLUDE asks for a Free plan.

See Also:
  • Method Details

    • pricingModelPreference

      public final PricingModel pricingModelPreference()

      Pricing model to use instead of letting the service choose. planOptions.preferenceOutcome in the response says whether it was used. Absent: the service chooses (preferenceOutcome NOT_REQUESTED). PER_USE_SPLIT needs two or more actions. PER_USE or PER_USE_SPLIT with freeTierInclusion, maxTierInclusion or annualPlanInclusion INCLUDE is rejected, and so is FLAT with freeTierInclusion INCLUDE.

      If the service returns an enum value that is not available in the current SDK version, pricingModelPreference will return PricingModel.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from pricingModelPreferenceAsString().

      Returns:
      Pricing model to use instead of letting the service choose. planOptions.preferenceOutcome in the response says whether it was used. Absent: the service chooses (preferenceOutcome NOT_REQUESTED). PER_USE_SPLIT needs two or more actions. PER_USE or PER_USE_SPLIT with freeTierInclusion, maxTierInclusion or annualPlanInclusion INCLUDE is rejected, and so is FLAT with freeTierInclusion INCLUDE.
      See Also:
    • pricingModelPreferenceAsString

      public final String pricingModelPreferenceAsString()

      Pricing model to use instead of letting the service choose. planOptions.preferenceOutcome in the response says whether it was used. Absent: the service chooses (preferenceOutcome NOT_REQUESTED). PER_USE_SPLIT needs two or more actions. PER_USE or PER_USE_SPLIT with freeTierInclusion, maxTierInclusion or annualPlanInclusion INCLUDE is rejected, and so is FLAT with freeTierInclusion INCLUDE.

      If the service returns an enum value that is not available in the current SDK version, pricingModelPreference will return PricingModel.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from pricingModelPreferenceAsString().

      Returns:
      Pricing model to use instead of letting the service choose. planOptions.preferenceOutcome in the response says whether it was used. Absent: the service chooses (preferenceOutcome NOT_REQUESTED). PER_USE_SPLIT needs two or more actions. PER_USE or PER_USE_SPLIT with freeTierInclusion, maxTierInclusion or annualPlanInclusion INCLUDE is rejected, and so is FLAT with freeTierInclusion INCLUDE.
      See Also:
    • freeTierInclusion

      public final PlanInclusion freeTierInclusion()

      Whether to include a Free plan. Absent: the segment's default, which considers a Free plan for CONSUMER and PROSUMER and not for ENTERPRISE; with a pricingModelPreference, a Free plan is considered only for TIERED. INCLUDE with no pricingModelPreference limits the choice to TIERED; INCLUDE with a PER_USE, PER_USE_SPLIT or FLAT preference is rejected. The response's planOptions.freeTier gives the outcome.

      If the service returns an enum value that is not available in the current SDK version, freeTierInclusion will return PlanInclusion.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from freeTierInclusionAsString().

      Returns:
      Whether to include a Free plan. Absent: the segment's default, which considers a Free plan for CONSUMER and PROSUMER and not for ENTERPRISE; with a pricingModelPreference, a Free plan is considered only for TIERED. INCLUDE with no pricingModelPreference limits the choice to TIERED; INCLUDE with a PER_USE, PER_USE_SPLIT or FLAT preference is rejected. The response's planOptions.freeTier gives the outcome.
      See Also:
    • freeTierInclusionAsString

      public final String freeTierInclusionAsString()

      Whether to include a Free plan. Absent: the segment's default, which considers a Free plan for CONSUMER and PROSUMER and not for ENTERPRISE; with a pricingModelPreference, a Free plan is considered only for TIERED. INCLUDE with no pricingModelPreference limits the choice to TIERED; INCLUDE with a PER_USE, PER_USE_SPLIT or FLAT preference is rejected. The response's planOptions.freeTier gives the outcome.

      If the service returns an enum value that is not available in the current SDK version, freeTierInclusion will return PlanInclusion.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from freeTierInclusionAsString().

      Returns:
      Whether to include a Free plan. Absent: the segment's default, which considers a Free plan for CONSUMER and PROSUMER and not for ENTERPRISE; with a pricingModelPreference, a Free plan is considered only for TIERED. INCLUDE with no pricingModelPreference limits the choice to TIERED; INCLUDE with a PER_USE, PER_USE_SPLIT or FLAT preference is rejected. The response's planOptions.freeTier gives the outcome.
      See Also:
    • maxTierInclusion

      public final PlanInclusion maxTierInclusion()

      Whether to include a Max plan for heavy users. On the default menu for CONSUMER and PROSUMER; for ENTERPRISE only when this is INCLUDE. Only with a value estimate: when no action has a value basis (minutesSaved, moneySaved or valuePerUse) and there is no experiential estimate (see valueKind), the price is cost-based and this is ignored, with no error: the response has no Max plan and no planOptions.maxTier outcome. A Max plan goes with a TIERED or FLAT model, never PER_USE or PER_USE_SPLIT: INCLUDE with a PER_USE or PER_USE_SPLIT preference is rejected, and a per-use model the service chooses has no Max plan. Absent, for CONSUMER and PROSUMER: a TIERED recommendation includes it unless it would clearly lower the modeled profit or almost no paying customer would move up to it; a FLAT one includes it only when it improves the recommendation. Absent, for ENTERPRISE: no Max plan. A TIERED Max is unlimited ( includedQuantity 1,000,000,000 with NO_OVERAGE_THROTTLE) unless its buyers' usage would cost too much of the Max price; then it has an allowance and overage. A FLAT Max always has an allowance.

      If the service returns an enum value that is not available in the current SDK version, maxTierInclusion will return PlanInclusion.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from maxTierInclusionAsString().

      Returns:
      Whether to include a Max plan for heavy users. On the default menu for CONSUMER and PROSUMER; for ENTERPRISE only when this is INCLUDE. Only with a value estimate: when no action has a value basis ( minutesSaved, moneySaved or valuePerUse) and there is no experiential estimate (see valueKind), the price is cost-based and this is ignored, with no error: the response has no Max plan and no planOptions.maxTier outcome. A Max plan goes with a TIERED or FLAT model, never PER_USE or PER_USE_SPLIT: INCLUDE with a PER_USE or PER_USE_SPLIT preference is rejected, and a per-use model the service chooses has no Max plan. Absent, for CONSUMER and PROSUMER: a TIERED recommendation includes it unless it would clearly lower the modeled profit or almost no paying customer would move up to it; a FLAT one includes it only when it improves the recommendation. Absent, for ENTERPRISE: no Max plan. A TIERED Max is unlimited (includedQuantity 1,000,000,000 with NO_OVERAGE_THROTTLE) unless its buyers' usage would cost too much of the Max price; then it has an allowance and overage. A FLAT Max always has an allowance.
      See Also:
    • maxTierInclusionAsString

      public final String maxTierInclusionAsString()

      Whether to include a Max plan for heavy users. On the default menu for CONSUMER and PROSUMER; for ENTERPRISE only when this is INCLUDE. Only with a value estimate: when no action has a value basis (minutesSaved, moneySaved or valuePerUse) and there is no experiential estimate (see valueKind), the price is cost-based and this is ignored, with no error: the response has no Max plan and no planOptions.maxTier outcome. A Max plan goes with a TIERED or FLAT model, never PER_USE or PER_USE_SPLIT: INCLUDE with a PER_USE or PER_USE_SPLIT preference is rejected, and a per-use model the service chooses has no Max plan. Absent, for CONSUMER and PROSUMER: a TIERED recommendation includes it unless it would clearly lower the modeled profit or almost no paying customer would move up to it; a FLAT one includes it only when it improves the recommendation. Absent, for ENTERPRISE: no Max plan. A TIERED Max is unlimited ( includedQuantity 1,000,000,000 with NO_OVERAGE_THROTTLE) unless its buyers' usage would cost too much of the Max price; then it has an allowance and overage. A FLAT Max always has an allowance.

      If the service returns an enum value that is not available in the current SDK version, maxTierInclusion will return PlanInclusion.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from maxTierInclusionAsString().

      Returns:
      Whether to include a Max plan for heavy users. On the default menu for CONSUMER and PROSUMER; for ENTERPRISE only when this is INCLUDE. Only with a value estimate: when no action has a value basis ( minutesSaved, moneySaved or valuePerUse) and there is no experiential estimate (see valueKind), the price is cost-based and this is ignored, with no error: the response has no Max plan and no planOptions.maxTier outcome. A Max plan goes with a TIERED or FLAT model, never PER_USE or PER_USE_SPLIT: INCLUDE with a PER_USE or PER_USE_SPLIT preference is rejected, and a per-use model the service chooses has no Max plan. Absent, for CONSUMER and PROSUMER: a TIERED recommendation includes it unless it would clearly lower the modeled profit or almost no paying customer would move up to it; a FLAT one includes it only when it improves the recommendation. Absent, for ENTERPRISE: no Max plan. A TIERED Max is unlimited (includedQuantity 1,000,000,000 with NO_OVERAGE_THROTTLE) unless its buyers' usage would cost too much of the Max price; then it has an allowance and overage. A FLAT Max always has an allowance.
      See Also:
    • annualPlanInclusion

      public final PlanInclusion annualPlanInclusion()

      Whether to add an annual plan (Annual). Absent: it is added when a subscription (FLAT or TIERED) is recommended, without changing the pricing model, unless every action is used less than once a month on average ( typicalMonthlyUsage below 1). INCLUDE adds it at any usage and, when the request sends no pricingModelPreference, also limits the choice to subscriptions; INCLUDE with a PER_USE or PER_USE_SPLIT preference is rejected. EXCLUDE leaves it out.

      If the service returns an enum value that is not available in the current SDK version, annualPlanInclusion will return PlanInclusion.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from annualPlanInclusionAsString().

      Returns:
      Whether to add an annual plan (Annual). Absent: it is added when a subscription (FLAT or TIERED) is recommended, without changing the pricing model, unless every action is used less than once a month on average (typicalMonthlyUsage below 1). INCLUDE adds it at any usage and, when the request sends no pricingModelPreference, also limits the choice to subscriptions; INCLUDE with a PER_USE or PER_USE_SPLIT preference is rejected. EXCLUDE leaves it out.
      See Also:
    • annualPlanInclusionAsString

      public final String annualPlanInclusionAsString()

      Whether to add an annual plan (Annual). Absent: it is added when a subscription (FLAT or TIERED) is recommended, without changing the pricing model, unless every action is used less than once a month on average ( typicalMonthlyUsage below 1). INCLUDE adds it at any usage and, when the request sends no pricingModelPreference, also limits the choice to subscriptions; INCLUDE with a PER_USE or PER_USE_SPLIT preference is rejected. EXCLUDE leaves it out.

      If the service returns an enum value that is not available in the current SDK version, annualPlanInclusion will return PlanInclusion.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from annualPlanInclusionAsString().

      Returns:
      Whether to add an annual plan (Annual). Absent: it is added when a subscription (FLAT or TIERED) is recommended, without changing the pricing model, unless every action is used less than once a month on average (typicalMonthlyUsage below 1). INCLUDE adds it at any usage and, when the request sends no pricingModelPreference, also limits the choice to subscriptions; INCLUDE with a PER_USE or PER_USE_SPLIT preference is rejected. EXCLUDE leaves it out.
      See Also:
    • creditPackInclusion

      public final PlanInclusion creditPackInclusion()

      Whether to add one-time credit packs alongside the plans, the response's creditPacks. Absent: EXCLUDE. INCLUDE is allowed with every pricing model, per-use included.

      If the service returns an enum value that is not available in the current SDK version, creditPackInclusion will return PlanInclusion.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from creditPackInclusionAsString().

      Returns:
      Whether to add one-time credit packs alongside the plans, the response's creditPacks. Absent: EXCLUDE. INCLUDE is allowed with every pricing model, per-use included.
      See Also:
    • creditPackInclusionAsString

      public final String creditPackInclusionAsString()

      Whether to add one-time credit packs alongside the plans, the response's creditPacks. Absent: EXCLUDE. INCLUDE is allowed with every pricing model, per-use included.

      If the service returns an enum value that is not available in the current SDK version, creditPackInclusion will return PlanInclusion.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from creditPackInclusionAsString().

      Returns:
      Whether to add one-time credit packs alongside the plans, the response's creditPacks. Absent: EXCLUDE. INCLUDE is allowed with every pricing model, per-use included.
      See Also:
    • hasPlanPrices

      public final boolean hasPlanPrices()
      For responses, this returns true if the service returned a value for the PlanPrices property. This DOES NOT check that the value is non-empty (for which, you should check the isEmpty() method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
    • planPrices

      public final List<PlanPrice> planPrices()

      Prices to evaluate instead of the recommended ones, one per plan. Each is evaluated against the same modeled demand and returned in planOptions.evaluatedPlanPrices, with the recommended plans and credit packs rebuilt at that price; the recommendation itself does not change. A pro price is evaluated with the Max plan as recommended; when that Max would sit too close to the pro price, Max is re-priced or left out, as the recommendation does when it moves Pro, and the rendered text says which. A max price in the same request does not change this, so a pro item is the same as for that pro price alone. A max price must be above Pro's price, and is evaluated with this request's pro price if it has one. Absent: none, and planOptions.evaluatedPlanPrices is empty.

      Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.

      This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the hasPlanPrices() method.

      Returns:
      Prices to evaluate instead of the recommended ones, one per plan. Each is evaluated against the same modeled demand and returned in planOptions.evaluatedPlanPrices, with the recommended plans and credit packs rebuilt at that price; the recommendation itself does not change. A pro price is evaluated with the Max plan as recommended; when that Max would sit too close to the pro price, Max is re-priced or left out, as the recommendation does when it moves Pro, and the rendered text says which. A max price in the same request does not change this, so a pro item is the same as for that pro price alone. A max price must be above Pro's price, and is evaluated with this request's pro price if it has one. Absent: none, and planOptions.evaluatedPlanPrices is empty.
    • publishedPrice

      public final PublishedPrice publishedPrice()

      Your current or intended monthly price, in USD (another currencyCode is rejected). Shown for comparison, except when no action has a value basis and no comparables are used: then it is the recommended price, raised to cost to serve at the lowest margin in costs.margins (0, which is cost, when margins are omitted) when it is below that. Absent: no price is shown for comparison, and the price comes from the value estimate, comparables or cost.

      Returns:
      Your current or intended monthly price, in USD (another currencyCode is rejected). Shown for comparison, except when no action has a value basis and no comparables are used: then it is the recommended price, raised to cost to serve at the lowest margin in costs.margins (0, which is cost, when margins are omitted) when it is below that. Absent: no price is shown for comparison, and the price comes from the value estimate, comparables or cost.
    • toBuilder

      public PlanOptions.Builder toBuilder()
      Description copied from interface: ToCopyableBuilder
      Take this object and create a builder that contains all of the current property values of this object.
      Specified by:
      toBuilder in interface ToCopyableBuilder<PlanOptions.Builder,PlanOptions>
      Returns:
      a builder for type T
    • builder

      public static PlanOptions.Builder builder()
    • serializableBuilderClass

      public static Class<? extends PlanOptions.Builder> serializableBuilderClass()
    • hashCode

      public final int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public final boolean equals(Object obj)
      Overrides:
      equals in class Object
    • equalsBySdkFields

      public final boolean equalsBySdkFields(Object obj)
      Description copied from interface: SdkPojo
      Indicates whether some other object is "equal to" this one by SDK fields. An SDK field is a modeled, non-inherited field in an SdkPojo class, and is generated based on a service model.

      If an SdkPojo class does not have any inherited fields, equalsBySdkFields and equals are essentially the same.

      Specified by:
      equalsBySdkFields in interface SdkPojo
      Parameters:
      obj - the object to be compared with
      Returns:
      true if the other object equals to this object by sdk fields, false otherwise.
    • toString

      public final String toString()
      Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value.
      Overrides:
      toString in class Object
    • getValueForField

      public final <T> Optional<T> getValueForField(String fieldName, Class<T> clazz)
    • sdkFields

      public final List<SdkField<?>> sdkFields()
      Specified by:
      sdkFields in interface SdkPojo
      Returns:
      List of SdkField in this POJO. May be empty list but should never be null.
    • sdkFieldNameToField

      public final Map<String,SdkField<?>> sdkFieldNameToField()
      Specified by:
      sdkFieldNameToField in interface SdkPojo
      Returns:
      The mapping between the field name and its corresponding field.