aws-sdk-ssmsap 1.106.0

AWS SDK for AWS Systems Manager for SAP
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>An SAP application registered with AWS Systems Manager for SAP.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Application {
    /// <p>The ID of the application.</p>
    pub id: ::std::option::Option<::std::string::String>,
    /// <p>The type of the application.</p>
    pub r#type: ::std::option::Option<crate::types::ApplicationType>,
    /// <p>The Amazon Resource Name (ARN) of the application.</p>
    pub arn: ::std::option::Option<::std::string::String>,
    /// <p>The Amazon Resource Name (ARN) of the Application Registry.</p>
    pub app_registry_arn: ::std::option::Option<::std::string::String>,
    /// <p>The status of the application.</p>
    pub status: ::std::option::Option<crate::types::ApplicationStatus>,
    /// <p>The latest discovery result for the application.</p>
    pub discovery_status: ::std::option::Option<crate::types::ApplicationDiscoveryStatus>,
    /// <p>The components of the application.</p>
    pub components: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    /// <p>The time at which the application was last updated.</p>
    pub last_updated: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The status message.</p>
    pub status_message: ::std::option::Option<::std::string::String>,
    /// <p>The Amazon Resource Names of the associated AWS Systems Manager for SAP applications.</p>
    pub associated_application_arns: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl Application {
    /// <p>The ID of the application.</p>
    pub fn id(&self) -> ::std::option::Option<&str> {
        self.id.as_deref()
    }
    /// <p>The type of the application.</p>
    pub fn r#type(&self) -> ::std::option::Option<&crate::types::ApplicationType> {
        self.r#type.as_ref()
    }
    /// <p>The Amazon Resource Name (ARN) of the application.</p>
    pub fn arn(&self) -> ::std::option::Option<&str> {
        self.arn.as_deref()
    }
    /// <p>The Amazon Resource Name (ARN) of the Application Registry.</p>
    pub fn app_registry_arn(&self) -> ::std::option::Option<&str> {
        self.app_registry_arn.as_deref()
    }
    /// <p>The status of the application.</p>
    pub fn status(&self) -> ::std::option::Option<&crate::types::ApplicationStatus> {
        self.status.as_ref()
    }
    /// <p>The latest discovery result for the application.</p>
    pub fn discovery_status(&self) -> ::std::option::Option<&crate::types::ApplicationDiscoveryStatus> {
        self.discovery_status.as_ref()
    }
    /// <p>The components of the application.</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 `.components.is_none()`.
    pub fn components(&self) -> &[::std::string::String] {
        self.components.as_deref().unwrap_or_default()
    }
    /// <p>The time at which the application was last updated.</p>
    pub fn last_updated(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.last_updated.as_ref()
    }
    /// <p>The status message.</p>
    pub fn status_message(&self) -> ::std::option::Option<&str> {
        self.status_message.as_deref()
    }
    /// <p>The Amazon Resource Names of the associated AWS Systems Manager for SAP applications.</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 `.associated_application_arns.is_none()`.
    pub fn associated_application_arns(&self) -> &[::std::string::String] {
        self.associated_application_arns.as_deref().unwrap_or_default()
    }
}
impl Application {
    /// Creates a new builder-style object to manufacture [`Application`](crate::types::Application).
    pub fn builder() -> crate::types::builders::ApplicationBuilder {
        crate::types::builders::ApplicationBuilder::default()
    }
}

/// A builder for [`Application`](crate::types::Application).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ApplicationBuilder {
    pub(crate) id: ::std::option::Option<::std::string::String>,
    pub(crate) r#type: ::std::option::Option<crate::types::ApplicationType>,
    pub(crate) arn: ::std::option::Option<::std::string::String>,
    pub(crate) app_registry_arn: ::std::option::Option<::std::string::String>,
    pub(crate) status: ::std::option::Option<crate::types::ApplicationStatus>,
    pub(crate) discovery_status: ::std::option::Option<crate::types::ApplicationDiscoveryStatus>,
    pub(crate) components: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    pub(crate) last_updated: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) status_message: ::std::option::Option<::std::string::String>,
    pub(crate) associated_application_arns: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl ApplicationBuilder {
    /// <p>The ID of the application.</p>
    pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the application.</p>
    pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.id = input;
        self
    }
    /// <p>The ID of the application.</p>
    pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.id
    }
    /// <p>The type of the application.</p>
    pub fn r#type(mut self, input: crate::types::ApplicationType) -> Self {
        self.r#type = ::std::option::Option::Some(input);
        self
    }
    /// <p>The type of the application.</p>
    pub fn set_type(mut self, input: ::std::option::Option<crate::types::ApplicationType>) -> Self {
        self.r#type = input;
        self
    }
    /// <p>The type of the application.</p>
    pub fn get_type(&self) -> &::std::option::Option<crate::types::ApplicationType> {
        &self.r#type
    }
    /// <p>The Amazon Resource Name (ARN) of the application.</p>
    pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the application.</p>
    pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.arn = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the application.</p>
    pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.arn
    }
    /// <p>The Amazon Resource Name (ARN) of the Application Registry.</p>
    pub fn app_registry_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.app_registry_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the Application Registry.</p>
    pub fn set_app_registry_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.app_registry_arn = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the Application Registry.</p>
    pub fn get_app_registry_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.app_registry_arn
    }
    /// <p>The status of the application.</p>
    pub fn status(mut self, input: crate::types::ApplicationStatus) -> Self {
        self.status = ::std::option::Option::Some(input);
        self
    }
    /// <p>The status of the application.</p>
    pub fn set_status(mut self, input: ::std::option::Option<crate::types::ApplicationStatus>) -> Self {
        self.status = input;
        self
    }
    /// <p>The status of the application.</p>
    pub fn get_status(&self) -> &::std::option::Option<crate::types::ApplicationStatus> {
        &self.status
    }
    /// <p>The latest discovery result for the application.</p>
    pub fn discovery_status(mut self, input: crate::types::ApplicationDiscoveryStatus) -> Self {
        self.discovery_status = ::std::option::Option::Some(input);
        self
    }
    /// <p>The latest discovery result for the application.</p>
    pub fn set_discovery_status(mut self, input: ::std::option::Option<crate::types::ApplicationDiscoveryStatus>) -> Self {
        self.discovery_status = input;
        self
    }
    /// <p>The latest discovery result for the application.</p>
    pub fn get_discovery_status(&self) -> &::std::option::Option<crate::types::ApplicationDiscoveryStatus> {
        &self.discovery_status
    }
    /// Appends an item to `components`.
    ///
    /// To override the contents of this collection use [`set_components`](Self::set_components).
    ///
    /// <p>The components of the application.</p>
    pub fn components(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.components.unwrap_or_default();
        v.push(input.into());
        self.components = ::std::option::Option::Some(v);
        self
    }
    /// <p>The components of the application.</p>
    pub fn set_components(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.components = input;
        self
    }
    /// <p>The components of the application.</p>
    pub fn get_components(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.components
    }
    /// <p>The time at which the application was last updated.</p>
    pub fn last_updated(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.last_updated = ::std::option::Option::Some(input);
        self
    }
    /// <p>The time at which the application was last updated.</p>
    pub fn set_last_updated(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.last_updated = input;
        self
    }
    /// <p>The time at which the application was last updated.</p>
    pub fn get_last_updated(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.last_updated
    }
    /// <p>The status message.</p>
    pub fn status_message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.status_message = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The status message.</p>
    pub fn set_status_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.status_message = input;
        self
    }
    /// <p>The status message.</p>
    pub fn get_status_message(&self) -> &::std::option::Option<::std::string::String> {
        &self.status_message
    }
    /// Appends an item to `associated_application_arns`.
    ///
    /// To override the contents of this collection use [`set_associated_application_arns`](Self::set_associated_application_arns).
    ///
    /// <p>The Amazon Resource Names of the associated AWS Systems Manager for SAP applications.</p>
    pub fn associated_application_arns(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.associated_application_arns.unwrap_or_default();
        v.push(input.into());
        self.associated_application_arns = ::std::option::Option::Some(v);
        self
    }
    /// <p>The Amazon Resource Names of the associated AWS Systems Manager for SAP applications.</p>
    pub fn set_associated_application_arns(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.associated_application_arns = input;
        self
    }
    /// <p>The Amazon Resource Names of the associated AWS Systems Manager for SAP applications.</p>
    pub fn get_associated_application_arns(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.associated_application_arns
    }
    /// Consumes the builder and constructs a [`Application`](crate::types::Application).
    pub fn build(self) -> crate::types::Application {
        crate::types::Application {
            id: self.id,
            r#type: self.r#type,
            arn: self.arn,
            app_registry_arn: self.app_registry_arn,
            status: self.status,
            discovery_status: self.discovery_status,
            components: self.components,
            last_updated: self.last_updated,
            status_message: self.status_message,
            associated_application_arns: self.associated_application_arns,
        }
    }
}