#[non_exhaustive]pub struct RemoteRepositoryConfig {
pub description: String,
pub upstream_credentials: Option<UpstreamCredentials>,
pub disable_upstream_validation: bool,
pub remote_source: Option<RemoteSource>,
/* private fields */
}Expand description
Remote repository configuration.
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.description: StringThe description of the remote source.
upstream_credentials: Option<UpstreamCredentials>Optional. The credentials used to access the remote repository.
disable_upstream_validation: boolInput only. A create/update remote repo option to avoid making a HEAD/GET request to validate a remote repo and any supplied upstream credentials.
remote_source: Option<RemoteSource>Settings specific to the remote repository.
Implementations§
Source§impl RemoteRepositoryConfig
impl RemoteRepositoryConfig
pub fn new() -> Self
Sourcepub fn set_description<T: Into<String>>(self, v: T) -> Self
pub fn set_description<T: Into<String>>(self, v: T) -> Self
Sets the value of description.
§Example
let x = RemoteRepositoryConfig::new().set_description("example");Sourcepub fn set_upstream_credentials<T>(self, v: T) -> Selfwhere
T: Into<UpstreamCredentials>,
pub fn set_upstream_credentials<T>(self, v: T) -> Selfwhere
T: Into<UpstreamCredentials>,
Sets the value of upstream_credentials.
§Example
use google_cloud_artifactregistry_v1::model::remote_repository_config::UpstreamCredentials;
let x = RemoteRepositoryConfig::new().set_upstream_credentials(UpstreamCredentials::default()/* use setters */);Sourcepub fn set_or_clear_upstream_credentials<T>(self, v: Option<T>) -> Selfwhere
T: Into<UpstreamCredentials>,
pub fn set_or_clear_upstream_credentials<T>(self, v: Option<T>) -> Selfwhere
T: Into<UpstreamCredentials>,
Sets or clears the value of upstream_credentials.
§Example
use google_cloud_artifactregistry_v1::model::remote_repository_config::UpstreamCredentials;
let x = RemoteRepositoryConfig::new().set_or_clear_upstream_credentials(Some(UpstreamCredentials::default()/* use setters */));
let x = RemoteRepositoryConfig::new().set_or_clear_upstream_credentials(None::<UpstreamCredentials>);Sourcepub fn set_disable_upstream_validation<T: Into<bool>>(self, v: T) -> Self
pub fn set_disable_upstream_validation<T: Into<bool>>(self, v: T) -> Self
Sets the value of disable_upstream_validation.
§Example
let x = RemoteRepositoryConfig::new().set_disable_upstream_validation(true);Sourcepub fn set_remote_source<T: Into<Option<RemoteSource>>>(self, v: T) -> Self
pub fn set_remote_source<T: Into<Option<RemoteSource>>>(self, v: T) -> Self
Sets the value of remote_source.
Note that all the setters affecting remote_source are mutually
exclusive.
§Example
use google_cloud_artifactregistry_v1::model::remote_repository_config::DockerRepository;
let x = RemoteRepositoryConfig::new().set_remote_source(Some(
google_cloud_artifactregistry_v1::model::remote_repository_config::RemoteSource::DockerRepository(DockerRepository::default().into())));Sourcepub fn docker_repository(&self) -> Option<&Box<DockerRepository>>
pub fn docker_repository(&self) -> Option<&Box<DockerRepository>>
The value of remote_source
if it holds a DockerRepository, None if the field is not set or
holds a different branch.
Sourcepub fn set_docker_repository<T: Into<Box<DockerRepository>>>(self, v: T) -> Self
pub fn set_docker_repository<T: Into<Box<DockerRepository>>>(self, v: T) -> Self
Sets the value of remote_source
to hold a DockerRepository.
Note that all the setters affecting remote_source are
mutually exclusive.
§Example
use google_cloud_artifactregistry_v1::model::remote_repository_config::DockerRepository;
let x = RemoteRepositoryConfig::new().set_docker_repository(DockerRepository::default()/* use setters */);
assert!(x.docker_repository().is_some());
assert!(x.maven_repository().is_none());
assert!(x.npm_repository().is_none());
assert!(x.python_repository().is_none());
assert!(x.apt_repository().is_none());
assert!(x.yum_repository().is_none());
assert!(x.common_repository().is_none());Sourcepub fn maven_repository(&self) -> Option<&Box<MavenRepository>>
pub fn maven_repository(&self) -> Option<&Box<MavenRepository>>
The value of remote_source
if it holds a MavenRepository, None if the field is not set or
holds a different branch.
Sourcepub fn set_maven_repository<T: Into<Box<MavenRepository>>>(self, v: T) -> Self
pub fn set_maven_repository<T: Into<Box<MavenRepository>>>(self, v: T) -> Self
Sets the value of remote_source
to hold a MavenRepository.
Note that all the setters affecting remote_source are
mutually exclusive.
§Example
use google_cloud_artifactregistry_v1::model::remote_repository_config::MavenRepository;
let x = RemoteRepositoryConfig::new().set_maven_repository(MavenRepository::default()/* use setters */);
assert!(x.maven_repository().is_some());
assert!(x.docker_repository().is_none());
assert!(x.npm_repository().is_none());
assert!(x.python_repository().is_none());
assert!(x.apt_repository().is_none());
assert!(x.yum_repository().is_none());
assert!(x.common_repository().is_none());Sourcepub fn npm_repository(&self) -> Option<&Box<NpmRepository>>
pub fn npm_repository(&self) -> Option<&Box<NpmRepository>>
The value of remote_source
if it holds a NpmRepository, None if the field is not set or
holds a different branch.
Sourcepub fn set_npm_repository<T: Into<Box<NpmRepository>>>(self, v: T) -> Self
pub fn set_npm_repository<T: Into<Box<NpmRepository>>>(self, v: T) -> Self
Sets the value of remote_source
to hold a NpmRepository.
Note that all the setters affecting remote_source are
mutually exclusive.
§Example
use google_cloud_artifactregistry_v1::model::remote_repository_config::NpmRepository;
let x = RemoteRepositoryConfig::new().set_npm_repository(NpmRepository::default()/* use setters */);
assert!(x.npm_repository().is_some());
assert!(x.docker_repository().is_none());
assert!(x.maven_repository().is_none());
assert!(x.python_repository().is_none());
assert!(x.apt_repository().is_none());
assert!(x.yum_repository().is_none());
assert!(x.common_repository().is_none());Sourcepub fn python_repository(&self) -> Option<&Box<PythonRepository>>
pub fn python_repository(&self) -> Option<&Box<PythonRepository>>
The value of remote_source
if it holds a PythonRepository, None if the field is not set or
holds a different branch.
Sourcepub fn set_python_repository<T: Into<Box<PythonRepository>>>(self, v: T) -> Self
pub fn set_python_repository<T: Into<Box<PythonRepository>>>(self, v: T) -> Self
Sets the value of remote_source
to hold a PythonRepository.
Note that all the setters affecting remote_source are
mutually exclusive.
§Example
use google_cloud_artifactregistry_v1::model::remote_repository_config::PythonRepository;
let x = RemoteRepositoryConfig::new().set_python_repository(PythonRepository::default()/* use setters */);
assert!(x.python_repository().is_some());
assert!(x.docker_repository().is_none());
assert!(x.maven_repository().is_none());
assert!(x.npm_repository().is_none());
assert!(x.apt_repository().is_none());
assert!(x.yum_repository().is_none());
assert!(x.common_repository().is_none());Sourcepub fn apt_repository(&self) -> Option<&Box<AptRepository>>
pub fn apt_repository(&self) -> Option<&Box<AptRepository>>
The value of remote_source
if it holds a AptRepository, None if the field is not set or
holds a different branch.
Sourcepub fn set_apt_repository<T: Into<Box<AptRepository>>>(self, v: T) -> Self
pub fn set_apt_repository<T: Into<Box<AptRepository>>>(self, v: T) -> Self
Sets the value of remote_source
to hold a AptRepository.
Note that all the setters affecting remote_source are
mutually exclusive.
§Example
use google_cloud_artifactregistry_v1::model::remote_repository_config::AptRepository;
let x = RemoteRepositoryConfig::new().set_apt_repository(AptRepository::default()/* use setters */);
assert!(x.apt_repository().is_some());
assert!(x.docker_repository().is_none());
assert!(x.maven_repository().is_none());
assert!(x.npm_repository().is_none());
assert!(x.python_repository().is_none());
assert!(x.yum_repository().is_none());
assert!(x.common_repository().is_none());Sourcepub fn yum_repository(&self) -> Option<&Box<YumRepository>>
pub fn yum_repository(&self) -> Option<&Box<YumRepository>>
The value of remote_source
if it holds a YumRepository, None if the field is not set or
holds a different branch.
Sourcepub fn set_yum_repository<T: Into<Box<YumRepository>>>(self, v: T) -> Self
pub fn set_yum_repository<T: Into<Box<YumRepository>>>(self, v: T) -> Self
Sets the value of remote_source
to hold a YumRepository.
Note that all the setters affecting remote_source are
mutually exclusive.
§Example
use google_cloud_artifactregistry_v1::model::remote_repository_config::YumRepository;
let x = RemoteRepositoryConfig::new().set_yum_repository(YumRepository::default()/* use setters */);
assert!(x.yum_repository().is_some());
assert!(x.docker_repository().is_none());
assert!(x.maven_repository().is_none());
assert!(x.npm_repository().is_none());
assert!(x.python_repository().is_none());
assert!(x.apt_repository().is_none());
assert!(x.common_repository().is_none());Sourcepub fn common_repository(&self) -> Option<&Box<CommonRemoteRepository>>
pub fn common_repository(&self) -> Option<&Box<CommonRemoteRepository>>
The value of remote_source
if it holds a CommonRepository, None if the field is not set or
holds a different branch.
Sourcepub fn set_common_repository<T: Into<Box<CommonRemoteRepository>>>(
self,
v: T,
) -> Self
pub fn set_common_repository<T: Into<Box<CommonRemoteRepository>>>( self, v: T, ) -> Self
Sets the value of remote_source
to hold a CommonRepository.
Note that all the setters affecting remote_source are
mutually exclusive.
§Example
use google_cloud_artifactregistry_v1::model::remote_repository_config::CommonRemoteRepository;
let x = RemoteRepositoryConfig::new().set_common_repository(CommonRemoteRepository::default()/* use setters */);
assert!(x.common_repository().is_some());
assert!(x.docker_repository().is_none());
assert!(x.maven_repository().is_none());
assert!(x.npm_repository().is_none());
assert!(x.python_repository().is_none());
assert!(x.apt_repository().is_none());
assert!(x.yum_repository().is_none());Trait Implementations§
Source§impl Clone for RemoteRepositoryConfig
impl Clone for RemoteRepositoryConfig
Source§fn clone(&self) -> RemoteRepositoryConfig
fn clone(&self) -> RemoteRepositoryConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more