#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct GetWebhookOutput {
#[allow(missing_docs)] pub name: ::std::string::String,
#[allow(missing_docs)] pub description: ::std::string::String,
#[allow(missing_docs)] pub enabled: bool,
#[allow(missing_docs)] pub url: ::std::string::String,
#[allow(missing_docs)] pub method: crate::types::HttpMethod,
#[allow(missing_docs)] pub version: crate::types::Version,
pub custom_headers: ::std::option::Option<::std::collections::HashMap::<::std::string::String, ::aws_smithy_types::Document>>,
#[allow(missing_docs)] pub events: ::std::vec::Vec::<::std::string::String>,
#[allow(missing_docs)] pub max_retries: i32,
#[allow(missing_docs)] pub last_triggered_at: ::std::option::Option<::aws_smithy_types::DateTime>,
#[allow(missing_docs)] pub change_reason: ::std::string::String,
#[allow(missing_docs)] pub created_by: ::std::string::String,
#[allow(missing_docs)] pub created_at: ::aws_smithy_types::DateTime,
#[allow(missing_docs)] pub last_modified_by: ::std::string::String,
#[allow(missing_docs)] pub last_modified_at: ::aws_smithy_types::DateTime,
}
impl GetWebhookOutput {
#[allow(missing_docs)] pub fn name(&self) -> &str {
use std::ops::Deref; self.name.deref()
}
#[allow(missing_docs)] pub fn description(&self) -> &str {
use std::ops::Deref; self.description.deref()
}
#[allow(missing_docs)] pub fn enabled(&self) -> bool {
self.enabled
}
#[allow(missing_docs)] pub fn url(&self) -> &str {
use std::ops::Deref; self.url.deref()
}
#[allow(missing_docs)] pub fn method(&self) -> &crate::types::HttpMethod {
&self.method
}
#[allow(missing_docs)] pub fn version(&self) -> &crate::types::Version {
&self.version
}
pub fn custom_headers(&self) -> ::std::option::Option<&::std::collections::HashMap::<::std::string::String, ::aws_smithy_types::Document>> {
self.custom_headers.as_ref()
}
#[allow(missing_docs)] pub fn events(&self) -> &[::std::string::String] {
use std::ops::Deref; self.events.deref()
}
#[allow(missing_docs)] pub fn max_retries(&self) -> i32 {
self.max_retries
}
#[allow(missing_docs)] pub fn last_triggered_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.last_triggered_at.as_ref()
}
#[allow(missing_docs)] pub fn change_reason(&self) -> &str {
use std::ops::Deref; self.change_reason.deref()
}
#[allow(missing_docs)] pub fn created_by(&self) -> &str {
use std::ops::Deref; self.created_by.deref()
}
#[allow(missing_docs)] pub fn created_at(&self) -> &::aws_smithy_types::DateTime {
&self.created_at
}
#[allow(missing_docs)] pub fn last_modified_by(&self) -> &str {
use std::ops::Deref; self.last_modified_by.deref()
}
#[allow(missing_docs)] pub fn last_modified_at(&self) -> &::aws_smithy_types::DateTime {
&self.last_modified_at
}
}
impl GetWebhookOutput {
pub fn builder() -> crate::operation::get_webhook::builders::GetWebhookOutputBuilder {
crate::operation::get_webhook::builders::GetWebhookOutputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetWebhookOutputBuilder {
pub(crate) name: ::std::option::Option<::std::string::String>,
pub(crate) description: ::std::option::Option<::std::string::String>,
pub(crate) enabled: ::std::option::Option<bool>,
pub(crate) url: ::std::option::Option<::std::string::String>,
pub(crate) method: ::std::option::Option<crate::types::HttpMethod>,
pub(crate) version: ::std::option::Option<crate::types::Version>,
pub(crate) custom_headers: ::std::option::Option<::std::collections::HashMap::<::std::string::String, ::aws_smithy_types::Document>>,
pub(crate) events: ::std::option::Option<::std::vec::Vec::<::std::string::String>>,
pub(crate) max_retries: ::std::option::Option<i32>,
pub(crate) last_triggered_at: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) change_reason: ::std::option::Option<::std::string::String>,
pub(crate) created_by: ::std::option::Option<::std::string::String>,
pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) last_modified_by: ::std::option::Option<::std::string::String>,
pub(crate) last_modified_at: ::std::option::Option<::aws_smithy_types::DateTime>,
}
impl GetWebhookOutputBuilder {
#[allow(missing_docs)] pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.name = ::std::option::Option::Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.name = input; self
}
#[allow(missing_docs)] pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
&self.name
}
#[allow(missing_docs)] pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.description = ::std::option::Option::Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.description = input; self
}
#[allow(missing_docs)] pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
&self.description
}
#[allow(missing_docs)] pub fn enabled(mut self, input: bool) -> Self {
self.enabled = ::std::option::Option::Some(input);
self
}
#[allow(missing_docs)] pub fn set_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
self.enabled = input; self
}
#[allow(missing_docs)] pub fn get_enabled(&self) -> &::std::option::Option<bool> {
&self.enabled
}
#[allow(missing_docs)] pub fn url(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.url = ::std::option::Option::Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_url(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.url = input; self
}
#[allow(missing_docs)] pub fn get_url(&self) -> &::std::option::Option<::std::string::String> {
&self.url
}
#[allow(missing_docs)] pub fn method(mut self, input: crate::types::HttpMethod) -> Self {
self.method = ::std::option::Option::Some(input);
self
}
#[allow(missing_docs)] pub fn set_method(mut self, input: ::std::option::Option<crate::types::HttpMethod>) -> Self {
self.method = input; self
}
#[allow(missing_docs)] pub fn get_method(&self) -> &::std::option::Option<crate::types::HttpMethod> {
&self.method
}
#[allow(missing_docs)] pub fn version(mut self, input: crate::types::Version) -> Self {
self.version = ::std::option::Option::Some(input);
self
}
#[allow(missing_docs)] pub fn set_version(mut self, input: ::std::option::Option<crate::types::Version>) -> Self {
self.version = input; self
}
#[allow(missing_docs)] pub fn get_version(&self) -> &::std::option::Option<crate::types::Version> {
&self.version
}
pub fn custom_headers(mut self, k: impl ::std::convert::Into<::std::string::String>, v: ::aws_smithy_types::Document) -> Self {
let mut hash_map = self.custom_headers.unwrap_or_default();
hash_map.insert(k.into(), v);
self.custom_headers = ::std::option::Option::Some(hash_map);
self
}
pub fn set_custom_headers(mut self, input: ::std::option::Option<::std::collections::HashMap::<::std::string::String, ::aws_smithy_types::Document>>) -> Self {
self.custom_headers = input; self
}
pub fn get_custom_headers(&self) -> &::std::option::Option<::std::collections::HashMap::<::std::string::String, ::aws_smithy_types::Document>> {
&self.custom_headers
}
pub fn events(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut v = self.events.unwrap_or_default();
v.push(input.into());
self.events = ::std::option::Option::Some(v);
self
}
#[allow(missing_docs)] pub fn set_events(mut self, input: ::std::option::Option<::std::vec::Vec::<::std::string::String>>) -> Self {
self.events = input; self
}
#[allow(missing_docs)] pub fn get_events(&self) -> &::std::option::Option<::std::vec::Vec::<::std::string::String>> {
&self.events
}
#[allow(missing_docs)] pub fn max_retries(mut self, input: i32) -> Self {
self.max_retries = ::std::option::Option::Some(input);
self
}
#[allow(missing_docs)] pub fn set_max_retries(mut self, input: ::std::option::Option<i32>) -> Self {
self.max_retries = input; self
}
#[allow(missing_docs)] pub fn get_max_retries(&self) -> &::std::option::Option<i32> {
&self.max_retries
}
#[allow(missing_docs)] pub fn last_triggered_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.last_triggered_at = ::std::option::Option::Some(input);
self
}
#[allow(missing_docs)] pub fn set_last_triggered_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.last_triggered_at = input; self
}
#[allow(missing_docs)] pub fn get_last_triggered_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.last_triggered_at
}
#[allow(missing_docs)] pub fn change_reason(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.change_reason = ::std::option::Option::Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_change_reason(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.change_reason = input; self
}
#[allow(missing_docs)] pub fn get_change_reason(&self) -> &::std::option::Option<::std::string::String> {
&self.change_reason
}
#[allow(missing_docs)] pub fn created_by(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.created_by = ::std::option::Option::Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_created_by(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.created_by = input; self
}
#[allow(missing_docs)] pub fn get_created_by(&self) -> &::std::option::Option<::std::string::String> {
&self.created_by
}
#[allow(missing_docs)] pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.created_at = ::std::option::Option::Some(input);
self
}
#[allow(missing_docs)] pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.created_at = input; self
}
#[allow(missing_docs)] pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.created_at
}
#[allow(missing_docs)] pub fn last_modified_by(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.last_modified_by = ::std::option::Option::Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_last_modified_by(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.last_modified_by = input; self
}
#[allow(missing_docs)] pub fn get_last_modified_by(&self) -> &::std::option::Option<::std::string::String> {
&self.last_modified_by
}
#[allow(missing_docs)] pub fn last_modified_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.last_modified_at = ::std::option::Option::Some(input);
self
}
#[allow(missing_docs)] pub fn set_last_modified_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.last_modified_at = input; self
}
#[allow(missing_docs)] pub fn get_last_modified_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.last_modified_at
}
pub fn build(self) -> ::std::result::Result<crate::operation::get_webhook::GetWebhookOutput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(
crate::operation::get_webhook::GetWebhookOutput {
name: self.name
.ok_or_else(||
::aws_smithy_types::error::operation::BuildError::missing_field("name", "name was not specified but it is required when building GetWebhookOutput")
)?
,
description: self.description
.ok_or_else(||
::aws_smithy_types::error::operation::BuildError::missing_field("description", "description was not specified but it is required when building GetWebhookOutput")
)?
,
enabled: self.enabled
.ok_or_else(||
::aws_smithy_types::error::operation::BuildError::missing_field("enabled", "enabled was not specified but it is required when building GetWebhookOutput")
)?
,
url: self.url
.ok_or_else(||
::aws_smithy_types::error::operation::BuildError::missing_field("url", "url was not specified but it is required when building GetWebhookOutput")
)?
,
method: self.method
.ok_or_else(||
::aws_smithy_types::error::operation::BuildError::missing_field("method", "method was not specified but it is required when building GetWebhookOutput")
)?
,
version: self.version
.ok_or_else(||
::aws_smithy_types::error::operation::BuildError::missing_field("version", "version was not specified but it is required when building GetWebhookOutput")
)?
,
custom_headers: self.custom_headers
,
events: self.events
.ok_or_else(||
::aws_smithy_types::error::operation::BuildError::missing_field("events", "events was not specified but it is required when building GetWebhookOutput")
)?
,
max_retries: self.max_retries
.ok_or_else(||
::aws_smithy_types::error::operation::BuildError::missing_field("max_retries", "max_retries was not specified but it is required when building GetWebhookOutput")
)?
,
last_triggered_at: self.last_triggered_at
,
change_reason: self.change_reason
.ok_or_else(||
::aws_smithy_types::error::operation::BuildError::missing_field("change_reason", "change_reason was not specified but it is required when building GetWebhookOutput")
)?
,
created_by: self.created_by
.ok_or_else(||
::aws_smithy_types::error::operation::BuildError::missing_field("created_by", "created_by was not specified but it is required when building GetWebhookOutput")
)?
,
created_at: self.created_at
.ok_or_else(||
::aws_smithy_types::error::operation::BuildError::missing_field("created_at", "created_at was not specified but it is required when building GetWebhookOutput")
)?
,
last_modified_by: self.last_modified_by
.ok_or_else(||
::aws_smithy_types::error::operation::BuildError::missing_field("last_modified_by", "last_modified_by was not specified but it is required when building GetWebhookOutput")
)?
,
last_modified_at: self.last_modified_at
.ok_or_else(||
::aws_smithy_types::error::operation::BuildError::missing_field("last_modified_at", "last_modified_at was not specified but it is required when building GetWebhookOutput")
)?
,
}
)
}
}