/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the kms-2014-11-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.KeyManagementService.Model { /// /// This is the response object from the GetPublicKey operation. /// public partial class GetPublicKeyResponse : AmazonWebServiceResponse { private CustomerMasterKeySpec _customerMasterKeySpec; private List _encryptionAlgorithms = new List(); private string _keyId; private KeySpec _keySpec; private KeyUsageType _keyUsage; private MemoryStream _publicKey; private List _signingAlgorithms = new List(); /// /// Gets and sets the property CustomerMasterKeySpec. /// /// Instead, use the KeySpec field in the GetPublicKey response. /// /// /// /// The KeySpec and CustomerMasterKeySpec fields have the same /// value. We recommend that you use the KeySpec field in your code. However, /// to avoid breaking changes, KMS supports both fields. /// /// [Obsolete("This field has been deprecated. Instead, use the KeySpec field.")] public CustomerMasterKeySpec CustomerMasterKeySpec { get { return this._customerMasterKeySpec; } set { this._customerMasterKeySpec = value; } } // Check to see if CustomerMasterKeySpec property is set internal bool IsSetCustomerMasterKeySpec() { return this._customerMasterKeySpec != null; } /// /// Gets and sets the property EncryptionAlgorithms. /// /// The encryption algorithms that KMS supports for this key. /// /// /// /// This information is critical. If a public key encrypts data outside of KMS by using /// an unsupported encryption algorithm, the ciphertext cannot be decrypted. /// /// /// /// This field appears in the response only when the KeyUsage of the public /// key is ENCRYPT_DECRYPT. /// /// public List EncryptionAlgorithms { get { return this._encryptionAlgorithms; } set { this._encryptionAlgorithms = value; } } // Check to see if EncryptionAlgorithms property is set internal bool IsSetEncryptionAlgorithms() { return this._encryptionAlgorithms != null && this._encryptionAlgorithms.Count > 0; } /// /// Gets and sets the property KeyId. /// /// The Amazon Resource Name (key /// ARN) of the asymmetric KMS key from which the public key was downloaded. /// /// [AWSProperty(Min=1, Max=2048)] public string KeyId { get { return this._keyId; } set { this._keyId = value; } } // Check to see if KeyId property is set internal bool IsSetKeyId() { return this._keyId != null; } /// /// Gets and sets the property KeySpec. /// /// The type of the of the public key that was downloaded. /// /// public KeySpec KeySpec { get { return this._keySpec; } set { this._keySpec = value; } } // Check to see if KeySpec property is set internal bool IsSetKeySpec() { return this._keySpec != null; } /// /// Gets and sets the property KeyUsage. /// /// The permitted use of the public key. Valid values are ENCRYPT_DECRYPT /// or SIGN_VERIFY. /// /// /// /// This information is critical. If a public key with SIGN_VERIFY key usage /// encrypts data outside of KMS, the ciphertext cannot be decrypted. /// /// public KeyUsageType KeyUsage { get { return this._keyUsage; } set { this._keyUsage = value; } } // Check to see if KeyUsage property is set internal bool IsSetKeyUsage() { return this._keyUsage != null; } /// /// Gets and sets the property PublicKey. /// /// The exported public key. /// /// /// /// The value is a DER-encoded X.509 public key, also known as SubjectPublicKeyInfo /// (SPKI), as defined in RFC 5280. /// When you use the HTTP API or the Amazon Web Services CLI, the value is Base64-encoded. /// Otherwise, it is not Base64-encoded. /// /// [AWSProperty(Min=1, Max=8192)] public MemoryStream PublicKey { get { return this._publicKey; } set { this._publicKey = value; } } // Check to see if PublicKey property is set internal bool IsSetPublicKey() { return this._publicKey != null; } /// /// Gets and sets the property SigningAlgorithms. /// /// The signing algorithms that KMS supports for this key. /// /// /// /// This field appears in the response only when the KeyUsage of the public /// key is SIGN_VERIFY. /// /// public List SigningAlgorithms { get { return this._signingAlgorithms; } set { this._signingAlgorithms = value; } } // Check to see if SigningAlgorithms property is set internal bool IsSetSigningAlgorithms() { return this._signingAlgorithms != null && this._signingAlgorithms.Count > 0; } } }