aws-sdk-pinpointsmsvoicev2 1.124.0

AWS SDK for Amazon Pinpoint SMS Voice V2
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct PutKeywordInput {
    /// <p>The origination identity to use such as a PhoneNumberId, PhoneNumberArn, SenderId or SenderIdArn. You can use <code>DescribePhoneNumbers</code> get the values for PhoneNumberId and PhoneNumberArn while <code>DescribeSenderIds</code> can be used to get the values for SenderId and SenderIdArn.</p><important>
    /// <p>If you are using a shared End User Messaging SMS resource then you must use the full Amazon Resource Name(ARN).</p>
    /// </important>
    pub origination_identity: ::std::option::Option<::std::string::String>,
    /// <p>The new keyword to add.</p>
    pub keyword: ::std::option::Option<::std::string::String>,
    /// <p>The message associated with the keyword.</p>
    pub keyword_message: ::std::option::Option<::std::string::String>,
    /// <p>The action to perform for the new keyword when it is received.</p>
    /// <ul>
    /// <li>
    /// <p>AUTOMATIC_RESPONSE: A message is sent to the recipient.</p></li>
    /// <li>
    /// <p>OPT_OUT: Keeps the recipient from receiving future messages.</p></li>
    /// <li>
    /// <p>OPT_IN: The recipient wants to receive future messages.</p></li>
    /// </ul>
    pub keyword_action: ::std::option::Option<crate::types::KeywordAction>,
}
impl PutKeywordInput {
    /// <p>The origination identity to use such as a PhoneNumberId, PhoneNumberArn, SenderId or SenderIdArn. You can use <code>DescribePhoneNumbers</code> get the values for PhoneNumberId and PhoneNumberArn while <code>DescribeSenderIds</code> can be used to get the values for SenderId and SenderIdArn.</p><important>
    /// <p>If you are using a shared End User Messaging SMS resource then you must use the full Amazon Resource Name(ARN).</p>
    /// </important>
    pub fn origination_identity(&self) -> ::std::option::Option<&str> {
        self.origination_identity.as_deref()
    }
    /// <p>The new keyword to add.</p>
    pub fn keyword(&self) -> ::std::option::Option<&str> {
        self.keyword.as_deref()
    }
    /// <p>The message associated with the keyword.</p>
    pub fn keyword_message(&self) -> ::std::option::Option<&str> {
        self.keyword_message.as_deref()
    }
    /// <p>The action to perform for the new keyword when it is received.</p>
    /// <ul>
    /// <li>
    /// <p>AUTOMATIC_RESPONSE: A message is sent to the recipient.</p></li>
    /// <li>
    /// <p>OPT_OUT: Keeps the recipient from receiving future messages.</p></li>
    /// <li>
    /// <p>OPT_IN: The recipient wants to receive future messages.</p></li>
    /// </ul>
    pub fn keyword_action(&self) -> ::std::option::Option<&crate::types::KeywordAction> {
        self.keyword_action.as_ref()
    }
}
impl PutKeywordInput {
    /// Creates a new builder-style object to manufacture [`PutKeywordInput`](crate::operation::put_keyword::PutKeywordInput).
    pub fn builder() -> crate::operation::put_keyword::builders::PutKeywordInputBuilder {
        crate::operation::put_keyword::builders::PutKeywordInputBuilder::default()
    }
}

/// A builder for [`PutKeywordInput`](crate::operation::put_keyword::PutKeywordInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct PutKeywordInputBuilder {
    pub(crate) origination_identity: ::std::option::Option<::std::string::String>,
    pub(crate) keyword: ::std::option::Option<::std::string::String>,
    pub(crate) keyword_message: ::std::option::Option<::std::string::String>,
    pub(crate) keyword_action: ::std::option::Option<crate::types::KeywordAction>,
}
impl PutKeywordInputBuilder {
    /// <p>The origination identity to use such as a PhoneNumberId, PhoneNumberArn, SenderId or SenderIdArn. You can use <code>DescribePhoneNumbers</code> get the values for PhoneNumberId and PhoneNumberArn while <code>DescribeSenderIds</code> can be used to get the values for SenderId and SenderIdArn.</p><important>
    /// <p>If you are using a shared End User Messaging SMS resource then you must use the full Amazon Resource Name(ARN).</p>
    /// </important>
    /// This field is required.
    pub fn origination_identity(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.origination_identity = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The origination identity to use such as a PhoneNumberId, PhoneNumberArn, SenderId or SenderIdArn. You can use <code>DescribePhoneNumbers</code> get the values for PhoneNumberId and PhoneNumberArn while <code>DescribeSenderIds</code> can be used to get the values for SenderId and SenderIdArn.</p><important>
    /// <p>If you are using a shared End User Messaging SMS resource then you must use the full Amazon Resource Name(ARN).</p>
    /// </important>
    pub fn set_origination_identity(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.origination_identity = input;
        self
    }
    /// <p>The origination identity to use such as a PhoneNumberId, PhoneNumberArn, SenderId or SenderIdArn. You can use <code>DescribePhoneNumbers</code> get the values for PhoneNumberId and PhoneNumberArn while <code>DescribeSenderIds</code> can be used to get the values for SenderId and SenderIdArn.</p><important>
    /// <p>If you are using a shared End User Messaging SMS resource then you must use the full Amazon Resource Name(ARN).</p>
    /// </important>
    pub fn get_origination_identity(&self) -> &::std::option::Option<::std::string::String> {
        &self.origination_identity
    }
    /// <p>The new keyword to add.</p>
    /// This field is required.
    pub fn keyword(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.keyword = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The new keyword to add.</p>
    pub fn set_keyword(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.keyword = input;
        self
    }
    /// <p>The new keyword to add.</p>
    pub fn get_keyword(&self) -> &::std::option::Option<::std::string::String> {
        &self.keyword
    }
    /// <p>The message associated with the keyword.</p>
    /// This field is required.
    pub fn keyword_message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.keyword_message = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The message associated with the keyword.</p>
    pub fn set_keyword_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.keyword_message = input;
        self
    }
    /// <p>The message associated with the keyword.</p>
    pub fn get_keyword_message(&self) -> &::std::option::Option<::std::string::String> {
        &self.keyword_message
    }
    /// <p>The action to perform for the new keyword when it is received.</p>
    /// <ul>
    /// <li>
    /// <p>AUTOMATIC_RESPONSE: A message is sent to the recipient.</p></li>
    /// <li>
    /// <p>OPT_OUT: Keeps the recipient from receiving future messages.</p></li>
    /// <li>
    /// <p>OPT_IN: The recipient wants to receive future messages.</p></li>
    /// </ul>
    pub fn keyword_action(mut self, input: crate::types::KeywordAction) -> Self {
        self.keyword_action = ::std::option::Option::Some(input);
        self
    }
    /// <p>The action to perform for the new keyword when it is received.</p>
    /// <ul>
    /// <li>
    /// <p>AUTOMATIC_RESPONSE: A message is sent to the recipient.</p></li>
    /// <li>
    /// <p>OPT_OUT: Keeps the recipient from receiving future messages.</p></li>
    /// <li>
    /// <p>OPT_IN: The recipient wants to receive future messages.</p></li>
    /// </ul>
    pub fn set_keyword_action(mut self, input: ::std::option::Option<crate::types::KeywordAction>) -> Self {
        self.keyword_action = input;
        self
    }
    /// <p>The action to perform for the new keyword when it is received.</p>
    /// <ul>
    /// <li>
    /// <p>AUTOMATIC_RESPONSE: A message is sent to the recipient.</p></li>
    /// <li>
    /// <p>OPT_OUT: Keeps the recipient from receiving future messages.</p></li>
    /// <li>
    /// <p>OPT_IN: The recipient wants to receive future messages.</p></li>
    /// </ul>
    pub fn get_keyword_action(&self) -> &::std::option::Option<crate::types::KeywordAction> {
        &self.keyword_action
    }
    /// Consumes the builder and constructs a [`PutKeywordInput`](crate::operation::put_keyword::PutKeywordInput).
    pub fn build(self) -> ::std::result::Result<crate::operation::put_keyword::PutKeywordInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::put_keyword::PutKeywordInput {
            origination_identity: self.origination_identity,
            keyword: self.keyword,
            keyword_message: self.keyword_message,
            keyword_action: self.keyword_action,
        })
    }
}