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 UpdateFlowTemplateInput {
    /// <p>The ID of the workflow to be updated.</p>
    /// <p>The ID should be in the following format.</p>
    /// <p><code>urn:tdm:REGION/ACCOUNT ID/default:workflow:WORKFLOWNAME</code></p>
    pub id: ::std::option::Option<::std::string::String>,
    /// <p>The <code>DefinitionDocument</code> that contains the updated workflow definition.</p>
    pub definition: ::std::option::Option<crate::types::DefinitionDocument>,
    /// <p>The version of the user's namespace.</p>
    /// <p>If no value is specified, the latest version is used by default. Use the <code>GetFlowTemplateRevisions</code> if you want to find earlier revisions of the flow to update.</p>
    pub compatible_namespace_version: ::std::option::Option<i64>,
}
impl UpdateFlowTemplateInput {
    /// <p>The ID of the workflow to be updated.</p>
    /// <p>The ID should be in the following format.</p>
    /// <p><code>urn:tdm:REGION/ACCOUNT ID/default:workflow:WORKFLOWNAME</code></p>
    pub fn id(&self) -> ::std::option::Option<&str> {
        self.id.as_deref()
    }
    /// <p>The <code>DefinitionDocument</code> that contains the updated workflow definition.</p>
    pub fn definition(&self) -> ::std::option::Option<&crate::types::DefinitionDocument> {
        self.definition.as_ref()
    }
    /// <p>The version of the user's namespace.</p>
    /// <p>If no value is specified, the latest version is used by default. Use the <code>GetFlowTemplateRevisions</code> if you want to find earlier revisions of the flow to update.</p>
    pub fn compatible_namespace_version(&self) -> ::std::option::Option<i64> {
        self.compatible_namespace_version
    }
}
impl UpdateFlowTemplateInput {
    /// Creates a new builder-style object to manufacture [`UpdateFlowTemplateInput`](crate::operation::update_flow_template::UpdateFlowTemplateInput).
    pub fn builder() -> crate::operation::update_flow_template::builders::UpdateFlowTemplateInputBuilder {
        crate::operation::update_flow_template::builders::UpdateFlowTemplateInputBuilder::default()
    }
}

/// A builder for [`UpdateFlowTemplateInput`](crate::operation::update_flow_template::UpdateFlowTemplateInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateFlowTemplateInputBuilder {
    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 UpdateFlowTemplateInputBuilder {
    /// <p>The ID of the workflow to be updated.</p>
    /// <p>The ID should be in the following format.</p>
    /// <p><code>urn:tdm:REGION/ACCOUNT ID/default:workflow:WORKFLOWNAME</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 workflow to be updated.</p>
    /// <p>The ID should be in the following format.</p>
    /// <p><code>urn:tdm:REGION/ACCOUNT ID/default:workflow:WORKFLOWNAME</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 workflow to be updated.</p>
    /// <p>The ID should be in the following format.</p>
    /// <p><code>urn:tdm:REGION/ACCOUNT ID/default:workflow:WORKFLOWNAME</code></p>
    pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.id
    }
    /// <p>The <code>DefinitionDocument</code> that contains the updated workflow 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 workflow 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 workflow definition.</p>
    pub fn get_definition(&self) -> &::std::option::Option<crate::types::DefinitionDocument> {
        &self.definition
    }
    /// <p>The version of the user's namespace.</p>
    /// <p>If no value is specified, the latest version is used by default. Use the <code>GetFlowTemplateRevisions</code> if you want to find earlier revisions of the flow to update.</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.</p>
    /// <p>If no value is specified, the latest version is used by default. Use the <code>GetFlowTemplateRevisions</code> if you want to find earlier revisions of the flow to update.</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.</p>
    /// <p>If no value is specified, the latest version is used by default. Use the <code>GetFlowTemplateRevisions</code> if you want to find earlier revisions of the flow to update.</p>
    pub fn get_compatible_namespace_version(&self) -> &::std::option::Option<i64> {
        &self.compatible_namespace_version
    }
    /// Consumes the builder and constructs a [`UpdateFlowTemplateInput`](crate::operation::update_flow_template::UpdateFlowTemplateInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::update_flow_template::UpdateFlowTemplateInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::update_flow_template::UpdateFlowTemplateInput {
            id: self.id,
            definition: self.definition,
            compatible_namespace_version: self.compatible_namespace_version,
        })
    }
}