amazon_spapi/models/services/encryption_details.rs
1/*
2 * Selling Partner API for Services
3 *
4 * With the Services API, you can build applications that help service providers get and modify their service orders and manage their resources.
5 *
6 * The version of the OpenAPI document: v1
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// EncryptionDetails : Encryption details for required client-side encryption and decryption of document contents.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct EncryptionDetails {
17 /// The encryption standard required to encrypt or decrypt the document contents.
18 #[serde(rename = "standard")]
19 pub standard: Standard,
20 /// The vector to encrypt or decrypt the document contents using Cipher Block Chaining (CBC).
21 #[serde(rename = "initializationVector")]
22 pub initialization_vector: String,
23 /// The encryption key used to encrypt or decrypt the document contents.
24 #[serde(rename = "key")]
25 pub key: String,
26}
27
28impl EncryptionDetails {
29 /// Encryption details for required client-side encryption and decryption of document contents.
30 pub fn new(standard: Standard, initialization_vector: String, key: String) -> EncryptionDetails {
31 EncryptionDetails {
32 standard,
33 initialization_vector,
34 key,
35 }
36 }
37}
38/// The encryption standard required to encrypt or decrypt the document contents.
39#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
40pub enum Standard {
41 #[serde(rename = "AES")]
42 Aes,
43}
44
45impl Default for Standard {
46 fn default() -> Standard {
47 Self::Aes
48 }
49}
50