aws_sdk_amplify/operation/update_branch/
_update_branch_output.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>The result structure for the update branch request.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct UpdateBranchOutput {
7    /// <p>The branch for an Amplify app, which maps to a third-party repository branch.</p>
8    pub branch: ::std::option::Option<crate::types::Branch>,
9    _request_id: Option<String>,
10}
11impl UpdateBranchOutput {
12    /// <p>The branch for an Amplify app, which maps to a third-party repository branch.</p>
13    pub fn branch(&self) -> ::std::option::Option<&crate::types::Branch> {
14        self.branch.as_ref()
15    }
16}
17impl ::aws_types::request_id::RequestId for UpdateBranchOutput {
18    fn request_id(&self) -> Option<&str> {
19        self._request_id.as_deref()
20    }
21}
22impl UpdateBranchOutput {
23    /// Creates a new builder-style object to manufacture [`UpdateBranchOutput`](crate::operation::update_branch::UpdateBranchOutput).
24    pub fn builder() -> crate::operation::update_branch::builders::UpdateBranchOutputBuilder {
25        crate::operation::update_branch::builders::UpdateBranchOutputBuilder::default()
26    }
27}
28
29/// A builder for [`UpdateBranchOutput`](crate::operation::update_branch::UpdateBranchOutput).
30#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
31#[non_exhaustive]
32pub struct UpdateBranchOutputBuilder {
33    pub(crate) branch: ::std::option::Option<crate::types::Branch>,
34    _request_id: Option<String>,
35}
36impl UpdateBranchOutputBuilder {
37    /// <p>The branch for an Amplify app, which maps to a third-party repository branch.</p>
38    /// This field is required.
39    pub fn branch(mut self, input: crate::types::Branch) -> Self {
40        self.branch = ::std::option::Option::Some(input);
41        self
42    }
43    /// <p>The branch for an Amplify app, which maps to a third-party repository branch.</p>
44    pub fn set_branch(mut self, input: ::std::option::Option<crate::types::Branch>) -> Self {
45        self.branch = input;
46        self
47    }
48    /// <p>The branch for an Amplify app, which maps to a third-party repository branch.</p>
49    pub fn get_branch(&self) -> &::std::option::Option<crate::types::Branch> {
50        &self.branch
51    }
52    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
53        self._request_id = Some(request_id.into());
54        self
55    }
56
57    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
58        self._request_id = request_id;
59        self
60    }
61    /// Consumes the builder and constructs a [`UpdateBranchOutput`](crate::operation::update_branch::UpdateBranchOutput).
62    pub fn build(self) -> crate::operation::update_branch::UpdateBranchOutput {
63        crate::operation::update_branch::UpdateBranchOutput {
64            branch: self.branch,
65            _request_id: self._request_id,
66        }
67    }
68}