aws-sdk-iotthingsgraph 1.97.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 CreateFlowTemplateInput {
    /// <p>The workflow <code>DefinitionDocument</code>.</p>
    pub definition: ::std::option::Option<crate::types::DefinitionDocument>,
    /// <p>The namespace version in which the workflow is to be created.</p>
    /// <p>If no value is specified, the latest version is used by default.</p>
    pub compatible_namespace_version: ::std::option::Option<i64>,
}
impl CreateFlowTemplateInput {
    /// <p>The workflow <code>DefinitionDocument</code>.</p>
    pub fn definition(&self) -> ::std::option::Option<&crate::types::DefinitionDocument> {
        self.definition.as_ref()
    }
    /// <p>The namespace version in which the workflow is to be created.</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 CreateFlowTemplateInput {
    /// Creates a new builder-style object to manufacture [`CreateFlowTemplateInput`](crate::operation::create_flow_template::CreateFlowTemplateInput).
    pub fn builder() -> crate::operation::create_flow_template::builders::CreateFlowTemplateInputBuilder {
        crate::operation::create_flow_template::builders::CreateFlowTemplateInputBuilder::default()
    }
}

/// A builder for [`CreateFlowTemplateInput`](crate::operation::create_flow_template::CreateFlowTemplateInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateFlowTemplateInputBuilder {
    pub(crate) definition: ::std::option::Option<crate::types::DefinitionDocument>,
    pub(crate) compatible_namespace_version: ::std::option::Option<i64>,
}
impl CreateFlowTemplateInputBuilder {
    /// <p>The workflow <code>DefinitionDocument</code>.</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 workflow <code>DefinitionDocument</code>.</p>
    pub fn set_definition(mut self, input: ::std::option::Option<crate::types::DefinitionDocument>) -> Self {
        self.definition = input;
        self
    }
    /// <p>The workflow <code>DefinitionDocument</code>.</p>
    pub fn get_definition(&self) -> &::std::option::Option<crate::types::DefinitionDocument> {
        &self.definition
    }
    /// <p>The namespace version in which the workflow is to be created.</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 namespace version in which the workflow is to be created.</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 namespace version in which the workflow is to be created.</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 [`CreateFlowTemplateInput`](crate::operation::create_flow_template::CreateFlowTemplateInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::create_flow_template::CreateFlowTemplateInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::create_flow_template::CreateFlowTemplateInput {
            definition: self.definition,
            compatible_namespace_version: self.compatible_namespace_version,
        })
    }
}