#[non_exhaustive]pub struct X509Parameters {
pub key_usage: Option<KeyUsage>,
pub ca_options: Option<CaOptions>,
pub policy_ids: Vec<ObjectId>,
pub aia_ocsp_servers: Vec<String>,
pub name_constraints: Option<NameConstraints>,
pub additional_extensions: Vec<X509Extension>,
/* private fields */
}Expand description
An X509Parameters is used to describe certain fields of an X.509 certificate, such as the key usage fields, fields specific to CA certificates, certificate policy extensions and custom extensions.
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.key_usage: Option<KeyUsage>Optional. Indicates the intended use for keys that correspond to a certificate.
ca_options: Option<CaOptions>Optional. Describes options in this
X509Parameters that
are relevant in a CA certificate. If not specified, a default basic
constraints extension with is_ca=false will be added for leaf
certificates.
policy_ids: Vec<ObjectId>Optional. Describes the X.509 certificate policy object identifiers, per https://tools.ietf.org/html/rfc5280#section-4.2.1.4.
aia_ocsp_servers: Vec<String>Optional. Describes Online Certificate Status Protocol (OCSP) endpoint addresses that appear in the “Authority Information Access” extension in the certificate.
name_constraints: Option<NameConstraints>Optional. Describes the X.509 name constraints extension.
additional_extensions: Vec<X509Extension>Optional. Describes custom X.509 extensions.
Implementations§
Source§impl X509Parameters
impl X509Parameters
pub fn new() -> Self
Sourcepub fn set_key_usage<T>(self, v: T) -> Self
pub fn set_key_usage<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_key_usage<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_key_usage<T>(self, v: Option<T>) -> Self
Sourcepub fn set_ca_options<T>(self, v: T) -> Self
pub fn set_ca_options<T>(self, v: T) -> Self
Sets the value of ca_options.
§Example
use google_cloud_security_privateca_v1::model::x_509_parameters::CaOptions;
let x = X509Parameters::new().set_ca_options(CaOptions::default()/* use setters */);Sourcepub fn set_or_clear_ca_options<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_ca_options<T>(self, v: Option<T>) -> Self
Sets or clears the value of ca_options.
§Example
use google_cloud_security_privateca_v1::model::x_509_parameters::CaOptions;
let x = X509Parameters::new().set_or_clear_ca_options(Some(CaOptions::default()/* use setters */));
let x = X509Parameters::new().set_or_clear_ca_options(None::<CaOptions>);Sourcepub fn set_policy_ids<T, V>(self, v: T) -> Self
pub fn set_policy_ids<T, V>(self, v: T) -> Self
Sets the value of policy_ids.
§Example
use google_cloud_security_privateca_v1::model::ObjectId;
let x = X509Parameters::new()
.set_policy_ids([
ObjectId::default()/* use setters */,
ObjectId::default()/* use (different) setters */,
]);Sourcepub fn set_aia_ocsp_servers<T, V>(self, v: T) -> Self
pub fn set_aia_ocsp_servers<T, V>(self, v: T) -> Self
Sets the value of aia_ocsp_servers.
§Example
let x = X509Parameters::new().set_aia_ocsp_servers(["a", "b", "c"]);Sourcepub fn set_name_constraints<T>(self, v: T) -> Selfwhere
T: Into<NameConstraints>,
pub fn set_name_constraints<T>(self, v: T) -> Selfwhere
T: Into<NameConstraints>,
Sets the value of name_constraints.
§Example
use google_cloud_security_privateca_v1::model::x_509_parameters::NameConstraints;
let x = X509Parameters::new().set_name_constraints(NameConstraints::default()/* use setters */);Sourcepub fn set_or_clear_name_constraints<T>(self, v: Option<T>) -> Selfwhere
T: Into<NameConstraints>,
pub fn set_or_clear_name_constraints<T>(self, v: Option<T>) -> Selfwhere
T: Into<NameConstraints>,
Sets or clears the value of name_constraints.
§Example
use google_cloud_security_privateca_v1::model::x_509_parameters::NameConstraints;
let x = X509Parameters::new().set_or_clear_name_constraints(Some(NameConstraints::default()/* use setters */));
let x = X509Parameters::new().set_or_clear_name_constraints(None::<NameConstraints>);Sourcepub fn set_additional_extensions<T, V>(self, v: T) -> Self
pub fn set_additional_extensions<T, V>(self, v: T) -> Self
Sets the value of additional_extensions.
§Example
use google_cloud_security_privateca_v1::model::X509Extension;
let x = X509Parameters::new()
.set_additional_extensions([
X509Extension::default()/* use setters */,
X509Extension::default()/* use (different) setters */,
]);Trait Implementations§
Source§impl Clone for X509Parameters
impl Clone for X509Parameters
Source§fn clone(&self) -> X509Parameters
fn clone(&self) -> X509Parameters
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more