oci_rust_sdk/core/models/create_macsec_key.rs
1use serde::{Deserialize, Serialize};
2
3#[allow(unused_imports)]
4use super::*;
5/// Defines the secret [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm)s held in Vault that represent the MACsec key.
6#[derive(Debug, Clone, Serialize, Deserialize)]
7#[serde(rename_all = "camelCase")]
8pub struct CreateMacsecKey {
9 /// Secret [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) containing the Connectivity association Key Name (CKN) of this MACsec key. <p> NOTE: Only the latest secret version will be used.
10 pub connectivity_association_name_secret_id: String,
11
12 /// Secret [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) containing the Connectivity Association Key (CAK) of this MACsec key. <p> NOTE: Only the latest secret version will be used.
13 pub connectivity_association_key_secret_id: String,
14}
15
16/// Required fields for CreateMacsecKey
17pub struct CreateMacsecKeyRequired {
18 /// Secret [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) containing the Connectivity association Key Name (CKN) of this MACsec key. <p> NOTE: Only the latest secret version will be used.
19 pub connectivity_association_name_secret_id: String,
20
21 /// Secret [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) containing the Connectivity Association Key (CAK) of this MACsec key. <p> NOTE: Only the latest secret version will be used.
22 pub connectivity_association_key_secret_id: String,
23}
24
25impl CreateMacsecKey {
26 /// Create a new CreateMacsecKey with required fields
27 pub fn new(required: CreateMacsecKeyRequired) -> Self {
28 Self {
29 connectivity_association_name_secret_id: required
30 .connectivity_association_name_secret_id,
31
32 connectivity_association_key_secret_id: required.connectivity_association_key_secret_id,
33 }
34 }
35
36 /// Set connectivity_association_name_secret_id
37 pub fn set_connectivity_association_name_secret_id(mut self, value: String) -> Self {
38 self.connectivity_association_name_secret_id = value;
39 self
40 }
41
42 /// Set connectivity_association_key_secret_id
43 pub fn set_connectivity_association_key_secret_id(mut self, value: String) -> Self {
44 self.connectivity_association_key_secret_id = value;
45 self
46 }
47}