#[non_exhaustive]pub struct CertificateConfig {
pub subject_config: Option<SubjectConfig>,
pub x509_config: Option<X509Parameters>,
pub public_key: Option<PublicKey>,
pub subject_key_id: Option<KeyId>,
/* private fields */
}Expand description
A CertificateConfig describes an X.509 certificate or CSR that is to be created, as an alternative to using ASN.1.
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.subject_config: Option<SubjectConfig>Required. Specifies some of the values in a certificate that are related to the subject.
x509_config: Option<X509Parameters>Required. Describes how some of the technical X.509 fields in a certificate should be populated.
public_key: Option<PublicKey>Optional. The public key that corresponds to this config. This is, for example, used when issuing Certificates, but not when creating a self-signed CertificateAuthority or CertificateAuthority CSR.
subject_key_id: Option<KeyId>Optional. When specified this provides a custom SKI to be used in the certificate. This should only be used to maintain a SKI of an existing CA originally created outside CA service, which was not generated using method (1) described in RFC 5280 section 4.2.1.2.
Implementations§
Source§impl CertificateConfig
impl CertificateConfig
pub fn new() -> Self
Sourcepub fn set_subject_config<T>(self, v: T) -> Selfwhere
T: Into<SubjectConfig>,
pub fn set_subject_config<T>(self, v: T) -> Selfwhere
T: Into<SubjectConfig>,
Sets the value of subject_config.
§Example
use google_cloud_security_privateca_v1::model::certificate_config::SubjectConfig;
let x = CertificateConfig::new().set_subject_config(SubjectConfig::default()/* use setters */);Sourcepub fn set_or_clear_subject_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<SubjectConfig>,
pub fn set_or_clear_subject_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<SubjectConfig>,
Sets or clears the value of subject_config.
§Example
use google_cloud_security_privateca_v1::model::certificate_config::SubjectConfig;
let x = CertificateConfig::new().set_or_clear_subject_config(Some(SubjectConfig::default()/* use setters */));
let x = CertificateConfig::new().set_or_clear_subject_config(None::<SubjectConfig>);Sourcepub fn set_x509_config<T>(self, v: T) -> Selfwhere
T: Into<X509Parameters>,
pub fn set_x509_config<T>(self, v: T) -> Selfwhere
T: Into<X509Parameters>,
Sets the value of x509_config.
§Example
use google_cloud_security_privateca_v1::model::X509Parameters;
let x = CertificateConfig::new().set_x509_config(X509Parameters::default()/* use setters */);Sourcepub fn set_or_clear_x509_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<X509Parameters>,
pub fn set_or_clear_x509_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<X509Parameters>,
Sets or clears the value of x509_config.
§Example
use google_cloud_security_privateca_v1::model::X509Parameters;
let x = CertificateConfig::new().set_or_clear_x509_config(Some(X509Parameters::default()/* use setters */));
let x = CertificateConfig::new().set_or_clear_x509_config(None::<X509Parameters>);Sourcepub fn set_public_key<T>(self, v: T) -> Self
pub fn set_public_key<T>(self, v: T) -> Self
Sets the value of public_key.
§Example
use google_cloud_security_privateca_v1::model::PublicKey;
let x = CertificateConfig::new().set_public_key(PublicKey::default()/* use setters */);Sourcepub fn set_or_clear_public_key<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_public_key<T>(self, v: Option<T>) -> Self
Sets or clears the value of public_key.
§Example
use google_cloud_security_privateca_v1::model::PublicKey;
let x = CertificateConfig::new().set_or_clear_public_key(Some(PublicKey::default()/* use setters */));
let x = CertificateConfig::new().set_or_clear_public_key(None::<PublicKey>);Sourcepub fn set_subject_key_id<T>(self, v: T) -> Self
pub fn set_subject_key_id<T>(self, v: T) -> Self
Sets the value of subject_key_id.
§Example
use google_cloud_security_privateca_v1::model::certificate_config::KeyId;
let x = CertificateConfig::new().set_subject_key_id(KeyId::default()/* use setters */);Sourcepub fn set_or_clear_subject_key_id<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_subject_key_id<T>(self, v: Option<T>) -> Self
Sets or clears the value of subject_key_id.
§Example
use google_cloud_security_privateca_v1::model::certificate_config::KeyId;
let x = CertificateConfig::new().set_or_clear_subject_key_id(Some(KeyId::default()/* use setters */));
let x = CertificateConfig::new().set_or_clear_subject_key_id(None::<KeyId>);Trait Implementations§
Source§impl Clone for CertificateConfig
impl Clone for CertificateConfig
Source§fn clone(&self) -> CertificateConfig
fn clone(&self) -> CertificateConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more