Struct aws_sdk_codepipeline::output::put_webhook_output::Builder
source · pub struct Builder { /* private fields */ }Expand description
A builder for PutWebhookOutput.
Implementations§
source§impl Builder
impl Builder
sourcepub fn webhook(self, input: ListWebhookItem) -> Self
pub fn webhook(self, input: ListWebhookItem) -> Self
The detail returned from creating the webhook, such as the webhook name, webhook URL, and webhook ARN.
sourcepub fn set_webhook(self, input: Option<ListWebhookItem>) -> Self
pub fn set_webhook(self, input: Option<ListWebhookItem>) -> Self
The detail returned from creating the webhook, such as the webhook name, webhook URL, and webhook ARN.
Examples found in repository?
src/json_deser.rs (lines 2551-2555)
2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578
pub(crate) fn deser_operation_crate_operation_put_webhook(
value: &[u8],
mut builder: crate::output::put_webhook_output::Builder,
) -> Result<
crate::output::put_webhook_output::Builder,
aws_smithy_json::deserialize::error::DeserializeError,
> {
let mut tokens_owned =
aws_smithy_json::deserialize::json_token_iter(crate::json_deser::or_empty_doc(value))
.peekable();
let tokens = &mut tokens_owned;
aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
loop {
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
Some(aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
match key.to_unescaped()?.as_ref() {
"webhook" => {
builder = builder.set_webhook(
crate::json_deser::deser_structure_crate_model_list_webhook_item(
tokens,
)?,
);
}
_ => aws_smithy_json::deserialize::token::skip_value(tokens)?,
}
}
other => {
return Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
"expected object key or end object, found: {:?}",
other
)),
)
}
}
}
if tokens.next().is_some() {
return Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(
"found more JSON tokens after completing parsing",
),
);
}
Ok(builder)
}sourcepub fn build(self) -> PutWebhookOutput
pub fn build(self) -> PutWebhookOutput
Consumes the builder and constructs a PutWebhookOutput.
Examples found in repository?
src/operation_deser.rs (line 2980)
2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982
pub fn parse_put_webhook_response(
response: &http::Response<bytes::Bytes>,
) -> std::result::Result<crate::output::PutWebhookOutput, crate::error::PutWebhookError> {
Ok({
#[allow(unused_mut)]
let mut output = crate::output::put_webhook_output::Builder::default();
let _ = response;
output = crate::json_deser::deser_operation_crate_operation_put_webhook(
response.body().as_ref(),
output,
)
.map_err(crate::error::PutWebhookError::unhandled)?;
output.build()
})
}