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 UploadEntityDefinitionsInput {
    /// <p>The <code>DefinitionDocument</code> that defines the updated entities.</p>
    pub document: ::std::option::Option<crate::types::DefinitionDocument>,
    /// <p>A Boolean that specifies whether to synchronize with the latest version of the public namespace. If set to <code>true</code>, the upload will create a new namespace version.</p>
    pub sync_with_public_namespace: ::std::option::Option<bool>,
    /// <p>A Boolean that specifies whether to deprecate all entities in the latest version before uploading the new <code>DefinitionDocument</code>. If set to <code>true</code>, the upload will create a new namespace version.</p>
    pub deprecate_existing_entities: ::std::option::Option<bool>,
}
impl UploadEntityDefinitionsInput {
    /// <p>The <code>DefinitionDocument</code> that defines the updated entities.</p>
    pub fn document(&self) -> ::std::option::Option<&crate::types::DefinitionDocument> {
        self.document.as_ref()
    }
    /// <p>A Boolean that specifies whether to synchronize with the latest version of the public namespace. If set to <code>true</code>, the upload will create a new namespace version.</p>
    pub fn sync_with_public_namespace(&self) -> ::std::option::Option<bool> {
        self.sync_with_public_namespace
    }
    /// <p>A Boolean that specifies whether to deprecate all entities in the latest version before uploading the new <code>DefinitionDocument</code>. If set to <code>true</code>, the upload will create a new namespace version.</p>
    pub fn deprecate_existing_entities(&self) -> ::std::option::Option<bool> {
        self.deprecate_existing_entities
    }
}
impl UploadEntityDefinitionsInput {
    /// Creates a new builder-style object to manufacture [`UploadEntityDefinitionsInput`](crate::operation::upload_entity_definitions::UploadEntityDefinitionsInput).
    pub fn builder() -> crate::operation::upload_entity_definitions::builders::UploadEntityDefinitionsInputBuilder {
        crate::operation::upload_entity_definitions::builders::UploadEntityDefinitionsInputBuilder::default()
    }
}

/// A builder for [`UploadEntityDefinitionsInput`](crate::operation::upload_entity_definitions::UploadEntityDefinitionsInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UploadEntityDefinitionsInputBuilder {
    pub(crate) document: ::std::option::Option<crate::types::DefinitionDocument>,
    pub(crate) sync_with_public_namespace: ::std::option::Option<bool>,
    pub(crate) deprecate_existing_entities: ::std::option::Option<bool>,
}
impl UploadEntityDefinitionsInputBuilder {
    /// <p>The <code>DefinitionDocument</code> that defines the updated entities.</p>
    pub fn document(mut self, input: crate::types::DefinitionDocument) -> Self {
        self.document = ::std::option::Option::Some(input);
        self
    }
    /// <p>The <code>DefinitionDocument</code> that defines the updated entities.</p>
    pub fn set_document(mut self, input: ::std::option::Option<crate::types::DefinitionDocument>) -> Self {
        self.document = input;
        self
    }
    /// <p>The <code>DefinitionDocument</code> that defines the updated entities.</p>
    pub fn get_document(&self) -> &::std::option::Option<crate::types::DefinitionDocument> {
        &self.document
    }
    /// <p>A Boolean that specifies whether to synchronize with the latest version of the public namespace. If set to <code>true</code>, the upload will create a new namespace version.</p>
    pub fn sync_with_public_namespace(mut self, input: bool) -> Self {
        self.sync_with_public_namespace = ::std::option::Option::Some(input);
        self
    }
    /// <p>A Boolean that specifies whether to synchronize with the latest version of the public namespace. If set to <code>true</code>, the upload will create a new namespace version.</p>
    pub fn set_sync_with_public_namespace(mut self, input: ::std::option::Option<bool>) -> Self {
        self.sync_with_public_namespace = input;
        self
    }
    /// <p>A Boolean that specifies whether to synchronize with the latest version of the public namespace. If set to <code>true</code>, the upload will create a new namespace version.</p>
    pub fn get_sync_with_public_namespace(&self) -> &::std::option::Option<bool> {
        &self.sync_with_public_namespace
    }
    /// <p>A Boolean that specifies whether to deprecate all entities in the latest version before uploading the new <code>DefinitionDocument</code>. If set to <code>true</code>, the upload will create a new namespace version.</p>
    pub fn deprecate_existing_entities(mut self, input: bool) -> Self {
        self.deprecate_existing_entities = ::std::option::Option::Some(input);
        self
    }
    /// <p>A Boolean that specifies whether to deprecate all entities in the latest version before uploading the new <code>DefinitionDocument</code>. If set to <code>true</code>, the upload will create a new namespace version.</p>
    pub fn set_deprecate_existing_entities(mut self, input: ::std::option::Option<bool>) -> Self {
        self.deprecate_existing_entities = input;
        self
    }
    /// <p>A Boolean that specifies whether to deprecate all entities in the latest version before uploading the new <code>DefinitionDocument</code>. If set to <code>true</code>, the upload will create a new namespace version.</p>
    pub fn get_deprecate_existing_entities(&self) -> &::std::option::Option<bool> {
        &self.deprecate_existing_entities
    }
    /// Consumes the builder and constructs a [`UploadEntityDefinitionsInput`](crate::operation::upload_entity_definitions::UploadEntityDefinitionsInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<
        crate::operation::upload_entity_definitions::UploadEntityDefinitionsInput,
        ::aws_smithy_types::error::operation::BuildError,
    > {
        ::std::result::Result::Ok(crate::operation::upload_entity_definitions::UploadEntityDefinitionsInput {
            document: self.document,
            sync_with_public_namespace: self.sync_with_public_namespace,
            deprecate_existing_entities: self.deprecate_existing_entities,
        })
    }
}