aws-sdk-securityagent 1.4.0

AWS SDK for AWS Security Agent
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>The collection of assets used in a pentest configuration, including endpoints, actors, documents, source code repositories, and integrated repositories.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Assets {
    /// <p>The list of endpoints to test during the pentest.</p>
    pub endpoints: ::std::option::Option<::std::vec::Vec<crate::types::Endpoint>>,
    /// <p>The list of actors used during penetration testing.</p>
    pub actors: ::std::option::Option<::std::vec::Vec<crate::types::Actor>>,
    /// <p>The list of documents that provide context for the pentest.</p>
    pub documents: ::std::option::Option<::std::vec::Vec<crate::types::DocumentInfo>>,
    /// <p>The list of source code repositories to analyze during the pentest.</p>
    pub source_code: ::std::option::Option<::std::vec::Vec<crate::types::SourceCodeRepository>>,
    /// <p>The list of integrated repositories associated with the pentest.</p>
    pub integrated_repositories: ::std::option::Option<::std::vec::Vec<crate::types::IntegratedRepository>>,
}
impl Assets {
    /// <p>The list of endpoints to test during the pentest.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.endpoints.is_none()`.
    pub fn endpoints(&self) -> &[crate::types::Endpoint] {
        self.endpoints.as_deref().unwrap_or_default()
    }
    /// <p>The list of actors used during penetration testing.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.actors.is_none()`.
    pub fn actors(&self) -> &[crate::types::Actor] {
        self.actors.as_deref().unwrap_or_default()
    }
    /// <p>The list of documents that provide context for the pentest.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.documents.is_none()`.
    pub fn documents(&self) -> &[crate::types::DocumentInfo] {
        self.documents.as_deref().unwrap_or_default()
    }
    /// <p>The list of source code repositories to analyze during the pentest.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.source_code.is_none()`.
    pub fn source_code(&self) -> &[crate::types::SourceCodeRepository] {
        self.source_code.as_deref().unwrap_or_default()
    }
    /// <p>The list of integrated repositories associated with the pentest.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.integrated_repositories.is_none()`.
    pub fn integrated_repositories(&self) -> &[crate::types::IntegratedRepository] {
        self.integrated_repositories.as_deref().unwrap_or_default()
    }
}
impl Assets {
    /// Creates a new builder-style object to manufacture [`Assets`](crate::types::Assets).
    pub fn builder() -> crate::types::builders::AssetsBuilder {
        crate::types::builders::AssetsBuilder::default()
    }
}

/// A builder for [`Assets`](crate::types::Assets).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct AssetsBuilder {
    pub(crate) endpoints: ::std::option::Option<::std::vec::Vec<crate::types::Endpoint>>,
    pub(crate) actors: ::std::option::Option<::std::vec::Vec<crate::types::Actor>>,
    pub(crate) documents: ::std::option::Option<::std::vec::Vec<crate::types::DocumentInfo>>,
    pub(crate) source_code: ::std::option::Option<::std::vec::Vec<crate::types::SourceCodeRepository>>,
    pub(crate) integrated_repositories: ::std::option::Option<::std::vec::Vec<crate::types::IntegratedRepository>>,
}
impl AssetsBuilder {
    /// Appends an item to `endpoints`.
    ///
    /// To override the contents of this collection use [`set_endpoints`](Self::set_endpoints).
    ///
    /// <p>The list of endpoints to test during the pentest.</p>
    pub fn endpoints(mut self, input: crate::types::Endpoint) -> Self {
        let mut v = self.endpoints.unwrap_or_default();
        v.push(input);
        self.endpoints = ::std::option::Option::Some(v);
        self
    }
    /// <p>The list of endpoints to test during the pentest.</p>
    pub fn set_endpoints(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Endpoint>>) -> Self {
        self.endpoints = input;
        self
    }
    /// <p>The list of endpoints to test during the pentest.</p>
    pub fn get_endpoints(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Endpoint>> {
        &self.endpoints
    }
    /// Appends an item to `actors`.
    ///
    /// To override the contents of this collection use [`set_actors`](Self::set_actors).
    ///
    /// <p>The list of actors used during penetration testing.</p>
    pub fn actors(mut self, input: crate::types::Actor) -> Self {
        let mut v = self.actors.unwrap_or_default();
        v.push(input);
        self.actors = ::std::option::Option::Some(v);
        self
    }
    /// <p>The list of actors used during penetration testing.</p>
    pub fn set_actors(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Actor>>) -> Self {
        self.actors = input;
        self
    }
    /// <p>The list of actors used during penetration testing.</p>
    pub fn get_actors(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Actor>> {
        &self.actors
    }
    /// Appends an item to `documents`.
    ///
    /// To override the contents of this collection use [`set_documents`](Self::set_documents).
    ///
    /// <p>The list of documents that provide context for the pentest.</p>
    pub fn documents(mut self, input: crate::types::DocumentInfo) -> Self {
        let mut v = self.documents.unwrap_or_default();
        v.push(input);
        self.documents = ::std::option::Option::Some(v);
        self
    }
    /// <p>The list of documents that provide context for the pentest.</p>
    pub fn set_documents(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::DocumentInfo>>) -> Self {
        self.documents = input;
        self
    }
    /// <p>The list of documents that provide context for the pentest.</p>
    pub fn get_documents(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::DocumentInfo>> {
        &self.documents
    }
    /// Appends an item to `source_code`.
    ///
    /// To override the contents of this collection use [`set_source_code`](Self::set_source_code).
    ///
    /// <p>The list of source code repositories to analyze during the pentest.</p>
    pub fn source_code(mut self, input: crate::types::SourceCodeRepository) -> Self {
        let mut v = self.source_code.unwrap_or_default();
        v.push(input);
        self.source_code = ::std::option::Option::Some(v);
        self
    }
    /// <p>The list of source code repositories to analyze during the pentest.</p>
    pub fn set_source_code(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::SourceCodeRepository>>) -> Self {
        self.source_code = input;
        self
    }
    /// <p>The list of source code repositories to analyze during the pentest.</p>
    pub fn get_source_code(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::SourceCodeRepository>> {
        &self.source_code
    }
    /// Appends an item to `integrated_repositories`.
    ///
    /// To override the contents of this collection use [`set_integrated_repositories`](Self::set_integrated_repositories).
    ///
    /// <p>The list of integrated repositories associated with the pentest.</p>
    pub fn integrated_repositories(mut self, input: crate::types::IntegratedRepository) -> Self {
        let mut v = self.integrated_repositories.unwrap_or_default();
        v.push(input);
        self.integrated_repositories = ::std::option::Option::Some(v);
        self
    }
    /// <p>The list of integrated repositories associated with the pentest.</p>
    pub fn set_integrated_repositories(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::IntegratedRepository>>) -> Self {
        self.integrated_repositories = input;
        self
    }
    /// <p>The list of integrated repositories associated with the pentest.</p>
    pub fn get_integrated_repositories(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::IntegratedRepository>> {
        &self.integrated_repositories
    }
    /// Consumes the builder and constructs a [`Assets`](crate::types::Assets).
    pub fn build(self) -> crate::types::Assets {
        crate::types::Assets {
            endpoints: self.endpoints,
            actors: self.actors,
            documents: self.documents,
            source_code: self.source_code,
            integrated_repositories: self.integrated_repositories,
        }
    }
}