#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct DeleteOpsMetadataInput {
pub ops_metadata_arn: ::std::option::Option<::std::string::String>,
}
impl DeleteOpsMetadataInput {
pub fn ops_metadata_arn(&self) -> ::std::option::Option<&str> {
self.ops_metadata_arn.as_deref()
}
}
static DELETEOPSMETADATAINPUT_MEMBER_OPS_METADATA_ARN: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
::aws_smithy_schema::ShapeId::from_parts(
"com.amazonaws.ssm.synthetic#DeleteOpsMetadataInput$OpsMetadataArn",
"com.amazonaws.ssm.synthetic",
"DeleteOpsMetadataInput",
),
::aws_smithy_schema::ShapeType::String,
"OpsMetadataArn",
0,
);
static DELETEOPSMETADATAINPUT_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
::aws_smithy_schema::ShapeId::from_parts(
"com.amazonaws.ssm.synthetic#DeleteOpsMetadataInput",
"com.amazonaws.ssm.synthetic",
"DeleteOpsMetadataInput",
),
::aws_smithy_schema::ShapeType::Structure,
&[&DELETEOPSMETADATAINPUT_MEMBER_OPS_METADATA_ARN],
)
.with_payload_hint(::aws_smithy_schema::PayloadHint::NoStructPayload)
.with_original_name("DeleteOpsMetadataRequest");
impl DeleteOpsMetadataInput {
pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &DELETEOPSMETADATAINPUT_SCHEMA;
}
impl ::aws_smithy_schema::serde::SerializableStruct for DeleteOpsMetadataInput {
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.ops_metadata_arn {
ser.write_string(&DELETEOPSMETADATAINPUT_MEMBER_OPS_METADATA_ARN, val)?;
}
Ok(())
}
}
impl crate::operation::delete_ops_metadata::builders::DeleteOpsMetadataInputBuilder {
#[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(&DELETEOPSMETADATAINPUT_SCHEMA, &mut |member, deser| {
match member.member_index() {
Some(0) => {
if deser.is_null() {
deser.read_null()?;
} else {
self.ops_metadata_arn = Some(deser.read_string(member)?);
}
}
_ => {}
}
Ok(())
})
}
}
impl DeleteOpsMetadataInput {
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.ops_metadata_arn = builder.ops_metadata_arn.or(Some(String::new()));
builder.build().map_err(|e| aws_smithy_schema::serde::SerdeError::custom(e.to_string()))
}
}
impl DeleteOpsMetadataInput {
pub fn builder() -> crate::operation::delete_ops_metadata::builders::DeleteOpsMetadataInputBuilder {
crate::operation::delete_ops_metadata::builders::DeleteOpsMetadataInputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DeleteOpsMetadataInputBuilder {
pub(crate) ops_metadata_arn: ::std::option::Option<::std::string::String>,
}
impl DeleteOpsMetadataInputBuilder {
pub fn ops_metadata_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.ops_metadata_arn = ::std::option::Option::Some(input.into());
self
}
pub fn set_ops_metadata_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.ops_metadata_arn = input;
self
}
pub fn get_ops_metadata_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.ops_metadata_arn
}
pub fn build(
self,
) -> ::std::result::Result<crate::operation::delete_ops_metadata::DeleteOpsMetadataInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::delete_ops_metadata::DeleteOpsMetadataInput {
ops_metadata_arn: self.ops_metadata_arn,
})
}
}