#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct DescribeDocumentInput {
pub name: ::std::option::Option<::std::string::String>,
pub document_version: ::std::option::Option<::std::string::String>,
pub version_name: ::std::option::Option<::std::string::String>,
}
impl DescribeDocumentInput {
pub fn name(&self) -> ::std::option::Option<&str> {
self.name.as_deref()
}
pub fn document_version(&self) -> ::std::option::Option<&str> {
self.document_version.as_deref()
}
pub fn version_name(&self) -> ::std::option::Option<&str> {
self.version_name.as_deref()
}
}
static DESCRIBEDOCUMENTINPUT_MEMBER_NAME: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
::aws_smithy_schema::ShapeId::from_parts(
"com.amazonaws.ssm.synthetic#DescribeDocumentInput$Name",
"com.amazonaws.ssm.synthetic",
"DescribeDocumentInput",
),
::aws_smithy_schema::ShapeType::String,
"Name",
0,
);
static DESCRIBEDOCUMENTINPUT_MEMBER_DOCUMENT_VERSION: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
::aws_smithy_schema::ShapeId::from_parts(
"com.amazonaws.ssm.synthetic#DescribeDocumentInput$DocumentVersion",
"com.amazonaws.ssm.synthetic",
"DescribeDocumentInput",
),
::aws_smithy_schema::ShapeType::String,
"DocumentVersion",
1,
);
static DESCRIBEDOCUMENTINPUT_MEMBER_VERSION_NAME: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
::aws_smithy_schema::ShapeId::from_parts(
"com.amazonaws.ssm.synthetic#DescribeDocumentInput$VersionName",
"com.amazonaws.ssm.synthetic",
"DescribeDocumentInput",
),
::aws_smithy_schema::ShapeType::String,
"VersionName",
2,
);
static DESCRIBEDOCUMENTINPUT_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
::aws_smithy_schema::ShapeId::from_parts(
"com.amazonaws.ssm.synthetic#DescribeDocumentInput",
"com.amazonaws.ssm.synthetic",
"DescribeDocumentInput",
),
::aws_smithy_schema::ShapeType::Structure,
&[
&DESCRIBEDOCUMENTINPUT_MEMBER_NAME,
&DESCRIBEDOCUMENTINPUT_MEMBER_DOCUMENT_VERSION,
&DESCRIBEDOCUMENTINPUT_MEMBER_VERSION_NAME,
],
)
.with_payload_hint(::aws_smithy_schema::PayloadHint::NoStructPayload)
.with_original_name("DescribeDocumentRequest");
impl DescribeDocumentInput {
pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &DESCRIBEDOCUMENTINPUT_SCHEMA;
}
impl ::aws_smithy_schema::serde::SerializableStruct for DescribeDocumentInput {
fn schema(&self) -> &::aws_smithy_schema::Schema<'_> {
Self::SCHEMA
}
#[allow(unused_variables, clippy::diverging_sub_expression)]
fn serialize_members(
&self,
ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
if let Some(ref val) = self.name {
ser.write_string(&DESCRIBEDOCUMENTINPUT_MEMBER_NAME, val)?;
}
if let Some(ref val) = self.document_version {
ser.write_string(&DESCRIBEDOCUMENTINPUT_MEMBER_DOCUMENT_VERSION, val)?;
}
if let Some(ref val) = self.version_name {
ser.write_string(&DESCRIBEDOCUMENTINPUT_MEMBER_VERSION_NAME, val)?;
}
Ok(())
}
}
impl crate::operation::describe_document::builders::DescribeDocumentInputBuilder {
#[allow(
unused_variables,
unreachable_code,
clippy::single_match,
clippy::match_single_binding,
clippy::diverging_sub_expression
)]
pub(crate) fn deserialize_members(
&mut self,
deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
deserializer.read_struct(&DESCRIBEDOCUMENTINPUT_SCHEMA, &mut |member, deser| {
match member.member_index() {
Some(0) => {
if deser.is_null() {
deser.read_null()?;
} else {
self.name = Some(deser.read_string(member)?);
}
}
Some(1) => {
if deser.is_null() {
deser.read_null()?;
} else {
self.document_version = Some(deser.read_string(member)?);
}
}
Some(2) => {
if deser.is_null() {
deser.read_null()?;
} else {
self.version_name = Some(deser.read_string(member)?);
}
}
_ => {}
}
Ok(())
})
}
}
impl DescribeDocumentInput {
pub fn deserialize(
deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
let mut builder = Self::builder();
builder.deserialize_members(deserializer)?;
builder.name = builder.name.or(Some(String::new()));
builder.build().map_err(|e| aws_smithy_schema::serde::SerdeError::custom(e.to_string()))
}
}
impl DescribeDocumentInput {
pub fn builder() -> crate::operation::describe_document::builders::DescribeDocumentInputBuilder {
crate::operation::describe_document::builders::DescribeDocumentInputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DescribeDocumentInputBuilder {
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>,
}
impl DescribeDocumentInputBuilder {
pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.name = ::std::option::Option::Some(input.into());
self
}
pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.name = input;
self
}
pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
&self.name
}
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
}
pub fn set_document_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.document_version = input;
self
}
pub fn get_document_version(&self) -> &::std::option::Option<::std::string::String> {
&self.document_version
}
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
}
pub fn set_version_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.version_name = input;
self
}
pub fn get_version_name(&self) -> &::std::option::Option<::std::string::String> {
&self.version_name
}
pub fn build(
self,
) -> ::std::result::Result<crate::operation::describe_document::DescribeDocumentInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::describe_document::DescribeDocumentInput {
name: self.name,
document_version: self.document_version,
version_name: self.version_name,
})
}
}