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 108
// 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 DeleteDocumentInput {
/// <p>The name of the document.</p>
#[doc(hidden)]
pub name: std::option::Option<std::string::String>,
/// <p>The version of the document that you want to delete. If not provided, all versions of the document are deleted.</p>
#[doc(hidden)]
pub document_version: std::option::Option<std::string::String>,
/// <p>The version name of the document that you want to delete. If not provided, all versions of the document are deleted.</p>
#[doc(hidden)]
pub version_name: std::option::Option<std::string::String>,
/// <p>Some SSM document types require that you specify a <code>Force</code> flag before you can delete the document. For example, you must specify a <code>Force</code> flag to delete a document of type <code>ApplicationConfigurationSchema</code>. You can restrict access to the <code>Force</code> flag in an Identity and Access Management (IAM) policy.</p>
#[doc(hidden)]
pub force: std::option::Option<bool>,
}
impl DeleteDocumentInput {
/// <p>The name of the document.</p>
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
/// <p>The version of the document that you want to delete. If not provided, all versions of the document are deleted.</p>
pub fn document_version(&self) -> std::option::Option<&str> {
self.document_version.as_deref()
}
/// <p>The version name of the document that you want to delete. If not provided, all versions of the document are deleted.</p>
pub fn version_name(&self) -> std::option::Option<&str> {
self.version_name.as_deref()
}
/// <p>Some SSM document types require that you specify a <code>Force</code> flag before you can delete the document. For example, you must specify a <code>Force</code> flag to delete a document of type <code>ApplicationConfigurationSchema</code>. You can restrict access to the <code>Force</code> flag in an Identity and Access Management (IAM) policy.</p>
pub fn force(&self) -> std::option::Option<bool> {
self.force
}
}
impl DeleteDocumentInput {
/// Creates a new builder-style object to manufacture [`DeleteDocumentInput`](crate::operation::delete_document::DeleteDocumentInput).
pub fn builder() -> crate::operation::delete_document::builders::DeleteDocumentInputBuilder {
crate::operation::delete_document::builders::DeleteDocumentInputBuilder::default()
}
}
/// A builder for [`DeleteDocumentInput`](crate::operation::delete_document::DeleteDocumentInput).
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct DeleteDocumentInputBuilder {
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) document_version: std::option::Option<std::string::String>,
pub(crate) version_name: std::option::Option<std::string::String>,
pub(crate) force: std::option::Option<bool>,
}
impl DeleteDocumentInputBuilder {
/// <p>The name of the document.</p>
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
/// <p>The name of the document.</p>
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
/// <p>The version of the document that you want to delete. If not provided, all versions of the document are deleted.</p>
pub fn document_version(mut self, input: impl Into<std::string::String>) -> Self {
self.document_version = Some(input.into());
self
}
/// <p>The version of the document that you want to delete. If not provided, all versions of the document are deleted.</p>
pub fn set_document_version(mut self, input: std::option::Option<std::string::String>) -> Self {
self.document_version = input;
self
}
/// <p>The version name of the document that you want to delete. If not provided, all versions of the document are deleted.</p>
pub fn version_name(mut self, input: impl Into<std::string::String>) -> Self {
self.version_name = Some(input.into());
self
}
/// <p>The version name of the document that you want to delete. If not provided, all versions of the document are deleted.</p>
pub fn set_version_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.version_name = input;
self
}
/// <p>Some SSM document types require that you specify a <code>Force</code> flag before you can delete the document. For example, you must specify a <code>Force</code> flag to delete a document of type <code>ApplicationConfigurationSchema</code>. You can restrict access to the <code>Force</code> flag in an Identity and Access Management (IAM) policy.</p>
pub fn force(mut self, input: bool) -> Self {
self.force = Some(input);
self
}
/// <p>Some SSM document types require that you specify a <code>Force</code> flag before you can delete the document. For example, you must specify a <code>Force</code> flag to delete a document of type <code>ApplicationConfigurationSchema</code>. You can restrict access to the <code>Force</code> flag in an Identity and Access Management (IAM) policy.</p>
pub fn set_force(mut self, input: std::option::Option<bool>) -> Self {
self.force = input;
self
}
/// Consumes the builder and constructs a [`DeleteDocumentInput`](crate::operation::delete_document::DeleteDocumentInput).
pub fn build(
self,
) -> Result<
crate::operation::delete_document::DeleteDocumentInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::operation::delete_document::DeleteDocumentInput {
name: self.name,
document_version: self.document_version,
version_name: self.version_name,
force: self.force,
})
}
}