aws_sdk_pinpointsmsvoice/types/
_ssml_message_type.rs1#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct SsmlMessageType {
7 pub language_code: ::std::option::Option<::std::string::String>,
9 pub text: ::std::option::Option<::std::string::String>,
11 pub voice_id: ::std::option::Option<::std::string::String>,
13}
14impl SsmlMessageType {
15 pub fn language_code(&self) -> ::std::option::Option<&str> {
17 self.language_code.as_deref()
18 }
19 pub fn text(&self) -> ::std::option::Option<&str> {
21 self.text.as_deref()
22 }
23 pub fn voice_id(&self) -> ::std::option::Option<&str> {
25 self.voice_id.as_deref()
26 }
27}
28impl SsmlMessageType {
29 pub fn builder() -> crate::types::builders::SsmlMessageTypeBuilder {
31 crate::types::builders::SsmlMessageTypeBuilder::default()
32 }
33}
34
35#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
37#[non_exhaustive]
38pub struct SsmlMessageTypeBuilder {
39 pub(crate) language_code: ::std::option::Option<::std::string::String>,
40 pub(crate) text: ::std::option::Option<::std::string::String>,
41 pub(crate) voice_id: ::std::option::Option<::std::string::String>,
42}
43impl SsmlMessageTypeBuilder {
44 pub fn language_code(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
46 self.language_code = ::std::option::Option::Some(input.into());
47 self
48 }
49 pub fn set_language_code(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
51 self.language_code = input;
52 self
53 }
54 pub fn get_language_code(&self) -> &::std::option::Option<::std::string::String> {
56 &self.language_code
57 }
58 pub fn text(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
60 self.text = ::std::option::Option::Some(input.into());
61 self
62 }
63 pub fn set_text(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
65 self.text = input;
66 self
67 }
68 pub fn get_text(&self) -> &::std::option::Option<::std::string::String> {
70 &self.text
71 }
72 pub fn voice_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
74 self.voice_id = ::std::option::Option::Some(input.into());
75 self
76 }
77 pub fn set_voice_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
79 self.voice_id = input;
80 self
81 }
82 pub fn get_voice_id(&self) -> &::std::option::Option<::std::string::String> {
84 &self.voice_id
85 }
86 pub fn build(self) -> crate::types::SsmlMessageType {
88 crate::types::SsmlMessageType {
89 language_code: self.language_code,
90 text: self.text,
91 voice_id: self.voice_id,
92 }
93 }
94}