#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct SourceControlDetails {
pub provider: ::std::option::Option<crate::types::SourceControlProvider>,
pub repository: ::std::option::Option<::std::string::String>,
pub owner: ::std::option::Option<::std::string::String>,
pub branch: ::std::option::Option<::std::string::String>,
pub folder: ::std::option::Option<::std::string::String>,
pub last_commit_id: ::std::option::Option<::std::string::String>,
pub auth_strategy: ::std::option::Option<crate::types::SourceControlAuthStrategy>,
pub auth_token: ::std::option::Option<::std::string::String>,
}
impl SourceControlDetails {
pub fn provider(&self) -> ::std::option::Option<&crate::types::SourceControlProvider> {
self.provider.as_ref()
}
pub fn repository(&self) -> ::std::option::Option<&str> {
self.repository.as_deref()
}
pub fn owner(&self) -> ::std::option::Option<&str> {
self.owner.as_deref()
}
pub fn branch(&self) -> ::std::option::Option<&str> {
self.branch.as_deref()
}
pub fn folder(&self) -> ::std::option::Option<&str> {
self.folder.as_deref()
}
pub fn last_commit_id(&self) -> ::std::option::Option<&str> {
self.last_commit_id.as_deref()
}
pub fn auth_strategy(&self) -> ::std::option::Option<&crate::types::SourceControlAuthStrategy> {
self.auth_strategy.as_ref()
}
pub fn auth_token(&self) -> ::std::option::Option<&str> {
self.auth_token.as_deref()
}
}
impl SourceControlDetails {
pub fn builder() -> crate::types::builders::SourceControlDetailsBuilder {
crate::types::builders::SourceControlDetailsBuilder::default()
}
}
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct SourceControlDetailsBuilder {
pub(crate) provider: ::std::option::Option<crate::types::SourceControlProvider>,
pub(crate) repository: ::std::option::Option<::std::string::String>,
pub(crate) owner: ::std::option::Option<::std::string::String>,
pub(crate) branch: ::std::option::Option<::std::string::String>,
pub(crate) folder: ::std::option::Option<::std::string::String>,
pub(crate) last_commit_id: ::std::option::Option<::std::string::String>,
pub(crate) auth_strategy: ::std::option::Option<crate::types::SourceControlAuthStrategy>,
pub(crate) auth_token: ::std::option::Option<::std::string::String>,
}
impl SourceControlDetailsBuilder {
pub fn provider(mut self, input: crate::types::SourceControlProvider) -> Self {
self.provider = ::std::option::Option::Some(input);
self
}
pub fn set_provider(mut self, input: ::std::option::Option<crate::types::SourceControlProvider>) -> Self {
self.provider = input;
self
}
pub fn get_provider(&self) -> &::std::option::Option<crate::types::SourceControlProvider> {
&self.provider
}
pub fn repository(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.repository = ::std::option::Option::Some(input.into());
self
}
pub fn set_repository(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.repository = input;
self
}
pub fn get_repository(&self) -> &::std::option::Option<::std::string::String> {
&self.repository
}
pub fn owner(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.owner = ::std::option::Option::Some(input.into());
self
}
pub fn set_owner(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.owner = input;
self
}
pub fn get_owner(&self) -> &::std::option::Option<::std::string::String> {
&self.owner
}
pub fn branch(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.branch = ::std::option::Option::Some(input.into());
self
}
pub fn set_branch(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.branch = input;
self
}
pub fn get_branch(&self) -> &::std::option::Option<::std::string::String> {
&self.branch
}
pub fn folder(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.folder = ::std::option::Option::Some(input.into());
self
}
pub fn set_folder(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.folder = input;
self
}
pub fn get_folder(&self) -> &::std::option::Option<::std::string::String> {
&self.folder
}
pub fn last_commit_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.last_commit_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_last_commit_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.last_commit_id = input;
self
}
pub fn get_last_commit_id(&self) -> &::std::option::Option<::std::string::String> {
&self.last_commit_id
}
pub fn auth_strategy(mut self, input: crate::types::SourceControlAuthStrategy) -> Self {
self.auth_strategy = ::std::option::Option::Some(input);
self
}
pub fn set_auth_strategy(mut self, input: ::std::option::Option<crate::types::SourceControlAuthStrategy>) -> Self {
self.auth_strategy = input;
self
}
pub fn get_auth_strategy(&self) -> &::std::option::Option<crate::types::SourceControlAuthStrategy> {
&self.auth_strategy
}
pub fn auth_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.auth_token = ::std::option::Option::Some(input.into());
self
}
pub fn set_auth_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.auth_token = input;
self
}
pub fn get_auth_token(&self) -> &::std::option::Option<::std::string::String> {
&self.auth_token
}
pub fn build(self) -> crate::types::SourceControlDetails {
crate::types::SourceControlDetails {
provider: self.provider,
repository: self.repository,
owner: self.owner,
branch: self.branch,
folder: self.folder,
last_commit_id: self.last_commit_id,
auth_strategy: self.auth_strategy,
auth_token: self.auth_token,
}
}
}