1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>Provides information about the content and settings for a message template that can be used in messages that are sent through the voice channel.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct VoiceTemplateResponse {
/// <p>The Amazon Resource Name (ARN) of the message template.</p>
pub arn: ::std::option::Option<::std::string::String>,
/// <p>The text of the script that's used in messages that are based on the message template, in plain text format.</p>
pub body: ::std::option::Option<::std::string::String>,
/// <p>The date, in ISO 8601 format, when the message template was created.</p>
pub creation_date: ::std::option::Option<::std::string::String>,
/// <p>The JSON object that specifies the default values that are used for message variables in the message template. This object is a set of key-value pairs. Each key defines a message variable in the template. The corresponding value defines the default value for that variable.</p>
pub default_substitutions: ::std::option::Option<::std::string::String>,
/// <p>The code for the language that's used when synthesizing the text of the script in messages that are based on the message template. For a list of supported languages and the code for each one, see the <a href="https://docs.aws.amazon.com/polly/latest/dg/what-is.html">Amazon Polly Developer Guide</a>.</p>
pub language_code: ::std::option::Option<::std::string::String>,
/// <p>The date, in ISO 8601 format, when the message template was last modified.</p>
pub last_modified_date: ::std::option::Option<::std::string::String>,
/// <p>A string-to-string map of key-value pairs that identifies the tags that are associated with the message template. Each tag consists of a required tag key and an associated tag value.</p>
pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
/// <p>The custom description of the message template.</p>
pub template_description: ::std::option::Option<::std::string::String>,
/// <p>The name of the message template.</p>
pub template_name: ::std::option::Option<::std::string::String>,
/// <p>The type of channel that the message template is designed for. For a voice template, this value is VOICE.</p>
pub template_type: ::std::option::Option<crate::types::TemplateType>,
/// <p>The unique identifier, as an integer, for the active version of the message template, or the version of the template that you specified by using the version parameter in your request.</p>
pub version: ::std::option::Option<::std::string::String>,
/// <p>The name of the voice that's used when delivering messages that are based on the message template. For a list of supported voices, see the <a href="https://docs.aws.amazon.com/polly/latest/dg/what-is.html">Amazon Polly Developer Guide</a>.</p>
pub voice_id: ::std::option::Option<::std::string::String>,
}
impl VoiceTemplateResponse {
/// <p>The Amazon Resource Name (ARN) of the message template.</p>
pub fn arn(&self) -> ::std::option::Option<&str> {
self.arn.as_deref()
}
/// <p>The text of the script that's used in messages that are based on the message template, in plain text format.</p>
pub fn body(&self) -> ::std::option::Option<&str> {
self.body.as_deref()
}
/// <p>The date, in ISO 8601 format, when the message template was created.</p>
pub fn creation_date(&self) -> ::std::option::Option<&str> {
self.creation_date.as_deref()
}
/// <p>The JSON object that specifies the default values that are used for message variables in the message template. This object is a set of key-value pairs. Each key defines a message variable in the template. The corresponding value defines the default value for that variable.</p>
pub fn default_substitutions(&self) -> ::std::option::Option<&str> {
self.default_substitutions.as_deref()
}
/// <p>The code for the language that's used when synthesizing the text of the script in messages that are based on the message template. For a list of supported languages and the code for each one, see the <a href="https://docs.aws.amazon.com/polly/latest/dg/what-is.html">Amazon Polly Developer Guide</a>.</p>
pub fn language_code(&self) -> ::std::option::Option<&str> {
self.language_code.as_deref()
}
/// <p>The date, in ISO 8601 format, when the message template was last modified.</p>
pub fn last_modified_date(&self) -> ::std::option::Option<&str> {
self.last_modified_date.as_deref()
}
/// <p>A string-to-string map of key-value pairs that identifies the tags that are associated with the message template. Each tag consists of a required tag key and an associated tag value.</p>
pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
self.tags.as_ref()
}
/// <p>The custom description of the message template.</p>
pub fn template_description(&self) -> ::std::option::Option<&str> {
self.template_description.as_deref()
}
/// <p>The name of the message template.</p>
pub fn template_name(&self) -> ::std::option::Option<&str> {
self.template_name.as_deref()
}
/// <p>The type of channel that the message template is designed for. For a voice template, this value is VOICE.</p>
pub fn template_type(&self) -> ::std::option::Option<&crate::types::TemplateType> {
self.template_type.as_ref()
}
/// <p>The unique identifier, as an integer, for the active version of the message template, or the version of the template that you specified by using the version parameter in your request.</p>
pub fn version(&self) -> ::std::option::Option<&str> {
self.version.as_deref()
}
/// <p>The name of the voice that's used when delivering messages that are based on the message template. For a list of supported voices, see the <a href="https://docs.aws.amazon.com/polly/latest/dg/what-is.html">Amazon Polly Developer Guide</a>.</p>
pub fn voice_id(&self) -> ::std::option::Option<&str> {
self.voice_id.as_deref()
}
}
impl VoiceTemplateResponse {
/// Creates a new builder-style object to manufacture [`VoiceTemplateResponse`](crate::types::VoiceTemplateResponse).
pub fn builder() -> crate::types::builders::VoiceTemplateResponseBuilder {
crate::types::builders::VoiceTemplateResponseBuilder::default()
}
}
/// A builder for [`VoiceTemplateResponse`](crate::types::VoiceTemplateResponse).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct VoiceTemplateResponseBuilder {
pub(crate) arn: ::std::option::Option<::std::string::String>,
pub(crate) body: ::std::option::Option<::std::string::String>,
pub(crate) creation_date: ::std::option::Option<::std::string::String>,
pub(crate) default_substitutions: ::std::option::Option<::std::string::String>,
pub(crate) language_code: ::std::option::Option<::std::string::String>,
pub(crate) last_modified_date: ::std::option::Option<::std::string::String>,
pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
pub(crate) template_description: ::std::option::Option<::std::string::String>,
pub(crate) template_name: ::std::option::Option<::std::string::String>,
pub(crate) template_type: ::std::option::Option<crate::types::TemplateType>,
pub(crate) version: ::std::option::Option<::std::string::String>,
pub(crate) voice_id: ::std::option::Option<::std::string::String>,
}
impl VoiceTemplateResponseBuilder {
/// <p>The Amazon Resource Name (ARN) of the message template.</p>
pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.arn = ::std::option::Option::Some(input.into());
self
}
/// <p>The Amazon Resource Name (ARN) of the message template.</p>
pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.arn = input;
self
}
/// <p>The Amazon Resource Name (ARN) of the message template.</p>
pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.arn
}
/// <p>The text of the script that's used in messages that are based on the message template, in plain text format.</p>
pub fn body(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.body = ::std::option::Option::Some(input.into());
self
}
/// <p>The text of the script that's used in messages that are based on the message template, in plain text format.</p>
pub fn set_body(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.body = input;
self
}
/// <p>The text of the script that's used in messages that are based on the message template, in plain text format.</p>
pub fn get_body(&self) -> &::std::option::Option<::std::string::String> {
&self.body
}
/// <p>The date, in ISO 8601 format, when the message template was created.</p>
pub fn creation_date(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.creation_date = ::std::option::Option::Some(input.into());
self
}
/// <p>The date, in ISO 8601 format, when the message template was created.</p>
pub fn set_creation_date(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.creation_date = input;
self
}
/// <p>The date, in ISO 8601 format, when the message template was created.</p>
pub fn get_creation_date(&self) -> &::std::option::Option<::std::string::String> {
&self.creation_date
}
/// <p>The JSON object that specifies the default values that are used for message variables in the message template. This object is a set of key-value pairs. Each key defines a message variable in the template. The corresponding value defines the default value for that variable.</p>
pub fn default_substitutions(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.default_substitutions = ::std::option::Option::Some(input.into());
self
}
/// <p>The JSON object that specifies the default values that are used for message variables in the message template. This object is a set of key-value pairs. Each key defines a message variable in the template. The corresponding value defines the default value for that variable.</p>
pub fn set_default_substitutions(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.default_substitutions = input;
self
}
/// <p>The JSON object that specifies the default values that are used for message variables in the message template. This object is a set of key-value pairs. Each key defines a message variable in the template. The corresponding value defines the default value for that variable.</p>
pub fn get_default_substitutions(&self) -> &::std::option::Option<::std::string::String> {
&self.default_substitutions
}
/// <p>The code for the language that's used when synthesizing the text of the script in messages that are based on the message template. For a list of supported languages and the code for each one, see the <a href="https://docs.aws.amazon.com/polly/latest/dg/what-is.html">Amazon Polly Developer Guide</a>.</p>
pub fn language_code(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.language_code = ::std::option::Option::Some(input.into());
self
}
/// <p>The code for the language that's used when synthesizing the text of the script in messages that are based on the message template. For a list of supported languages and the code for each one, see the <a href="https://docs.aws.amazon.com/polly/latest/dg/what-is.html">Amazon Polly Developer Guide</a>.</p>
pub fn set_language_code(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.language_code = input;
self
}
/// <p>The code for the language that's used when synthesizing the text of the script in messages that are based on the message template. For a list of supported languages and the code for each one, see the <a href="https://docs.aws.amazon.com/polly/latest/dg/what-is.html">Amazon Polly Developer Guide</a>.</p>
pub fn get_language_code(&self) -> &::std::option::Option<::std::string::String> {
&self.language_code
}
/// <p>The date, in ISO 8601 format, when the message template was last modified.</p>
pub fn last_modified_date(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.last_modified_date = ::std::option::Option::Some(input.into());
self
}
/// <p>The date, in ISO 8601 format, when the message template was last modified.</p>
pub fn set_last_modified_date(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.last_modified_date = input;
self
}
/// <p>The date, in ISO 8601 format, when the message template was last modified.</p>
pub fn get_last_modified_date(&self) -> &::std::option::Option<::std::string::String> {
&self.last_modified_date
}
/// Adds a key-value pair to `tags`.
///
/// To override the contents of this collection use [`set_tags`](Self::set_tags).
///
/// <p>A string-to-string map of key-value pairs that identifies the tags that are associated with the message template. Each tag consists of a required tag key and an associated tag value.</p>
pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut hash_map = self.tags.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.tags = ::std::option::Option::Some(hash_map);
self
}
/// <p>A string-to-string map of key-value pairs that identifies the tags that are associated with the message template. Each tag consists of a required tag key and an associated tag value.</p>
pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
self.tags = input;
self
}
/// <p>A string-to-string map of key-value pairs that identifies the tags that are associated with the message template. Each tag consists of a required tag key and an associated tag value.</p>
pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
&self.tags
}
/// <p>The custom description of the message template.</p>
pub fn template_description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.template_description = ::std::option::Option::Some(input.into());
self
}
/// <p>The custom description of the message template.</p>
pub fn set_template_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.template_description = input;
self
}
/// <p>The custom description of the message template.</p>
pub fn get_template_description(&self) -> &::std::option::Option<::std::string::String> {
&self.template_description
}
/// <p>The name of the message template.</p>
pub fn template_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.template_name = ::std::option::Option::Some(input.into());
self
}
/// <p>The name of the message template.</p>
pub fn set_template_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.template_name = input;
self
}
/// <p>The name of the message template.</p>
pub fn get_template_name(&self) -> &::std::option::Option<::std::string::String> {
&self.template_name
}
/// <p>The type of channel that the message template is designed for. For a voice template, this value is VOICE.</p>
pub fn template_type(mut self, input: crate::types::TemplateType) -> Self {
self.template_type = ::std::option::Option::Some(input);
self
}
/// <p>The type of channel that the message template is designed for. For a voice template, this value is VOICE.</p>
pub fn set_template_type(mut self, input: ::std::option::Option<crate::types::TemplateType>) -> Self {
self.template_type = input;
self
}
/// <p>The type of channel that the message template is designed for. For a voice template, this value is VOICE.</p>
pub fn get_template_type(&self) -> &::std::option::Option<crate::types::TemplateType> {
&self.template_type
}
/// <p>The unique identifier, as an integer, for the active version of the message template, or the version of the template that you specified by using the version parameter in your request.</p>
pub fn version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.version = ::std::option::Option::Some(input.into());
self
}
/// <p>The unique identifier, as an integer, for the active version of the message template, or the version of the template that you specified by using the version parameter in your request.</p>
pub fn set_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.version = input;
self
}
/// <p>The unique identifier, as an integer, for the active version of the message template, or the version of the template that you specified by using the version parameter in your request.</p>
pub fn get_version(&self) -> &::std::option::Option<::std::string::String> {
&self.version
}
/// <p>The name of the voice that's used when delivering messages that are based on the message template. For a list of supported voices, see the <a href="https://docs.aws.amazon.com/polly/latest/dg/what-is.html">Amazon Polly Developer Guide</a>.</p>
pub fn voice_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.voice_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The name of the voice that's used when delivering messages that are based on the message template. For a list of supported voices, see the <a href="https://docs.aws.amazon.com/polly/latest/dg/what-is.html">Amazon Polly Developer Guide</a>.</p>
pub fn set_voice_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.voice_id = input;
self
}
/// <p>The name of the voice that's used when delivering messages that are based on the message template. For a list of supported voices, see the <a href="https://docs.aws.amazon.com/polly/latest/dg/what-is.html">Amazon Polly Developer Guide</a>.</p>
pub fn get_voice_id(&self) -> &::std::option::Option<::std::string::String> {
&self.voice_id
}
/// Consumes the builder and constructs a [`VoiceTemplateResponse`](crate::types::VoiceTemplateResponse).
pub fn build(self) -> crate::types::VoiceTemplateResponse {
crate::types::VoiceTemplateResponse {
arn: self.arn,
body: self.body,
creation_date: self.creation_date,
default_substitutions: self.default_substitutions,
language_code: self.language_code,
last_modified_date: self.last_modified_date,
tags: self.tags,
template_description: self.template_description,
template_name: self.template_name,
template_type: self.template_type,
version: self.version,
voice_id: self.voice_id,
}
}
}