1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107
// 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>
#[doc(hidden)]
pub id: std::option::Option<std::string::String>,
/// <p>The <code>DefinitionDocument</code> that contains the updated system definition.</p>
#[doc(hidden)]
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>
#[doc(hidden)]
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).
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
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>
pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
self.id = 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 <code>DefinitionDocument</code> that contains the updated system definition.</p>
pub fn definition(mut self, input: crate::types::DefinitionDocument) -> Self {
self.definition = 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 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 = 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
}
/// Consumes the builder and constructs a [`UpdateSystemTemplateInput`](crate::operation::update_system_template::UpdateSystemTemplateInput).
pub fn build(
self,
) -> Result<
crate::operation::update_system_template::UpdateSystemTemplateInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(
crate::operation::update_system_template::UpdateSystemTemplateInput {
id: self.id,
definition: self.definition,
compatible_namespace_version: self.compatible_namespace_version,
},
)
}
}