aws_sdk_evidently/operation/create_project/
_create_project_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 CreateProjectInput {
6    /// <p>The name for the project.</p>
7    pub name: ::std::option::Option<::std::string::String>,
8    /// <p>An optional description of the project.</p>
9    pub description: ::std::option::Option<::std::string::String>,
10    /// <p>A structure that contains information about where Evidently is to store evaluation events for longer term storage, if you choose to do so. If you choose not to store these events, Evidently deletes them after using them to produce metrics and other experiment results that you can view.</p>
11    pub data_delivery: ::std::option::Option<crate::types::ProjectDataDeliveryConfig>,
12    /// <p>Use this parameter if the project will use <i>client-side evaluation powered by AppConfig</i>. Client-side evaluation allows your application to assign variations to user sessions locally instead of by calling the <a href="https://docs.aws.amazon.com/cloudwatchevidently/latest/APIReference/API_EvaluateFeature.html">EvaluateFeature</a> operation. This mitigates the latency and availability risks that come with an API call. For more information, see <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Evidently-client-side-evaluation.html"> Client-side evaluation - powered by AppConfig.</a></p>
13    /// <p>This parameter is a structure that contains information about the AppConfig application and environment that will be used as for client-side evaluation.</p>
14    /// <p>To create a project that uses client-side evaluation, you must have the <code>evidently:ExportProjectAsConfiguration</code> permission.</p>
15    pub app_config_resource: ::std::option::Option<crate::types::ProjectAppConfigResourceConfig>,
16    /// <p>Assigns one or more tags (key-value pairs) to the project.</p>
17    /// <p>Tags can help you organize and categorize your resources. You can also use them to scope user permissions by granting a user permission to access or change only resources with certain tag values.</p>
18    /// <p>Tags don't have any semantic meaning to Amazon Web Services and are interpreted strictly as strings of characters.</p>
19    /// <p>You can associate as many as 50 tags with a project.</p>
20    /// <p>For more information, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html">Tagging Amazon Web Services resources</a>.</p>
21    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
22}
23impl CreateProjectInput {
24    /// <p>The name for the project.</p>
25    pub fn name(&self) -> ::std::option::Option<&str> {
26        self.name.as_deref()
27    }
28    /// <p>An optional description of the project.</p>
29    pub fn description(&self) -> ::std::option::Option<&str> {
30        self.description.as_deref()
31    }
32    /// <p>A structure that contains information about where Evidently is to store evaluation events for longer term storage, if you choose to do so. If you choose not to store these events, Evidently deletes them after using them to produce metrics and other experiment results that you can view.</p>
33    pub fn data_delivery(&self) -> ::std::option::Option<&crate::types::ProjectDataDeliveryConfig> {
34        self.data_delivery.as_ref()
35    }
36    /// <p>Use this parameter if the project will use <i>client-side evaluation powered by AppConfig</i>. Client-side evaluation allows your application to assign variations to user sessions locally instead of by calling the <a href="https://docs.aws.amazon.com/cloudwatchevidently/latest/APIReference/API_EvaluateFeature.html">EvaluateFeature</a> operation. This mitigates the latency and availability risks that come with an API call. For more information, see <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Evidently-client-side-evaluation.html"> Client-side evaluation - powered by AppConfig.</a></p>
37    /// <p>This parameter is a structure that contains information about the AppConfig application and environment that will be used as for client-side evaluation.</p>
38    /// <p>To create a project that uses client-side evaluation, you must have the <code>evidently:ExportProjectAsConfiguration</code> permission.</p>
39    pub fn app_config_resource(&self) -> ::std::option::Option<&crate::types::ProjectAppConfigResourceConfig> {
40        self.app_config_resource.as_ref()
41    }
42    /// <p>Assigns one or more tags (key-value pairs) to the project.</p>
43    /// <p>Tags can help you organize and categorize your resources. You can also use them to scope user permissions by granting a user permission to access or change only resources with certain tag values.</p>
44    /// <p>Tags don't have any semantic meaning to Amazon Web Services and are interpreted strictly as strings of characters.</p>
45    /// <p>You can associate as many as 50 tags with a project.</p>
46    /// <p>For more information, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html">Tagging Amazon Web Services resources</a>.</p>
47    pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
48        self.tags.as_ref()
49    }
50}
51impl CreateProjectInput {
52    /// Creates a new builder-style object to manufacture [`CreateProjectInput`](crate::operation::create_project::CreateProjectInput).
53    pub fn builder() -> crate::operation::create_project::builders::CreateProjectInputBuilder {
54        crate::operation::create_project::builders::CreateProjectInputBuilder::default()
55    }
56}
57
58/// A builder for [`CreateProjectInput`](crate::operation::create_project::CreateProjectInput).
59#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
60#[non_exhaustive]
61pub struct CreateProjectInputBuilder {
62    pub(crate) name: ::std::option::Option<::std::string::String>,
63    pub(crate) description: ::std::option::Option<::std::string::String>,
64    pub(crate) data_delivery: ::std::option::Option<crate::types::ProjectDataDeliveryConfig>,
65    pub(crate) app_config_resource: ::std::option::Option<crate::types::ProjectAppConfigResourceConfig>,
66    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
67}
68impl CreateProjectInputBuilder {
69    /// <p>The name for the project.</p>
70    /// This field is required.
71    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
72        self.name = ::std::option::Option::Some(input.into());
73        self
74    }
75    /// <p>The name for the project.</p>
76    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
77        self.name = input;
78        self
79    }
80    /// <p>The name for the project.</p>
81    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
82        &self.name
83    }
84    /// <p>An optional description of the project.</p>
85    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
86        self.description = ::std::option::Option::Some(input.into());
87        self
88    }
89    /// <p>An optional description of the project.</p>
90    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
91        self.description = input;
92        self
93    }
94    /// <p>An optional description of the project.</p>
95    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
96        &self.description
97    }
98    /// <p>A structure that contains information about where Evidently is to store evaluation events for longer term storage, if you choose to do so. If you choose not to store these events, Evidently deletes them after using them to produce metrics and other experiment results that you can view.</p>
99    pub fn data_delivery(mut self, input: crate::types::ProjectDataDeliveryConfig) -> Self {
100        self.data_delivery = ::std::option::Option::Some(input);
101        self
102    }
103    /// <p>A structure that contains information about where Evidently is to store evaluation events for longer term storage, if you choose to do so. If you choose not to store these events, Evidently deletes them after using them to produce metrics and other experiment results that you can view.</p>
104    pub fn set_data_delivery(mut self, input: ::std::option::Option<crate::types::ProjectDataDeliveryConfig>) -> Self {
105        self.data_delivery = input;
106        self
107    }
108    /// <p>A structure that contains information about where Evidently is to store evaluation events for longer term storage, if you choose to do so. If you choose not to store these events, Evidently deletes them after using them to produce metrics and other experiment results that you can view.</p>
109    pub fn get_data_delivery(&self) -> &::std::option::Option<crate::types::ProjectDataDeliveryConfig> {
110        &self.data_delivery
111    }
112    /// <p>Use this parameter if the project will use <i>client-side evaluation powered by AppConfig</i>. Client-side evaluation allows your application to assign variations to user sessions locally instead of by calling the <a href="https://docs.aws.amazon.com/cloudwatchevidently/latest/APIReference/API_EvaluateFeature.html">EvaluateFeature</a> operation. This mitigates the latency and availability risks that come with an API call. For more information, see <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Evidently-client-side-evaluation.html"> Client-side evaluation - powered by AppConfig.</a></p>
113    /// <p>This parameter is a structure that contains information about the AppConfig application and environment that will be used as for client-side evaluation.</p>
114    /// <p>To create a project that uses client-side evaluation, you must have the <code>evidently:ExportProjectAsConfiguration</code> permission.</p>
115    pub fn app_config_resource(mut self, input: crate::types::ProjectAppConfigResourceConfig) -> Self {
116        self.app_config_resource = ::std::option::Option::Some(input);
117        self
118    }
119    /// <p>Use this parameter if the project will use <i>client-side evaluation powered by AppConfig</i>. Client-side evaluation allows your application to assign variations to user sessions locally instead of by calling the <a href="https://docs.aws.amazon.com/cloudwatchevidently/latest/APIReference/API_EvaluateFeature.html">EvaluateFeature</a> operation. This mitigates the latency and availability risks that come with an API call. For more information, see <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Evidently-client-side-evaluation.html"> Client-side evaluation - powered by AppConfig.</a></p>
120    /// <p>This parameter is a structure that contains information about the AppConfig application and environment that will be used as for client-side evaluation.</p>
121    /// <p>To create a project that uses client-side evaluation, you must have the <code>evidently:ExportProjectAsConfiguration</code> permission.</p>
122    pub fn set_app_config_resource(mut self, input: ::std::option::Option<crate::types::ProjectAppConfigResourceConfig>) -> Self {
123        self.app_config_resource = input;
124        self
125    }
126    /// <p>Use this parameter if the project will use <i>client-side evaluation powered by AppConfig</i>. Client-side evaluation allows your application to assign variations to user sessions locally instead of by calling the <a href="https://docs.aws.amazon.com/cloudwatchevidently/latest/APIReference/API_EvaluateFeature.html">EvaluateFeature</a> operation. This mitigates the latency and availability risks that come with an API call. For more information, see <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Evidently-client-side-evaluation.html"> Client-side evaluation - powered by AppConfig.</a></p>
127    /// <p>This parameter is a structure that contains information about the AppConfig application and environment that will be used as for client-side evaluation.</p>
128    /// <p>To create a project that uses client-side evaluation, you must have the <code>evidently:ExportProjectAsConfiguration</code> permission.</p>
129    pub fn get_app_config_resource(&self) -> &::std::option::Option<crate::types::ProjectAppConfigResourceConfig> {
130        &self.app_config_resource
131    }
132    /// Adds a key-value pair to `tags`.
133    ///
134    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
135    ///
136    /// <p>Assigns one or more tags (key-value pairs) to the project.</p>
137    /// <p>Tags can help you organize and categorize your resources. You can also use them to scope user permissions by granting a user permission to access or change only resources with certain tag values.</p>
138    /// <p>Tags don't have any semantic meaning to Amazon Web Services and are interpreted strictly as strings of characters.</p>
139    /// <p>You can associate as many as 50 tags with a project.</p>
140    /// <p>For more information, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html">Tagging Amazon Web Services resources</a>.</p>
141    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
142        let mut hash_map = self.tags.unwrap_or_default();
143        hash_map.insert(k.into(), v.into());
144        self.tags = ::std::option::Option::Some(hash_map);
145        self
146    }
147    /// <p>Assigns one or more tags (key-value pairs) to the project.</p>
148    /// <p>Tags can help you organize and categorize your resources. You can also use them to scope user permissions by granting a user permission to access or change only resources with certain tag values.</p>
149    /// <p>Tags don't have any semantic meaning to Amazon Web Services and are interpreted strictly as strings of characters.</p>
150    /// <p>You can associate as many as 50 tags with a project.</p>
151    /// <p>For more information, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html">Tagging Amazon Web Services resources</a>.</p>
152    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
153        self.tags = input;
154        self
155    }
156    /// <p>Assigns one or more tags (key-value pairs) to the project.</p>
157    /// <p>Tags can help you organize and categorize your resources. You can also use them to scope user permissions by granting a user permission to access or change only resources with certain tag values.</p>
158    /// <p>Tags don't have any semantic meaning to Amazon Web Services and are interpreted strictly as strings of characters.</p>
159    /// <p>You can associate as many as 50 tags with a project.</p>
160    /// <p>For more information, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html">Tagging Amazon Web Services resources</a>.</p>
161    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
162        &self.tags
163    }
164    /// Consumes the builder and constructs a [`CreateProjectInput`](crate::operation::create_project::CreateProjectInput).
165    pub fn build(
166        self,
167    ) -> ::std::result::Result<crate::operation::create_project::CreateProjectInput, ::aws_smithy_types::error::operation::BuildError> {
168        ::std::result::Result::Ok(crate::operation::create_project::CreateProjectInput {
169            name: self.name,
170            description: self.description,
171            data_delivery: self.data_delivery,
172            app_config_resource: self.app_config_resource,
173            tags: self.tags,
174        })
175    }
176}