aws-sdk-nimble 1.46.0

AWS SDK for AmazonNimbleStudio
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)]
pub struct UpdateStudioComponentInput {
    /// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you don’t specify a client token, the Amazon Web Services SDK automatically generates a client token and uses it for the request to ensure idempotency.</p>
    pub client_token: ::std::option::Option<::std::string::String>,
    /// <p>The configuration of the studio component, based on component type.</p>
    pub configuration: ::std::option::Option<crate::types::StudioComponentConfiguration>,
    /// <p>The description.</p>
    pub description: ::std::option::Option<::std::string::String>,
    /// <p>The EC2 security groups that control access to the studio component.</p>
    pub ec2_security_group_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    /// <p>Initialization scripts for studio components.</p>
    pub initialization_scripts: ::std::option::Option<::std::vec::Vec<crate::types::StudioComponentInitializationScript>>,
    /// <p>The name for the studio component.</p>
    pub name: ::std::option::Option<::std::string::String>,
    /// <p>Parameters for the studio component scripts.</p>
    pub script_parameters: ::std::option::Option<::std::vec::Vec<crate::types::ScriptParameterKeyValue>>,
    /// <p>The studio component ID.</p>
    pub studio_component_id: ::std::option::Option<::std::string::String>,
    /// <p>The studio ID.</p>
    pub studio_id: ::std::option::Option<::std::string::String>,
    /// <p>The specific subtype of a studio component.</p>
    pub subtype: ::std::option::Option<crate::types::StudioComponentSubtype>,
    /// <p>The type of the studio component.</p>
    pub r#type: ::std::option::Option<crate::types::StudioComponentType>,
    /// <p>An IAM role attached to Studio Component when the system initialization script runs which give the studio component access to Amazon Web Services resources when the system initialization script runs.</p>
    pub secure_initialization_role_arn: ::std::option::Option<::std::string::String>,
    /// <p>An IAM role attached to a Studio Component that gives the studio component access to Amazon Web Services resources at anytime while the instance is running.</p>
    pub runtime_role_arn: ::std::option::Option<::std::string::String>,
}
impl UpdateStudioComponentInput {
    /// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you don’t specify a client token, the Amazon Web Services SDK automatically generates a client token and uses it for the request to ensure idempotency.</p>
    pub fn client_token(&self) -> ::std::option::Option<&str> {
        self.client_token.as_deref()
    }
    /// <p>The configuration of the studio component, based on component type.</p>
    pub fn configuration(&self) -> ::std::option::Option<&crate::types::StudioComponentConfiguration> {
        self.configuration.as_ref()
    }
    /// <p>The description.</p>
    pub fn description(&self) -> ::std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>The EC2 security groups that control access to the studio component.</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 `.ec2_security_group_ids.is_none()`.
    pub fn ec2_security_group_ids(&self) -> &[::std::string::String] {
        self.ec2_security_group_ids.as_deref().unwrap_or_default()
    }
    /// <p>Initialization scripts for studio components.</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 `.initialization_scripts.is_none()`.
    pub fn initialization_scripts(&self) -> &[crate::types::StudioComponentInitializationScript] {
        self.initialization_scripts.as_deref().unwrap_or_default()
    }
    /// <p>The name for the studio component.</p>
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>Parameters for the studio component scripts.</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 `.script_parameters.is_none()`.
    pub fn script_parameters(&self) -> &[crate::types::ScriptParameterKeyValue] {
        self.script_parameters.as_deref().unwrap_or_default()
    }
    /// <p>The studio component ID.</p>
    pub fn studio_component_id(&self) -> ::std::option::Option<&str> {
        self.studio_component_id.as_deref()
    }
    /// <p>The studio ID.</p>
    pub fn studio_id(&self) -> ::std::option::Option<&str> {
        self.studio_id.as_deref()
    }
    /// <p>The specific subtype of a studio component.</p>
    pub fn subtype(&self) -> ::std::option::Option<&crate::types::StudioComponentSubtype> {
        self.subtype.as_ref()
    }
    /// <p>The type of the studio component.</p>
    pub fn r#type(&self) -> ::std::option::Option<&crate::types::StudioComponentType> {
        self.r#type.as_ref()
    }
    /// <p>An IAM role attached to Studio Component when the system initialization script runs which give the studio component access to Amazon Web Services resources when the system initialization script runs.</p>
    pub fn secure_initialization_role_arn(&self) -> ::std::option::Option<&str> {
        self.secure_initialization_role_arn.as_deref()
    }
    /// <p>An IAM role attached to a Studio Component that gives the studio component access to Amazon Web Services resources at anytime while the instance is running.</p>
    pub fn runtime_role_arn(&self) -> ::std::option::Option<&str> {
        self.runtime_role_arn.as_deref()
    }
}
impl ::std::fmt::Debug for UpdateStudioComponentInput {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("UpdateStudioComponentInput");
        formatter.field("client_token", &self.client_token);
        formatter.field("configuration", &self.configuration);
        formatter.field("description", &"*** Sensitive Data Redacted ***");
        formatter.field("ec2_security_group_ids", &self.ec2_security_group_ids);
        formatter.field("initialization_scripts", &self.initialization_scripts);
        formatter.field("name", &"*** Sensitive Data Redacted ***");
        formatter.field("script_parameters", &"*** Sensitive Data Redacted ***");
        formatter.field("studio_component_id", &self.studio_component_id);
        formatter.field("studio_id", &self.studio_id);
        formatter.field("subtype", &self.subtype);
        formatter.field("r#type", &self.r#type);
        formatter.field("secure_initialization_role_arn", &self.secure_initialization_role_arn);
        formatter.field("runtime_role_arn", &self.runtime_role_arn);
        formatter.finish()
    }
}
impl UpdateStudioComponentInput {
    /// Creates a new builder-style object to manufacture [`UpdateStudioComponentInput`](crate::operation::update_studio_component::UpdateStudioComponentInput).
    pub fn builder() -> crate::operation::update_studio_component::builders::UpdateStudioComponentInputBuilder {
        crate::operation::update_studio_component::builders::UpdateStudioComponentInputBuilder::default()
    }
}

/// A builder for [`UpdateStudioComponentInput`](crate::operation::update_studio_component::UpdateStudioComponentInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct UpdateStudioComponentInputBuilder {
    pub(crate) client_token: ::std::option::Option<::std::string::String>,
    pub(crate) configuration: ::std::option::Option<crate::types::StudioComponentConfiguration>,
    pub(crate) description: ::std::option::Option<::std::string::String>,
    pub(crate) ec2_security_group_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    pub(crate) initialization_scripts: ::std::option::Option<::std::vec::Vec<crate::types::StudioComponentInitializationScript>>,
    pub(crate) name: ::std::option::Option<::std::string::String>,
    pub(crate) script_parameters: ::std::option::Option<::std::vec::Vec<crate::types::ScriptParameterKeyValue>>,
    pub(crate) studio_component_id: ::std::option::Option<::std::string::String>,
    pub(crate) studio_id: ::std::option::Option<::std::string::String>,
    pub(crate) subtype: ::std::option::Option<crate::types::StudioComponentSubtype>,
    pub(crate) r#type: ::std::option::Option<crate::types::StudioComponentType>,
    pub(crate) secure_initialization_role_arn: ::std::option::Option<::std::string::String>,
    pub(crate) runtime_role_arn: ::std::option::Option<::std::string::String>,
}
impl UpdateStudioComponentInputBuilder {
    /// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you don’t specify a client token, the Amazon Web Services SDK automatically generates a client token and uses it for the request to ensure idempotency.</p>
    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.client_token = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you don’t specify a client token, the Amazon Web Services SDK automatically generates a client token and uses it for the request to ensure idempotency.</p>
    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.client_token = input;
        self
    }
    /// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you don’t specify a client token, the Amazon Web Services SDK automatically generates a client token and uses it for the request to ensure idempotency.</p>
    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.client_token
    }
    /// <p>The configuration of the studio component, based on component type.</p>
    pub fn configuration(mut self, input: crate::types::StudioComponentConfiguration) -> Self {
        self.configuration = ::std::option::Option::Some(input);
        self
    }
    /// <p>The configuration of the studio component, based on component type.</p>
    pub fn set_configuration(mut self, input: ::std::option::Option<crate::types::StudioComponentConfiguration>) -> Self {
        self.configuration = input;
        self
    }
    /// <p>The configuration of the studio component, based on component type.</p>
    pub fn get_configuration(&self) -> &::std::option::Option<crate::types::StudioComponentConfiguration> {
        &self.configuration
    }
    /// <p>The description.</p>
    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.description = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The description.</p>
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.description = input;
        self
    }
    /// <p>The description.</p>
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.description
    }
    /// Appends an item to `ec2_security_group_ids`.
    ///
    /// To override the contents of this collection use [`set_ec2_security_group_ids`](Self::set_ec2_security_group_ids).
    ///
    /// <p>The EC2 security groups that control access to the studio component.</p>
    pub fn ec2_security_group_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.ec2_security_group_ids.unwrap_or_default();
        v.push(input.into());
        self.ec2_security_group_ids = ::std::option::Option::Some(v);
        self
    }
    /// <p>The EC2 security groups that control access to the studio component.</p>
    pub fn set_ec2_security_group_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.ec2_security_group_ids = input;
        self
    }
    /// <p>The EC2 security groups that control access to the studio component.</p>
    pub fn get_ec2_security_group_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.ec2_security_group_ids
    }
    /// Appends an item to `initialization_scripts`.
    ///
    /// To override the contents of this collection use [`set_initialization_scripts`](Self::set_initialization_scripts).
    ///
    /// <p>Initialization scripts for studio components.</p>
    pub fn initialization_scripts(mut self, input: crate::types::StudioComponentInitializationScript) -> Self {
        let mut v = self.initialization_scripts.unwrap_or_default();
        v.push(input);
        self.initialization_scripts = ::std::option::Option::Some(v);
        self
    }
    /// <p>Initialization scripts for studio components.</p>
    pub fn set_initialization_scripts(
        mut self,
        input: ::std::option::Option<::std::vec::Vec<crate::types::StudioComponentInitializationScript>>,
    ) -> Self {
        self.initialization_scripts = input;
        self
    }
    /// <p>Initialization scripts for studio components.</p>
    pub fn get_initialization_scripts(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::StudioComponentInitializationScript>> {
        &self.initialization_scripts
    }
    /// <p>The name for the studio component.</p>
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name for the studio component.</p>
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// <p>The name for the studio component.</p>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// Appends an item to `script_parameters`.
    ///
    /// To override the contents of this collection use [`set_script_parameters`](Self::set_script_parameters).
    ///
    /// <p>Parameters for the studio component scripts.</p>
    pub fn script_parameters(mut self, input: crate::types::ScriptParameterKeyValue) -> Self {
        let mut v = self.script_parameters.unwrap_or_default();
        v.push(input);
        self.script_parameters = ::std::option::Option::Some(v);
        self
    }
    /// <p>Parameters for the studio component scripts.</p>
    pub fn set_script_parameters(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ScriptParameterKeyValue>>) -> Self {
        self.script_parameters = input;
        self
    }
    /// <p>Parameters for the studio component scripts.</p>
    pub fn get_script_parameters(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ScriptParameterKeyValue>> {
        &self.script_parameters
    }
    /// <p>The studio component ID.</p>
    /// This field is required.
    pub fn studio_component_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.studio_component_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The studio component ID.</p>
    pub fn set_studio_component_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.studio_component_id = input;
        self
    }
    /// <p>The studio component ID.</p>
    pub fn get_studio_component_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.studio_component_id
    }
    /// <p>The studio ID.</p>
    /// This field is required.
    pub fn studio_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.studio_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The studio ID.</p>
    pub fn set_studio_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.studio_id = input;
        self
    }
    /// <p>The studio ID.</p>
    pub fn get_studio_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.studio_id
    }
    /// <p>The specific subtype of a studio component.</p>
    pub fn subtype(mut self, input: crate::types::StudioComponentSubtype) -> Self {
        self.subtype = ::std::option::Option::Some(input);
        self
    }
    /// <p>The specific subtype of a studio component.</p>
    pub fn set_subtype(mut self, input: ::std::option::Option<crate::types::StudioComponentSubtype>) -> Self {
        self.subtype = input;
        self
    }
    /// <p>The specific subtype of a studio component.</p>
    pub fn get_subtype(&self) -> &::std::option::Option<crate::types::StudioComponentSubtype> {
        &self.subtype
    }
    /// <p>The type of the studio component.</p>
    pub fn r#type(mut self, input: crate::types::StudioComponentType) -> Self {
        self.r#type = ::std::option::Option::Some(input);
        self
    }
    /// <p>The type of the studio component.</p>
    pub fn set_type(mut self, input: ::std::option::Option<crate::types::StudioComponentType>) -> Self {
        self.r#type = input;
        self
    }
    /// <p>The type of the studio component.</p>
    pub fn get_type(&self) -> &::std::option::Option<crate::types::StudioComponentType> {
        &self.r#type
    }
    /// <p>An IAM role attached to Studio Component when the system initialization script runs which give the studio component access to Amazon Web Services resources when the system initialization script runs.</p>
    pub fn secure_initialization_role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.secure_initialization_role_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>An IAM role attached to Studio Component when the system initialization script runs which give the studio component access to Amazon Web Services resources when the system initialization script runs.</p>
    pub fn set_secure_initialization_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.secure_initialization_role_arn = input;
        self
    }
    /// <p>An IAM role attached to Studio Component when the system initialization script runs which give the studio component access to Amazon Web Services resources when the system initialization script runs.</p>
    pub fn get_secure_initialization_role_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.secure_initialization_role_arn
    }
    /// <p>An IAM role attached to a Studio Component that gives the studio component access to Amazon Web Services resources at anytime while the instance is running.</p>
    pub fn runtime_role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.runtime_role_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>An IAM role attached to a Studio Component that gives the studio component access to Amazon Web Services resources at anytime while the instance is running.</p>
    pub fn set_runtime_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.runtime_role_arn = input;
        self
    }
    /// <p>An IAM role attached to a Studio Component that gives the studio component access to Amazon Web Services resources at anytime while the instance is running.</p>
    pub fn get_runtime_role_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.runtime_role_arn
    }
    /// Consumes the builder and constructs a [`UpdateStudioComponentInput`](crate::operation::update_studio_component::UpdateStudioComponentInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::update_studio_component::UpdateStudioComponentInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::update_studio_component::UpdateStudioComponentInput {
            client_token: self.client_token,
            configuration: self.configuration,
            description: self.description,
            ec2_security_group_ids: self.ec2_security_group_ids,
            initialization_scripts: self.initialization_scripts,
            name: self.name,
            script_parameters: self.script_parameters,
            studio_component_id: self.studio_component_id,
            studio_id: self.studio_id,
            subtype: self.subtype,
            r#type: self.r#type,
            secure_initialization_role_arn: self.secure_initialization_role_arn,
            runtime_role_arn: self.runtime_role_arn,
        })
    }
}
impl ::std::fmt::Debug for UpdateStudioComponentInputBuilder {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("UpdateStudioComponentInputBuilder");
        formatter.field("client_token", &self.client_token);
        formatter.field("configuration", &self.configuration);
        formatter.field("description", &"*** Sensitive Data Redacted ***");
        formatter.field("ec2_security_group_ids", &self.ec2_security_group_ids);
        formatter.field("initialization_scripts", &self.initialization_scripts);
        formatter.field("name", &"*** Sensitive Data Redacted ***");
        formatter.field("script_parameters", &"*** Sensitive Data Redacted ***");
        formatter.field("studio_component_id", &self.studio_component_id);
        formatter.field("studio_id", &self.studio_id);
        formatter.field("subtype", &self.subtype);
        formatter.field("r#type", &self.r#type);
        formatter.field("secure_initialization_role_arn", &self.secure_initialization_role_arn);
        formatter.field("runtime_role_arn", &self.runtime_role_arn);
        formatter.finish()
    }
}