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

Configuration for a lifecycle rule.

See Also:

AWS * API Reference

*/ class AwsS3BucketBucketLifecycleConfigurationRulesDetails { public: AWS_SECURITYHUB_API AwsS3BucketBucketLifecycleConfigurationRulesDetails(); AWS_SECURITYHUB_API AwsS3BucketBucketLifecycleConfigurationRulesDetails(Aws::Utils::Json::JsonView jsonValue); AWS_SECURITYHUB_API AwsS3BucketBucketLifecycleConfigurationRulesDetails& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_SECURITYHUB_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

How Amazon S3 responds when a multipart upload is incomplete. Specifically, * provides a number of days before Amazon S3 cancels the entire upload.

*/ inline const AwsS3BucketBucketLifecycleConfigurationRulesAbortIncompleteMultipartUploadDetails& GetAbortIncompleteMultipartUpload() const{ return m_abortIncompleteMultipartUpload; } /** *

How Amazon S3 responds when a multipart upload is incomplete. Specifically, * provides a number of days before Amazon S3 cancels the entire upload.

*/ inline bool AbortIncompleteMultipartUploadHasBeenSet() const { return m_abortIncompleteMultipartUploadHasBeenSet; } /** *

How Amazon S3 responds when a multipart upload is incomplete. Specifically, * provides a number of days before Amazon S3 cancels the entire upload.

*/ inline void SetAbortIncompleteMultipartUpload(const AwsS3BucketBucketLifecycleConfigurationRulesAbortIncompleteMultipartUploadDetails& value) { m_abortIncompleteMultipartUploadHasBeenSet = true; m_abortIncompleteMultipartUpload = value; } /** *

How Amazon S3 responds when a multipart upload is incomplete. Specifically, * provides a number of days before Amazon S3 cancels the entire upload.

*/ inline void SetAbortIncompleteMultipartUpload(AwsS3BucketBucketLifecycleConfigurationRulesAbortIncompleteMultipartUploadDetails&& value) { m_abortIncompleteMultipartUploadHasBeenSet = true; m_abortIncompleteMultipartUpload = std::move(value); } /** *

How Amazon S3 responds when a multipart upload is incomplete. Specifically, * provides a number of days before Amazon S3 cancels the entire upload.

*/ inline AwsS3BucketBucketLifecycleConfigurationRulesDetails& WithAbortIncompleteMultipartUpload(const AwsS3BucketBucketLifecycleConfigurationRulesAbortIncompleteMultipartUploadDetails& value) { SetAbortIncompleteMultipartUpload(value); return *this;} /** *

How Amazon S3 responds when a multipart upload is incomplete. Specifically, * provides a number of days before Amazon S3 cancels the entire upload.

*/ inline AwsS3BucketBucketLifecycleConfigurationRulesDetails& WithAbortIncompleteMultipartUpload(AwsS3BucketBucketLifecycleConfigurationRulesAbortIncompleteMultipartUploadDetails&& value) { SetAbortIncompleteMultipartUpload(std::move(value)); return *this;} /** *

The date when objects are moved or deleted.

Uses the * date-time format specified in RFC 3339 section 5.6, * Internet Date/Time Format. The value cannot contain spaces, and date and * time should be separated by T. For example, * 2020-03-22T13:22:13.933Z.

*/ inline const Aws::String& GetExpirationDate() const{ return m_expirationDate; } /** *

The date when objects are moved or deleted.

Uses the * date-time format specified in RFC 3339 section 5.6, * Internet Date/Time Format. The value cannot contain spaces, and date and * time should be separated by T. For example, * 2020-03-22T13:22:13.933Z.

*/ inline bool ExpirationDateHasBeenSet() const { return m_expirationDateHasBeenSet; } /** *

The date when objects are moved or deleted.

Uses the * date-time format specified in RFC 3339 section 5.6, * Internet Date/Time Format. The value cannot contain spaces, and date and * time should be separated by T. For example, * 2020-03-22T13:22:13.933Z.

*/ inline void SetExpirationDate(const Aws::String& value) { m_expirationDateHasBeenSet = true; m_expirationDate = value; } /** *

The date when objects are moved or deleted.

Uses the * date-time format specified in RFC 3339 section 5.6, * Internet Date/Time Format. The value cannot contain spaces, and date and * time should be separated by T. For example, * 2020-03-22T13:22:13.933Z.

*/ inline void SetExpirationDate(Aws::String&& value) { m_expirationDateHasBeenSet = true; m_expirationDate = std::move(value); } /** *

The date when objects are moved or deleted.

Uses the * date-time format specified in RFC 3339 section 5.6, * Internet Date/Time Format. The value cannot contain spaces, and date and * time should be separated by T. For example, * 2020-03-22T13:22:13.933Z.

*/ inline void SetExpirationDate(const char* value) { m_expirationDateHasBeenSet = true; m_expirationDate.assign(value); } /** *

The date when objects are moved or deleted.

Uses the * date-time format specified in RFC 3339 section 5.6, * Internet Date/Time Format. The value cannot contain spaces, and date and * time should be separated by T. For example, * 2020-03-22T13:22:13.933Z.

*/ inline AwsS3BucketBucketLifecycleConfigurationRulesDetails& WithExpirationDate(const Aws::String& value) { SetExpirationDate(value); return *this;} /** *

The date when objects are moved or deleted.

Uses the * date-time format specified in RFC 3339 section 5.6, * Internet Date/Time Format. The value cannot contain spaces, and date and * time should be separated by T. For example, * 2020-03-22T13:22:13.933Z.

*/ inline AwsS3BucketBucketLifecycleConfigurationRulesDetails& WithExpirationDate(Aws::String&& value) { SetExpirationDate(std::move(value)); return *this;} /** *

The date when objects are moved or deleted.

Uses the * date-time format specified in RFC 3339 section 5.6, * Internet Date/Time Format. The value cannot contain spaces, and date and * time should be separated by T. For example, * 2020-03-22T13:22:13.933Z.

*/ inline AwsS3BucketBucketLifecycleConfigurationRulesDetails& WithExpirationDate(const char* value) { SetExpirationDate(value); return *this;} /** *

The length in days of the lifetime for objects that are subject to the * rule.

*/ inline int GetExpirationInDays() const{ return m_expirationInDays; } /** *

The length in days of the lifetime for objects that are subject to the * rule.

*/ inline bool ExpirationInDaysHasBeenSet() const { return m_expirationInDaysHasBeenSet; } /** *

The length in days of the lifetime for objects that are subject to the * rule.

*/ inline void SetExpirationInDays(int value) { m_expirationInDaysHasBeenSet = true; m_expirationInDays = value; } /** *

The length in days of the lifetime for objects that are subject to the * rule.

*/ inline AwsS3BucketBucketLifecycleConfigurationRulesDetails& WithExpirationInDays(int value) { SetExpirationInDays(value); return *this;} /** *

Whether Amazon S3 removes a delete marker that has no noncurrent versions. If * set to true, the delete marker is expired. If set to * false, the policy takes no action.

If you provide * ExpiredObjectDeleteMarker, you cannot provide * ExpirationInDays or ExpirationDate.

*/ inline bool GetExpiredObjectDeleteMarker() const{ return m_expiredObjectDeleteMarker; } /** *

Whether Amazon S3 removes a delete marker that has no noncurrent versions. If * set to true, the delete marker is expired. If set to * false, the policy takes no action.

If you provide * ExpiredObjectDeleteMarker, you cannot provide * ExpirationInDays or ExpirationDate.

*/ inline bool ExpiredObjectDeleteMarkerHasBeenSet() const { return m_expiredObjectDeleteMarkerHasBeenSet; } /** *

Whether Amazon S3 removes a delete marker that has no noncurrent versions. If * set to true, the delete marker is expired. If set to * false, the policy takes no action.

If you provide * ExpiredObjectDeleteMarker, you cannot provide * ExpirationInDays or ExpirationDate.

*/ inline void SetExpiredObjectDeleteMarker(bool value) { m_expiredObjectDeleteMarkerHasBeenSet = true; m_expiredObjectDeleteMarker = value; } /** *

Whether Amazon S3 removes a delete marker that has no noncurrent versions. If * set to true, the delete marker is expired. If set to * false, the policy takes no action.

If you provide * ExpiredObjectDeleteMarker, you cannot provide * ExpirationInDays or ExpirationDate.

*/ inline AwsS3BucketBucketLifecycleConfigurationRulesDetails& WithExpiredObjectDeleteMarker(bool value) { SetExpiredObjectDeleteMarker(value); return *this;} /** *

Identifies the objects that a rule applies to.

*/ inline const AwsS3BucketBucketLifecycleConfigurationRulesFilterDetails& GetFilter() const{ return m_filter; } /** *

Identifies the objects that a rule applies to.

*/ inline bool FilterHasBeenSet() const { return m_filterHasBeenSet; } /** *

Identifies the objects that a rule applies to.

*/ inline void SetFilter(const AwsS3BucketBucketLifecycleConfigurationRulesFilterDetails& value) { m_filterHasBeenSet = true; m_filter = value; } /** *

Identifies the objects that a rule applies to.

*/ inline void SetFilter(AwsS3BucketBucketLifecycleConfigurationRulesFilterDetails&& value) { m_filterHasBeenSet = true; m_filter = std::move(value); } /** *

Identifies the objects that a rule applies to.

*/ inline AwsS3BucketBucketLifecycleConfigurationRulesDetails& WithFilter(const AwsS3BucketBucketLifecycleConfigurationRulesFilterDetails& value) { SetFilter(value); return *this;} /** *

Identifies the objects that a rule applies to.

*/ inline AwsS3BucketBucketLifecycleConfigurationRulesDetails& WithFilter(AwsS3BucketBucketLifecycleConfigurationRulesFilterDetails&& value) { SetFilter(std::move(value)); return *this;} /** *

The unique identifier of the rule.

*/ inline const Aws::String& GetID() const{ return m_iD; } /** *

The unique identifier of the rule.

*/ inline bool IDHasBeenSet() const { return m_iDHasBeenSet; } /** *

The unique identifier of the rule.

*/ inline void SetID(const Aws::String& value) { m_iDHasBeenSet = true; m_iD = value; } /** *

The unique identifier of the rule.

*/ inline void SetID(Aws::String&& value) { m_iDHasBeenSet = true; m_iD = std::move(value); } /** *

The unique identifier of the rule.

*/ inline void SetID(const char* value) { m_iDHasBeenSet = true; m_iD.assign(value); } /** *

The unique identifier of the rule.

*/ inline AwsS3BucketBucketLifecycleConfigurationRulesDetails& WithID(const Aws::String& value) { SetID(value); return *this;} /** *

The unique identifier of the rule.

*/ inline AwsS3BucketBucketLifecycleConfigurationRulesDetails& WithID(Aws::String&& value) { SetID(std::move(value)); return *this;} /** *

The unique identifier of the rule.

*/ inline AwsS3BucketBucketLifecycleConfigurationRulesDetails& WithID(const char* value) { SetID(value); return *this;} /** *

The number of days that an object is noncurrent before Amazon S3 can perform * the associated action.

*/ inline int GetNoncurrentVersionExpirationInDays() const{ return m_noncurrentVersionExpirationInDays; } /** *

The number of days that an object is noncurrent before Amazon S3 can perform * the associated action.

*/ inline bool NoncurrentVersionExpirationInDaysHasBeenSet() const { return m_noncurrentVersionExpirationInDaysHasBeenSet; } /** *

The number of days that an object is noncurrent before Amazon S3 can perform * the associated action.

*/ inline void SetNoncurrentVersionExpirationInDays(int value) { m_noncurrentVersionExpirationInDaysHasBeenSet = true; m_noncurrentVersionExpirationInDays = value; } /** *

The number of days that an object is noncurrent before Amazon S3 can perform * the associated action.

*/ inline AwsS3BucketBucketLifecycleConfigurationRulesDetails& WithNoncurrentVersionExpirationInDays(int value) { SetNoncurrentVersionExpirationInDays(value); return *this;} /** *

Transition rules that describe when noncurrent objects transition to a * specified storage class.

*/ inline const Aws::Vector& GetNoncurrentVersionTransitions() const{ return m_noncurrentVersionTransitions; } /** *

Transition rules that describe when noncurrent objects transition to a * specified storage class.

*/ inline bool NoncurrentVersionTransitionsHasBeenSet() const { return m_noncurrentVersionTransitionsHasBeenSet; } /** *

Transition rules that describe when noncurrent objects transition to a * specified storage class.

*/ inline void SetNoncurrentVersionTransitions(const Aws::Vector& value) { m_noncurrentVersionTransitionsHasBeenSet = true; m_noncurrentVersionTransitions = value; } /** *

Transition rules that describe when noncurrent objects transition to a * specified storage class.

*/ inline void SetNoncurrentVersionTransitions(Aws::Vector&& value) { m_noncurrentVersionTransitionsHasBeenSet = true; m_noncurrentVersionTransitions = std::move(value); } /** *

Transition rules that describe when noncurrent objects transition to a * specified storage class.

*/ inline AwsS3BucketBucketLifecycleConfigurationRulesDetails& WithNoncurrentVersionTransitions(const Aws::Vector& value) { SetNoncurrentVersionTransitions(value); return *this;} /** *

Transition rules that describe when noncurrent objects transition to a * specified storage class.

*/ inline AwsS3BucketBucketLifecycleConfigurationRulesDetails& WithNoncurrentVersionTransitions(Aws::Vector&& value) { SetNoncurrentVersionTransitions(std::move(value)); return *this;} /** *

Transition rules that describe when noncurrent objects transition to a * specified storage class.

*/ inline AwsS3BucketBucketLifecycleConfigurationRulesDetails& AddNoncurrentVersionTransitions(const AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails& value) { m_noncurrentVersionTransitionsHasBeenSet = true; m_noncurrentVersionTransitions.push_back(value); return *this; } /** *

Transition rules that describe when noncurrent objects transition to a * specified storage class.

*/ inline AwsS3BucketBucketLifecycleConfigurationRulesDetails& AddNoncurrentVersionTransitions(AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails&& value) { m_noncurrentVersionTransitionsHasBeenSet = true; m_noncurrentVersionTransitions.push_back(std::move(value)); return *this; } /** *

A prefix that identifies one or more objects that the rule applies to.

*/ inline const Aws::String& GetPrefix() const{ return m_prefix; } /** *

A prefix that identifies one or more objects that the rule applies to.

*/ inline bool PrefixHasBeenSet() const { return m_prefixHasBeenSet; } /** *

A prefix that identifies one or more objects that the rule applies to.

*/ inline void SetPrefix(const Aws::String& value) { m_prefixHasBeenSet = true; m_prefix = value; } /** *

A prefix that identifies one or more objects that the rule applies to.

*/ inline void SetPrefix(Aws::String&& value) { m_prefixHasBeenSet = true; m_prefix = std::move(value); } /** *

A prefix that identifies one or more objects that the rule applies to.

*/ inline void SetPrefix(const char* value) { m_prefixHasBeenSet = true; m_prefix.assign(value); } /** *

A prefix that identifies one or more objects that the rule applies to.

*/ inline AwsS3BucketBucketLifecycleConfigurationRulesDetails& WithPrefix(const Aws::String& value) { SetPrefix(value); return *this;} /** *

A prefix that identifies one or more objects that the rule applies to.

*/ inline AwsS3BucketBucketLifecycleConfigurationRulesDetails& WithPrefix(Aws::String&& value) { SetPrefix(std::move(value)); return *this;} /** *

A prefix that identifies one or more objects that the rule applies to.

*/ inline AwsS3BucketBucketLifecycleConfigurationRulesDetails& WithPrefix(const char* value) { SetPrefix(value); return *this;} /** *

The current status of the rule. Indicates whether the rule is currently being * applied.

*/ inline const Aws::String& GetStatus() const{ return m_status; } /** *

The current status of the rule. Indicates whether the rule is currently being * applied.

*/ inline bool StatusHasBeenSet() const { return m_statusHasBeenSet; } /** *

The current status of the rule. Indicates whether the rule is currently being * applied.

*/ inline void SetStatus(const Aws::String& value) { m_statusHasBeenSet = true; m_status = value; } /** *

The current status of the rule. Indicates whether the rule is currently being * applied.

*/ inline void SetStatus(Aws::String&& value) { m_statusHasBeenSet = true; m_status = std::move(value); } /** *

The current status of the rule. Indicates whether the rule is currently being * applied.

*/ inline void SetStatus(const char* value) { m_statusHasBeenSet = true; m_status.assign(value); } /** *

The current status of the rule. Indicates whether the rule is currently being * applied.

*/ inline AwsS3BucketBucketLifecycleConfigurationRulesDetails& WithStatus(const Aws::String& value) { SetStatus(value); return *this;} /** *

The current status of the rule. Indicates whether the rule is currently being * applied.

*/ inline AwsS3BucketBucketLifecycleConfigurationRulesDetails& WithStatus(Aws::String&& value) { SetStatus(std::move(value)); return *this;} /** *

The current status of the rule. Indicates whether the rule is currently being * applied.

*/ inline AwsS3BucketBucketLifecycleConfigurationRulesDetails& WithStatus(const char* value) { SetStatus(value); return *this;} /** *

Transition rules that indicate when objects transition to a specified storage * class.

*/ inline const Aws::Vector& GetTransitions() const{ return m_transitions; } /** *

Transition rules that indicate when objects transition to a specified storage * class.

*/ inline bool TransitionsHasBeenSet() const { return m_transitionsHasBeenSet; } /** *

Transition rules that indicate when objects transition to a specified storage * class.

*/ inline void SetTransitions(const Aws::Vector& value) { m_transitionsHasBeenSet = true; m_transitions = value; } /** *

Transition rules that indicate when objects transition to a specified storage * class.

*/ inline void SetTransitions(Aws::Vector&& value) { m_transitionsHasBeenSet = true; m_transitions = std::move(value); } /** *

Transition rules that indicate when objects transition to a specified storage * class.

*/ inline AwsS3BucketBucketLifecycleConfigurationRulesDetails& WithTransitions(const Aws::Vector& value) { SetTransitions(value); return *this;} /** *

Transition rules that indicate when objects transition to a specified storage * class.

*/ inline AwsS3BucketBucketLifecycleConfigurationRulesDetails& WithTransitions(Aws::Vector&& value) { SetTransitions(std::move(value)); return *this;} /** *

Transition rules that indicate when objects transition to a specified storage * class.

*/ inline AwsS3BucketBucketLifecycleConfigurationRulesDetails& AddTransitions(const AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails& value) { m_transitionsHasBeenSet = true; m_transitions.push_back(value); return *this; } /** *

Transition rules that indicate when objects transition to a specified storage * class.

*/ inline AwsS3BucketBucketLifecycleConfigurationRulesDetails& AddTransitions(AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails&& value) { m_transitionsHasBeenSet = true; m_transitions.push_back(std::move(value)); return *this; } private: AwsS3BucketBucketLifecycleConfigurationRulesAbortIncompleteMultipartUploadDetails m_abortIncompleteMultipartUpload; bool m_abortIncompleteMultipartUploadHasBeenSet = false; Aws::String m_expirationDate; bool m_expirationDateHasBeenSet = false; int m_expirationInDays; bool m_expirationInDaysHasBeenSet = false; bool m_expiredObjectDeleteMarker; bool m_expiredObjectDeleteMarkerHasBeenSet = false; AwsS3BucketBucketLifecycleConfigurationRulesFilterDetails m_filter; bool m_filterHasBeenSet = false; Aws::String m_iD; bool m_iDHasBeenSet = false; int m_noncurrentVersionExpirationInDays; bool m_noncurrentVersionExpirationInDaysHasBeenSet = false; Aws::Vector m_noncurrentVersionTransitions; bool m_noncurrentVersionTransitionsHasBeenSet = false; Aws::String m_prefix; bool m_prefixHasBeenSet = false; Aws::String m_status; bool m_statusHasBeenSet = false; Aws::Vector m_transitions; bool m_transitionsHasBeenSet = false; }; } // namespace Model } // namespace SecurityHub } // namespace Aws