aws-sdk-pipes 1.97.0

AWS SDK for Amazon EventBridge Pipes
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)]
pub struct ListPipesInput {
    /// <p>A value that will return a subset of the pipes associated with this account. For example, <code>"NamePrefix": "ABC"</code> will return all endpoints with "ABC" in the name.</p>
    pub name_prefix: ::std::option::Option<::std::string::String>,
    /// <p>The state the pipe should be in.</p>
    pub desired_state: ::std::option::Option<crate::types::RequestedPipeState>,
    /// <p>The state the pipe is in.</p>
    pub current_state: ::std::option::Option<crate::types::PipeState>,
    /// <p>The prefix matching the pipe source.</p>
    pub source_prefix: ::std::option::Option<::std::string::String>,
    /// <p>The prefix matching the pipe target.</p>
    pub target_prefix: ::std::option::Option<::std::string::String>,
    /// <p>If <code>nextToken</code> is returned, there are more results available. The value of <code>nextToken</code> is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. Using an expired pagination token will return an HTTP 400 InvalidToken error.</p>
    pub next_token: ::std::option::Option<::std::string::String>,
    /// <p>The maximum number of pipes to include in the response.</p>
    pub limit: ::std::option::Option<i32>,
}
impl ListPipesInput {
    /// <p>A value that will return a subset of the pipes associated with this account. For example, <code>"NamePrefix": "ABC"</code> will return all endpoints with "ABC" in the name.</p>
    pub fn name_prefix(&self) -> ::std::option::Option<&str> {
        self.name_prefix.as_deref()
    }
    /// <p>The state the pipe should be in.</p>
    pub fn desired_state(&self) -> ::std::option::Option<&crate::types::RequestedPipeState> {
        self.desired_state.as_ref()
    }
    /// <p>The state the pipe is in.</p>
    pub fn current_state(&self) -> ::std::option::Option<&crate::types::PipeState> {
        self.current_state.as_ref()
    }
    /// <p>The prefix matching the pipe source.</p>
    pub fn source_prefix(&self) -> ::std::option::Option<&str> {
        self.source_prefix.as_deref()
    }
    /// <p>The prefix matching the pipe target.</p>
    pub fn target_prefix(&self) -> ::std::option::Option<&str> {
        self.target_prefix.as_deref()
    }
    /// <p>If <code>nextToken</code> is returned, there are more results available. The value of <code>nextToken</code> is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. Using an expired pagination token will return an HTTP 400 InvalidToken error.</p>
    pub fn next_token(&self) -> ::std::option::Option<&str> {
        self.next_token.as_deref()
    }
    /// <p>The maximum number of pipes to include in the response.</p>
    pub fn limit(&self) -> ::std::option::Option<i32> {
        self.limit
    }
}
impl ::std::fmt::Debug for ListPipesInput {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("ListPipesInput");
        formatter.field("name_prefix", &self.name_prefix);
        formatter.field("desired_state", &self.desired_state);
        formatter.field("current_state", &self.current_state);
        formatter.field("source_prefix", &self.source_prefix);
        formatter.field("target_prefix", &self.target_prefix);
        formatter.field("next_token", &"*** Sensitive Data Redacted ***");
        formatter.field("limit", &self.limit);
        formatter.finish()
    }
}
impl ListPipesInput {
    /// Creates a new builder-style object to manufacture [`ListPipesInput`](crate::operation::list_pipes::ListPipesInput).
    pub fn builder() -> crate::operation::list_pipes::builders::ListPipesInputBuilder {
        crate::operation::list_pipes::builders::ListPipesInputBuilder::default()
    }
}

/// A builder for [`ListPipesInput`](crate::operation::list_pipes::ListPipesInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct ListPipesInputBuilder {
    pub(crate) name_prefix: ::std::option::Option<::std::string::String>,
    pub(crate) desired_state: ::std::option::Option<crate::types::RequestedPipeState>,
    pub(crate) current_state: ::std::option::Option<crate::types::PipeState>,
    pub(crate) source_prefix: ::std::option::Option<::std::string::String>,
    pub(crate) target_prefix: ::std::option::Option<::std::string::String>,
    pub(crate) next_token: ::std::option::Option<::std::string::String>,
    pub(crate) limit: ::std::option::Option<i32>,
}
impl ListPipesInputBuilder {
    /// <p>A value that will return a subset of the pipes associated with this account. For example, <code>"NamePrefix": "ABC"</code> will return all endpoints with "ABC" in the name.</p>
    pub fn name_prefix(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.name_prefix = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A value that will return a subset of the pipes associated with this account. For example, <code>"NamePrefix": "ABC"</code> will return all endpoints with "ABC" in the name.</p>
    pub fn set_name_prefix(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name_prefix = input;
        self
    }
    /// <p>A value that will return a subset of the pipes associated with this account. For example, <code>"NamePrefix": "ABC"</code> will return all endpoints with "ABC" in the name.</p>
    pub fn get_name_prefix(&self) -> &::std::option::Option<::std::string::String> {
        &self.name_prefix
    }
    /// <p>The state the pipe should be in.</p>
    pub fn desired_state(mut self, input: crate::types::RequestedPipeState) -> Self {
        self.desired_state = ::std::option::Option::Some(input);
        self
    }
    /// <p>The state the pipe should be in.</p>
    pub fn set_desired_state(mut self, input: ::std::option::Option<crate::types::RequestedPipeState>) -> Self {
        self.desired_state = input;
        self
    }
    /// <p>The state the pipe should be in.</p>
    pub fn get_desired_state(&self) -> &::std::option::Option<crate::types::RequestedPipeState> {
        &self.desired_state
    }
    /// <p>The state the pipe is in.</p>
    pub fn current_state(mut self, input: crate::types::PipeState) -> Self {
        self.current_state = ::std::option::Option::Some(input);
        self
    }
    /// <p>The state the pipe is in.</p>
    pub fn set_current_state(mut self, input: ::std::option::Option<crate::types::PipeState>) -> Self {
        self.current_state = input;
        self
    }
    /// <p>The state the pipe is in.</p>
    pub fn get_current_state(&self) -> &::std::option::Option<crate::types::PipeState> {
        &self.current_state
    }
    /// <p>The prefix matching the pipe source.</p>
    pub fn source_prefix(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.source_prefix = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The prefix matching the pipe source.</p>
    pub fn set_source_prefix(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.source_prefix = input;
        self
    }
    /// <p>The prefix matching the pipe source.</p>
    pub fn get_source_prefix(&self) -> &::std::option::Option<::std::string::String> {
        &self.source_prefix
    }
    /// <p>The prefix matching the pipe target.</p>
    pub fn target_prefix(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.target_prefix = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The prefix matching the pipe target.</p>
    pub fn set_target_prefix(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.target_prefix = input;
        self
    }
    /// <p>The prefix matching the pipe target.</p>
    pub fn get_target_prefix(&self) -> &::std::option::Option<::std::string::String> {
        &self.target_prefix
    }
    /// <p>If <code>nextToken</code> is returned, there are more results available. The value of <code>nextToken</code> is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. Using an expired pagination token will return an HTTP 400 InvalidToken error.</p>
    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.next_token = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>If <code>nextToken</code> is returned, there are more results available. The value of <code>nextToken</code> is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. Using an expired pagination token will return an HTTP 400 InvalidToken error.</p>
    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.next_token = input;
        self
    }
    /// <p>If <code>nextToken</code> is returned, there are more results available. The value of <code>nextToken</code> is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. Using an expired pagination token will return an HTTP 400 InvalidToken error.</p>
    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.next_token
    }
    /// <p>The maximum number of pipes to include in the response.</p>
    pub fn limit(mut self, input: i32) -> Self {
        self.limit = ::std::option::Option::Some(input);
        self
    }
    /// <p>The maximum number of pipes to include in the response.</p>
    pub fn set_limit(mut self, input: ::std::option::Option<i32>) -> Self {
        self.limit = input;
        self
    }
    /// <p>The maximum number of pipes to include in the response.</p>
    pub fn get_limit(&self) -> &::std::option::Option<i32> {
        &self.limit
    }
    /// Consumes the builder and constructs a [`ListPipesInput`](crate::operation::list_pipes::ListPipesInput).
    pub fn build(self) -> ::std::result::Result<crate::operation::list_pipes::ListPipesInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::list_pipes::ListPipesInput {
            name_prefix: self.name_prefix,
            desired_state: self.desired_state,
            current_state: self.current_state,
            source_prefix: self.source_prefix,
            target_prefix: self.target_prefix,
            next_token: self.next_token,
            limit: self.limit,
        })
    }
}
impl ::std::fmt::Debug for ListPipesInputBuilder {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("ListPipesInputBuilder");
        formatter.field("name_prefix", &self.name_prefix);
        formatter.field("desired_state", &self.desired_state);
        formatter.field("current_state", &self.current_state);
        formatter.field("source_prefix", &self.source_prefix);
        formatter.field("target_prefix", &self.target_prefix);
        formatter.field("next_token", &"*** Sensitive Data Redacted ***");
        formatter.field("limit", &self.limit);
        formatter.finish()
    }
}