#[non_exhaustive]pub struct Connection {
pub name: String,
pub create_time: Option<Timestamp>,
pub update_time: Option<Timestamp>,
pub installation_state: Option<InstallationState>,
pub disabled: bool,
pub reconciling: bool,
pub annotations: HashMap<String, String>,
pub etag: String,
pub connection_config: Option<ConnectionConfig>,
/* private fields */
}Expand description
A connection to a SCM like GitHub, GitHub Enterprise, Bitbucket Data Center, Bitbucket Cloud or GitLab.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.name: StringImmutable. The resource name of the connection, in the format
projects/{project}/locations/{location}/connections/{connection_id}.
create_time: Option<Timestamp>Output only. Server assigned timestamp for when the connection was created.
update_time: Option<Timestamp>Output only. Server assigned timestamp for when the connection was updated.
installation_state: Option<InstallationState>Output only. Installation state of the Connection.
disabled: boolIf disabled is set to true, functionality is disabled for this connection. Repository based API methods and webhooks processing for repositories in this connection will be disabled.
reconciling: boolOutput only. Set to true when the connection is being set up or updated in the background.
annotations: HashMap<String, String>Allows clients to store small amounts of arbitrary data.
etag: StringThis checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.
connection_config: Option<ConnectionConfig>Configuration for the connection depending on the type of provider.
Implementations§
Source§impl Connection
impl Connection
Sourcepub fn set_create_time<T>(self, v: T) -> Self
pub fn set_create_time<T>(self, v: T) -> Self
Sets the value of create_time.
§Example
use wkt::Timestamp;
let x = Connection::new().set_create_time(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_create_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_create_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of create_time.
§Example
use wkt::Timestamp;
let x = Connection::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
let x = Connection::new().set_or_clear_create_time(None::<Timestamp>);Sourcepub fn set_update_time<T>(self, v: T) -> Self
pub fn set_update_time<T>(self, v: T) -> Self
Sets the value of update_time.
§Example
use wkt::Timestamp;
let x = Connection::new().set_update_time(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_update_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_update_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of update_time.
§Example
use wkt::Timestamp;
let x = Connection::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
let x = Connection::new().set_or_clear_update_time(None::<Timestamp>);Sourcepub fn set_installation_state<T>(self, v: T) -> Selfwhere
T: Into<InstallationState>,
pub fn set_installation_state<T>(self, v: T) -> Selfwhere
T: Into<InstallationState>,
Sets the value of installation_state.
§Example
use google_cloud_build_v2::model::InstallationState;
let x = Connection::new().set_installation_state(InstallationState::default()/* use setters */);Sourcepub fn set_or_clear_installation_state<T>(self, v: Option<T>) -> Selfwhere
T: Into<InstallationState>,
pub fn set_or_clear_installation_state<T>(self, v: Option<T>) -> Selfwhere
T: Into<InstallationState>,
Sets or clears the value of installation_state.
§Example
use google_cloud_build_v2::model::InstallationState;
let x = Connection::new().set_or_clear_installation_state(Some(InstallationState::default()/* use setters */));
let x = Connection::new().set_or_clear_installation_state(None::<InstallationState>);Sourcepub fn set_disabled<T: Into<bool>>(self, v: T) -> Self
pub fn set_disabled<T: Into<bool>>(self, v: T) -> Self
Sourcepub fn set_reconciling<T: Into<bool>>(self, v: T) -> Self
pub fn set_reconciling<T: Into<bool>>(self, v: T) -> Self
Sourcepub fn set_annotations<T, K, V>(self, v: T) -> Self
pub fn set_annotations<T, K, V>(self, v: T) -> Self
Sets the value of annotations.
§Example
let x = Connection::new().set_annotations([
("key0", "abc"),
("key1", "xyz"),
]);Sourcepub fn set_connection_config<T: Into<Option<ConnectionConfig>>>(
self,
v: T,
) -> Self
pub fn set_connection_config<T: Into<Option<ConnectionConfig>>>( self, v: T, ) -> Self
Sets the value of connection_config.
Note that all the setters affecting connection_config are mutually
exclusive.
§Example
use google_cloud_build_v2::model::GitHubConfig;
let x = Connection::new().set_connection_config(Some(
google_cloud_build_v2::model::connection::ConnectionConfig::GithubConfig(GitHubConfig::default().into())));Sourcepub fn github_config(&self) -> Option<&Box<GitHubConfig>>
pub fn github_config(&self) -> Option<&Box<GitHubConfig>>
The value of connection_config
if it holds a GithubConfig, None if the field is not set or
holds a different branch.
Sourcepub fn set_github_config<T: Into<Box<GitHubConfig>>>(self, v: T) -> Self
pub fn set_github_config<T: Into<Box<GitHubConfig>>>(self, v: T) -> Self
Sets the value of connection_config
to hold a GithubConfig.
Note that all the setters affecting connection_config are
mutually exclusive.
§Example
use google_cloud_build_v2::model::GitHubConfig;
let x = Connection::new().set_github_config(GitHubConfig::default()/* use setters */);
assert!(x.github_config().is_some());
assert!(x.github_enterprise_config().is_none());
assert!(x.gitlab_config().is_none());
assert!(x.bitbucket_data_center_config().is_none());
assert!(x.bitbucket_cloud_config().is_none());Sourcepub fn github_enterprise_config(&self) -> Option<&Box<GitHubEnterpriseConfig>>
pub fn github_enterprise_config(&self) -> Option<&Box<GitHubEnterpriseConfig>>
The value of connection_config
if it holds a GithubEnterpriseConfig, None if the field is not set or
holds a different branch.
Sourcepub fn set_github_enterprise_config<T: Into<Box<GitHubEnterpriseConfig>>>(
self,
v: T,
) -> Self
pub fn set_github_enterprise_config<T: Into<Box<GitHubEnterpriseConfig>>>( self, v: T, ) -> Self
Sets the value of connection_config
to hold a GithubEnterpriseConfig.
Note that all the setters affecting connection_config are
mutually exclusive.
§Example
use google_cloud_build_v2::model::GitHubEnterpriseConfig;
let x = Connection::new().set_github_enterprise_config(GitHubEnterpriseConfig::default()/* use setters */);
assert!(x.github_enterprise_config().is_some());
assert!(x.github_config().is_none());
assert!(x.gitlab_config().is_none());
assert!(x.bitbucket_data_center_config().is_none());
assert!(x.bitbucket_cloud_config().is_none());Sourcepub fn gitlab_config(&self) -> Option<&Box<GitLabConfig>>
pub fn gitlab_config(&self) -> Option<&Box<GitLabConfig>>
The value of connection_config
if it holds a GitlabConfig, None if the field is not set or
holds a different branch.
Sourcepub fn set_gitlab_config<T: Into<Box<GitLabConfig>>>(self, v: T) -> Self
pub fn set_gitlab_config<T: Into<Box<GitLabConfig>>>(self, v: T) -> Self
Sets the value of connection_config
to hold a GitlabConfig.
Note that all the setters affecting connection_config are
mutually exclusive.
§Example
use google_cloud_build_v2::model::GitLabConfig;
let x = Connection::new().set_gitlab_config(GitLabConfig::default()/* use setters */);
assert!(x.gitlab_config().is_some());
assert!(x.github_config().is_none());
assert!(x.github_enterprise_config().is_none());
assert!(x.bitbucket_data_center_config().is_none());
assert!(x.bitbucket_cloud_config().is_none());Sourcepub fn bitbucket_data_center_config(
&self,
) -> Option<&Box<BitbucketDataCenterConfig>>
pub fn bitbucket_data_center_config( &self, ) -> Option<&Box<BitbucketDataCenterConfig>>
The value of connection_config
if it holds a BitbucketDataCenterConfig, None if the field is not set or
holds a different branch.
Sourcepub fn set_bitbucket_data_center_config<T: Into<Box<BitbucketDataCenterConfig>>>(
self,
v: T,
) -> Self
pub fn set_bitbucket_data_center_config<T: Into<Box<BitbucketDataCenterConfig>>>( self, v: T, ) -> Self
Sets the value of connection_config
to hold a BitbucketDataCenterConfig.
Note that all the setters affecting connection_config are
mutually exclusive.
§Example
use google_cloud_build_v2::model::BitbucketDataCenterConfig;
let x = Connection::new().set_bitbucket_data_center_config(BitbucketDataCenterConfig::default()/* use setters */);
assert!(x.bitbucket_data_center_config().is_some());
assert!(x.github_config().is_none());
assert!(x.github_enterprise_config().is_none());
assert!(x.gitlab_config().is_none());
assert!(x.bitbucket_cloud_config().is_none());Sourcepub fn bitbucket_cloud_config(&self) -> Option<&Box<BitbucketCloudConfig>>
pub fn bitbucket_cloud_config(&self) -> Option<&Box<BitbucketCloudConfig>>
The value of connection_config
if it holds a BitbucketCloudConfig, None if the field is not set or
holds a different branch.
Sourcepub fn set_bitbucket_cloud_config<T: Into<Box<BitbucketCloudConfig>>>(
self,
v: T,
) -> Self
pub fn set_bitbucket_cloud_config<T: Into<Box<BitbucketCloudConfig>>>( self, v: T, ) -> Self
Sets the value of connection_config
to hold a BitbucketCloudConfig.
Note that all the setters affecting connection_config are
mutually exclusive.
§Example
use google_cloud_build_v2::model::BitbucketCloudConfig;
let x = Connection::new().set_bitbucket_cloud_config(BitbucketCloudConfig::default()/* use setters */);
assert!(x.bitbucket_cloud_config().is_some());
assert!(x.github_config().is_none());
assert!(x.github_enterprise_config().is_none());
assert!(x.gitlab_config().is_none());
assert!(x.bitbucket_data_center_config().is_none());Trait Implementations§
Source§impl Clone for Connection
impl Clone for Connection
Source§fn clone(&self) -> Connection
fn clone(&self) -> Connection
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for Connection
impl Debug for Connection
Source§impl Default for Connection
impl Default for Connection
Source§fn default() -> Connection
fn default() -> Connection
Source§impl PartialEq for Connection
impl PartialEq for Connection
impl StructuralPartialEq for Connection
Auto Trait Implementations§
impl Freeze for Connection
impl RefUnwindSafe for Connection
impl Send for Connection
impl Sync for Connection
impl Unpin for Connection
impl UnsafeUnpin for Connection
impl UnwindSafe for Connection
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request