/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include namespace Aws { namespace Utils { namespace Xml { class XmlNode; } // namespace Xml } // namespace Utils namespace S3 { namespace Model { /** *

Describes where logs are stored and the prefix that Amazon S3 assigns to all * log object keys for a bucket. For more information, see PUT * Bucket logging in the Amazon S3 API Reference.

See * Also:

AWS * API Reference

*/ class AWS_S3_API LoggingEnabled { public: LoggingEnabled(); LoggingEnabled(const Aws::Utils::Xml::XmlNode& xmlNode); LoggingEnabled& operator=(const Aws::Utils::Xml::XmlNode& xmlNode); void AddToNode(Aws::Utils::Xml::XmlNode& parentNode) const; /** *

Specifies the bucket where you want Amazon S3 to store server access logs. * You can have your logs delivered to any bucket that you own, including the same * bucket that is being logged. You can also configure multiple buckets to deliver * their logs to the same target bucket. In this case, you should choose a * different TargetPrefix for each source bucket so that the delivered * log files can be distinguished by key.

*/ inline const Aws::String& GetTargetBucket() const{ return m_targetBucket; } /** *

Specifies the bucket where you want Amazon S3 to store server access logs. * You can have your logs delivered to any bucket that you own, including the same * bucket that is being logged. You can also configure multiple buckets to deliver * their logs to the same target bucket. In this case, you should choose a * different TargetPrefix for each source bucket so that the delivered * log files can be distinguished by key.

*/ inline bool TargetBucketHasBeenSet() const { return m_targetBucketHasBeenSet; } /** *

Specifies the bucket where you want Amazon S3 to store server access logs. * You can have your logs delivered to any bucket that you own, including the same * bucket that is being logged. You can also configure multiple buckets to deliver * their logs to the same target bucket. In this case, you should choose a * different TargetPrefix for each source bucket so that the delivered * log files can be distinguished by key.

*/ inline void SetTargetBucket(const Aws::String& value) { m_targetBucketHasBeenSet = true; m_targetBucket = value; } /** *

Specifies the bucket where you want Amazon S3 to store server access logs. * You can have your logs delivered to any bucket that you own, including the same * bucket that is being logged. You can also configure multiple buckets to deliver * their logs to the same target bucket. In this case, you should choose a * different TargetPrefix for each source bucket so that the delivered * log files can be distinguished by key.

*/ inline void SetTargetBucket(Aws::String&& value) { m_targetBucketHasBeenSet = true; m_targetBucket = std::move(value); } /** *

Specifies the bucket where you want Amazon S3 to store server access logs. * You can have your logs delivered to any bucket that you own, including the same * bucket that is being logged. You can also configure multiple buckets to deliver * their logs to the same target bucket. In this case, you should choose a * different TargetPrefix for each source bucket so that the delivered * log files can be distinguished by key.

*/ inline void SetTargetBucket(const char* value) { m_targetBucketHasBeenSet = true; m_targetBucket.assign(value); } /** *

Specifies the bucket where you want Amazon S3 to store server access logs. * You can have your logs delivered to any bucket that you own, including the same * bucket that is being logged. You can also configure multiple buckets to deliver * their logs to the same target bucket. In this case, you should choose a * different TargetPrefix for each source bucket so that the delivered * log files can be distinguished by key.

*/ inline LoggingEnabled& WithTargetBucket(const Aws::String& value) { SetTargetBucket(value); return *this;} /** *

Specifies the bucket where you want Amazon S3 to store server access logs. * You can have your logs delivered to any bucket that you own, including the same * bucket that is being logged. You can also configure multiple buckets to deliver * their logs to the same target bucket. In this case, you should choose a * different TargetPrefix for each source bucket so that the delivered * log files can be distinguished by key.

*/ inline LoggingEnabled& WithTargetBucket(Aws::String&& value) { SetTargetBucket(std::move(value)); return *this;} /** *

Specifies the bucket where you want Amazon S3 to store server access logs. * You can have your logs delivered to any bucket that you own, including the same * bucket that is being logged. You can also configure multiple buckets to deliver * their logs to the same target bucket. In this case, you should choose a * different TargetPrefix for each source bucket so that the delivered * log files can be distinguished by key.

*/ inline LoggingEnabled& WithTargetBucket(const char* value) { SetTargetBucket(value); return *this;} /** *

Container for granting information.

*/ inline const Aws::Vector& GetTargetGrants() const{ return m_targetGrants; } /** *

Container for granting information.

*/ inline bool TargetGrantsHasBeenSet() const { return m_targetGrantsHasBeenSet; } /** *

Container for granting information.

*/ inline void SetTargetGrants(const Aws::Vector& value) { m_targetGrantsHasBeenSet = true; m_targetGrants = value; } /** *

Container for granting information.

*/ inline void SetTargetGrants(Aws::Vector&& value) { m_targetGrantsHasBeenSet = true; m_targetGrants = std::move(value); } /** *

Container for granting information.

*/ inline LoggingEnabled& WithTargetGrants(const Aws::Vector& value) { SetTargetGrants(value); return *this;} /** *

Container for granting information.

*/ inline LoggingEnabled& WithTargetGrants(Aws::Vector&& value) { SetTargetGrants(std::move(value)); return *this;} /** *

Container for granting information.

*/ inline LoggingEnabled& AddTargetGrants(const TargetGrant& value) { m_targetGrantsHasBeenSet = true; m_targetGrants.push_back(value); return *this; } /** *

Container for granting information.

*/ inline LoggingEnabled& AddTargetGrants(TargetGrant&& value) { m_targetGrantsHasBeenSet = true; m_targetGrants.push_back(std::move(value)); return *this; } /** *

A prefix for all log object keys. If you store log files from multiple Amazon * S3 buckets in a single bucket, you can use a prefix to distinguish which log * files came from which bucket.

*/ inline const Aws::String& GetTargetPrefix() const{ return m_targetPrefix; } /** *

A prefix for all log object keys. If you store log files from multiple Amazon * S3 buckets in a single bucket, you can use a prefix to distinguish which log * files came from which bucket.

*/ inline bool TargetPrefixHasBeenSet() const { return m_targetPrefixHasBeenSet; } /** *

A prefix for all log object keys. If you store log files from multiple Amazon * S3 buckets in a single bucket, you can use a prefix to distinguish which log * files came from which bucket.

*/ inline void SetTargetPrefix(const Aws::String& value) { m_targetPrefixHasBeenSet = true; m_targetPrefix = value; } /** *

A prefix for all log object keys. If you store log files from multiple Amazon * S3 buckets in a single bucket, you can use a prefix to distinguish which log * files came from which bucket.

*/ inline void SetTargetPrefix(Aws::String&& value) { m_targetPrefixHasBeenSet = true; m_targetPrefix = std::move(value); } /** *

A prefix for all log object keys. If you store log files from multiple Amazon * S3 buckets in a single bucket, you can use a prefix to distinguish which log * files came from which bucket.

*/ inline void SetTargetPrefix(const char* value) { m_targetPrefixHasBeenSet = true; m_targetPrefix.assign(value); } /** *

A prefix for all log object keys. If you store log files from multiple Amazon * S3 buckets in a single bucket, you can use a prefix to distinguish which log * files came from which bucket.

*/ inline LoggingEnabled& WithTargetPrefix(const Aws::String& value) { SetTargetPrefix(value); return *this;} /** *

A prefix for all log object keys. If you store log files from multiple Amazon * S3 buckets in a single bucket, you can use a prefix to distinguish which log * files came from which bucket.

*/ inline LoggingEnabled& WithTargetPrefix(Aws::String&& value) { SetTargetPrefix(std::move(value)); return *this;} /** *

A prefix for all log object keys. If you store log files from multiple Amazon * S3 buckets in a single bucket, you can use a prefix to distinguish which log * files came from which bucket.

*/ inline LoggingEnabled& WithTargetPrefix(const char* value) { SetTargetPrefix(value); return *this;} private: Aws::String m_targetBucket; bool m_targetBucketHasBeenSet; Aws::Vector m_targetGrants; bool m_targetGrantsHasBeenSet; Aws::String m_targetPrefix; bool m_targetPrefixHasBeenSet; }; } // namespace Model } // namespace S3 } // namespace Aws