#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct UpdateAssociationOutput {
pub association_description: ::std::option::Option<crate::types::AssociationDescription>,
_request_id: Option<String>,
}
impl UpdateAssociationOutput {
pub fn association_description(&self) -> ::std::option::Option<&crate::types::AssociationDescription> {
self.association_description.as_ref()
}
}
static UPDATEASSOCIATIONOUTPUT_MEMBER_ASSOCIATION_DESCRIPTION: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
::aws_smithy_schema::ShapeId::from_parts(
"com.amazonaws.ssm.synthetic#UpdateAssociationOutput$AssociationDescription",
"com.amazonaws.ssm.synthetic",
"UpdateAssociationOutput",
),
::aws_smithy_schema::ShapeType::Structure,
"AssociationDescription",
0,
);
static UPDATEASSOCIATIONOUTPUT_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
::aws_smithy_schema::ShapeId::from_parts(
"com.amazonaws.ssm.synthetic#UpdateAssociationOutput",
"com.amazonaws.ssm.synthetic",
"UpdateAssociationOutput",
),
::aws_smithy_schema::ShapeType::Structure,
&[&UPDATEASSOCIATIONOUTPUT_MEMBER_ASSOCIATION_DESCRIPTION],
)
.with_original_name("UpdateAssociationResult");
impl UpdateAssociationOutput {
pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &UPDATEASSOCIATIONOUTPUT_SCHEMA;
}
impl ::aws_smithy_schema::serde::SerializableStruct for UpdateAssociationOutput {
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.association_description {
ser.write_struct(&UPDATEASSOCIATIONOUTPUT_MEMBER_ASSOCIATION_DESCRIPTION, val)?;
}
Ok(())
}
}
impl crate::operation::update_association::builders::UpdateAssociationOutputBuilder {
#[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(&UPDATEASSOCIATIONOUTPUT_SCHEMA, &mut |member, deser| {
match member.member_index() {
Some(0) => {
if deser.is_null() {
deser.read_null()?;
} else {
self.association_description = Some(crate::types::AssociationDescription::deserialize(deser)?);
}
}
_ => {}
}
Ok(())
})
}
}
impl UpdateAssociationOutput {
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)?;
Ok(builder.build())
}
}
impl ::aws_types::request_id::RequestId for UpdateAssociationOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl UpdateAssociationOutput {
pub fn builder() -> crate::operation::update_association::builders::UpdateAssociationOutputBuilder {
crate::operation::update_association::builders::UpdateAssociationOutputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateAssociationOutputBuilder {
pub(crate) association_description: ::std::option::Option<crate::types::AssociationDescription>,
_request_id: Option<String>,
}
impl UpdateAssociationOutputBuilder {
pub fn association_description(mut self, input: crate::types::AssociationDescription) -> Self {
self.association_description = ::std::option::Option::Some(input);
self
}
pub fn set_association_description(mut self, input: ::std::option::Option<crate::types::AssociationDescription>) -> Self {
self.association_description = input;
self
}
pub fn get_association_description(&self) -> &::std::option::Option<crate::types::AssociationDescription> {
&self.association_description
}
pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
self._request_id = Some(request_id.into());
self
}
pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
self._request_id = request_id;
self
}
pub fn build(self) -> crate::operation::update_association::UpdateAssociationOutput {
crate::operation::update_association::UpdateAssociationOutput {
association_description: self.association_description,
_request_id: self._request_id,
}
}
}