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/appconfig/AppConfig_EXPORTS.h> 8 #include <aws/appconfig/model/ValidatorType.h> 9 #include <aws/core/utils/memory/stl/AWSString.h> 10 #include <utility> 11 12 namespace Aws 13 { 14 namespace Utils 15 { 16 namespace Json 17 { 18 class JsonValue; 19 class JsonView; 20 } // namespace Json 21 } // namespace Utils 22 namespace AppConfig 23 { 24 namespace Model 25 { 26 27 /** 28 * <p>A validator provides a syntactic or semantic check to ensure the 29 * configuration you want to deploy functions as intended. To validate your 30 * application configuration data, you provide a schema or a Lambda function that 31 * runs against the configuration. The configuration deployment or update can only 32 * proceed when the configuration data is valid.</p><p><h3>See Also:</h3> <a 33 * href="http://docs.aws.amazon.com/goto/WebAPI/appconfig-2019-10-09/Validator">AWS 34 * API Reference</a></p> 35 */ 36 class AWS_APPCONFIG_API Validator 37 { 38 public: 39 Validator(); 40 Validator(Aws::Utils::Json::JsonView jsonValue); 41 Validator& operator=(Aws::Utils::Json::JsonView jsonValue); 42 Aws::Utils::Json::JsonValue Jsonize() const; 43 44 45 /** 46 * <p>AppConfig supports validators of type <code>JSON_SCHEMA</code> and 47 * <code>LAMBDA</code> </p> 48 */ GetType()49 inline const ValidatorType& GetType() const{ return m_type; } 50 51 /** 52 * <p>AppConfig supports validators of type <code>JSON_SCHEMA</code> and 53 * <code>LAMBDA</code> </p> 54 */ TypeHasBeenSet()55 inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; } 56 57 /** 58 * <p>AppConfig supports validators of type <code>JSON_SCHEMA</code> and 59 * <code>LAMBDA</code> </p> 60 */ SetType(const ValidatorType & value)61 inline void SetType(const ValidatorType& value) { m_typeHasBeenSet = true; m_type = value; } 62 63 /** 64 * <p>AppConfig supports validators of type <code>JSON_SCHEMA</code> and 65 * <code>LAMBDA</code> </p> 66 */ SetType(ValidatorType && value)67 inline void SetType(ValidatorType&& value) { m_typeHasBeenSet = true; m_type = std::move(value); } 68 69 /** 70 * <p>AppConfig supports validators of type <code>JSON_SCHEMA</code> and 71 * <code>LAMBDA</code> </p> 72 */ WithType(const ValidatorType & value)73 inline Validator& WithType(const ValidatorType& value) { SetType(value); return *this;} 74 75 /** 76 * <p>AppConfig supports validators of type <code>JSON_SCHEMA</code> and 77 * <code>LAMBDA</code> </p> 78 */ WithType(ValidatorType && value)79 inline Validator& WithType(ValidatorType&& value) { SetType(std::move(value)); return *this;} 80 81 82 /** 83 * <p>Either the JSON Schema content or the Amazon Resource Name (ARN) of an AWS 84 * Lambda function.</p> 85 */ GetContent()86 inline const Aws::String& GetContent() const{ return m_content; } 87 88 /** 89 * <p>Either the JSON Schema content or the Amazon Resource Name (ARN) of an AWS 90 * Lambda function.</p> 91 */ ContentHasBeenSet()92 inline bool ContentHasBeenSet() const { return m_contentHasBeenSet; } 93 94 /** 95 * <p>Either the JSON Schema content or the Amazon Resource Name (ARN) of an AWS 96 * Lambda function.</p> 97 */ SetContent(const Aws::String & value)98 inline void SetContent(const Aws::String& value) { m_contentHasBeenSet = true; m_content = value; } 99 100 /** 101 * <p>Either the JSON Schema content or the Amazon Resource Name (ARN) of an AWS 102 * Lambda function.</p> 103 */ SetContent(Aws::String && value)104 inline void SetContent(Aws::String&& value) { m_contentHasBeenSet = true; m_content = std::move(value); } 105 106 /** 107 * <p>Either the JSON Schema content or the Amazon Resource Name (ARN) of an AWS 108 * Lambda function.</p> 109 */ SetContent(const char * value)110 inline void SetContent(const char* value) { m_contentHasBeenSet = true; m_content.assign(value); } 111 112 /** 113 * <p>Either the JSON Schema content or the Amazon Resource Name (ARN) of an AWS 114 * Lambda function.</p> 115 */ WithContent(const Aws::String & value)116 inline Validator& WithContent(const Aws::String& value) { SetContent(value); return *this;} 117 118 /** 119 * <p>Either the JSON Schema content or the Amazon Resource Name (ARN) of an AWS 120 * Lambda function.</p> 121 */ WithContent(Aws::String && value)122 inline Validator& WithContent(Aws::String&& value) { SetContent(std::move(value)); return *this;} 123 124 /** 125 * <p>Either the JSON Schema content or the Amazon Resource Name (ARN) of an AWS 126 * Lambda function.</p> 127 */ WithContent(const char * value)128 inline Validator& WithContent(const char* value) { SetContent(value); return *this;} 129 130 private: 131 132 ValidatorType m_type; 133 bool m_typeHasBeenSet; 134 135 Aws::String m_content; 136 bool m_contentHasBeenSet; 137 }; 138 139 } // namespace Model 140 } // namespace AppConfig 141 } // namespace Aws 142