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 109 110 111 112 113 114 115 116
// 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 GetDocumentInput {
/// <p>The name of the SSM document.</p>
pub name: ::std::option::Option<::std::string::String>,
/// <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>
pub version_name: ::std::option::Option<::std::string::String>,
/// <p>The document version for which you want information.</p>
pub document_version: ::std::option::Option<::std::string::String>,
/// <p>Returns the document in the specified format. The document format can be either JSON or YAML. JSON is the default format.</p>
pub document_format: ::std::option::Option<crate::types::DocumentFormat>,
}
impl GetDocumentInput {
/// <p>The name of the SSM document.</p>
pub fn name(&self) -> ::std::option::Option<&str> {
self.name.as_deref()
}
/// <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>
pub fn version_name(&self) -> ::std::option::Option<&str> {
self.version_name.as_deref()
}
/// <p>The document version for which you want information.</p>
pub fn document_version(&self) -> ::std::option::Option<&str> {
self.document_version.as_deref()
}
/// <p>Returns the document in the specified format. The document format can be either JSON or YAML. JSON is the default format.</p>
pub fn document_format(&self) -> ::std::option::Option<&crate::types::DocumentFormat> {
self.document_format.as_ref()
}
}
impl GetDocumentInput {
/// Creates a new builder-style object to manufacture [`GetDocumentInput`](crate::operation::get_document::GetDocumentInput).
pub fn builder() -> crate::operation::get_document::builders::GetDocumentInputBuilder {
crate::operation::get_document::builders::GetDocumentInputBuilder::default()
}
}
/// A builder for [`GetDocumentInput`](crate::operation::get_document::GetDocumentInput).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct GetDocumentInputBuilder {
pub(crate) name: ::std::option::Option<::std::string::String>,
pub(crate) version_name: ::std::option::Option<::std::string::String>,
pub(crate) document_version: ::std::option::Option<::std::string::String>,
pub(crate) document_format: ::std::option::Option<crate::types::DocumentFormat>,
}
impl GetDocumentInputBuilder {
/// <p>The name of the SSM document.</p>
/// This field is required.
pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.name = ::std::option::Option::Some(input.into());
self
}
/// <p>The name of the SSM document.</p>
pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.name = input;
self
}
/// <p>The name of the SSM document.</p>
pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
&self.name
}
/// <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>
pub fn version_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.version_name = ::std::option::Option::Some(input.into());
self
}
/// <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>
pub fn set_version_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.version_name = input;
self
}
/// <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>
pub fn get_version_name(&self) -> &::std::option::Option<::std::string::String> {
&self.version_name
}
/// <p>The document version for which you want information.</p>
pub fn document_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.document_version = ::std::option::Option::Some(input.into());
self
}
/// <p>The document version for which you want information.</p>
pub fn set_document_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.document_version = input;
self
}
/// <p>The document version for which you want information.</p>
pub fn get_document_version(&self) -> &::std::option::Option<::std::string::String> {
&self.document_version
}
/// <p>Returns the document in the specified format. The document format can be either JSON or YAML. JSON is the default format.</p>
pub fn document_format(mut self, input: crate::types::DocumentFormat) -> Self {
self.document_format = ::std::option::Option::Some(input);
self
}
/// <p>Returns the document in the specified format. The document format can be either JSON or YAML. JSON is the default format.</p>
pub fn set_document_format(mut self, input: ::std::option::Option<crate::types::DocumentFormat>) -> Self {
self.document_format = input;
self
}
/// <p>Returns the document in the specified format. The document format can be either JSON or YAML. JSON is the default format.</p>
pub fn get_document_format(&self) -> &::std::option::Option<crate::types::DocumentFormat> {
&self.document_format
}
/// Consumes the builder and constructs a [`GetDocumentInput`](crate::operation::get_document::GetDocumentInput).
pub fn build(self) -> ::std::result::Result<crate::operation::get_document::GetDocumentInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::get_document::GetDocumentInput {
name: self.name,
version_name: self.version_name,
document_version: self.document_version,
document_format: self.document_format,
})
}
}