aws-sdk-robomaker 1.81.0

AWS SDK for AWS RoboMaker
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 UpdateRobotApplicationInput {
    /// <p>The application information for the robot application.</p>
    pub application: ::std::option::Option<::std::string::String>,
    /// <p>The sources of the robot application.</p>
    pub sources: ::std::option::Option<::std::vec::Vec<crate::types::SourceConfig>>,
    /// <p>The robot software suite used by the robot application.</p>
    pub robot_software_suite: ::std::option::Option<crate::types::RobotSoftwareSuite>,
    /// <p>The revision id for the robot application.</p>
    pub current_revision_id: ::std::option::Option<::std::string::String>,
    /// <p>The object that contains the Docker image URI for your robot application.</p>
    pub environment: ::std::option::Option<crate::types::Environment>,
}
impl UpdateRobotApplicationInput {
    /// <p>The application information for the robot application.</p>
    pub fn application(&self) -> ::std::option::Option<&str> {
        self.application.as_deref()
    }
    /// <p>The sources of the robot 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 `.sources.is_none()`.
    pub fn sources(&self) -> &[crate::types::SourceConfig] {
        self.sources.as_deref().unwrap_or_default()
    }
    /// <p>The robot software suite used by the robot application.</p>
    pub fn robot_software_suite(&self) -> ::std::option::Option<&crate::types::RobotSoftwareSuite> {
        self.robot_software_suite.as_ref()
    }
    /// <p>The revision id for the robot application.</p>
    pub fn current_revision_id(&self) -> ::std::option::Option<&str> {
        self.current_revision_id.as_deref()
    }
    /// <p>The object that contains the Docker image URI for your robot application.</p>
    pub fn environment(&self) -> ::std::option::Option<&crate::types::Environment> {
        self.environment.as_ref()
    }
}
impl UpdateRobotApplicationInput {
    /// Creates a new builder-style object to manufacture [`UpdateRobotApplicationInput`](crate::operation::update_robot_application::UpdateRobotApplicationInput).
    pub fn builder() -> crate::operation::update_robot_application::builders::UpdateRobotApplicationInputBuilder {
        crate::operation::update_robot_application::builders::UpdateRobotApplicationInputBuilder::default()
    }
}

/// A builder for [`UpdateRobotApplicationInput`](crate::operation::update_robot_application::UpdateRobotApplicationInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateRobotApplicationInputBuilder {
    pub(crate) application: ::std::option::Option<::std::string::String>,
    pub(crate) sources: ::std::option::Option<::std::vec::Vec<crate::types::SourceConfig>>,
    pub(crate) robot_software_suite: ::std::option::Option<crate::types::RobotSoftwareSuite>,
    pub(crate) current_revision_id: ::std::option::Option<::std::string::String>,
    pub(crate) environment: ::std::option::Option<crate::types::Environment>,
}
impl UpdateRobotApplicationInputBuilder {
    /// <p>The application information for the robot application.</p>
    /// This field is required.
    pub fn application(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.application = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The application information for the robot application.</p>
    pub fn set_application(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.application = input;
        self
    }
    /// <p>The application information for the robot application.</p>
    pub fn get_application(&self) -> &::std::option::Option<::std::string::String> {
        &self.application
    }
    /// Appends an item to `sources`.
    ///
    /// To override the contents of this collection use [`set_sources`](Self::set_sources).
    ///
    /// <p>The sources of the robot application.</p>
    pub fn sources(mut self, input: crate::types::SourceConfig) -> Self {
        let mut v = self.sources.unwrap_or_default();
        v.push(input);
        self.sources = ::std::option::Option::Some(v);
        self
    }
    /// <p>The sources of the robot application.</p>
    pub fn set_sources(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::SourceConfig>>) -> Self {
        self.sources = input;
        self
    }
    /// <p>The sources of the robot application.</p>
    pub fn get_sources(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::SourceConfig>> {
        &self.sources
    }
    /// <p>The robot software suite used by the robot application.</p>
    /// This field is required.
    pub fn robot_software_suite(mut self, input: crate::types::RobotSoftwareSuite) -> Self {
        self.robot_software_suite = ::std::option::Option::Some(input);
        self
    }
    /// <p>The robot software suite used by the robot application.</p>
    pub fn set_robot_software_suite(mut self, input: ::std::option::Option<crate::types::RobotSoftwareSuite>) -> Self {
        self.robot_software_suite = input;
        self
    }
    /// <p>The robot software suite used by the robot application.</p>
    pub fn get_robot_software_suite(&self) -> &::std::option::Option<crate::types::RobotSoftwareSuite> {
        &self.robot_software_suite
    }
    /// <p>The revision id for the robot application.</p>
    pub fn current_revision_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.current_revision_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The revision id for the robot application.</p>
    pub fn set_current_revision_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.current_revision_id = input;
        self
    }
    /// <p>The revision id for the robot application.</p>
    pub fn get_current_revision_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.current_revision_id
    }
    /// <p>The object that contains the Docker image URI for your robot application.</p>
    pub fn environment(mut self, input: crate::types::Environment) -> Self {
        self.environment = ::std::option::Option::Some(input);
        self
    }
    /// <p>The object that contains the Docker image URI for your robot application.</p>
    pub fn set_environment(mut self, input: ::std::option::Option<crate::types::Environment>) -> Self {
        self.environment = input;
        self
    }
    /// <p>The object that contains the Docker image URI for your robot application.</p>
    pub fn get_environment(&self) -> &::std::option::Option<crate::types::Environment> {
        &self.environment
    }
    /// Consumes the builder and constructs a [`UpdateRobotApplicationInput`](crate::operation::update_robot_application::UpdateRobotApplicationInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<
        crate::operation::update_robot_application::UpdateRobotApplicationInput,
        ::aws_smithy_types::error::operation::BuildError,
    > {
        ::std::result::Result::Ok(crate::operation::update_robot_application::UpdateRobotApplicationInput {
            application: self.application,
            sources: self.sources,
            robot_software_suite: self.robot_software_suite,
            current_revision_id: self.current_revision_id,
            environment: self.environment,
        })
    }
}