aws-sdk-continuum 1.0.0

AWS SDK for AWS Continuum
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 GetCodeScanInput {
    /// Environment that owns the scan.
    pub environment_id: ::std::option::Option<::std::string::String>,
    /// Scan to retrieve.
    pub scan_run_id: ::std::option::Option<::std::string::String>,
}
impl GetCodeScanInput {
    /// Environment that owns the scan.
    pub fn environment_id(&self) -> ::std::option::Option<&str> {
        self.environment_id.as_deref()
    }
    /// Scan to retrieve.
    pub fn scan_run_id(&self) -> ::std::option::Option<&str> {
        self.scan_run_id.as_deref()
    }
}
impl GetCodeScanInput {
    /// Creates a new builder-style object to manufacture [`GetCodeScanInput`](crate::operation::get_code_scan::GetCodeScanInput).
    pub fn builder() -> crate::operation::get_code_scan::builders::GetCodeScanInputBuilder {
        crate::operation::get_code_scan::builders::GetCodeScanInputBuilder::default()
    }
}

/// A builder for [`GetCodeScanInput`](crate::operation::get_code_scan::GetCodeScanInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetCodeScanInputBuilder {
    pub(crate) environment_id: ::std::option::Option<::std::string::String>,
    pub(crate) scan_run_id: ::std::option::Option<::std::string::String>,
}
impl GetCodeScanInputBuilder {
    /// Environment that owns the scan.
    /// This field is required.
    pub fn environment_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.environment_id = ::std::option::Option::Some(input.into());
        self
    }
    /// Environment that owns the scan.
    pub fn set_environment_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.environment_id = input;
        self
    }
    /// Environment that owns the scan.
    pub fn get_environment_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.environment_id
    }
    /// Scan to retrieve.
    /// This field is required.
    pub fn scan_run_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.scan_run_id = ::std::option::Option::Some(input.into());
        self
    }
    /// Scan to retrieve.
    pub fn set_scan_run_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.scan_run_id = input;
        self
    }
    /// Scan to retrieve.
    pub fn get_scan_run_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.scan_run_id
    }
    /// Consumes the builder and constructs a [`GetCodeScanInput`](crate::operation::get_code_scan::GetCodeScanInput).
    pub fn build(self) -> ::std::result::Result<crate::operation::get_code_scan::GetCodeScanInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::get_code_scan::GetCodeScanInput {
            environment_id: self.environment_id,
            scan_run_id: self.scan_run_id,
        })
    }
}