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/elasticloadbalancing/ElasticLoadBalancing_EXPORTS.h> 8 #include <aws/core/utils/memory/stl/AWSStreamFwd.h> 9 #include <aws/core/utils/memory/stl/AWSString.h> 10 #include <utility> 11 12 namespace Aws 13 { 14 namespace Utils 15 { 16 namespace Xml 17 { 18 class XmlNode; 19 } // namespace Xml 20 } // namespace Utils 21 namespace ElasticLoadBalancing 22 { 23 namespace Model 24 { 25 26 /** 27 * <p>Information about the <code>AccessLog</code> attribute.</p><p><h3>See 28 * Also:</h3> <a 29 * href="http://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/AccessLog">AWS 30 * API Reference</a></p> 31 */ 32 class AWS_ELASTICLOADBALANCING_API AccessLog 33 { 34 public: 35 AccessLog(); 36 AccessLog(const Aws::Utils::Xml::XmlNode& xmlNode); 37 AccessLog& operator=(const Aws::Utils::Xml::XmlNode& xmlNode); 38 39 void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const; 40 void OutputToStream(Aws::OStream& oStream, const char* location) const; 41 42 43 /** 44 * <p>Specifies whether access logs are enabled for the load balancer.</p> 45 */ GetEnabled()46 inline bool GetEnabled() const{ return m_enabled; } 47 48 /** 49 * <p>Specifies whether access logs are enabled for the load balancer.</p> 50 */ EnabledHasBeenSet()51 inline bool EnabledHasBeenSet() const { return m_enabledHasBeenSet; } 52 53 /** 54 * <p>Specifies whether access logs are enabled for the load balancer.</p> 55 */ SetEnabled(bool value)56 inline void SetEnabled(bool value) { m_enabledHasBeenSet = true; m_enabled = value; } 57 58 /** 59 * <p>Specifies whether access logs are enabled for the load balancer.</p> 60 */ WithEnabled(bool value)61 inline AccessLog& WithEnabled(bool value) { SetEnabled(value); return *this;} 62 63 64 /** 65 * <p>The name of the Amazon S3 bucket where the access logs are stored.</p> 66 */ GetS3BucketName()67 inline const Aws::String& GetS3BucketName() const{ return m_s3BucketName; } 68 69 /** 70 * <p>The name of the Amazon S3 bucket where the access logs are stored.</p> 71 */ S3BucketNameHasBeenSet()72 inline bool S3BucketNameHasBeenSet() const { return m_s3BucketNameHasBeenSet; } 73 74 /** 75 * <p>The name of the Amazon S3 bucket where the access logs are stored.</p> 76 */ SetS3BucketName(const Aws::String & value)77 inline void SetS3BucketName(const Aws::String& value) { m_s3BucketNameHasBeenSet = true; m_s3BucketName = value; } 78 79 /** 80 * <p>The name of the Amazon S3 bucket where the access logs are stored.</p> 81 */ SetS3BucketName(Aws::String && value)82 inline void SetS3BucketName(Aws::String&& value) { m_s3BucketNameHasBeenSet = true; m_s3BucketName = std::move(value); } 83 84 /** 85 * <p>The name of the Amazon S3 bucket where the access logs are stored.</p> 86 */ SetS3BucketName(const char * value)87 inline void SetS3BucketName(const char* value) { m_s3BucketNameHasBeenSet = true; m_s3BucketName.assign(value); } 88 89 /** 90 * <p>The name of the Amazon S3 bucket where the access logs are stored.</p> 91 */ WithS3BucketName(const Aws::String & value)92 inline AccessLog& WithS3BucketName(const Aws::String& value) { SetS3BucketName(value); return *this;} 93 94 /** 95 * <p>The name of the Amazon S3 bucket where the access logs are stored.</p> 96 */ WithS3BucketName(Aws::String && value)97 inline AccessLog& WithS3BucketName(Aws::String&& value) { SetS3BucketName(std::move(value)); return *this;} 98 99 /** 100 * <p>The name of the Amazon S3 bucket where the access logs are stored.</p> 101 */ WithS3BucketName(const char * value)102 inline AccessLog& WithS3BucketName(const char* value) { SetS3BucketName(value); return *this;} 103 104 105 /** 106 * <p>The interval for publishing the access logs. You can specify an interval of 107 * either 5 minutes or 60 minutes.</p> <p>Default: 60 minutes</p> 108 */ GetEmitInterval()109 inline int GetEmitInterval() const{ return m_emitInterval; } 110 111 /** 112 * <p>The interval for publishing the access logs. You can specify an interval of 113 * either 5 minutes or 60 minutes.</p> <p>Default: 60 minutes</p> 114 */ EmitIntervalHasBeenSet()115 inline bool EmitIntervalHasBeenSet() const { return m_emitIntervalHasBeenSet; } 116 117 /** 118 * <p>The interval for publishing the access logs. You can specify an interval of 119 * either 5 minutes or 60 minutes.</p> <p>Default: 60 minutes</p> 120 */ SetEmitInterval(int value)121 inline void SetEmitInterval(int value) { m_emitIntervalHasBeenSet = true; m_emitInterval = value; } 122 123 /** 124 * <p>The interval for publishing the access logs. You can specify an interval of 125 * either 5 minutes or 60 minutes.</p> <p>Default: 60 minutes</p> 126 */ WithEmitInterval(int value)127 inline AccessLog& WithEmitInterval(int value) { SetEmitInterval(value); return *this;} 128 129 130 /** 131 * <p>The logical hierarchy you created for your Amazon S3 bucket, for example 132 * <code>my-bucket-prefix/prod</code>. If the prefix is not provided, the log is 133 * placed at the root level of the bucket.</p> 134 */ GetS3BucketPrefix()135 inline const Aws::String& GetS3BucketPrefix() const{ return m_s3BucketPrefix; } 136 137 /** 138 * <p>The logical hierarchy you created for your Amazon S3 bucket, for example 139 * <code>my-bucket-prefix/prod</code>. If the prefix is not provided, the log is 140 * placed at the root level of the bucket.</p> 141 */ S3BucketPrefixHasBeenSet()142 inline bool S3BucketPrefixHasBeenSet() const { return m_s3BucketPrefixHasBeenSet; } 143 144 /** 145 * <p>The logical hierarchy you created for your Amazon S3 bucket, for example 146 * <code>my-bucket-prefix/prod</code>. If the prefix is not provided, the log is 147 * placed at the root level of the bucket.</p> 148 */ SetS3BucketPrefix(const Aws::String & value)149 inline void SetS3BucketPrefix(const Aws::String& value) { m_s3BucketPrefixHasBeenSet = true; m_s3BucketPrefix = value; } 150 151 /** 152 * <p>The logical hierarchy you created for your Amazon S3 bucket, for example 153 * <code>my-bucket-prefix/prod</code>. If the prefix is not provided, the log is 154 * placed at the root level of the bucket.</p> 155 */ SetS3BucketPrefix(Aws::String && value)156 inline void SetS3BucketPrefix(Aws::String&& value) { m_s3BucketPrefixHasBeenSet = true; m_s3BucketPrefix = std::move(value); } 157 158 /** 159 * <p>The logical hierarchy you created for your Amazon S3 bucket, for example 160 * <code>my-bucket-prefix/prod</code>. If the prefix is not provided, the log is 161 * placed at the root level of the bucket.</p> 162 */ SetS3BucketPrefix(const char * value)163 inline void SetS3BucketPrefix(const char* value) { m_s3BucketPrefixHasBeenSet = true; m_s3BucketPrefix.assign(value); } 164 165 /** 166 * <p>The logical hierarchy you created for your Amazon S3 bucket, for example 167 * <code>my-bucket-prefix/prod</code>. If the prefix is not provided, the log is 168 * placed at the root level of the bucket.</p> 169 */ WithS3BucketPrefix(const Aws::String & value)170 inline AccessLog& WithS3BucketPrefix(const Aws::String& value) { SetS3BucketPrefix(value); return *this;} 171 172 /** 173 * <p>The logical hierarchy you created for your Amazon S3 bucket, for example 174 * <code>my-bucket-prefix/prod</code>. If the prefix is not provided, the log is 175 * placed at the root level of the bucket.</p> 176 */ WithS3BucketPrefix(Aws::String && value)177 inline AccessLog& WithS3BucketPrefix(Aws::String&& value) { SetS3BucketPrefix(std::move(value)); return *this;} 178 179 /** 180 * <p>The logical hierarchy you created for your Amazon S3 bucket, for example 181 * <code>my-bucket-prefix/prod</code>. If the prefix is not provided, the log is 182 * placed at the root level of the bucket.</p> 183 */ WithS3BucketPrefix(const char * value)184 inline AccessLog& WithS3BucketPrefix(const char* value) { SetS3BucketPrefix(value); return *this;} 185 186 private: 187 188 bool m_enabled; 189 bool m_enabledHasBeenSet; 190 191 Aws::String m_s3BucketName; 192 bool m_s3BucketNameHasBeenSet; 193 194 int m_emitInterval; 195 bool m_emitIntervalHasBeenSet; 196 197 Aws::String m_s3BucketPrefix; 198 bool m_s3BucketPrefixHasBeenSet; 199 }; 200 201 } // namespace Model 202 } // namespace ElasticLoadBalancing 203 } // namespace Aws 204