aws-sdk-iotthingsgraph 1.98.0

AWS SDK for AWS IoT Things Graph
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 UpdateSystemTemplateInput {
    /// <p>The ID of the system to be updated.</p>
    /// <p>The ID should be in the following format.</p>
    /// <p><code>urn:tdm:REGION/ACCOUNT ID/default:system:SYSTEMNAME</code></p>
    pub id: ::std::option::Option<::std::string::String>,
    /// <p>The <code>DefinitionDocument</code> that contains the updated system definition.</p>
    pub definition: ::std::option::Option<crate::types::DefinitionDocument>,
    /// <p>The version of the user's namespace. Defaults to the latest version of the user's namespace.</p>
    /// <p>If no value is specified, the latest version is used by default.</p>
    pub compatible_namespace_version: ::std::option::Option<i64>,
}
impl UpdateSystemTemplateInput {
    /// <p>The ID of the system to be updated.</p>
    /// <p>The ID should be in the following format.</p>
    /// <p><code>urn:tdm:REGION/ACCOUNT ID/default:system:SYSTEMNAME</code></p>
    pub fn id(&self) -> ::std::option::Option<&str> {
        self.id.as_deref()
    }
    /// <p>The <code>DefinitionDocument</code> that contains the updated system definition.</p>
    pub fn definition(&self) -> ::std::option::Option<&crate::types::DefinitionDocument> {
        self.definition.as_ref()
    }
    /// <p>The version of the user's namespace. Defaults to the latest version of the user's namespace.</p>
    /// <p>If no value is specified, the latest version is used by default.</p>
    pub fn compatible_namespace_version(&self) -> ::std::option::Option<i64> {
        self.compatible_namespace_version
    }
}
impl UpdateSystemTemplateInput {
    /// Creates a new builder-style object to manufacture [`UpdateSystemTemplateInput`](crate::operation::update_system_template::UpdateSystemTemplateInput).
    pub fn builder() -> crate::operation::update_system_template::builders::UpdateSystemTemplateInputBuilder {
        crate::operation::update_system_template::builders::UpdateSystemTemplateInputBuilder::default()
    }
}

/// A builder for [`UpdateSystemTemplateInput`](crate::operation::update_system_template::UpdateSystemTemplateInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateSystemTemplateInputBuilder {
    pub(crate) id: ::std::option::Option<::std::string::String>,
    pub(crate) definition: ::std::option::Option<crate::types::DefinitionDocument>,
    pub(crate) compatible_namespace_version: ::std::option::Option<i64>,
}
impl UpdateSystemTemplateInputBuilder {
    /// <p>The ID of the system to be updated.</p>
    /// <p>The ID should be in the following format.</p>
    /// <p><code>urn:tdm:REGION/ACCOUNT ID/default:system:SYSTEMNAME</code></p>
    /// This field is required.
    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 system to be updated.</p>
    /// <p>The ID should be in the following format.</p>
    /// <p><code>urn:tdm:REGION/ACCOUNT ID/default:system:SYSTEMNAME</code></p>
    pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.id = input;
        self
    }
    /// <p>The ID of the system to be updated.</p>
    /// <p>The ID should be in the following format.</p>
    /// <p><code>urn:tdm:REGION/ACCOUNT ID/default:system:SYSTEMNAME</code></p>
    pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.id
    }
    /// <p>The <code>DefinitionDocument</code> that contains the updated system definition.</p>
    /// This field is required.
    pub fn definition(mut self, input: crate::types::DefinitionDocument) -> Self {
        self.definition = ::std::option::Option::Some(input);
        self
    }
    /// <p>The <code>DefinitionDocument</code> that contains the updated system definition.</p>
    pub fn set_definition(mut self, input: ::std::option::Option<crate::types::DefinitionDocument>) -> Self {
        self.definition = input;
        self
    }
    /// <p>The <code>DefinitionDocument</code> that contains the updated system definition.</p>
    pub fn get_definition(&self) -> &::std::option::Option<crate::types::DefinitionDocument> {
        &self.definition
    }
    /// <p>The version of the user's namespace. Defaults to the latest version of the user's namespace.</p>
    /// <p>If no value is specified, the latest version is used by default.</p>
    pub fn compatible_namespace_version(mut self, input: i64) -> Self {
        self.compatible_namespace_version = ::std::option::Option::Some(input);
        self
    }
    /// <p>The version of the user's namespace. Defaults to the latest version of the user's namespace.</p>
    /// <p>If no value is specified, the latest version is used by default.</p>
    pub fn set_compatible_namespace_version(mut self, input: ::std::option::Option<i64>) -> Self {
        self.compatible_namespace_version = input;
        self
    }
    /// <p>The version of the user's namespace. Defaults to the latest version of the user's namespace.</p>
    /// <p>If no value is specified, the latest version is used by default.</p>
    pub fn get_compatible_namespace_version(&self) -> &::std::option::Option<i64> {
        &self.compatible_namespace_version
    }
    /// Consumes the builder and constructs a [`UpdateSystemTemplateInput`](crate::operation::update_system_template::UpdateSystemTemplateInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::update_system_template::UpdateSystemTemplateInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::update_system_template::UpdateSystemTemplateInput {
            id: self.id,
            definition: self.definition,
            compatible_namespace_version: self.compatible_namespace_version,
        })
    }
}