aws_sdk_evidently/operation/update_launch/
_update_launch_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 UpdateLaunchInput {
6    /// <p>The name or ARN of the project that contains the launch that you want to update.</p>
7    pub project: ::std::option::Option<::std::string::String>,
8    /// <p>The name of the launch that is to be updated.</p>
9    pub launch: ::std::option::Option<::std::string::String>,
10    /// <p>An optional description for the launch.</p>
11    pub description: ::std::option::Option<::std::string::String>,
12    /// <p>An array of structures that contains the feature and variations that are to be used for the launch.</p>
13    pub groups: ::std::option::Option<::std::vec::Vec<crate::types::LaunchGroupConfig>>,
14    /// <p>An array of structures that define the metrics that will be used to monitor the launch performance.</p>
15    pub metric_monitors: ::std::option::Option<::std::vec::Vec<crate::types::MetricMonitorConfig>>,
16    /// <p>When Evidently assigns a particular user session to a launch, it must use a randomization ID to determine which variation the user session is served. This randomization ID is a combination of the entity ID and <code>randomizationSalt</code>. If you omit <code>randomizationSalt</code>, Evidently uses the launch name as the <code>randomizationSalt</code>.</p>
17    pub randomization_salt: ::std::option::Option<::std::string::String>,
18    /// <p>An array of structures that define the traffic allocation percentages among the feature variations during each step of the launch.</p>
19    pub scheduled_splits_config: ::std::option::Option<crate::types::ScheduledSplitsLaunchConfig>,
20}
21impl UpdateLaunchInput {
22    /// <p>The name or ARN of the project that contains the launch that you want to update.</p>
23    pub fn project(&self) -> ::std::option::Option<&str> {
24        self.project.as_deref()
25    }
26    /// <p>The name of the launch that is to be updated.</p>
27    pub fn launch(&self) -> ::std::option::Option<&str> {
28        self.launch.as_deref()
29    }
30    /// <p>An optional description for the launch.</p>
31    pub fn description(&self) -> ::std::option::Option<&str> {
32        self.description.as_deref()
33    }
34    /// <p>An array of structures that contains the feature and variations that are to be used for the launch.</p>
35    ///
36    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.groups.is_none()`.
37    pub fn groups(&self) -> &[crate::types::LaunchGroupConfig] {
38        self.groups.as_deref().unwrap_or_default()
39    }
40    /// <p>An array of structures that define the metrics that will be used to monitor the launch performance.</p>
41    ///
42    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.metric_monitors.is_none()`.
43    pub fn metric_monitors(&self) -> &[crate::types::MetricMonitorConfig] {
44        self.metric_monitors.as_deref().unwrap_or_default()
45    }
46    /// <p>When Evidently assigns a particular user session to a launch, it must use a randomization ID to determine which variation the user session is served. This randomization ID is a combination of the entity ID and <code>randomizationSalt</code>. If you omit <code>randomizationSalt</code>, Evidently uses the launch name as the <code>randomizationSalt</code>.</p>
47    pub fn randomization_salt(&self) -> ::std::option::Option<&str> {
48        self.randomization_salt.as_deref()
49    }
50    /// <p>An array of structures that define the traffic allocation percentages among the feature variations during each step of the launch.</p>
51    pub fn scheduled_splits_config(&self) -> ::std::option::Option<&crate::types::ScheduledSplitsLaunchConfig> {
52        self.scheduled_splits_config.as_ref()
53    }
54}
55impl UpdateLaunchInput {
56    /// Creates a new builder-style object to manufacture [`UpdateLaunchInput`](crate::operation::update_launch::UpdateLaunchInput).
57    pub fn builder() -> crate::operation::update_launch::builders::UpdateLaunchInputBuilder {
58        crate::operation::update_launch::builders::UpdateLaunchInputBuilder::default()
59    }
60}
61
62/// A builder for [`UpdateLaunchInput`](crate::operation::update_launch::UpdateLaunchInput).
63#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
64#[non_exhaustive]
65pub struct UpdateLaunchInputBuilder {
66    pub(crate) project: ::std::option::Option<::std::string::String>,
67    pub(crate) launch: ::std::option::Option<::std::string::String>,
68    pub(crate) description: ::std::option::Option<::std::string::String>,
69    pub(crate) groups: ::std::option::Option<::std::vec::Vec<crate::types::LaunchGroupConfig>>,
70    pub(crate) metric_monitors: ::std::option::Option<::std::vec::Vec<crate::types::MetricMonitorConfig>>,
71    pub(crate) randomization_salt: ::std::option::Option<::std::string::String>,
72    pub(crate) scheduled_splits_config: ::std::option::Option<crate::types::ScheduledSplitsLaunchConfig>,
73}
74impl UpdateLaunchInputBuilder {
75    /// <p>The name or ARN of the project that contains the launch that you want to update.</p>
76    /// This field is required.
77    pub fn project(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
78        self.project = ::std::option::Option::Some(input.into());
79        self
80    }
81    /// <p>The name or ARN of the project that contains the launch that you want to update.</p>
82    pub fn set_project(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
83        self.project = input;
84        self
85    }
86    /// <p>The name or ARN of the project that contains the launch that you want to update.</p>
87    pub fn get_project(&self) -> &::std::option::Option<::std::string::String> {
88        &self.project
89    }
90    /// <p>The name of the launch that is to be updated.</p>
91    /// This field is required.
92    pub fn launch(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
93        self.launch = ::std::option::Option::Some(input.into());
94        self
95    }
96    /// <p>The name of the launch that is to be updated.</p>
97    pub fn set_launch(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
98        self.launch = input;
99        self
100    }
101    /// <p>The name of the launch that is to be updated.</p>
102    pub fn get_launch(&self) -> &::std::option::Option<::std::string::String> {
103        &self.launch
104    }
105    /// <p>An optional description for the launch.</p>
106    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
107        self.description = ::std::option::Option::Some(input.into());
108        self
109    }
110    /// <p>An optional description for the launch.</p>
111    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
112        self.description = input;
113        self
114    }
115    /// <p>An optional description for the launch.</p>
116    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
117        &self.description
118    }
119    /// Appends an item to `groups`.
120    ///
121    /// To override the contents of this collection use [`set_groups`](Self::set_groups).
122    ///
123    /// <p>An array of structures that contains the feature and variations that are to be used for the launch.</p>
124    pub fn groups(mut self, input: crate::types::LaunchGroupConfig) -> Self {
125        let mut v = self.groups.unwrap_or_default();
126        v.push(input);
127        self.groups = ::std::option::Option::Some(v);
128        self
129    }
130    /// <p>An array of structures that contains the feature and variations that are to be used for the launch.</p>
131    pub fn set_groups(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::LaunchGroupConfig>>) -> Self {
132        self.groups = input;
133        self
134    }
135    /// <p>An array of structures that contains the feature and variations that are to be used for the launch.</p>
136    pub fn get_groups(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::LaunchGroupConfig>> {
137        &self.groups
138    }
139    /// Appends an item to `metric_monitors`.
140    ///
141    /// To override the contents of this collection use [`set_metric_monitors`](Self::set_metric_monitors).
142    ///
143    /// <p>An array of structures that define the metrics that will be used to monitor the launch performance.</p>
144    pub fn metric_monitors(mut self, input: crate::types::MetricMonitorConfig) -> Self {
145        let mut v = self.metric_monitors.unwrap_or_default();
146        v.push(input);
147        self.metric_monitors = ::std::option::Option::Some(v);
148        self
149    }
150    /// <p>An array of structures that define the metrics that will be used to monitor the launch performance.</p>
151    pub fn set_metric_monitors(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::MetricMonitorConfig>>) -> Self {
152        self.metric_monitors = input;
153        self
154    }
155    /// <p>An array of structures that define the metrics that will be used to monitor the launch performance.</p>
156    pub fn get_metric_monitors(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::MetricMonitorConfig>> {
157        &self.metric_monitors
158    }
159    /// <p>When Evidently assigns a particular user session to a launch, it must use a randomization ID to determine which variation the user session is served. This randomization ID is a combination of the entity ID and <code>randomizationSalt</code>. If you omit <code>randomizationSalt</code>, Evidently uses the launch name as the <code>randomizationSalt</code>.</p>
160    pub fn randomization_salt(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
161        self.randomization_salt = ::std::option::Option::Some(input.into());
162        self
163    }
164    /// <p>When Evidently assigns a particular user session to a launch, it must use a randomization ID to determine which variation the user session is served. This randomization ID is a combination of the entity ID and <code>randomizationSalt</code>. If you omit <code>randomizationSalt</code>, Evidently uses the launch name as the <code>randomizationSalt</code>.</p>
165    pub fn set_randomization_salt(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
166        self.randomization_salt = input;
167        self
168    }
169    /// <p>When Evidently assigns a particular user session to a launch, it must use a randomization ID to determine which variation the user session is served. This randomization ID is a combination of the entity ID and <code>randomizationSalt</code>. If you omit <code>randomizationSalt</code>, Evidently uses the launch name as the <code>randomizationSalt</code>.</p>
170    pub fn get_randomization_salt(&self) -> &::std::option::Option<::std::string::String> {
171        &self.randomization_salt
172    }
173    /// <p>An array of structures that define the traffic allocation percentages among the feature variations during each step of the launch.</p>
174    pub fn scheduled_splits_config(mut self, input: crate::types::ScheduledSplitsLaunchConfig) -> Self {
175        self.scheduled_splits_config = ::std::option::Option::Some(input);
176        self
177    }
178    /// <p>An array of structures that define the traffic allocation percentages among the feature variations during each step of the launch.</p>
179    pub fn set_scheduled_splits_config(mut self, input: ::std::option::Option<crate::types::ScheduledSplitsLaunchConfig>) -> Self {
180        self.scheduled_splits_config = input;
181        self
182    }
183    /// <p>An array of structures that define the traffic allocation percentages among the feature variations during each step of the launch.</p>
184    pub fn get_scheduled_splits_config(&self) -> &::std::option::Option<crate::types::ScheduledSplitsLaunchConfig> {
185        &self.scheduled_splits_config
186    }
187    /// Consumes the builder and constructs a [`UpdateLaunchInput`](crate::operation::update_launch::UpdateLaunchInput).
188    pub fn build(
189        self,
190    ) -> ::std::result::Result<crate::operation::update_launch::UpdateLaunchInput, ::aws_smithy_types::error::operation::BuildError> {
191        ::std::result::Result::Ok(crate::operation::update_launch::UpdateLaunchInput {
192            project: self.project,
193            launch: self.launch,
194            description: self.description,
195            groups: self.groups,
196            metric_monitors: self.metric_monitors,
197            randomization_salt: self.randomization_salt,
198            scheduled_splits_config: self.scheduled_splits_config,
199        })
200    }
201}