aws_sdk_amplify/operation/update_webhook/
_update_webhook_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>The request structure for the update webhook request.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct UpdateWebhookInput {
7    /// <p>The unique ID for a webhook.</p>
8    pub webhook_id: ::std::option::Option<::std::string::String>,
9    /// <p>The name for a branch that is part of an Amplify app.</p>
10    pub branch_name: ::std::option::Option<::std::string::String>,
11    /// <p>The description for a webhook.</p>
12    pub description: ::std::option::Option<::std::string::String>,
13}
14impl UpdateWebhookInput {
15    /// <p>The unique ID for a webhook.</p>
16    pub fn webhook_id(&self) -> ::std::option::Option<&str> {
17        self.webhook_id.as_deref()
18    }
19    /// <p>The name for a branch that is part of an Amplify app.</p>
20    pub fn branch_name(&self) -> ::std::option::Option<&str> {
21        self.branch_name.as_deref()
22    }
23    /// <p>The description for a webhook.</p>
24    pub fn description(&self) -> ::std::option::Option<&str> {
25        self.description.as_deref()
26    }
27}
28impl UpdateWebhookInput {
29    /// Creates a new builder-style object to manufacture [`UpdateWebhookInput`](crate::operation::update_webhook::UpdateWebhookInput).
30    pub fn builder() -> crate::operation::update_webhook::builders::UpdateWebhookInputBuilder {
31        crate::operation::update_webhook::builders::UpdateWebhookInputBuilder::default()
32    }
33}
34
35/// A builder for [`UpdateWebhookInput`](crate::operation::update_webhook::UpdateWebhookInput).
36#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
37#[non_exhaustive]
38pub struct UpdateWebhookInputBuilder {
39    pub(crate) webhook_id: ::std::option::Option<::std::string::String>,
40    pub(crate) branch_name: ::std::option::Option<::std::string::String>,
41    pub(crate) description: ::std::option::Option<::std::string::String>,
42}
43impl UpdateWebhookInputBuilder {
44    /// <p>The unique ID for a webhook.</p>
45    /// This field is required.
46    pub fn webhook_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
47        self.webhook_id = ::std::option::Option::Some(input.into());
48        self
49    }
50    /// <p>The unique ID for a webhook.</p>
51    pub fn set_webhook_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
52        self.webhook_id = input;
53        self
54    }
55    /// <p>The unique ID for a webhook.</p>
56    pub fn get_webhook_id(&self) -> &::std::option::Option<::std::string::String> {
57        &self.webhook_id
58    }
59    /// <p>The name for a branch that is part of an Amplify app.</p>
60    pub fn branch_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
61        self.branch_name = ::std::option::Option::Some(input.into());
62        self
63    }
64    /// <p>The name for a branch that is part of an Amplify app.</p>
65    pub fn set_branch_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
66        self.branch_name = input;
67        self
68    }
69    /// <p>The name for a branch that is part of an Amplify app.</p>
70    pub fn get_branch_name(&self) -> &::std::option::Option<::std::string::String> {
71        &self.branch_name
72    }
73    /// <p>The description for a webhook.</p>
74    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
75        self.description = ::std::option::Option::Some(input.into());
76        self
77    }
78    /// <p>The description for a webhook.</p>
79    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
80        self.description = input;
81        self
82    }
83    /// <p>The description for a webhook.</p>
84    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
85        &self.description
86    }
87    /// Consumes the builder and constructs a [`UpdateWebhookInput`](crate::operation::update_webhook::UpdateWebhookInput).
88    pub fn build(
89        self,
90    ) -> ::std::result::Result<crate::operation::update_webhook::UpdateWebhookInput, ::aws_smithy_types::error::operation::BuildError> {
91        ::std::result::Result::Ok(crate::operation::update_webhook::UpdateWebhookInput {
92            webhook_id: self.webhook_id,
93            branch_name: self.branch_name,
94            description: self.description,
95        })
96    }
97}