akeyless_api/models/name.rs
1/*
2 * Akeyless API
3 *
4 * The purpose of this application is to provide access to Akeyless API.
5 *
6 * The version of the OpenAPI document: 3.0
7 * Contact: support@akeyless.io
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// Name : Name represents an X.509 distinguished name. This only includes the common elements of a DN. Note that Name is only an approximation of the X.509 structure. If an accurate representation is needed, asn1.Unmarshal the raw subject or issuer as an [RDNSequence].
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct Name {
17 #[serde(rename = "Country", skip_serializing_if = "Option::is_none")]
18 pub country: Option<Vec<String>>,
19 /// ExtraNames contains attributes to be copied, raw, into any marshaled distinguished names. Values override any attributes with the same OID. The ExtraNames field is not populated when parsing, see Names.
20 #[serde(rename = "ExtraNames", skip_serializing_if = "Option::is_none")]
21 pub extra_names: Option<Vec<models::AttributeTypeAndValue>>,
22 #[serde(rename = "Locality", skip_serializing_if = "Option::is_none")]
23 pub locality: Option<Vec<String>>,
24 /// Names contains all parsed attributes. When parsing distinguished names, this can be used to extract non-standard attributes that are not parsed by this package. When marshaling to RDNSequences, the Names field is ignored, see ExtraNames.
25 #[serde(rename = "Names", skip_serializing_if = "Option::is_none")]
26 pub names: Option<Vec<models::AttributeTypeAndValue>>,
27 #[serde(rename = "SerialNumber", skip_serializing_if = "Option::is_none")]
28 pub serial_number: Option<String>,
29 #[serde(rename = "StreetAddress", skip_serializing_if = "Option::is_none")]
30 pub street_address: Option<Vec<String>>,
31}
32
33impl Name {
34 /// Name represents an X.509 distinguished name. This only includes the common elements of a DN. Note that Name is only an approximation of the X.509 structure. If an accurate representation is needed, asn1.Unmarshal the raw subject or issuer as an [RDNSequence].
35 pub fn new() -> Name {
36 Name {
37 country: None,
38 extra_names: None,
39 locality: None,
40 names: None,
41 serial_number: None,
42 street_address: None,
43 }
44 }
45}
46