aws_sdk_ssm/operation/describe_document/
_describe_document_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct DescribeDocumentInput {
6    /// <p>The name of the SSM document.</p><note>
7    /// <p>If you're calling a shared SSM document from a different Amazon Web Services account, <code>Name</code> is the full Amazon Resource Name (ARN) of the document.</p>
8    /// </note>
9    pub name: ::std::option::Option<::std::string::String>,
10    /// <p>The document version for which you want information. Can be a specific version or the default version.</p>
11    pub document_version: ::std::option::Option<::std::string::String>,
12    /// <p>An optional field specifying the version of the artifact associated with the document. For example, 12.6. This value is unique across all versions of a document, and can't be changed.</p>
13    pub version_name: ::std::option::Option<::std::string::String>,
14}
15impl DescribeDocumentInput {
16    /// <p>The name of the SSM document.</p><note>
17    /// <p>If you're calling a shared SSM document from a different Amazon Web Services account, <code>Name</code> is the full Amazon Resource Name (ARN) of the document.</p>
18    /// </note>
19    pub fn name(&self) -> ::std::option::Option<&str> {
20        self.name.as_deref()
21    }
22    /// <p>The document version for which you want information. Can be a specific version or the default version.</p>
23    pub fn document_version(&self) -> ::std::option::Option<&str> {
24        self.document_version.as_deref()
25    }
26    /// <p>An optional field specifying the version of the artifact associated with the document. For example, 12.6. This value is unique across all versions of a document, and can't be changed.</p>
27    pub fn version_name(&self) -> ::std::option::Option<&str> {
28        self.version_name.as_deref()
29    }
30}
31impl DescribeDocumentInput {
32    /// Creates a new builder-style object to manufacture [`DescribeDocumentInput`](crate::operation::describe_document::DescribeDocumentInput).
33    pub fn builder() -> crate::operation::describe_document::builders::DescribeDocumentInputBuilder {
34        crate::operation::describe_document::builders::DescribeDocumentInputBuilder::default()
35    }
36}
37
38/// A builder for [`DescribeDocumentInput`](crate::operation::describe_document::DescribeDocumentInput).
39#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
40#[non_exhaustive]
41pub struct DescribeDocumentInputBuilder {
42    pub(crate) name: ::std::option::Option<::std::string::String>,
43    pub(crate) document_version: ::std::option::Option<::std::string::String>,
44    pub(crate) version_name: ::std::option::Option<::std::string::String>,
45}
46impl DescribeDocumentInputBuilder {
47    /// <p>The name of the SSM document.</p><note>
48    /// <p>If you're calling a shared SSM document from a different Amazon Web Services account, <code>Name</code> is the full Amazon Resource Name (ARN) of the document.</p>
49    /// </note>
50    /// This field is required.
51    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
52        self.name = ::std::option::Option::Some(input.into());
53        self
54    }
55    /// <p>The name of the SSM document.</p><note>
56    /// <p>If you're calling a shared SSM document from a different Amazon Web Services account, <code>Name</code> is the full Amazon Resource Name (ARN) of the document.</p>
57    /// </note>
58    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
59        self.name = input;
60        self
61    }
62    /// <p>The name of the SSM document.</p><note>
63    /// <p>If you're calling a shared SSM document from a different Amazon Web Services account, <code>Name</code> is the full Amazon Resource Name (ARN) of the document.</p>
64    /// </note>
65    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
66        &self.name
67    }
68    /// <p>The document version for which you want information. Can be a specific version or the default version.</p>
69    pub fn document_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
70        self.document_version = ::std::option::Option::Some(input.into());
71        self
72    }
73    /// <p>The document version for which you want information. Can be a specific version or the default version.</p>
74    pub fn set_document_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
75        self.document_version = input;
76        self
77    }
78    /// <p>The document version for which you want information. Can be a specific version or the default version.</p>
79    pub fn get_document_version(&self) -> &::std::option::Option<::std::string::String> {
80        &self.document_version
81    }
82    /// <p>An optional field specifying the version of the artifact associated with the document. For example, 12.6. This value is unique across all versions of a document, and can't be changed.</p>
83    pub fn version_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
84        self.version_name = ::std::option::Option::Some(input.into());
85        self
86    }
87    /// <p>An optional field specifying the version of the artifact associated with the document. For example, 12.6. This value is unique across all versions of a document, and can't be changed.</p>
88    pub fn set_version_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
89        self.version_name = input;
90        self
91    }
92    /// <p>An optional field specifying the version of the artifact associated with the document. For example, 12.6. This value is unique across all versions of a document, and can't be changed.</p>
93    pub fn get_version_name(&self) -> &::std::option::Option<::std::string::String> {
94        &self.version_name
95    }
96    /// Consumes the builder and constructs a [`DescribeDocumentInput`](crate::operation::describe_document::DescribeDocumentInput).
97    pub fn build(
98        self,
99    ) -> ::std::result::Result<crate::operation::describe_document::DescribeDocumentInput, ::aws_smithy_types::error::operation::BuildError> {
100        ::std::result::Result::Ok(crate::operation::describe_document::DescribeDocumentInput {
101            name: self.name,
102            document_version: self.document_version,
103            version_name: self.version_name,
104        })
105    }
106}