#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct CreateBranchInput {
pub repository_name: ::std::option::Option<::std::string::String>,
pub branch_name: ::std::option::Option<::std::string::String>,
pub commit_id: ::std::option::Option<::std::string::String>,
}
impl CreateBranchInput {
pub fn repository_name(&self) -> ::std::option::Option<&str> {
self.repository_name.as_deref()
}
pub fn branch_name(&self) -> ::std::option::Option<&str> {
self.branch_name.as_deref()
}
pub fn commit_id(&self) -> ::std::option::Option<&str> {
self.commit_id.as_deref()
}
}
impl CreateBranchInput {
pub fn builder() -> crate::operation::create_branch::builders::CreateBranchInputBuilder {
crate::operation::create_branch::builders::CreateBranchInputBuilder::default()
}
}
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct CreateBranchInputBuilder {
pub(crate) repository_name: ::std::option::Option<::std::string::String>,
pub(crate) branch_name: ::std::option::Option<::std::string::String>,
pub(crate) commit_id: ::std::option::Option<::std::string::String>,
}
impl CreateBranchInputBuilder {
pub fn repository_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.repository_name = ::std::option::Option::Some(input.into());
self
}
pub fn set_repository_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.repository_name = input;
self
}
pub fn get_repository_name(&self) -> &::std::option::Option<::std::string::String> {
&self.repository_name
}
pub fn branch_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.branch_name = ::std::option::Option::Some(input.into());
self
}
pub fn set_branch_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.branch_name = input;
self
}
pub fn get_branch_name(&self) -> &::std::option::Option<::std::string::String> {
&self.branch_name
}
pub fn commit_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.commit_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_commit_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.commit_id = input;
self
}
pub fn get_commit_id(&self) -> &::std::option::Option<::std::string::String> {
&self.commit_id
}
pub fn build(
self,
) -> ::std::result::Result<crate::operation::create_branch::CreateBranchInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::create_branch::CreateBranchInput {
repository_name: self.repository_name,
branch_name: self.branch_name,
commit_id: self.commit_id,
})
}
}