#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Branch {
pub fully_qualified_name: ::std::string::String,
pub description: ::std::option::Option<::std::string::String>,
pub deprecation_message: ::std::option::Option<::std::string::String>,
pub comment: ::std::option::Option<::std::string::String>,
}
impl Branch {
pub fn fully_qualified_name(&self) -> &str {
use std::ops::Deref;
self.fully_qualified_name.deref()
}
pub fn description(&self) -> ::std::option::Option<&str> {
self.description.as_deref()
}
pub fn deprecation_message(&self) -> ::std::option::Option<&str> {
self.deprecation_message.as_deref()
}
pub fn comment(&self) -> ::std::option::Option<&str> {
self.comment.as_deref()
}
}
impl Branch {
pub fn builder() -> crate::types::builders::BranchBuilder {
crate::types::builders::BranchBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct BranchBuilder {
pub(crate) fully_qualified_name: ::std::option::Option<::std::string::String>,
pub(crate) description: ::std::option::Option<::std::string::String>,
pub(crate) deprecation_message: ::std::option::Option<::std::string::String>,
pub(crate) comment: ::std::option::Option<::std::string::String>,
}
impl BranchBuilder {
pub fn fully_qualified_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.fully_qualified_name = ::std::option::Option::Some(input.into());
self
}
pub fn set_fully_qualified_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.fully_qualified_name = input;
self
}
pub fn get_fully_qualified_name(&self) -> &::std::option::Option<::std::string::String> {
&self.fully_qualified_name
}
pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.description = ::std::option::Option::Some(input.into());
self
}
pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.description = input;
self
}
pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
&self.description
}
pub fn deprecation_message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.deprecation_message = ::std::option::Option::Some(input.into());
self
}
pub fn set_deprecation_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.deprecation_message = input;
self
}
pub fn get_deprecation_message(&self) -> &::std::option::Option<::std::string::String> {
&self.deprecation_message
}
pub fn comment(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.comment = ::std::option::Option::Some(input.into());
self
}
pub fn set_comment(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.comment = input;
self
}
pub fn get_comment(&self) -> &::std::option::Option<::std::string::String> {
&self.comment
}
pub fn build(self) -> ::std::result::Result<crate::types::Branch, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::types::Branch {
fully_qualified_name: self.fully_qualified_name.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"fully_qualified_name",
"fully_qualified_name was not specified but it is required when building Branch",
)
})?,
description: self.description,
deprecation_message: self.deprecation_message,
comment: self.comment,
})
}
}