#[non_exhaustive]pub struct Certificate {Show 13 fields
pub name: String,
pub issuer_certificate_authority: String,
pub lifetime: Option<Duration>,
pub certificate_template: String,
pub subject_mode: SubjectRequestMode,
pub revocation_details: Option<RevocationDetails>,
pub pem_certificate: String,
pub certificate_description: Option<CertificateDescription>,
pub pem_certificate_chain: Vec<String>,
pub create_time: Option<Timestamp>,
pub update_time: Option<Timestamp>,
pub labels: HashMap<String, String>,
pub certificate_config: Option<CertificateConfig>,
/* private fields */
}Expand description
A Certificate corresponds to a signed X.509 certificate issued by a CertificateAuthority.
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: StringIdentifier. The resource name for this
Certificate in the format
projects/*/locations/*/caPools/*/certificates/*.
Output only. The resource name of the issuing
CertificateAuthority
in the format projects/*/locations/*/caPools/*/certificateAuthorities/*.
lifetime: Option<Duration>Required. Immutable. The desired lifetime of a certificate. Used to create the “not_before_time” and “not_after_time” fields inside an X.509 certificate. Note that the lifetime may be truncated if it would extend past the life of any certificate authority in the issuing chain.
certificate_template: StringImmutable. The resource name for a
CertificateTemplate
used to issue this certificate, in the format
projects/*/locations/*/certificateTemplates/*.
If this is specified, the caller must have the necessary permission to
use this template. If this is omitted, no template will be used.
This template must be in the same location as the
Certificate.
subject_mode: SubjectRequestModeImmutable. Specifies how the
Certificate’s identity
fields are to be decided. If this is omitted, the DEFAULT subject mode
will be used.
revocation_details: Option<RevocationDetails>Output only. Details regarding the revocation of this Certificate. This Certificate is considered revoked if and only if this field is present.
pem_certificate: StringOutput only. The pem-encoded, signed X.509 certificate.
certificate_description: Option<CertificateDescription>Output only. A structured description of the issued X.509 certificate.
pem_certificate_chain: Vec<String>Output only. The chain that may be used to verify the X.509 certificate. Expected to be in issuer-to-root order according to RFC 5246.
create_time: Option<Timestamp>Output only. The time at which this Certificate was created.
update_time: Option<Timestamp>Output only. The time at which this Certificate was updated.
labels: HashMap<String, String>Optional. Labels with user-defined metadata.
certificate_config: Option<CertificateConfig>The config used to create a signed X.509 certificate.
Implementations§
Source§impl Certificate
impl Certificate
pub fn new() -> Self
Sets the value of issuer_certificate_authority.
§Example
let x = Certificate::new().set_issuer_certificate_authority("example");Sourcepub fn set_lifetime<T>(self, v: T) -> Self
pub fn set_lifetime<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_lifetime<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_lifetime<T>(self, v: Option<T>) -> Self
Sourcepub fn set_certificate_template<T: Into<String>>(self, v: T) -> Self
pub fn set_certificate_template<T: Into<String>>(self, v: T) -> Self
Sets the value of certificate_template.
§Example
let x = Certificate::new().set_certificate_template("example");Sourcepub fn set_subject_mode<T: Into<SubjectRequestMode>>(self, v: T) -> Self
pub fn set_subject_mode<T: Into<SubjectRequestMode>>(self, v: T) -> Self
Sets the value of subject_mode.
§Example
use google_cloud_security_privateca_v1::model::SubjectRequestMode;
let x0 = Certificate::new().set_subject_mode(SubjectRequestMode::Default);
let x1 = Certificate::new().set_subject_mode(SubjectRequestMode::RdnSequence);
let x2 = Certificate::new().set_subject_mode(SubjectRequestMode::ReflectedSpiffe);Sourcepub fn set_revocation_details<T>(self, v: T) -> Selfwhere
T: Into<RevocationDetails>,
pub fn set_revocation_details<T>(self, v: T) -> Selfwhere
T: Into<RevocationDetails>,
Sets the value of revocation_details.
§Example
use google_cloud_security_privateca_v1::model::certificate::RevocationDetails;
let x = Certificate::new().set_revocation_details(RevocationDetails::default()/* use setters */);Sourcepub fn set_or_clear_revocation_details<T>(self, v: Option<T>) -> Selfwhere
T: Into<RevocationDetails>,
pub fn set_or_clear_revocation_details<T>(self, v: Option<T>) -> Selfwhere
T: Into<RevocationDetails>,
Sets or clears the value of revocation_details.
§Example
use google_cloud_security_privateca_v1::model::certificate::RevocationDetails;
let x = Certificate::new().set_or_clear_revocation_details(Some(RevocationDetails::default()/* use setters */));
let x = Certificate::new().set_or_clear_revocation_details(None::<RevocationDetails>);Sourcepub fn set_pem_certificate<T: Into<String>>(self, v: T) -> Self
pub fn set_pem_certificate<T: Into<String>>(self, v: T) -> Self
Sets the value of pem_certificate.
§Example
let x = Certificate::new().set_pem_certificate("example");Sourcepub fn set_certificate_description<T>(self, v: T) -> Selfwhere
T: Into<CertificateDescription>,
pub fn set_certificate_description<T>(self, v: T) -> Selfwhere
T: Into<CertificateDescription>,
Sets the value of certificate_description.
§Example
use google_cloud_security_privateca_v1::model::CertificateDescription;
let x = Certificate::new().set_certificate_description(CertificateDescription::default()/* use setters */);Sourcepub fn set_or_clear_certificate_description<T>(self, v: Option<T>) -> Selfwhere
T: Into<CertificateDescription>,
pub fn set_or_clear_certificate_description<T>(self, v: Option<T>) -> Selfwhere
T: Into<CertificateDescription>,
Sets or clears the value of certificate_description.
§Example
use google_cloud_security_privateca_v1::model::CertificateDescription;
let x = Certificate::new().set_or_clear_certificate_description(Some(CertificateDescription::default()/* use setters */));
let x = Certificate::new().set_or_clear_certificate_description(None::<CertificateDescription>);Sourcepub fn set_pem_certificate_chain<T, V>(self, v: T) -> Self
pub fn set_pem_certificate_chain<T, V>(self, v: T) -> Self
Sets the value of pem_certificate_chain.
§Example
let x = Certificate::new().set_pem_certificate_chain(["a", "b", "c"]);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 = Certificate::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 = Certificate::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
let x = Certificate::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 = Certificate::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 = Certificate::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
let x = Certificate::new().set_or_clear_update_time(None::<Timestamp>);Sourcepub fn set_labels<T, K, V>(self, v: T) -> Self
pub fn set_labels<T, K, V>(self, v: T) -> Self
Sourcepub fn set_certificate_config<T: Into<Option<CertificateConfig>>>(
self,
v: T,
) -> Self
pub fn set_certificate_config<T: Into<Option<CertificateConfig>>>( self, v: T, ) -> Self
Sets the value of certificate_config.
Note that all the setters affecting certificate_config are mutually
exclusive.
§Example
use google_cloud_security_privateca_v1::model::certificate::CertificateConfig;
let x = Certificate::new().set_certificate_config(Some(CertificateConfig::PemCsr("example".to_string())));Sourcepub fn pem_csr(&self) -> Option<&String>
pub fn pem_csr(&self) -> Option<&String>
The value of certificate_config
if it holds a PemCsr, None if the field is not set or
holds a different branch.
Sourcepub fn set_pem_csr<T: Into<String>>(self, v: T) -> Self
pub fn set_pem_csr<T: Into<String>>(self, v: T) -> Self
Sets the value of certificate_config
to hold a PemCsr.
Note that all the setters affecting certificate_config are
mutually exclusive.
§Example
let x = Certificate::new().set_pem_csr("example");
assert!(x.pem_csr().is_some());
assert!(x.config().is_none());Sourcepub fn config(&self) -> Option<&Box<CertificateConfig>>
pub fn config(&self) -> Option<&Box<CertificateConfig>>
The value of certificate_config
if it holds a Config, None if the field is not set or
holds a different branch.
Sourcepub fn set_config<T: Into<Box<CertificateConfig>>>(self, v: T) -> Self
pub fn set_config<T: Into<Box<CertificateConfig>>>(self, v: T) -> Self
Sets the value of certificate_config
to hold a Config.
Note that all the setters affecting certificate_config are
mutually exclusive.
§Example
use google_cloud_security_privateca_v1::model::CertificateConfig;
let x = Certificate::new().set_config(CertificateConfig::default()/* use setters */);
assert!(x.config().is_some());
assert!(x.pem_csr().is_none());Trait Implementations§
Source§impl Clone for Certificate
impl Clone for Certificate
Source§fn clone(&self) -> Certificate
fn clone(&self) -> Certificate
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more