#[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
pub fn new() -> Self
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.
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.
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.
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.
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.
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.
Sourcepub fn set_disabled<T: Into<bool>>(self, v: T) -> Self
pub fn set_disabled<T: Into<bool>>(self, v: T) -> Self
Sets the value of disabled.
Sourcepub fn set_reconciling<T: Into<bool>>(self, v: T) -> Self
pub fn set_reconciling<T: Into<bool>>(self, v: T) -> Self
Sets the value of reconciling.
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.
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.
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.
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.
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.
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.
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.
Trait Implementations§
Source§impl Clone for Connection
impl Clone for Connection
Source§fn clone(&self) -> Connection
fn clone(&self) -> Connection
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more