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.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct RegisterApplicationInput {
    /// <p>The ID of the application.</p>
    pub application_id: ::std::option::Option<::std::string::String>,
    /// <p>The type of the application.</p>
    pub application_type: ::std::option::Option<crate::types::ApplicationType>,
    /// <p>The Amazon EC2 instances on which your SAP application is running.</p>
    pub instances: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    /// <p>The SAP instance number of the application.</p>
    pub sap_instance_number: ::std::option::Option<::std::string::String>,
    /// <p>The System ID of the application.</p>
    pub sid: ::std::option::Option<::std::string::String>,
    /// <p>The tags to be attached to the SAP application.</p>
    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    /// <p>The credentials of the SAP application.</p>
    pub credentials: ::std::option::Option<::std::vec::Vec<crate::types::ApplicationCredential>>,
    /// <p>The Amazon Resource Name of the SAP HANA database.</p>
    pub database_arn: ::std::option::Option<::std::string::String>,
    /// <p>This is an optional parameter for component details to which the SAP ABAP application is attached, such as Web Dispatcher.</p>
    /// <p>This is an array of ApplicationComponent objects. You may input 0 to 5 items.</p>
    pub components_info: ::std::option::Option<::std::vec::Vec<crate::types::ComponentInfo>>,
}
impl RegisterApplicationInput {
    /// <p>The ID of the application.</p>
    pub fn application_id(&self) -> ::std::option::Option<&str> {
        self.application_id.as_deref()
    }
    /// <p>The type of the application.</p>
    pub fn application_type(&self) -> ::std::option::Option<&crate::types::ApplicationType> {
        self.application_type.as_ref()
    }
    /// <p>The Amazon EC2 instances on which your SAP application is running.</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 `.instances.is_none()`.
    pub fn instances(&self) -> &[::std::string::String] {
        self.instances.as_deref().unwrap_or_default()
    }
    /// <p>The SAP instance number of the application.</p>
    pub fn sap_instance_number(&self) -> ::std::option::Option<&str> {
        self.sap_instance_number.as_deref()
    }
    /// <p>The System ID of the application.</p>
    pub fn sid(&self) -> ::std::option::Option<&str> {
        self.sid.as_deref()
    }
    /// <p>The tags to be attached to the SAP application.</p>
    pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        self.tags.as_ref()
    }
    /// <p>The credentials of the SAP 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 `.credentials.is_none()`.
    pub fn credentials(&self) -> &[crate::types::ApplicationCredential] {
        self.credentials.as_deref().unwrap_or_default()
    }
    /// <p>The Amazon Resource Name of the SAP HANA database.</p>
    pub fn database_arn(&self) -> ::std::option::Option<&str> {
        self.database_arn.as_deref()
    }
    /// <p>This is an optional parameter for component details to which the SAP ABAP application is attached, such as Web Dispatcher.</p>
    /// <p>This is an array of ApplicationComponent objects. You may input 0 to 5 items.</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_info.is_none()`.
    pub fn components_info(&self) -> &[crate::types::ComponentInfo] {
        self.components_info.as_deref().unwrap_or_default()
    }
}
impl RegisterApplicationInput {
    /// Creates a new builder-style object to manufacture [`RegisterApplicationInput`](crate::operation::register_application::RegisterApplicationInput).
    pub fn builder() -> crate::operation::register_application::builders::RegisterApplicationInputBuilder {
        crate::operation::register_application::builders::RegisterApplicationInputBuilder::default()
    }
}

/// A builder for [`RegisterApplicationInput`](crate::operation::register_application::RegisterApplicationInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct RegisterApplicationInputBuilder {
    pub(crate) application_id: ::std::option::Option<::std::string::String>,
    pub(crate) application_type: ::std::option::Option<crate::types::ApplicationType>,
    pub(crate) instances: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    pub(crate) sap_instance_number: ::std::option::Option<::std::string::String>,
    pub(crate) sid: ::std::option::Option<::std::string::String>,
    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    pub(crate) credentials: ::std::option::Option<::std::vec::Vec<crate::types::ApplicationCredential>>,
    pub(crate) database_arn: ::std::option::Option<::std::string::String>,
    pub(crate) components_info: ::std::option::Option<::std::vec::Vec<crate::types::ComponentInfo>>,
}
impl RegisterApplicationInputBuilder {
    /// <p>The ID of the application.</p>
    /// This field is required.
    pub fn application_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.application_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the application.</p>
    pub fn set_application_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.application_id = input;
        self
    }
    /// <p>The ID of the application.</p>
    pub fn get_application_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.application_id
    }
    /// <p>The type of the application.</p>
    /// This field is required.
    pub fn application_type(mut self, input: crate::types::ApplicationType) -> Self {
        self.application_type = ::std::option::Option::Some(input);
        self
    }
    /// <p>The type of the application.</p>
    pub fn set_application_type(mut self, input: ::std::option::Option<crate::types::ApplicationType>) -> Self {
        self.application_type = input;
        self
    }
    /// <p>The type of the application.</p>
    pub fn get_application_type(&self) -> &::std::option::Option<crate::types::ApplicationType> {
        &self.application_type
    }
    /// Appends an item to `instances`.
    ///
    /// To override the contents of this collection use [`set_instances`](Self::set_instances).
    ///
    /// <p>The Amazon EC2 instances on which your SAP application is running.</p>
    pub fn instances(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.instances.unwrap_or_default();
        v.push(input.into());
        self.instances = ::std::option::Option::Some(v);
        self
    }
    /// <p>The Amazon EC2 instances on which your SAP application is running.</p>
    pub fn set_instances(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.instances = input;
        self
    }
    /// <p>The Amazon EC2 instances on which your SAP application is running.</p>
    pub fn get_instances(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.instances
    }
    /// <p>The SAP instance number of the application.</p>
    pub fn sap_instance_number(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.sap_instance_number = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The SAP instance number of the application.</p>
    pub fn set_sap_instance_number(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.sap_instance_number = input;
        self
    }
    /// <p>The SAP instance number of the application.</p>
    pub fn get_sap_instance_number(&self) -> &::std::option::Option<::std::string::String> {
        &self.sap_instance_number
    }
    /// <p>The System ID of the application.</p>
    pub fn sid(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.sid = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The System ID of the application.</p>
    pub fn set_sid(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.sid = input;
        self
    }
    /// <p>The System ID of the application.</p>
    pub fn get_sid(&self) -> &::std::option::Option<::std::string::String> {
        &self.sid
    }
    /// Adds a key-value pair to `tags`.
    ///
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
    ///
    /// <p>The tags to be attached to the SAP application.</p>
    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut hash_map = self.tags.unwrap_or_default();
        hash_map.insert(k.into(), v.into());
        self.tags = ::std::option::Option::Some(hash_map);
        self
    }
    /// <p>The tags to be attached to the SAP application.</p>
    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
        self.tags = input;
        self
    }
    /// <p>The tags to be attached to the SAP application.</p>
    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        &self.tags
    }
    /// Appends an item to `credentials`.
    ///
    /// To override the contents of this collection use [`set_credentials`](Self::set_credentials).
    ///
    /// <p>The credentials of the SAP application.</p>
    pub fn credentials(mut self, input: crate::types::ApplicationCredential) -> Self {
        let mut v = self.credentials.unwrap_or_default();
        v.push(input);
        self.credentials = ::std::option::Option::Some(v);
        self
    }
    /// <p>The credentials of the SAP application.</p>
    pub fn set_credentials(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ApplicationCredential>>) -> Self {
        self.credentials = input;
        self
    }
    /// <p>The credentials of the SAP application.</p>
    pub fn get_credentials(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ApplicationCredential>> {
        &self.credentials
    }
    /// <p>The Amazon Resource Name of the SAP HANA database.</p>
    pub fn database_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.database_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name of the SAP HANA database.</p>
    pub fn set_database_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.database_arn = input;
        self
    }
    /// <p>The Amazon Resource Name of the SAP HANA database.</p>
    pub fn get_database_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.database_arn
    }
    /// Appends an item to `components_info`.
    ///
    /// To override the contents of this collection use [`set_components_info`](Self::set_components_info).
    ///
    /// <p>This is an optional parameter for component details to which the SAP ABAP application is attached, such as Web Dispatcher.</p>
    /// <p>This is an array of ApplicationComponent objects. You may input 0 to 5 items.</p>
    pub fn components_info(mut self, input: crate::types::ComponentInfo) -> Self {
        let mut v = self.components_info.unwrap_or_default();
        v.push(input);
        self.components_info = ::std::option::Option::Some(v);
        self
    }
    /// <p>This is an optional parameter for component details to which the SAP ABAP application is attached, such as Web Dispatcher.</p>
    /// <p>This is an array of ApplicationComponent objects. You may input 0 to 5 items.</p>
    pub fn set_components_info(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ComponentInfo>>) -> Self {
        self.components_info = input;
        self
    }
    /// <p>This is an optional parameter for component details to which the SAP ABAP application is attached, such as Web Dispatcher.</p>
    /// <p>This is an array of ApplicationComponent objects. You may input 0 to 5 items.</p>
    pub fn get_components_info(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ComponentInfo>> {
        &self.components_info
    }
    /// Consumes the builder and constructs a [`RegisterApplicationInput`](crate::operation::register_application::RegisterApplicationInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::register_application::RegisterApplicationInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::register_application::RegisterApplicationInput {
            application_id: self.application_id,
            application_type: self.application_type,
            instances: self.instances,
            sap_instance_number: self.sap_instance_number,
            sid: self.sid,
            tags: self.tags,
            credentials: self.credentials,
            database_arn: self.database_arn,
            components_info: self.components_info,
        })
    }
}