aws_sdk_codecommit/operation/get_branch/
_get_branch_input.rs1#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct GetBranchInput {
7 pub repository_name: ::std::option::Option<::std::string::String>,
9 pub branch_name: ::std::option::Option<::std::string::String>,
11}
12impl GetBranchInput {
13 pub fn repository_name(&self) -> ::std::option::Option<&str> {
15 self.repository_name.as_deref()
16 }
17 pub fn branch_name(&self) -> ::std::option::Option<&str> {
19 self.branch_name.as_deref()
20 }
21}
22impl GetBranchInput {
23 pub fn builder() -> crate::operation::get_branch::builders::GetBranchInputBuilder {
25 crate::operation::get_branch::builders::GetBranchInputBuilder::default()
26 }
27}
28
29#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
31#[non_exhaustive]
32pub struct GetBranchInputBuilder {
33 pub(crate) repository_name: ::std::option::Option<::std::string::String>,
34 pub(crate) branch_name: ::std::option::Option<::std::string::String>,
35}
36impl GetBranchInputBuilder {
37 pub fn repository_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
39 self.repository_name = ::std::option::Option::Some(input.into());
40 self
41 }
42 pub fn set_repository_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
44 self.repository_name = input;
45 self
46 }
47 pub fn get_repository_name(&self) -> &::std::option::Option<::std::string::String> {
49 &self.repository_name
50 }
51 pub fn branch_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
53 self.branch_name = ::std::option::Option::Some(input.into());
54 self
55 }
56 pub fn set_branch_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
58 self.branch_name = input;
59 self
60 }
61 pub fn get_branch_name(&self) -> &::std::option::Option<::std::string::String> {
63 &self.branch_name
64 }
65 pub fn build(self) -> ::std::result::Result<crate::operation::get_branch::GetBranchInput, ::aws_smithy_types::error::operation::BuildError> {
67 ::std::result::Result::Ok(crate::operation::get_branch::GetBranchInput {
68 repository_name: self.repository_name,
69 branch_name: self.branch_name,
70 })
71 }
72}