aws_sdk_connect/operation/create_prompt/_create_prompt_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 CreatePromptInput {
6 /// <p>The identifier of the Amazon Connect instance. You can <a href="https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html">find the instance ID</a> in the Amazon Resource Name (ARN) of the instance.</p>
7 pub instance_id: ::std::option::Option<::std::string::String>,
8 /// <p>The name of the prompt.</p>
9 pub name: ::std::option::Option<::std::string::String>,
10 /// <p>The description of the prompt.</p>
11 pub description: ::std::option::Option<::std::string::String>,
12 /// <p>The URI for the S3 bucket where the prompt is stored. You can provide S3 pre-signed URLs returned by the <a href="https://docs.aws.amazon.com/connect/latest/APIReference/API_GetPromptFile.html">GetPromptFile</a> API instead of providing S3 URIs.</p>
13 pub s3_uri: ::std::option::Option<::std::string::String>,
14 /// <p>The tags used to organize, track, or control access for this resource. For example, { "Tags": {"key1":"value1", "key2":"value2"} }.</p>
15 pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
16}
17impl CreatePromptInput {
18 /// <p>The identifier of the Amazon Connect instance. You can <a href="https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html">find the instance ID</a> in the Amazon Resource Name (ARN) of the instance.</p>
19 pub fn instance_id(&self) -> ::std::option::Option<&str> {
20 self.instance_id.as_deref()
21 }
22 /// <p>The name of the prompt.</p>
23 pub fn name(&self) -> ::std::option::Option<&str> {
24 self.name.as_deref()
25 }
26 /// <p>The description of the prompt.</p>
27 pub fn description(&self) -> ::std::option::Option<&str> {
28 self.description.as_deref()
29 }
30 /// <p>The URI for the S3 bucket where the prompt is stored. You can provide S3 pre-signed URLs returned by the <a href="https://docs.aws.amazon.com/connect/latest/APIReference/API_GetPromptFile.html">GetPromptFile</a> API instead of providing S3 URIs.</p>
31 pub fn s3_uri(&self) -> ::std::option::Option<&str> {
32 self.s3_uri.as_deref()
33 }
34 /// <p>The tags used to organize, track, or control access for this resource. For example, { "Tags": {"key1":"value1", "key2":"value2"} }.</p>
35 pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
36 self.tags.as_ref()
37 }
38}
39impl CreatePromptInput {
40 /// Creates a new builder-style object to manufacture [`CreatePromptInput`](crate::operation::create_prompt::CreatePromptInput).
41 pub fn builder() -> crate::operation::create_prompt::builders::CreatePromptInputBuilder {
42 crate::operation::create_prompt::builders::CreatePromptInputBuilder::default()
43 }
44}
45
46/// A builder for [`CreatePromptInput`](crate::operation::create_prompt::CreatePromptInput).
47#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
48#[non_exhaustive]
49pub struct CreatePromptInputBuilder {
50 pub(crate) instance_id: ::std::option::Option<::std::string::String>,
51 pub(crate) name: ::std::option::Option<::std::string::String>,
52 pub(crate) description: ::std::option::Option<::std::string::String>,
53 pub(crate) s3_uri: ::std::option::Option<::std::string::String>,
54 pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
55}
56impl CreatePromptInputBuilder {
57 /// <p>The identifier of the Amazon Connect instance. You can <a href="https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html">find the instance ID</a> in the Amazon Resource Name (ARN) of the instance.</p>
58 /// This field is required.
59 pub fn instance_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
60 self.instance_id = ::std::option::Option::Some(input.into());
61 self
62 }
63 /// <p>The identifier of the Amazon Connect instance. You can <a href="https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html">find the instance ID</a> in the Amazon Resource Name (ARN) of the instance.</p>
64 pub fn set_instance_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
65 self.instance_id = input;
66 self
67 }
68 /// <p>The identifier of the Amazon Connect instance. You can <a href="https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html">find the instance ID</a> in the Amazon Resource Name (ARN) of the instance.</p>
69 pub fn get_instance_id(&self) -> &::std::option::Option<::std::string::String> {
70 &self.instance_id
71 }
72 /// <p>The name of the prompt.</p>
73 /// This field is required.
74 pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
75 self.name = ::std::option::Option::Some(input.into());
76 self
77 }
78 /// <p>The name of the prompt.</p>
79 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
80 self.name = input;
81 self
82 }
83 /// <p>The name of the prompt.</p>
84 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
85 &self.name
86 }
87 /// <p>The description of the prompt.</p>
88 pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
89 self.description = ::std::option::Option::Some(input.into());
90 self
91 }
92 /// <p>The description of the prompt.</p>
93 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
94 self.description = input;
95 self
96 }
97 /// <p>The description of the prompt.</p>
98 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
99 &self.description
100 }
101 /// <p>The URI for the S3 bucket where the prompt is stored. You can provide S3 pre-signed URLs returned by the <a href="https://docs.aws.amazon.com/connect/latest/APIReference/API_GetPromptFile.html">GetPromptFile</a> API instead of providing S3 URIs.</p>
102 /// This field is required.
103 pub fn s3_uri(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
104 self.s3_uri = ::std::option::Option::Some(input.into());
105 self
106 }
107 /// <p>The URI for the S3 bucket where the prompt is stored. You can provide S3 pre-signed URLs returned by the <a href="https://docs.aws.amazon.com/connect/latest/APIReference/API_GetPromptFile.html">GetPromptFile</a> API instead of providing S3 URIs.</p>
108 pub fn set_s3_uri(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
109 self.s3_uri = input;
110 self
111 }
112 /// <p>The URI for the S3 bucket where the prompt is stored. You can provide S3 pre-signed URLs returned by the <a href="https://docs.aws.amazon.com/connect/latest/APIReference/API_GetPromptFile.html">GetPromptFile</a> API instead of providing S3 URIs.</p>
113 pub fn get_s3_uri(&self) -> &::std::option::Option<::std::string::String> {
114 &self.s3_uri
115 }
116 /// Adds a key-value pair to `tags`.
117 ///
118 /// To override the contents of this collection use [`set_tags`](Self::set_tags).
119 ///
120 /// <p>The tags used to organize, track, or control access for this resource. For example, { "Tags": {"key1":"value1", "key2":"value2"} }.</p>
121 pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
122 let mut hash_map = self.tags.unwrap_or_default();
123 hash_map.insert(k.into(), v.into());
124 self.tags = ::std::option::Option::Some(hash_map);
125 self
126 }
127 /// <p>The tags used to organize, track, or control access for this resource. For example, { "Tags": {"key1":"value1", "key2":"value2"} }.</p>
128 pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
129 self.tags = input;
130 self
131 }
132 /// <p>The tags used to organize, track, or control access for this resource. For example, { "Tags": {"key1":"value1", "key2":"value2"} }.</p>
133 pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
134 &self.tags
135 }
136 /// Consumes the builder and constructs a [`CreatePromptInput`](crate::operation::create_prompt::CreatePromptInput).
137 pub fn build(
138 self,
139 ) -> ::std::result::Result<crate::operation::create_prompt::CreatePromptInput, ::aws_smithy_types::error::operation::BuildError> {
140 ::std::result::Result::Ok(crate::operation::create_prompt::CreatePromptInput {
141 instance_id: self.instance_id,
142 name: self.name,
143 description: self.description,
144 s3_uri: self.s3_uri,
145 tags: self.tags,
146 })
147 }
148}