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 CreateCodeScanOutput {
    /// The scan run this request created, or the scan run a previous request with the same clientToken already accepted.
    pub scan: ::std::option::Option<crate::types::CodeScanSummary>,
    _request_id: Option<String>,
}
impl CreateCodeScanOutput {
    /// The scan run this request created, or the scan run a previous request with the same clientToken already accepted.
    pub fn scan(&self) -> ::std::option::Option<&crate::types::CodeScanSummary> {
        self.scan.as_ref()
    }
}
impl ::aws_types::request_id::RequestId for CreateCodeScanOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl CreateCodeScanOutput {
    /// Creates a new builder-style object to manufacture [`CreateCodeScanOutput`](crate::operation::create_code_scan::CreateCodeScanOutput).
    pub fn builder() -> crate::operation::create_code_scan::builders::CreateCodeScanOutputBuilder {
        crate::operation::create_code_scan::builders::CreateCodeScanOutputBuilder::default()
    }
}

/// A builder for [`CreateCodeScanOutput`](crate::operation::create_code_scan::CreateCodeScanOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateCodeScanOutputBuilder {
    pub(crate) scan: ::std::option::Option<crate::types::CodeScanSummary>,
    _request_id: Option<String>,
}
impl CreateCodeScanOutputBuilder {
    /// The scan run this request created, or the scan run a previous request with the same clientToken already accepted.
    /// This field is required.
    pub fn scan(mut self, input: crate::types::CodeScanSummary) -> Self {
        self.scan = ::std::option::Option::Some(input);
        self
    }
    /// The scan run this request created, or the scan run a previous request with the same clientToken already accepted.
    pub fn set_scan(mut self, input: ::std::option::Option<crate::types::CodeScanSummary>) -> Self {
        self.scan = input;
        self
    }
    /// The scan run this request created, or the scan run a previous request with the same clientToken already accepted.
    pub fn get_scan(&self) -> &::std::option::Option<crate::types::CodeScanSummary> {
        &self.scan
    }
    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
        self._request_id = Some(request_id.into());
        self
    }

    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
        self._request_id = request_id;
        self
    }
    /// Consumes the builder and constructs a [`CreateCodeScanOutput`](crate::operation::create_code_scan::CreateCodeScanOutput).
    pub fn build(self) -> crate::operation::create_code_scan::CreateCodeScanOutput {
        crate::operation::create_code_scan::CreateCodeScanOutput {
            scan: self.scan,
            _request_id: self._request_id,
        }
    }
}