aws_sdk_personalize/operation/update_campaign/_update_campaign_input.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct UpdateCampaignInput {
6 /// <p>The Amazon Resource Name (ARN) of the campaign.</p>
7 pub campaign_arn: ::std::option::Option<::std::string::String>,
8 /// <p>The Amazon Resource Name (ARN) of a new model to deploy. To specify the latest solution version of your solution, specify the ARN of your <i>solution</i> in <code>SolutionArn/$LATEST</code> format. You must use this format if you set <code>syncWithLatestSolutionVersion</code> to <code>True</code> in the <a href="https://docs.aws.amazon.com/personalize/latest/dg/API_CampaignConfig.html">CampaignConfig</a>.</p>
9 /// <p>To deploy a model that isn't the latest solution version of your solution, specify the ARN of the solution version.</p>
10 /// <p>For more information about automatic campaign updates, see <a href="https://docs.aws.amazon.com/personalize/latest/dg/campaigns.html#create-campaign-automatic-latest-sv-update">Enabling automatic campaign updates</a>.</p>
11 pub solution_version_arn: ::std::option::Option<::std::string::String>,
12 /// <p>Specifies the requested minimum provisioned transactions (recommendations) per second that Amazon Personalize will support. A high <code>minProvisionedTPS</code> will increase your bill. We recommend starting with 1 for <code>minProvisionedTPS</code> (the default). Track your usage using Amazon CloudWatch metrics, and increase the <code>minProvisionedTPS</code> as necessary.</p>
13 pub min_provisioned_tps: ::std::option::Option<i32>,
14 /// <p>The configuration details of a campaign.</p>
15 pub campaign_config: ::std::option::Option<crate::types::CampaignConfig>,
16}
17impl UpdateCampaignInput {
18 /// <p>The Amazon Resource Name (ARN) of the campaign.</p>
19 pub fn campaign_arn(&self) -> ::std::option::Option<&str> {
20 self.campaign_arn.as_deref()
21 }
22 /// <p>The Amazon Resource Name (ARN) of a new model to deploy. To specify the latest solution version of your solution, specify the ARN of your <i>solution</i> in <code>SolutionArn/$LATEST</code> format. You must use this format if you set <code>syncWithLatestSolutionVersion</code> to <code>True</code> in the <a href="https://docs.aws.amazon.com/personalize/latest/dg/API_CampaignConfig.html">CampaignConfig</a>.</p>
23 /// <p>To deploy a model that isn't the latest solution version of your solution, specify the ARN of the solution version.</p>
24 /// <p>For more information about automatic campaign updates, see <a href="https://docs.aws.amazon.com/personalize/latest/dg/campaigns.html#create-campaign-automatic-latest-sv-update">Enabling automatic campaign updates</a>.</p>
25 pub fn solution_version_arn(&self) -> ::std::option::Option<&str> {
26 self.solution_version_arn.as_deref()
27 }
28 /// <p>Specifies the requested minimum provisioned transactions (recommendations) per second that Amazon Personalize will support. A high <code>minProvisionedTPS</code> will increase your bill. We recommend starting with 1 for <code>minProvisionedTPS</code> (the default). Track your usage using Amazon CloudWatch metrics, and increase the <code>minProvisionedTPS</code> as necessary.</p>
29 pub fn min_provisioned_tps(&self) -> ::std::option::Option<i32> {
30 self.min_provisioned_tps
31 }
32 /// <p>The configuration details of a campaign.</p>
33 pub fn campaign_config(&self) -> ::std::option::Option<&crate::types::CampaignConfig> {
34 self.campaign_config.as_ref()
35 }
36}
37impl UpdateCampaignInput {
38 /// Creates a new builder-style object to manufacture [`UpdateCampaignInput`](crate::operation::update_campaign::UpdateCampaignInput).
39 pub fn builder() -> crate::operation::update_campaign::builders::UpdateCampaignInputBuilder {
40 crate::operation::update_campaign::builders::UpdateCampaignInputBuilder::default()
41 }
42}
43
44/// A builder for [`UpdateCampaignInput`](crate::operation::update_campaign::UpdateCampaignInput).
45#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
46#[non_exhaustive]
47pub struct UpdateCampaignInputBuilder {
48 pub(crate) campaign_arn: ::std::option::Option<::std::string::String>,
49 pub(crate) solution_version_arn: ::std::option::Option<::std::string::String>,
50 pub(crate) min_provisioned_tps: ::std::option::Option<i32>,
51 pub(crate) campaign_config: ::std::option::Option<crate::types::CampaignConfig>,
52}
53impl UpdateCampaignInputBuilder {
54 /// <p>The Amazon Resource Name (ARN) of the campaign.</p>
55 /// This field is required.
56 pub fn campaign_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
57 self.campaign_arn = ::std::option::Option::Some(input.into());
58 self
59 }
60 /// <p>The Amazon Resource Name (ARN) of the campaign.</p>
61 pub fn set_campaign_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
62 self.campaign_arn = input;
63 self
64 }
65 /// <p>The Amazon Resource Name (ARN) of the campaign.</p>
66 pub fn get_campaign_arn(&self) -> &::std::option::Option<::std::string::String> {
67 &self.campaign_arn
68 }
69 /// <p>The Amazon Resource Name (ARN) of a new model to deploy. To specify the latest solution version of your solution, specify the ARN of your <i>solution</i> in <code>SolutionArn/$LATEST</code> format. You must use this format if you set <code>syncWithLatestSolutionVersion</code> to <code>True</code> in the <a href="https://docs.aws.amazon.com/personalize/latest/dg/API_CampaignConfig.html">CampaignConfig</a>.</p>
70 /// <p>To deploy a model that isn't the latest solution version of your solution, specify the ARN of the solution version.</p>
71 /// <p>For more information about automatic campaign updates, see <a href="https://docs.aws.amazon.com/personalize/latest/dg/campaigns.html#create-campaign-automatic-latest-sv-update">Enabling automatic campaign updates</a>.</p>
72 pub fn solution_version_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
73 self.solution_version_arn = ::std::option::Option::Some(input.into());
74 self
75 }
76 /// <p>The Amazon Resource Name (ARN) of a new model to deploy. To specify the latest solution version of your solution, specify the ARN of your <i>solution</i> in <code>SolutionArn/$LATEST</code> format. You must use this format if you set <code>syncWithLatestSolutionVersion</code> to <code>True</code> in the <a href="https://docs.aws.amazon.com/personalize/latest/dg/API_CampaignConfig.html">CampaignConfig</a>.</p>
77 /// <p>To deploy a model that isn't the latest solution version of your solution, specify the ARN of the solution version.</p>
78 /// <p>For more information about automatic campaign updates, see <a href="https://docs.aws.amazon.com/personalize/latest/dg/campaigns.html#create-campaign-automatic-latest-sv-update">Enabling automatic campaign updates</a>.</p>
79 pub fn set_solution_version_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
80 self.solution_version_arn = input;
81 self
82 }
83 /// <p>The Amazon Resource Name (ARN) of a new model to deploy. To specify the latest solution version of your solution, specify the ARN of your <i>solution</i> in <code>SolutionArn/$LATEST</code> format. You must use this format if you set <code>syncWithLatestSolutionVersion</code> to <code>True</code> in the <a href="https://docs.aws.amazon.com/personalize/latest/dg/API_CampaignConfig.html">CampaignConfig</a>.</p>
84 /// <p>To deploy a model that isn't the latest solution version of your solution, specify the ARN of the solution version.</p>
85 /// <p>For more information about automatic campaign updates, see <a href="https://docs.aws.amazon.com/personalize/latest/dg/campaigns.html#create-campaign-automatic-latest-sv-update">Enabling automatic campaign updates</a>.</p>
86 pub fn get_solution_version_arn(&self) -> &::std::option::Option<::std::string::String> {
87 &self.solution_version_arn
88 }
89 /// <p>Specifies the requested minimum provisioned transactions (recommendations) per second that Amazon Personalize will support. A high <code>minProvisionedTPS</code> will increase your bill. We recommend starting with 1 for <code>minProvisionedTPS</code> (the default). Track your usage using Amazon CloudWatch metrics, and increase the <code>minProvisionedTPS</code> as necessary.</p>
90 pub fn min_provisioned_tps(mut self, input: i32) -> Self {
91 self.min_provisioned_tps = ::std::option::Option::Some(input);
92 self
93 }
94 /// <p>Specifies the requested minimum provisioned transactions (recommendations) per second that Amazon Personalize will support. A high <code>minProvisionedTPS</code> will increase your bill. We recommend starting with 1 for <code>minProvisionedTPS</code> (the default). Track your usage using Amazon CloudWatch metrics, and increase the <code>minProvisionedTPS</code> as necessary.</p>
95 pub fn set_min_provisioned_tps(mut self, input: ::std::option::Option<i32>) -> Self {
96 self.min_provisioned_tps = input;
97 self
98 }
99 /// <p>Specifies the requested minimum provisioned transactions (recommendations) per second that Amazon Personalize will support. A high <code>minProvisionedTPS</code> will increase your bill. We recommend starting with 1 for <code>minProvisionedTPS</code> (the default). Track your usage using Amazon CloudWatch metrics, and increase the <code>minProvisionedTPS</code> as necessary.</p>
100 pub fn get_min_provisioned_tps(&self) -> &::std::option::Option<i32> {
101 &self.min_provisioned_tps
102 }
103 /// <p>The configuration details of a campaign.</p>
104 pub fn campaign_config(mut self, input: crate::types::CampaignConfig) -> Self {
105 self.campaign_config = ::std::option::Option::Some(input);
106 self
107 }
108 /// <p>The configuration details of a campaign.</p>
109 pub fn set_campaign_config(mut self, input: ::std::option::Option<crate::types::CampaignConfig>) -> Self {
110 self.campaign_config = input;
111 self
112 }
113 /// <p>The configuration details of a campaign.</p>
114 pub fn get_campaign_config(&self) -> &::std::option::Option<crate::types::CampaignConfig> {
115 &self.campaign_config
116 }
117 /// Consumes the builder and constructs a [`UpdateCampaignInput`](crate::operation::update_campaign::UpdateCampaignInput).
118 pub fn build(
119 self,
120 ) -> ::std::result::Result<crate::operation::update_campaign::UpdateCampaignInput, ::aws_smithy_types::error::operation::BuildError> {
121 ::std::result::Result::Ok(crate::operation::update_campaign::UpdateCampaignInput {
122 campaign_arn: self.campaign_arn,
123 solution_version_arn: self.solution_version_arn,
124 min_provisioned_tps: self.min_provisioned_tps,
125 campaign_config: self.campaign_config,
126 })
127 }
128}