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