Skip to main content

RemoteRepositoryConfig

Struct RemoteRepositoryConfig 

Source
#[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
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§description: String

The description of the remote source.

§upstream_credentials: Option<UpstreamCredentials>

Optional. The credentials used to access the remote repository.

§disable_upstream_validation: bool

Input 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

Source

pub fn new() -> Self

Source

pub fn set_description<T: Into<String>>(self, v: T) -> Self

Sets the value of description.

§Example
let x = RemoteRepositoryConfig::new().set_description("example");
Source

pub fn set_upstream_credentials<T>(self, v: T) -> Self

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 */);
Source

pub fn set_or_clear_upstream_credentials<T>(self, v: Option<T>) -> Self

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>);
Source

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);
Source

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())));
Source

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.

Source

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());
Source

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.

Source

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());
Source

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.

Source

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());
Source

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.

Source

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());
Source

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.

Source

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());
Source

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.

Source

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());
Source

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.

Source

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

Source§

fn clone(&self) -> RemoteRepositoryConfig

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for RemoteRepositoryConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for RemoteRepositoryConfig

Source§

fn default() -> RemoteRepositoryConfig

Returns the “default value” for a type. Read more
Source§

impl Message for RemoteRepositoryConfig

Source§

fn typename() -> &'static str

The typename of this message.
Source§

impl PartialEq for RemoteRepositoryConfig

Source§

fn eq(&self, other: &RemoteRepositoryConfig) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for RemoteRepositoryConfig

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,