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/opsworks/OpsWorks_EXPORTS.h> 8 #include <aws/core/utils/memory/stl/AWSVector.h> 9 #include <aws/opsworks/model/CloudWatchLogsLogStream.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 OpsWorks 23 { 24 namespace Model 25 { 26 27 /** 28 * <p>Describes the Amazon CloudWatch logs configuration for a layer.</p><p><h3>See 29 * Also:</h3> <a 30 * href="http://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/CloudWatchLogsConfiguration">AWS 31 * API Reference</a></p> 32 */ 33 class AWS_OPSWORKS_API CloudWatchLogsConfiguration 34 { 35 public: 36 CloudWatchLogsConfiguration(); 37 CloudWatchLogsConfiguration(Aws::Utils::Json::JsonView jsonValue); 38 CloudWatchLogsConfiguration& operator=(Aws::Utils::Json::JsonView jsonValue); 39 Aws::Utils::Json::JsonValue Jsonize() const; 40 41 42 /** 43 * <p>Whether CloudWatch Logs is enabled for a layer.</p> 44 */ GetEnabled()45 inline bool GetEnabled() const{ return m_enabled; } 46 47 /** 48 * <p>Whether CloudWatch Logs is enabled for a layer.</p> 49 */ EnabledHasBeenSet()50 inline bool EnabledHasBeenSet() const { return m_enabledHasBeenSet; } 51 52 /** 53 * <p>Whether CloudWatch Logs is enabled for a layer.</p> 54 */ SetEnabled(bool value)55 inline void SetEnabled(bool value) { m_enabledHasBeenSet = true; m_enabled = value; } 56 57 /** 58 * <p>Whether CloudWatch Logs is enabled for a layer.</p> 59 */ WithEnabled(bool value)60 inline CloudWatchLogsConfiguration& WithEnabled(bool value) { SetEnabled(value); return *this;} 61 62 63 /** 64 * <p>A list of configuration options for CloudWatch Logs.</p> 65 */ GetLogStreams()66 inline const Aws::Vector<CloudWatchLogsLogStream>& GetLogStreams() const{ return m_logStreams; } 67 68 /** 69 * <p>A list of configuration options for CloudWatch Logs.</p> 70 */ LogStreamsHasBeenSet()71 inline bool LogStreamsHasBeenSet() const { return m_logStreamsHasBeenSet; } 72 73 /** 74 * <p>A list of configuration options for CloudWatch Logs.</p> 75 */ SetLogStreams(const Aws::Vector<CloudWatchLogsLogStream> & value)76 inline void SetLogStreams(const Aws::Vector<CloudWatchLogsLogStream>& value) { m_logStreamsHasBeenSet = true; m_logStreams = value; } 77 78 /** 79 * <p>A list of configuration options for CloudWatch Logs.</p> 80 */ SetLogStreams(Aws::Vector<CloudWatchLogsLogStream> && value)81 inline void SetLogStreams(Aws::Vector<CloudWatchLogsLogStream>&& value) { m_logStreamsHasBeenSet = true; m_logStreams = std::move(value); } 82 83 /** 84 * <p>A list of configuration options for CloudWatch Logs.</p> 85 */ WithLogStreams(const Aws::Vector<CloudWatchLogsLogStream> & value)86 inline CloudWatchLogsConfiguration& WithLogStreams(const Aws::Vector<CloudWatchLogsLogStream>& value) { SetLogStreams(value); return *this;} 87 88 /** 89 * <p>A list of configuration options for CloudWatch Logs.</p> 90 */ WithLogStreams(Aws::Vector<CloudWatchLogsLogStream> && value)91 inline CloudWatchLogsConfiguration& WithLogStreams(Aws::Vector<CloudWatchLogsLogStream>&& value) { SetLogStreams(std::move(value)); return *this;} 92 93 /** 94 * <p>A list of configuration options for CloudWatch Logs.</p> 95 */ AddLogStreams(const CloudWatchLogsLogStream & value)96 inline CloudWatchLogsConfiguration& AddLogStreams(const CloudWatchLogsLogStream& value) { m_logStreamsHasBeenSet = true; m_logStreams.push_back(value); return *this; } 97 98 /** 99 * <p>A list of configuration options for CloudWatch Logs.</p> 100 */ AddLogStreams(CloudWatchLogsLogStream && value)101 inline CloudWatchLogsConfiguration& AddLogStreams(CloudWatchLogsLogStream&& value) { m_logStreamsHasBeenSet = true; m_logStreams.push_back(std::move(value)); return *this; } 102 103 private: 104 105 bool m_enabled; 106 bool m_enabledHasBeenSet; 107 108 Aws::Vector<CloudWatchLogsLogStream> m_logStreams; 109 bool m_logStreamsHasBeenSet; 110 }; 111 112 } // namespace Model 113 } // namespace OpsWorks 114 } // namespace Aws 115