Interface PlanOptions.Builder

  • Method Details

    • pricingModelPreference

      PlanOptions.Builder pricingModelPreference(String 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.

      Parameters:
      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.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • pricingModelPreference

      PlanOptions.Builder pricingModelPreference(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.

      Parameters:
      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.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • freeTierInclusion

      PlanOptions.Builder freeTierInclusion(String 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.

      Parameters:
      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.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • freeTierInclusion

      PlanOptions.Builder freeTierInclusion(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.

      Parameters:
      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.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • maxTierInclusion

      PlanOptions.Builder maxTierInclusion(String 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.

      Parameters:
      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.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • maxTierInclusion

      PlanOptions.Builder maxTierInclusion(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.

      Parameters:
      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.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • annualPlanInclusion

      PlanOptions.Builder annualPlanInclusion(String 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.

      Parameters:
      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.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • annualPlanInclusion

      PlanOptions.Builder annualPlanInclusion(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.

      Parameters:
      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.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • creditPackInclusion

      PlanOptions.Builder creditPackInclusion(String 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.

      Parameters:
      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.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • creditPackInclusion

      PlanOptions.Builder creditPackInclusion(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.

      Parameters:
      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.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • planPrices

      PlanOptions.Builder planPrices(Collection<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.

      Parameters:
      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.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • planPrices

      PlanOptions.Builder planPrices(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.

      Parameters:
      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.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • planPrices

      PlanOptions.Builder planPrices(Consumer<PlanPrice.Builder>... 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.

      This is a convenience method that creates an instance of the PlanPrice.Builder avoiding the need to create one manually via PlanPrice.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to planPrices(List<PlanPrice>).

      Parameters:
      planPrices - a consumer that will call methods on PlanPrice.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • publishedPrice

      PlanOptions.Builder publishedPrice(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.

      Parameters:
      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:
      Returns a reference to this object so that method calls can be chained together.
    • publishedPrice

      default PlanOptions.Builder publishedPrice(Consumer<PublishedPrice.Builder> 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.

      This is a convenience method that creates an instance of the PublishedPrice.Builder avoiding the need to create one manually via PublishedPrice.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to publishedPrice(PublishedPrice).

      Parameters:
      publishedPrice - a consumer that will call methods on PublishedPrice.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also: