1 /** 2 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 * SPDX-License-Identifier: Apache-2.0. 4 */ 5 6 #pragma once 7 #include <aws/cloudfront/CloudFront_EXPORTS.h> 8 #include <aws/core/utils/memory/stl/AWSString.h> 9 #include <aws/core/utils/DateTime.h> 10 #include <aws/cloudfront/model/PublicKeyConfig.h> 11 #include <utility> 12 13 namespace Aws 14 { 15 namespace Utils 16 { 17 namespace Xml 18 { 19 class XmlNode; 20 } // namespace Xml 21 } // namespace Utils 22 namespace CloudFront 23 { 24 namespace Model 25 { 26 27 /** 28 * <p>A public key that you can use with <a 29 * href="https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html">signed 30 * URLs and signed cookies</a>, or with <a 31 * href="https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/field-level-encryption.html">field-level 32 * encryption</a>.</p><p><h3>See Also:</h3> <a 33 * href="http://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/PublicKey">AWS 34 * API Reference</a></p> 35 */ 36 class AWS_CLOUDFRONT_API PublicKey 37 { 38 public: 39 PublicKey(); 40 PublicKey(const Aws::Utils::Xml::XmlNode& xmlNode); 41 PublicKey& operator=(const Aws::Utils::Xml::XmlNode& xmlNode); 42 43 void AddToNode(Aws::Utils::Xml::XmlNode& parentNode) const; 44 45 46 /** 47 * <p>The identifier of the public key.</p> 48 */ GetId()49 inline const Aws::String& GetId() const{ return m_id; } 50 51 /** 52 * <p>The identifier of the public key.</p> 53 */ IdHasBeenSet()54 inline bool IdHasBeenSet() const { return m_idHasBeenSet; } 55 56 /** 57 * <p>The identifier of the public key.</p> 58 */ SetId(const Aws::String & value)59 inline void SetId(const Aws::String& value) { m_idHasBeenSet = true; m_id = value; } 60 61 /** 62 * <p>The identifier of the public key.</p> 63 */ SetId(Aws::String && value)64 inline void SetId(Aws::String&& value) { m_idHasBeenSet = true; m_id = std::move(value); } 65 66 /** 67 * <p>The identifier of the public key.</p> 68 */ SetId(const char * value)69 inline void SetId(const char* value) { m_idHasBeenSet = true; m_id.assign(value); } 70 71 /** 72 * <p>The identifier of the public key.</p> 73 */ WithId(const Aws::String & value)74 inline PublicKey& WithId(const Aws::String& value) { SetId(value); return *this;} 75 76 /** 77 * <p>The identifier of the public key.</p> 78 */ WithId(Aws::String && value)79 inline PublicKey& WithId(Aws::String&& value) { SetId(std::move(value)); return *this;} 80 81 /** 82 * <p>The identifier of the public key.</p> 83 */ WithId(const char * value)84 inline PublicKey& WithId(const char* value) { SetId(value); return *this;} 85 86 87 /** 88 * <p>The date and time when the public key was uploaded.</p> 89 */ GetCreatedTime()90 inline const Aws::Utils::DateTime& GetCreatedTime() const{ return m_createdTime; } 91 92 /** 93 * <p>The date and time when the public key was uploaded.</p> 94 */ CreatedTimeHasBeenSet()95 inline bool CreatedTimeHasBeenSet() const { return m_createdTimeHasBeenSet; } 96 97 /** 98 * <p>The date and time when the public key was uploaded.</p> 99 */ SetCreatedTime(const Aws::Utils::DateTime & value)100 inline void SetCreatedTime(const Aws::Utils::DateTime& value) { m_createdTimeHasBeenSet = true; m_createdTime = value; } 101 102 /** 103 * <p>The date and time when the public key was uploaded.</p> 104 */ SetCreatedTime(Aws::Utils::DateTime && value)105 inline void SetCreatedTime(Aws::Utils::DateTime&& value) { m_createdTimeHasBeenSet = true; m_createdTime = std::move(value); } 106 107 /** 108 * <p>The date and time when the public key was uploaded.</p> 109 */ WithCreatedTime(const Aws::Utils::DateTime & value)110 inline PublicKey& WithCreatedTime(const Aws::Utils::DateTime& value) { SetCreatedTime(value); return *this;} 111 112 /** 113 * <p>The date and time when the public key was uploaded.</p> 114 */ WithCreatedTime(Aws::Utils::DateTime && value)115 inline PublicKey& WithCreatedTime(Aws::Utils::DateTime&& value) { SetCreatedTime(std::move(value)); return *this;} 116 117 118 /** 119 * <p>Configuration information about a public key that you can use with <a 120 * href="https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html">signed 121 * URLs and signed cookies</a>, or with <a 122 * href="https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/field-level-encryption.html">field-level 123 * encryption</a>.</p> 124 */ GetPublicKeyConfig()125 inline const PublicKeyConfig& GetPublicKeyConfig() const{ return m_publicKeyConfig; } 126 127 /** 128 * <p>Configuration information about a public key that you can use with <a 129 * href="https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html">signed 130 * URLs and signed cookies</a>, or with <a 131 * href="https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/field-level-encryption.html">field-level 132 * encryption</a>.</p> 133 */ PublicKeyConfigHasBeenSet()134 inline bool PublicKeyConfigHasBeenSet() const { return m_publicKeyConfigHasBeenSet; } 135 136 /** 137 * <p>Configuration information about a public key that you can use with <a 138 * href="https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html">signed 139 * URLs and signed cookies</a>, or with <a 140 * href="https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/field-level-encryption.html">field-level 141 * encryption</a>.</p> 142 */ SetPublicKeyConfig(const PublicKeyConfig & value)143 inline void SetPublicKeyConfig(const PublicKeyConfig& value) { m_publicKeyConfigHasBeenSet = true; m_publicKeyConfig = value; } 144 145 /** 146 * <p>Configuration information about a public key that you can use with <a 147 * href="https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html">signed 148 * URLs and signed cookies</a>, or with <a 149 * href="https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/field-level-encryption.html">field-level 150 * encryption</a>.</p> 151 */ SetPublicKeyConfig(PublicKeyConfig && value)152 inline void SetPublicKeyConfig(PublicKeyConfig&& value) { m_publicKeyConfigHasBeenSet = true; m_publicKeyConfig = std::move(value); } 153 154 /** 155 * <p>Configuration information about a public key that you can use with <a 156 * href="https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html">signed 157 * URLs and signed cookies</a>, or with <a 158 * href="https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/field-level-encryption.html">field-level 159 * encryption</a>.</p> 160 */ WithPublicKeyConfig(const PublicKeyConfig & value)161 inline PublicKey& WithPublicKeyConfig(const PublicKeyConfig& value) { SetPublicKeyConfig(value); return *this;} 162 163 /** 164 * <p>Configuration information about a public key that you can use with <a 165 * href="https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html">signed 166 * URLs and signed cookies</a>, or with <a 167 * href="https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/field-level-encryption.html">field-level 168 * encryption</a>.</p> 169 */ WithPublicKeyConfig(PublicKeyConfig && value)170 inline PublicKey& WithPublicKeyConfig(PublicKeyConfig&& value) { SetPublicKeyConfig(std::move(value)); return *this;} 171 172 private: 173 174 Aws::String m_id; 175 bool m_idHasBeenSet; 176 177 Aws::Utils::DateTime m_createdTime; 178 bool m_createdTimeHasBeenSet; 179 180 PublicKeyConfig m_publicKeyConfig; 181 bool m_publicKeyConfigHasBeenSet; 182 }; 183 184 } // namespace Model 185 } // namespace CloudFront 186 } // namespace Aws 187