aws-sdk-inspector 1.99.0

AWS SDK for Amazon Inspector
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 PreviewAgentsInput {
    /// <p>The ARN of the assessment target whose agents you want to preview.</p>
    pub preview_agents_arn: ::std::option::Option<::std::string::String>,
    /// <p>You can use this parameter when paginating results. Set the value of this parameter to null on your first call to the <b>PreviewAgents</b> action. Subsequent calls to the action fill <b>nextToken</b> in the request with the value of <b>NextToken</b> from the previous response to continue listing data.</p>
    pub next_token: ::std::option::Option<::std::string::String>,
    /// <p>You can use this parameter to indicate the maximum number of items you want in the response. The default value is 10. The maximum value is 500.</p>
    pub max_results: ::std::option::Option<i32>,
}
impl PreviewAgentsInput {
    /// <p>The ARN of the assessment target whose agents you want to preview.</p>
    pub fn preview_agents_arn(&self) -> ::std::option::Option<&str> {
        self.preview_agents_arn.as_deref()
    }
    /// <p>You can use this parameter when paginating results. Set the value of this parameter to null on your first call to the <b>PreviewAgents</b> action. Subsequent calls to the action fill <b>nextToken</b> in the request with the value of <b>NextToken</b> from the previous response to continue listing data.</p>
    pub fn next_token(&self) -> ::std::option::Option<&str> {
        self.next_token.as_deref()
    }
    /// <p>You can use this parameter to indicate the maximum number of items you want in the response. The default value is 10. The maximum value is 500.</p>
    pub fn max_results(&self) -> ::std::option::Option<i32> {
        self.max_results
    }
}
impl PreviewAgentsInput {
    /// Creates a new builder-style object to manufacture [`PreviewAgentsInput`](crate::operation::preview_agents::PreviewAgentsInput).
    pub fn builder() -> crate::operation::preview_agents::builders::PreviewAgentsInputBuilder {
        crate::operation::preview_agents::builders::PreviewAgentsInputBuilder::default()
    }
}

/// A builder for [`PreviewAgentsInput`](crate::operation::preview_agents::PreviewAgentsInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct PreviewAgentsInputBuilder {
    pub(crate) preview_agents_arn: ::std::option::Option<::std::string::String>,
    pub(crate) next_token: ::std::option::Option<::std::string::String>,
    pub(crate) max_results: ::std::option::Option<i32>,
}
impl PreviewAgentsInputBuilder {
    /// <p>The ARN of the assessment target whose agents you want to preview.</p>
    /// This field is required.
    pub fn preview_agents_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.preview_agents_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ARN of the assessment target whose agents you want to preview.</p>
    pub fn set_preview_agents_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.preview_agents_arn = input;
        self
    }
    /// <p>The ARN of the assessment target whose agents you want to preview.</p>
    pub fn get_preview_agents_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.preview_agents_arn
    }
    /// <p>You can use this parameter when paginating results. Set the value of this parameter to null on your first call to the <b>PreviewAgents</b> action. Subsequent calls to the action fill <b>nextToken</b> in the request with the value of <b>NextToken</b> from the previous response to continue listing data.</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>You can use this parameter when paginating results. Set the value of this parameter to null on your first call to the <b>PreviewAgents</b> action. Subsequent calls to the action fill <b>nextToken</b> in the request with the value of <b>NextToken</b> from the previous response to continue listing data.</p>
    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.next_token = input;
        self
    }
    /// <p>You can use this parameter when paginating results. Set the value of this parameter to null on your first call to the <b>PreviewAgents</b> action. Subsequent calls to the action fill <b>nextToken</b> in the request with the value of <b>NextToken</b> from the previous response to continue listing data.</p>
    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.next_token
    }
    /// <p>You can use this parameter to indicate the maximum number of items you want in the response. The default value is 10. The maximum value is 500.</p>
    pub fn max_results(mut self, input: i32) -> Self {
        self.max_results = ::std::option::Option::Some(input);
        self
    }
    /// <p>You can use this parameter to indicate the maximum number of items you want in the response. The default value is 10. The maximum value is 500.</p>
    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
        self.max_results = input;
        self
    }
    /// <p>You can use this parameter to indicate the maximum number of items you want in the response. The default value is 10. The maximum value is 500.</p>
    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
        &self.max_results
    }
    /// Consumes the builder and constructs a [`PreviewAgentsInput`](crate::operation::preview_agents::PreviewAgentsInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::preview_agents::PreviewAgentsInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::preview_agents::PreviewAgentsInput {
            preview_agents_arn: self.preview_agents_arn,
            next_token: self.next_token,
            max_results: self.max_results,
        })
    }
}