aws_sdk_pinpoint/operation/create_voice_template/_create_voice_template_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 CreateVoiceTemplateInput {
6 /// <p>The name of the message template. A template name must start with an alphanumeric character and can contain a maximum of 128 characters. The characters can be alphanumeric characters, underscores (_), or hyphens (-). Template names are case sensitive.</p>
7 pub template_name: ::std::option::Option<::std::string::String>,
8 /// <p>Specifies the content and settings for a message template that can be used in messages that are sent through the voice channel.</p>
9 pub voice_template_request: ::std::option::Option<crate::types::VoiceTemplateRequest>,
10}
11impl CreateVoiceTemplateInput {
12 /// <p>The name of the message template. A template name must start with an alphanumeric character and can contain a maximum of 128 characters. The characters can be alphanumeric characters, underscores (_), or hyphens (-). Template names are case sensitive.</p>
13 pub fn template_name(&self) -> ::std::option::Option<&str> {
14 self.template_name.as_deref()
15 }
16 /// <p>Specifies the content and settings for a message template that can be used in messages that are sent through the voice channel.</p>
17 pub fn voice_template_request(&self) -> ::std::option::Option<&crate::types::VoiceTemplateRequest> {
18 self.voice_template_request.as_ref()
19 }
20}
21impl CreateVoiceTemplateInput {
22 /// Creates a new builder-style object to manufacture [`CreateVoiceTemplateInput`](crate::operation::create_voice_template::CreateVoiceTemplateInput).
23 pub fn builder() -> crate::operation::create_voice_template::builders::CreateVoiceTemplateInputBuilder {
24 crate::operation::create_voice_template::builders::CreateVoiceTemplateInputBuilder::default()
25 }
26}
27
28/// A builder for [`CreateVoiceTemplateInput`](crate::operation::create_voice_template::CreateVoiceTemplateInput).
29#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
30#[non_exhaustive]
31pub struct CreateVoiceTemplateInputBuilder {
32 pub(crate) template_name: ::std::option::Option<::std::string::String>,
33 pub(crate) voice_template_request: ::std::option::Option<crate::types::VoiceTemplateRequest>,
34}
35impl CreateVoiceTemplateInputBuilder {
36 /// <p>The name of the message template. A template name must start with an alphanumeric character and can contain a maximum of 128 characters. The characters can be alphanumeric characters, underscores (_), or hyphens (-). Template names are case sensitive.</p>
37 /// This field is required.
38 pub fn template_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
39 self.template_name = ::std::option::Option::Some(input.into());
40 self
41 }
42 /// <p>The name of the message template. A template name must start with an alphanumeric character and can contain a maximum of 128 characters. The characters can be alphanumeric characters, underscores (_), or hyphens (-). Template names are case sensitive.</p>
43 pub fn set_template_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
44 self.template_name = input;
45 self
46 }
47 /// <p>The name of the message template. A template name must start with an alphanumeric character and can contain a maximum of 128 characters. The characters can be alphanumeric characters, underscores (_), or hyphens (-). Template names are case sensitive.</p>
48 pub fn get_template_name(&self) -> &::std::option::Option<::std::string::String> {
49 &self.template_name
50 }
51 /// <p>Specifies the content and settings for a message template that can be used in messages that are sent through the voice channel.</p>
52 /// This field is required.
53 pub fn voice_template_request(mut self, input: crate::types::VoiceTemplateRequest) -> Self {
54 self.voice_template_request = ::std::option::Option::Some(input);
55 self
56 }
57 /// <p>Specifies the content and settings for a message template that can be used in messages that are sent through the voice channel.</p>
58 pub fn set_voice_template_request(mut self, input: ::std::option::Option<crate::types::VoiceTemplateRequest>) -> Self {
59 self.voice_template_request = input;
60 self
61 }
62 /// <p>Specifies the content and settings for a message template that can be used in messages that are sent through the voice channel.</p>
63 pub fn get_voice_template_request(&self) -> &::std::option::Option<crate::types::VoiceTemplateRequest> {
64 &self.voice_template_request
65 }
66 /// Consumes the builder and constructs a [`CreateVoiceTemplateInput`](crate::operation::create_voice_template::CreateVoiceTemplateInput).
67 pub fn build(
68 self,
69 ) -> ::std::result::Result<crate::operation::create_voice_template::CreateVoiceTemplateInput, ::aws_smithy_types::error::operation::BuildError>
70 {
71 ::std::result::Result::Ok(crate::operation::create_voice_template::CreateVoiceTemplateInput {
72 template_name: self.template_name,
73 voice_template_request: self.voice_template_request,
74 })
75 }
76}