1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>Specifies configuration details for a Git repository in your Amazon Web Services account.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct GitConfig {
/// <p>The URL where the Git repository is located.</p>
pub repository_url: ::std::option::Option<::std::string::String>,
/// <p>The default branch for the Git repository.</p>
pub branch: ::std::option::Option<::std::string::String>,
/// <p>The Amazon Resource Name (ARN) of the Amazon Web Services Secrets Manager secret that contains the credentials used to access the git repository. The secret must have a staging label of <code>AWSCURRENT</code> and must be in the following format:</p>
/// <p><code>{"username": <i>UserName</i>, "password": <i>Password</i>}</code></p>
pub secret_arn: ::std::option::Option<::std::string::String>,
}
impl GitConfig {
/// <p>The URL where the Git repository is located.</p>
pub fn repository_url(&self) -> ::std::option::Option<&str> {
self.repository_url.as_deref()
}
/// <p>The default branch for the Git repository.</p>
pub fn branch(&self) -> ::std::option::Option<&str> {
self.branch.as_deref()
}
/// <p>The Amazon Resource Name (ARN) of the Amazon Web Services Secrets Manager secret that contains the credentials used to access the git repository. The secret must have a staging label of <code>AWSCURRENT</code> and must be in the following format:</p>
/// <p><code>{"username": <i>UserName</i>, "password": <i>Password</i>}</code></p>
pub fn secret_arn(&self) -> ::std::option::Option<&str> {
self.secret_arn.as_deref()
}
}
impl GitConfig {
/// Creates a new builder-style object to manufacture [`GitConfig`](crate::types::GitConfig).
pub fn builder() -> crate::types::builders::GitConfigBuilder {
crate::types::builders::GitConfigBuilder::default()
}
}
/// A builder for [`GitConfig`](crate::types::GitConfig).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct GitConfigBuilder {
pub(crate) repository_url: ::std::option::Option<::std::string::String>,
pub(crate) branch: ::std::option::Option<::std::string::String>,
pub(crate) secret_arn: ::std::option::Option<::std::string::String>,
}
impl GitConfigBuilder {
/// <p>The URL where the Git repository is located.</p>
/// This field is required.
pub fn repository_url(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.repository_url = ::std::option::Option::Some(input.into());
self
}
/// <p>The URL where the Git repository is located.</p>
pub fn set_repository_url(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.repository_url = input;
self
}
/// <p>The URL where the Git repository is located.</p>
pub fn get_repository_url(&self) -> &::std::option::Option<::std::string::String> {
&self.repository_url
}
/// <p>The default branch for the Git repository.</p>
pub fn branch(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.branch = ::std::option::Option::Some(input.into());
self
}
/// <p>The default branch for the Git repository.</p>
pub fn set_branch(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.branch = input;
self
}
/// <p>The default branch for the Git repository.</p>
pub fn get_branch(&self) -> &::std::option::Option<::std::string::String> {
&self.branch
}
/// <p>The Amazon Resource Name (ARN) of the Amazon Web Services Secrets Manager secret that contains the credentials used to access the git repository. The secret must have a staging label of <code>AWSCURRENT</code> and must be in the following format:</p>
/// <p><code>{"username": <i>UserName</i>, "password": <i>Password</i>}</code></p>
pub fn secret_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.secret_arn = ::std::option::Option::Some(input.into());
self
}
/// <p>The Amazon Resource Name (ARN) of the Amazon Web Services Secrets Manager secret that contains the credentials used to access the git repository. The secret must have a staging label of <code>AWSCURRENT</code> and must be in the following format:</p>
/// <p><code>{"username": <i>UserName</i>, "password": <i>Password</i>}</code></p>
pub fn set_secret_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.secret_arn = input;
self
}
/// <p>The Amazon Resource Name (ARN) of the Amazon Web Services Secrets Manager secret that contains the credentials used to access the git repository. The secret must have a staging label of <code>AWSCURRENT</code> and must be in the following format:</p>
/// <p><code>{"username": <i>UserName</i>, "password": <i>Password</i>}</code></p>
pub fn get_secret_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.secret_arn
}
/// Consumes the builder and constructs a [`GitConfig`](crate::types::GitConfig).
pub fn build(self) -> crate::types::GitConfig {
crate::types::GitConfig {
repository_url: self.repository_url,
branch: self.branch,
secret_arn: self.secret_arn,
}
}
}