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
// 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 SubscribeInput {
/// <p>The Amazon Resource Name (ARN) of the notification rule for which you want to create the association.</p>
#[doc(hidden)]
pub arn: std::option::Option<std::string::String>,
/// <p>Information about the Chatbot topics or Chatbot clients associated with a notification rule.</p>
#[doc(hidden)]
pub target: std::option::Option<crate::types::Target>,
/// <p>An enumeration token that, when provided in a request, returns the next batch of the results.</p>
#[doc(hidden)]
pub client_request_token: std::option::Option<std::string::String>,
}
impl SubscribeInput {
/// <p>The Amazon Resource Name (ARN) of the notification rule for which you want to create the association.</p>
pub fn arn(&self) -> std::option::Option<&str> {
self.arn.as_deref()
}
/// <p>Information about the Chatbot topics or Chatbot clients associated with a notification rule.</p>
pub fn target(&self) -> std::option::Option<&crate::types::Target> {
self.target.as_ref()
}
/// <p>An enumeration token that, when provided in a request, returns the next batch of the results.</p>
pub fn client_request_token(&self) -> std::option::Option<&str> {
self.client_request_token.as_deref()
}
}
impl SubscribeInput {
/// Creates a new builder-style object to manufacture [`SubscribeInput`](crate::operation::subscribe::SubscribeInput).
pub fn builder() -> crate::operation::subscribe::builders::SubscribeInputBuilder {
crate::operation::subscribe::builders::SubscribeInputBuilder::default()
}
}
/// A builder for [`SubscribeInput`](crate::operation::subscribe::SubscribeInput).
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct SubscribeInputBuilder {
pub(crate) arn: std::option::Option<std::string::String>,
pub(crate) target: std::option::Option<crate::types::Target>,
pub(crate) client_request_token: std::option::Option<std::string::String>,
}
impl SubscribeInputBuilder {
/// <p>The Amazon Resource Name (ARN) of the notification rule for which you want to create the association.</p>
pub fn arn(mut self, input: impl Into<std::string::String>) -> Self {
self.arn = Some(input.into());
self
}
/// <p>The Amazon Resource Name (ARN) of the notification rule for which you want to create the association.</p>
pub fn set_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.arn = input;
self
}
/// <p>Information about the Chatbot topics or Chatbot clients associated with a notification rule.</p>
pub fn target(mut self, input: crate::types::Target) -> Self {
self.target = Some(input);
self
}
/// <p>Information about the Chatbot topics or Chatbot clients associated with a notification rule.</p>
pub fn set_target(mut self, input: std::option::Option<crate::types::Target>) -> Self {
self.target = input;
self
}
/// <p>An enumeration token that, when provided in a request, returns the next batch of the results.</p>
pub fn client_request_token(mut self, input: impl Into<std::string::String>) -> Self {
self.client_request_token = Some(input.into());
self
}
/// <p>An enumeration token that, when provided in a request, returns the next batch of the results.</p>
pub fn set_client_request_token(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.client_request_token = input;
self
}
/// Consumes the builder and constructs a [`SubscribeInput`](crate::operation::subscribe::SubscribeInput).
pub fn build(
self,
) -> Result<
crate::operation::subscribe::SubscribeInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::operation::subscribe::SubscribeInput {
arn: self.arn,
target: self.target,
client_request_token: self.client_request_token,
})
}
}