oci_rust_sdk/core/models/update_macsec_key.rs
1use serde::{Deserialize, Serialize};
2
3#[allow(unused_imports)]
4use super::*;
5/// An object defining the OCID of the Secret held in Vault that represent the MACsec key.
6#[derive(Debug, Clone, Serialize, Deserialize)]
7#[serde(rename_all = "camelCase")]
8pub struct UpdateMacsecKey {
9 /// Secret [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) containing the Connectivity Association Key Name (CKN) of this MACsec key.
10 pub connectivity_association_name_secret_id: String,
11
12 /// The secret version of the connectivity association name secret in Vault. Note: Numbers greater than Number.MAX_SAFE_INTEGER will result in rounding issues.
13 pub connectivity_association_name_secret_version: i64,
14
15 /// Secret [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) containing the Connectivity Association Key (CAK) of this MACsec key.
16 pub connectivity_association_key_secret_id: String,
17
18 /// The secret version of the connectivityAssociationKey secret in Vault. Note: Numbers greater than Number.MAX_SAFE_INTEGER will result in rounding issues.
19 pub connectivity_association_key_secret_version: i64,
20}
21
22/// Required fields for UpdateMacsecKey
23pub struct UpdateMacsecKeyRequired {
24 /// Secret [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) containing the Connectivity Association Key Name (CKN) of this MACsec key.
25 pub connectivity_association_name_secret_id: String,
26
27 /// The secret version of the connectivity association name secret in Vault. Note: Numbers greater than Number.MAX_SAFE_INTEGER will result in rounding issues.
28 pub connectivity_association_name_secret_version: i64,
29
30 /// Secret [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) containing the Connectivity Association Key (CAK) of this MACsec key.
31 pub connectivity_association_key_secret_id: String,
32
33 /// The secret version of the connectivityAssociationKey secret in Vault. Note: Numbers greater than Number.MAX_SAFE_INTEGER will result in rounding issues.
34 pub connectivity_association_key_secret_version: i64,
35}
36
37impl UpdateMacsecKey {
38 /// Create a new UpdateMacsecKey with required fields
39 pub fn new(required: UpdateMacsecKeyRequired) -> Self {
40 Self {
41 connectivity_association_name_secret_id: required
42 .connectivity_association_name_secret_id,
43
44 connectivity_association_name_secret_version: required
45 .connectivity_association_name_secret_version,
46
47 connectivity_association_key_secret_id: required.connectivity_association_key_secret_id,
48
49 connectivity_association_key_secret_version: required
50 .connectivity_association_key_secret_version,
51 }
52 }
53
54 /// Set connectivity_association_name_secret_id
55 pub fn set_connectivity_association_name_secret_id(mut self, value: String) -> Self {
56 self.connectivity_association_name_secret_id = value;
57 self
58 }
59
60 /// Set connectivity_association_name_secret_version
61 pub fn set_connectivity_association_name_secret_version(mut self, value: i64) -> Self {
62 self.connectivity_association_name_secret_version = value;
63 self
64 }
65
66 /// Set connectivity_association_key_secret_id
67 pub fn set_connectivity_association_key_secret_id(mut self, value: String) -> Self {
68 self.connectivity_association_key_secret_id = value;
69 self
70 }
71
72 /// Set connectivity_association_key_secret_version
73 pub fn set_connectivity_association_key_secret_version(mut self, value: i64) -> Self {
74 self.connectivity_association_key_secret_version = value;
75 self
76 }
77}