// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// Input for GetPlanRecommendation. Only `segment`, `appType` and `actions` are required. The optional inputs are grouped by what they describe: `costs`, `alternatives`, `market` and `planOptions`. Each optional member's doc says what its absence means. The service checks the inputs against each other itself and rejects, with a ValidationException naming the member, the combinations stated on `valueKind`, `hourlyRate`, `valueShare`, `features`, a customer type's `featureWeights` and the `planOptions` inclusion members, each an input the rest of the request leaves unused or contradicts. Members this structure does not define are ignored. Smallest call that returns MEDIUM confidence: `{"segment":"CONSUMER","appType":"DAILY_WORKFLOW","actions":\[{"unitCost":0.02,"typicalMonthlyUsage":30,"valuePerUse":0.40}\]}`.
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
pub struct GetPlanRecommendationInput {
/// Display name of the app, used in the rendered text. Absent: `your app`.
pub app_name: ::std::option::Option<::std::string::String>,
/// Who buys the app.
pub segment: ::std::option::Option<crate::types::CustomerSegment>,
/// Kind of app. It sets the service's usage and value benchmarks for this kind of app.
pub app_type: ::std::option::Option<crate::types::PlanRecommendationAppType>,
/// What kind of value the app gives its users. Absent: PRODUCTIVITY. An experiential app has no time or money value, so with EXPERIENTIAL each of `actions\[\].minutesSaved`, `actions\[\].moneySaved`, `actions\[\].valuePerUse`, `hourlyRate` and `valueShare` that is sent is rejected. With EXPERIENTIAL, no `planOptions.publishedPrice` and no comparables used, a CONSUMER app is valued at the typical monthly price of public apps of its `appType` (there is none for API_WRAPPER), shown as an estimate. That estimate is not used when it is too close to a typical user's usage cost, so the estimate alone never makes the verdict NOT_MONETIZABLE. The estimate exists only for CONSUMER: a PROSUMER or ENTERPRISE experiential app with no `planOptions.publishedPrice` and no usable comparables is priced from cost (verdict COST_ONLY, or COST_NOT_CHECKED when costs are not checked: no `unitCost`, or `costs.source` NONE; confidence LOW).
pub value_kind: ::std::option::Option<crate::types::ValueKind>,
/// The things that your app charges for, each with its cost to serve, typical usage, and value to a customer. Names must be unique. Give a value basis (`minutesSaved`, `moneySaved` or `valuePerUse`, one per action) on every action or on none: when no action has a value basis and there is no experiential estimate (see `valueKind`), the price is based on cost (and comparables, if opted in, or `planOptions.publishedPrice`) and the confidence is LOW. Give `unitCost` on every action or on none.
pub actions: ::std::option::Option<::std::vec::Vec<crate::types::BillableAction>>,
/// What one hour of a customer's time is worth, in USD: the hourly rate of the person whose time the app saves. Required when any action has `minutesSaved`. There is no default. It is used only with `actions\[\].minutesSaved`: sent when no action has `minutesSaved`, or with `valueKind` EXPERIENTIAL, it is rejected.
pub hourly_rate: ::std::option::Option<f64>,
/// The most a typical customer would pay for the app, as a share of the time value it saves them (`minutesSaved` / 60 times `hourlyRate`). Above 1 when the minutes understate the value. The value of one use of an action with `minutesSaved` is `minutesSaved` / 60 times `hourlyRate` times the share; the share does not apply to `moneySaved` or `valuePerUse`. When an action's value is above 0, each outside option's `monthlyCost` is also weighed at this share (see `OutsideOption`). Absent: the service's benchmark share. For PROSUMER this value scales the service's benchmark share instead of replacing it. With usable comparables the recommended price uses the service's benchmark share for comparables instead, but this value still sets the price from the app's value alone, which the confidence and the texts compare with. Rejected unless an action's `minutesSaved`, `moneySaved` or `valuePerUse` is above 0 and, besides, an action has `minutesSaved` (0 counts) or an outside option's `monthlyCost` is above 0: otherwise it changes nothing (with no value above 0 there is no value estimate, and an outside option counts in full). Rejected with `valueKind` EXPERIENTIAL.
pub value_share: ::std::option::Option<f64>,
/// How this app scores on the characteristics customers decide on, and how much each one matters. Required when a comparable or an outside option in `alternatives` is scored by `features`, and used only then: sent when no comparable and no outside option is scored by `features`, it is rejected. A comparable with `alternatives.comparablesOptIn` OPTED_OUT is validated but not used, so `features` scored only against such comparables is validated with them and changes nothing. Absent: every comparable and outside option is scored by its `quality`.
pub features: ::std::option::Option<crate::types::FeatureScores>,
/// Cost inputs beyond each action's `unitCost`: where the costs came from, any costs that could not be priced, fixed monthly cost and target margins. Absent: `costs.source` is inferred from `actions\[\].unitCost`, and the costs count as complete but unconfirmed (see `costs.unknown`).
pub costs: ::std::option::Option<crate::types::CostInputs>,
/// What customers could use instead of the app: comparable apps and what they do without any product. Absent: no comparables (`comparablesOptIn` OPTED_OUT) and no outside options.
pub alternatives: ::std::option::Option<crate::types::AlternativeInputs>,
/// Who the customers are, how many there are and, for a deployed app, how many pay today; and any checkout drop-off rates to use instead of the benchmarks. Absent: each member's default (see `MarketInputs`).
pub market: ::std::option::Option<crate::types::MarketInputs>,
/// The pricing model and optional plans to consider, prices to evaluate, and the developer's own price (`publishedPrice`). Absent: each member's default (see `PlanOptions`); the service chooses the pricing model and plans.
pub plan_options: ::std::option::Option<crate::types::PlanOptions>,
/// Where the inputs came from, and notes on them. Changes no price, plan, verdict or confidence label: only how `summary` and `details` label and word the inputs. Absent: the rendered text uses default labels.
pub context: ::std::option::Option<crate::types::RequestContext>,
}
impl GetPlanRecommendationInput {
/// Display name of the app, used in the rendered text. Absent: `your app`.
pub fn app_name(&self) -> ::std::option::Option<&str> {
self.app_name.as_deref()
}
/// Who buys the app.
pub fn segment(&self) -> ::std::option::Option<&crate::types::CustomerSegment> {
self.segment.as_ref()
}
/// Kind of app. It sets the service's usage and value benchmarks for this kind of app.
pub fn app_type(&self) -> ::std::option::Option<&crate::types::PlanRecommendationAppType> {
self.app_type.as_ref()
}
/// What kind of value the app gives its users. Absent: PRODUCTIVITY. An experiential app has no time or money value, so with EXPERIENTIAL each of `actions\[\].minutesSaved`, `actions\[\].moneySaved`, `actions\[\].valuePerUse`, `hourlyRate` and `valueShare` that is sent is rejected. With EXPERIENTIAL, no `planOptions.publishedPrice` and no comparables used, a CONSUMER app is valued at the typical monthly price of public apps of its `appType` (there is none for API_WRAPPER), shown as an estimate. That estimate is not used when it is too close to a typical user's usage cost, so the estimate alone never makes the verdict NOT_MONETIZABLE. The estimate exists only for CONSUMER: a PROSUMER or ENTERPRISE experiential app with no `planOptions.publishedPrice` and no usable comparables is priced from cost (verdict COST_ONLY, or COST_NOT_CHECKED when costs are not checked: no `unitCost`, or `costs.source` NONE; confidence LOW).
pub fn value_kind(&self) -> ::std::option::Option<&crate::types::ValueKind> {
self.value_kind.as_ref()
}
/// The things that your app charges for, each with its cost to serve, typical usage, and value to a customer. Names must be unique. Give a value basis (`minutesSaved`, `moneySaved` or `valuePerUse`, one per action) on every action or on none: when no action has a value basis and there is no experiential estimate (see `valueKind`), the price is based on cost (and comparables, if opted in, or `planOptions.publishedPrice`) and the confidence is LOW. Give `unitCost` on every action or on none.
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.actions.is_none()`.
pub fn actions(&self) -> &[crate::types::BillableAction] {
self.actions.as_deref().unwrap_or_default()
}
/// What one hour of a customer's time is worth, in USD: the hourly rate of the person whose time the app saves. Required when any action has `minutesSaved`. There is no default. It is used only with `actions\[\].minutesSaved`: sent when no action has `minutesSaved`, or with `valueKind` EXPERIENTIAL, it is rejected.
pub fn hourly_rate(&self) -> ::std::option::Option<f64> {
self.hourly_rate
}
/// The most a typical customer would pay for the app, as a share of the time value it saves them (`minutesSaved` / 60 times `hourlyRate`). Above 1 when the minutes understate the value. The value of one use of an action with `minutesSaved` is `minutesSaved` / 60 times `hourlyRate` times the share; the share does not apply to `moneySaved` or `valuePerUse`. When an action's value is above 0, each outside option's `monthlyCost` is also weighed at this share (see `OutsideOption`). Absent: the service's benchmark share. For PROSUMER this value scales the service's benchmark share instead of replacing it. With usable comparables the recommended price uses the service's benchmark share for comparables instead, but this value still sets the price from the app's value alone, which the confidence and the texts compare with. Rejected unless an action's `minutesSaved`, `moneySaved` or `valuePerUse` is above 0 and, besides, an action has `minutesSaved` (0 counts) or an outside option's `monthlyCost` is above 0: otherwise it changes nothing (with no value above 0 there is no value estimate, and an outside option counts in full). Rejected with `valueKind` EXPERIENTIAL.
pub fn value_share(&self) -> ::std::option::Option<f64> {
self.value_share
}
/// How this app scores on the characteristics customers decide on, and how much each one matters. Required when a comparable or an outside option in `alternatives` is scored by `features`, and used only then: sent when no comparable and no outside option is scored by `features`, it is rejected. A comparable with `alternatives.comparablesOptIn` OPTED_OUT is validated but not used, so `features` scored only against such comparables is validated with them and changes nothing. Absent: every comparable and outside option is scored by its `quality`.
pub fn features(&self) -> ::std::option::Option<&crate::types::FeatureScores> {
self.features.as_ref()
}
/// Cost inputs beyond each action's `unitCost`: where the costs came from, any costs that could not be priced, fixed monthly cost and target margins. Absent: `costs.source` is inferred from `actions\[\].unitCost`, and the costs count as complete but unconfirmed (see `costs.unknown`).
pub fn costs(&self) -> ::std::option::Option<&crate::types::CostInputs> {
self.costs.as_ref()
}
/// What customers could use instead of the app: comparable apps and what they do without any product. Absent: no comparables (`comparablesOptIn` OPTED_OUT) and no outside options.
pub fn alternatives(&self) -> ::std::option::Option<&crate::types::AlternativeInputs> {
self.alternatives.as_ref()
}
/// Who the customers are, how many there are and, for a deployed app, how many pay today; and any checkout drop-off rates to use instead of the benchmarks. Absent: each member's default (see `MarketInputs`).
pub fn market(&self) -> ::std::option::Option<&crate::types::MarketInputs> {
self.market.as_ref()
}
/// The pricing model and optional plans to consider, prices to evaluate, and the developer's own price (`publishedPrice`). Absent: each member's default (see `PlanOptions`); the service chooses the pricing model and plans.
pub fn plan_options(&self) -> ::std::option::Option<&crate::types::PlanOptions> {
self.plan_options.as_ref()
}
/// Where the inputs came from, and notes on them. Changes no price, plan, verdict or confidence label: only how `summary` and `details` label and word the inputs. Absent: the rendered text uses default labels.
pub fn context(&self) -> ::std::option::Option<&crate::types::RequestContext> {
self.context.as_ref()
}
}
impl ::std::fmt::Debug for GetPlanRecommendationInput {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("GetPlanRecommendationInput");
formatter.field("app_name", &self.app_name);
formatter.field("segment", &self.segment);
formatter.field("app_type", &self.app_type);
formatter.field("value_kind", &self.value_kind);
formatter.field("actions", &"*** Sensitive Data Redacted ***");
formatter.field("hourly_rate", &"*** Sensitive Data Redacted ***");
formatter.field("value_share", &"*** Sensitive Data Redacted ***");
formatter.field("features", &"*** Sensitive Data Redacted ***");
formatter.field("costs", &self.costs);
formatter.field("alternatives", &self.alternatives);
formatter.field("market", &self.market);
formatter.field("plan_options", &self.plan_options);
formatter.field("context", &"*** Sensitive Data Redacted ***");
formatter.finish()
}
}
impl GetPlanRecommendationInput {
/// Creates a new builder-style object to manufacture [`GetPlanRecommendationInput`](crate::operation::get_plan_recommendation::GetPlanRecommendationInput).
pub fn builder() -> crate::operation::get_plan_recommendation::builders::GetPlanRecommendationInputBuilder {
crate::operation::get_plan_recommendation::builders::GetPlanRecommendationInputBuilder::default()
}
}
/// A builder for [`GetPlanRecommendationInput`](crate::operation::get_plan_recommendation::GetPlanRecommendationInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct GetPlanRecommendationInputBuilder {
pub(crate) app_name: ::std::option::Option<::std::string::String>,
pub(crate) segment: ::std::option::Option<crate::types::CustomerSegment>,
pub(crate) app_type: ::std::option::Option<crate::types::PlanRecommendationAppType>,
pub(crate) value_kind: ::std::option::Option<crate::types::ValueKind>,
pub(crate) actions: ::std::option::Option<::std::vec::Vec<crate::types::BillableAction>>,
pub(crate) hourly_rate: ::std::option::Option<f64>,
pub(crate) value_share: ::std::option::Option<f64>,
pub(crate) features: ::std::option::Option<crate::types::FeatureScores>,
pub(crate) costs: ::std::option::Option<crate::types::CostInputs>,
pub(crate) alternatives: ::std::option::Option<crate::types::AlternativeInputs>,
pub(crate) market: ::std::option::Option<crate::types::MarketInputs>,
pub(crate) plan_options: ::std::option::Option<crate::types::PlanOptions>,
pub(crate) context: ::std::option::Option<crate::types::RequestContext>,
}
impl GetPlanRecommendationInputBuilder {
/// Display name of the app, used in the rendered text. Absent: `your app`.
pub fn app_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.app_name = ::std::option::Option::Some(input.into());
self
}
/// Display name of the app, used in the rendered text. Absent: `your app`.
pub fn set_app_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.app_name = input;
self
}
/// Display name of the app, used in the rendered text. Absent: `your app`.
pub fn get_app_name(&self) -> &::std::option::Option<::std::string::String> {
&self.app_name
}
/// Who buys the app.
/// This field is required.
pub fn segment(mut self, input: crate::types::CustomerSegment) -> Self {
self.segment = ::std::option::Option::Some(input);
self
}
/// Who buys the app.
pub fn set_segment(mut self, input: ::std::option::Option<crate::types::CustomerSegment>) -> Self {
self.segment = input;
self
}
/// Who buys the app.
pub fn get_segment(&self) -> &::std::option::Option<crate::types::CustomerSegment> {
&self.segment
}
/// Kind of app. It sets the service's usage and value benchmarks for this kind of app.
/// This field is required.
pub fn app_type(mut self, input: crate::types::PlanRecommendationAppType) -> Self {
self.app_type = ::std::option::Option::Some(input);
self
}
/// Kind of app. It sets the service's usage and value benchmarks for this kind of app.
pub fn set_app_type(mut self, input: ::std::option::Option<crate::types::PlanRecommendationAppType>) -> Self {
self.app_type = input;
self
}
/// Kind of app. It sets the service's usage and value benchmarks for this kind of app.
pub fn get_app_type(&self) -> &::std::option::Option<crate::types::PlanRecommendationAppType> {
&self.app_type
}
/// What kind of value the app gives its users. Absent: PRODUCTIVITY. An experiential app has no time or money value, so with EXPERIENTIAL each of `actions\[\].minutesSaved`, `actions\[\].moneySaved`, `actions\[\].valuePerUse`, `hourlyRate` and `valueShare` that is sent is rejected. With EXPERIENTIAL, no `planOptions.publishedPrice` and no comparables used, a CONSUMER app is valued at the typical monthly price of public apps of its `appType` (there is none for API_WRAPPER), shown as an estimate. That estimate is not used when it is too close to a typical user's usage cost, so the estimate alone never makes the verdict NOT_MONETIZABLE. The estimate exists only for CONSUMER: a PROSUMER or ENTERPRISE experiential app with no `planOptions.publishedPrice` and no usable comparables is priced from cost (verdict COST_ONLY, or COST_NOT_CHECKED when costs are not checked: no `unitCost`, or `costs.source` NONE; confidence LOW).
pub fn value_kind(mut self, input: crate::types::ValueKind) -> Self {
self.value_kind = ::std::option::Option::Some(input);
self
}
/// What kind of value the app gives its users. Absent: PRODUCTIVITY. An experiential app has no time or money value, so with EXPERIENTIAL each of `actions\[\].minutesSaved`, `actions\[\].moneySaved`, `actions\[\].valuePerUse`, `hourlyRate` and `valueShare` that is sent is rejected. With EXPERIENTIAL, no `planOptions.publishedPrice` and no comparables used, a CONSUMER app is valued at the typical monthly price of public apps of its `appType` (there is none for API_WRAPPER), shown as an estimate. That estimate is not used when it is too close to a typical user's usage cost, so the estimate alone never makes the verdict NOT_MONETIZABLE. The estimate exists only for CONSUMER: a PROSUMER or ENTERPRISE experiential app with no `planOptions.publishedPrice` and no usable comparables is priced from cost (verdict COST_ONLY, or COST_NOT_CHECKED when costs are not checked: no `unitCost`, or `costs.source` NONE; confidence LOW).
pub fn set_value_kind(mut self, input: ::std::option::Option<crate::types::ValueKind>) -> Self {
self.value_kind = input;
self
}
/// What kind of value the app gives its users. Absent: PRODUCTIVITY. An experiential app has no time or money value, so with EXPERIENTIAL each of `actions\[\].minutesSaved`, `actions\[\].moneySaved`, `actions\[\].valuePerUse`, `hourlyRate` and `valueShare` that is sent is rejected. With EXPERIENTIAL, no `planOptions.publishedPrice` and no comparables used, a CONSUMER app is valued at the typical monthly price of public apps of its `appType` (there is none for API_WRAPPER), shown as an estimate. That estimate is not used when it is too close to a typical user's usage cost, so the estimate alone never makes the verdict NOT_MONETIZABLE. The estimate exists only for CONSUMER: a PROSUMER or ENTERPRISE experiential app with no `planOptions.publishedPrice` and no usable comparables is priced from cost (verdict COST_ONLY, or COST_NOT_CHECKED when costs are not checked: no `unitCost`, or `costs.source` NONE; confidence LOW).
pub fn get_value_kind(&self) -> &::std::option::Option<crate::types::ValueKind> {
&self.value_kind
}
/// Appends an item to `actions`.
///
/// To override the contents of this collection use [`set_actions`](Self::set_actions).
///
/// The things that your app charges for, each with its cost to serve, typical usage, and value to a customer. Names must be unique. Give a value basis (`minutesSaved`, `moneySaved` or `valuePerUse`, one per action) on every action or on none: when no action has a value basis and there is no experiential estimate (see `valueKind`), the price is based on cost (and comparables, if opted in, or `planOptions.publishedPrice`) and the confidence is LOW. Give `unitCost` on every action or on none.
pub fn actions(mut self, input: crate::types::BillableAction) -> Self {
let mut v = self.actions.unwrap_or_default();
v.push(input);
self.actions = ::std::option::Option::Some(v);
self
}
/// The things that your app charges for, each with its cost to serve, typical usage, and value to a customer. Names must be unique. Give a value basis (`minutesSaved`, `moneySaved` or `valuePerUse`, one per action) on every action or on none: when no action has a value basis and there is no experiential estimate (see `valueKind`), the price is based on cost (and comparables, if opted in, or `planOptions.publishedPrice`) and the confidence is LOW. Give `unitCost` on every action or on none.
pub fn set_actions(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::BillableAction>>) -> Self {
self.actions = input;
self
}
/// The things that your app charges for, each with its cost to serve, typical usage, and value to a customer. Names must be unique. Give a value basis (`minutesSaved`, `moneySaved` or `valuePerUse`, one per action) on every action or on none: when no action has a value basis and there is no experiential estimate (see `valueKind`), the price is based on cost (and comparables, if opted in, or `planOptions.publishedPrice`) and the confidence is LOW. Give `unitCost` on every action or on none.
pub fn get_actions(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::BillableAction>> {
&self.actions
}
/// What one hour of a customer's time is worth, in USD: the hourly rate of the person whose time the app saves. Required when any action has `minutesSaved`. There is no default. It is used only with `actions\[\].minutesSaved`: sent when no action has `minutesSaved`, or with `valueKind` EXPERIENTIAL, it is rejected.
pub fn hourly_rate(mut self, input: f64) -> Self {
self.hourly_rate = ::std::option::Option::Some(input);
self
}
/// What one hour of a customer's time is worth, in USD: the hourly rate of the person whose time the app saves. Required when any action has `minutesSaved`. There is no default. It is used only with `actions\[\].minutesSaved`: sent when no action has `minutesSaved`, or with `valueKind` EXPERIENTIAL, it is rejected.
pub fn set_hourly_rate(mut self, input: ::std::option::Option<f64>) -> Self {
self.hourly_rate = input;
self
}
/// What one hour of a customer's time is worth, in USD: the hourly rate of the person whose time the app saves. Required when any action has `minutesSaved`. There is no default. It is used only with `actions\[\].minutesSaved`: sent when no action has `minutesSaved`, or with `valueKind` EXPERIENTIAL, it is rejected.
pub fn get_hourly_rate(&self) -> &::std::option::Option<f64> {
&self.hourly_rate
}
/// The most a typical customer would pay for the app, as a share of the time value it saves them (`minutesSaved` / 60 times `hourlyRate`). Above 1 when the minutes understate the value. The value of one use of an action with `minutesSaved` is `minutesSaved` / 60 times `hourlyRate` times the share; the share does not apply to `moneySaved` or `valuePerUse`. When an action's value is above 0, each outside option's `monthlyCost` is also weighed at this share (see `OutsideOption`). Absent: the service's benchmark share. For PROSUMER this value scales the service's benchmark share instead of replacing it. With usable comparables the recommended price uses the service's benchmark share for comparables instead, but this value still sets the price from the app's value alone, which the confidence and the texts compare with. Rejected unless an action's `minutesSaved`, `moneySaved` or `valuePerUse` is above 0 and, besides, an action has `minutesSaved` (0 counts) or an outside option's `monthlyCost` is above 0: otherwise it changes nothing (with no value above 0 there is no value estimate, and an outside option counts in full). Rejected with `valueKind` EXPERIENTIAL.
pub fn value_share(mut self, input: f64) -> Self {
self.value_share = ::std::option::Option::Some(input);
self
}
/// The most a typical customer would pay for the app, as a share of the time value it saves them (`minutesSaved` / 60 times `hourlyRate`). Above 1 when the minutes understate the value. The value of one use of an action with `minutesSaved` is `minutesSaved` / 60 times `hourlyRate` times the share; the share does not apply to `moneySaved` or `valuePerUse`. When an action's value is above 0, each outside option's `monthlyCost` is also weighed at this share (see `OutsideOption`). Absent: the service's benchmark share. For PROSUMER this value scales the service's benchmark share instead of replacing it. With usable comparables the recommended price uses the service's benchmark share for comparables instead, but this value still sets the price from the app's value alone, which the confidence and the texts compare with. Rejected unless an action's `minutesSaved`, `moneySaved` or `valuePerUse` is above 0 and, besides, an action has `minutesSaved` (0 counts) or an outside option's `monthlyCost` is above 0: otherwise it changes nothing (with no value above 0 there is no value estimate, and an outside option counts in full). Rejected with `valueKind` EXPERIENTIAL.
pub fn set_value_share(mut self, input: ::std::option::Option<f64>) -> Self {
self.value_share = input;
self
}
/// The most a typical customer would pay for the app, as a share of the time value it saves them (`minutesSaved` / 60 times `hourlyRate`). Above 1 when the minutes understate the value. The value of one use of an action with `minutesSaved` is `minutesSaved` / 60 times `hourlyRate` times the share; the share does not apply to `moneySaved` or `valuePerUse`. When an action's value is above 0, each outside option's `monthlyCost` is also weighed at this share (see `OutsideOption`). Absent: the service's benchmark share. For PROSUMER this value scales the service's benchmark share instead of replacing it. With usable comparables the recommended price uses the service's benchmark share for comparables instead, but this value still sets the price from the app's value alone, which the confidence and the texts compare with. Rejected unless an action's `minutesSaved`, `moneySaved` or `valuePerUse` is above 0 and, besides, an action has `minutesSaved` (0 counts) or an outside option's `monthlyCost` is above 0: otherwise it changes nothing (with no value above 0 there is no value estimate, and an outside option counts in full). Rejected with `valueKind` EXPERIENTIAL.
pub fn get_value_share(&self) -> &::std::option::Option<f64> {
&self.value_share
}
/// How this app scores on the characteristics customers decide on, and how much each one matters. Required when a comparable or an outside option in `alternatives` is scored by `features`, and used only then: sent when no comparable and no outside option is scored by `features`, it is rejected. A comparable with `alternatives.comparablesOptIn` OPTED_OUT is validated but not used, so `features` scored only against such comparables is validated with them and changes nothing. Absent: every comparable and outside option is scored by its `quality`.
pub fn features(mut self, input: crate::types::FeatureScores) -> Self {
self.features = ::std::option::Option::Some(input);
self
}
/// How this app scores on the characteristics customers decide on, and how much each one matters. Required when a comparable or an outside option in `alternatives` is scored by `features`, and used only then: sent when no comparable and no outside option is scored by `features`, it is rejected. A comparable with `alternatives.comparablesOptIn` OPTED_OUT is validated but not used, so `features` scored only against such comparables is validated with them and changes nothing. Absent: every comparable and outside option is scored by its `quality`.
pub fn set_features(mut self, input: ::std::option::Option<crate::types::FeatureScores>) -> Self {
self.features = input;
self
}
/// How this app scores on the characteristics customers decide on, and how much each one matters. Required when a comparable or an outside option in `alternatives` is scored by `features`, and used only then: sent when no comparable and no outside option is scored by `features`, it is rejected. A comparable with `alternatives.comparablesOptIn` OPTED_OUT is validated but not used, so `features` scored only against such comparables is validated with them and changes nothing. Absent: every comparable and outside option is scored by its `quality`.
pub fn get_features(&self) -> &::std::option::Option<crate::types::FeatureScores> {
&self.features
}
/// Cost inputs beyond each action's `unitCost`: where the costs came from, any costs that could not be priced, fixed monthly cost and target margins. Absent: `costs.source` is inferred from `actions\[\].unitCost`, and the costs count as complete but unconfirmed (see `costs.unknown`).
pub fn costs(mut self, input: crate::types::CostInputs) -> Self {
self.costs = ::std::option::Option::Some(input);
self
}
/// Cost inputs beyond each action's `unitCost`: where the costs came from, any costs that could not be priced, fixed monthly cost and target margins. Absent: `costs.source` is inferred from `actions\[\].unitCost`, and the costs count as complete but unconfirmed (see `costs.unknown`).
pub fn set_costs(mut self, input: ::std::option::Option<crate::types::CostInputs>) -> Self {
self.costs = input;
self
}
/// Cost inputs beyond each action's `unitCost`: where the costs came from, any costs that could not be priced, fixed monthly cost and target margins. Absent: `costs.source` is inferred from `actions\[\].unitCost`, and the costs count as complete but unconfirmed (see `costs.unknown`).
pub fn get_costs(&self) -> &::std::option::Option<crate::types::CostInputs> {
&self.costs
}
/// What customers could use instead of the app: comparable apps and what they do without any product. Absent: no comparables (`comparablesOptIn` OPTED_OUT) and no outside options.
pub fn alternatives(mut self, input: crate::types::AlternativeInputs) -> Self {
self.alternatives = ::std::option::Option::Some(input);
self
}
/// What customers could use instead of the app: comparable apps and what they do without any product. Absent: no comparables (`comparablesOptIn` OPTED_OUT) and no outside options.
pub fn set_alternatives(mut self, input: ::std::option::Option<crate::types::AlternativeInputs>) -> Self {
self.alternatives = input;
self
}
/// What customers could use instead of the app: comparable apps and what they do without any product. Absent: no comparables (`comparablesOptIn` OPTED_OUT) and no outside options.
pub fn get_alternatives(&self) -> &::std::option::Option<crate::types::AlternativeInputs> {
&self.alternatives
}
/// Who the customers are, how many there are and, for a deployed app, how many pay today; and any checkout drop-off rates to use instead of the benchmarks. Absent: each member's default (see `MarketInputs`).
pub fn market(mut self, input: crate::types::MarketInputs) -> Self {
self.market = ::std::option::Option::Some(input);
self
}
/// Who the customers are, how many there are and, for a deployed app, how many pay today; and any checkout drop-off rates to use instead of the benchmarks. Absent: each member's default (see `MarketInputs`).
pub fn set_market(mut self, input: ::std::option::Option<crate::types::MarketInputs>) -> Self {
self.market = input;
self
}
/// Who the customers are, how many there are and, for a deployed app, how many pay today; and any checkout drop-off rates to use instead of the benchmarks. Absent: each member's default (see `MarketInputs`).
pub fn get_market(&self) -> &::std::option::Option<crate::types::MarketInputs> {
&self.market
}
/// The pricing model and optional plans to consider, prices to evaluate, and the developer's own price (`publishedPrice`). Absent: each member's default (see `PlanOptions`); the service chooses the pricing model and plans.
pub fn plan_options(mut self, input: crate::types::PlanOptions) -> Self {
self.plan_options = ::std::option::Option::Some(input);
self
}
/// The pricing model and optional plans to consider, prices to evaluate, and the developer's own price (`publishedPrice`). Absent: each member's default (see `PlanOptions`); the service chooses the pricing model and plans.
pub fn set_plan_options(mut self, input: ::std::option::Option<crate::types::PlanOptions>) -> Self {
self.plan_options = input;
self
}
/// The pricing model and optional plans to consider, prices to evaluate, and the developer's own price (`publishedPrice`). Absent: each member's default (see `PlanOptions`); the service chooses the pricing model and plans.
pub fn get_plan_options(&self) -> &::std::option::Option<crate::types::PlanOptions> {
&self.plan_options
}
/// Where the inputs came from, and notes on them. Changes no price, plan, verdict or confidence label: only how `summary` and `details` label and word the inputs. Absent: the rendered text uses default labels.
pub fn context(mut self, input: crate::types::RequestContext) -> Self {
self.context = ::std::option::Option::Some(input);
self
}
/// Where the inputs came from, and notes on them. Changes no price, plan, verdict or confidence label: only how `summary` and `details` label and word the inputs. Absent: the rendered text uses default labels.
pub fn set_context(mut self, input: ::std::option::Option<crate::types::RequestContext>) -> Self {
self.context = input;
self
}
/// Where the inputs came from, and notes on them. Changes no price, plan, verdict or confidence label: only how `summary` and `details` label and word the inputs. Absent: the rendered text uses default labels.
pub fn get_context(&self) -> &::std::option::Option<crate::types::RequestContext> {
&self.context
}
/// Consumes the builder and constructs a [`GetPlanRecommendationInput`](crate::operation::get_plan_recommendation::GetPlanRecommendationInput).
pub fn build(
self,
) -> ::std::result::Result<crate::operation::get_plan_recommendation::GetPlanRecommendationInput, ::aws_smithy_types::error::operation::BuildError>
{
::std::result::Result::Ok(crate::operation::get_plan_recommendation::GetPlanRecommendationInput {
app_name: self.app_name,
segment: self.segment,
app_type: self.app_type,
value_kind: self.value_kind,
actions: self.actions,
hourly_rate: self.hourly_rate,
value_share: self.value_share,
features: self.features,
costs: self.costs,
alternatives: self.alternatives,
market: self.market,
plan_options: self.plan_options,
context: self.context,
})
}
}
impl ::std::fmt::Debug for GetPlanRecommendationInputBuilder {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("GetPlanRecommendationInputBuilder");
formatter.field("app_name", &self.app_name);
formatter.field("segment", &self.segment);
formatter.field("app_type", &self.app_type);
formatter.field("value_kind", &self.value_kind);
formatter.field("actions", &"*** Sensitive Data Redacted ***");
formatter.field("hourly_rate", &"*** Sensitive Data Redacted ***");
formatter.field("value_share", &"*** Sensitive Data Redacted ***");
formatter.field("features", &"*** Sensitive Data Redacted ***");
formatter.field("costs", &self.costs);
formatter.field("alternatives", &self.alternatives);
formatter.field("market", &self.market);
formatter.field("plan_options", &self.plan_options);
formatter.field("context", &"*** Sensitive Data Redacted ***");
formatter.finish()
}
}