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/s3-crt/S3Crt_EXPORTS.h> 8 #include <aws/s3-crt/model/MetricsStatus.h> 9 #include <aws/s3-crt/model/ReplicationTimeValue.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 S3Crt 22 { 23 namespace Model 24 { 25 26 /** 27 * <p> A container specifying replication metrics-related settings enabling 28 * replication metrics and events.</p><p><h3>See Also:</h3> <a 29 * href="http://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/Metrics">AWS API 30 * Reference</a></p> 31 */ 32 class AWS_S3CRT_API Metrics 33 { 34 public: 35 Metrics(); 36 Metrics(const Aws::Utils::Xml::XmlNode& xmlNode); 37 Metrics& operator=(const Aws::Utils::Xml::XmlNode& xmlNode); 38 39 void AddToNode(Aws::Utils::Xml::XmlNode& parentNode) const; 40 41 42 /** 43 * <p> Specifies whether the replication metrics are enabled. </p> 44 */ GetStatus()45 inline const MetricsStatus& GetStatus() const{ return m_status; } 46 47 /** 48 * <p> Specifies whether the replication metrics are enabled. </p> 49 */ StatusHasBeenSet()50 inline bool StatusHasBeenSet() const { return m_statusHasBeenSet; } 51 52 /** 53 * <p> Specifies whether the replication metrics are enabled. </p> 54 */ SetStatus(const MetricsStatus & value)55 inline void SetStatus(const MetricsStatus& value) { m_statusHasBeenSet = true; m_status = value; } 56 57 /** 58 * <p> Specifies whether the replication metrics are enabled. </p> 59 */ SetStatus(MetricsStatus && value)60 inline void SetStatus(MetricsStatus&& value) { m_statusHasBeenSet = true; m_status = std::move(value); } 61 62 /** 63 * <p> Specifies whether the replication metrics are enabled. </p> 64 */ WithStatus(const MetricsStatus & value)65 inline Metrics& WithStatus(const MetricsStatus& value) { SetStatus(value); return *this;} 66 67 /** 68 * <p> Specifies whether the replication metrics are enabled. </p> 69 */ WithStatus(MetricsStatus && value)70 inline Metrics& WithStatus(MetricsStatus&& value) { SetStatus(std::move(value)); return *this;} 71 72 73 /** 74 * <p> A container specifying the time threshold for emitting the 75 * <code>s3:Replication:OperationMissedThreshold</code> event. </p> 76 */ GetEventThreshold()77 inline const ReplicationTimeValue& GetEventThreshold() const{ return m_eventThreshold; } 78 79 /** 80 * <p> A container specifying the time threshold for emitting the 81 * <code>s3:Replication:OperationMissedThreshold</code> event. </p> 82 */ EventThresholdHasBeenSet()83 inline bool EventThresholdHasBeenSet() const { return m_eventThresholdHasBeenSet; } 84 85 /** 86 * <p> A container specifying the time threshold for emitting the 87 * <code>s3:Replication:OperationMissedThreshold</code> event. </p> 88 */ SetEventThreshold(const ReplicationTimeValue & value)89 inline void SetEventThreshold(const ReplicationTimeValue& value) { m_eventThresholdHasBeenSet = true; m_eventThreshold = value; } 90 91 /** 92 * <p> A container specifying the time threshold for emitting the 93 * <code>s3:Replication:OperationMissedThreshold</code> event. </p> 94 */ SetEventThreshold(ReplicationTimeValue && value)95 inline void SetEventThreshold(ReplicationTimeValue&& value) { m_eventThresholdHasBeenSet = true; m_eventThreshold = std::move(value); } 96 97 /** 98 * <p> A container specifying the time threshold for emitting the 99 * <code>s3:Replication:OperationMissedThreshold</code> event. </p> 100 */ WithEventThreshold(const ReplicationTimeValue & value)101 inline Metrics& WithEventThreshold(const ReplicationTimeValue& value) { SetEventThreshold(value); return *this;} 102 103 /** 104 * <p> A container specifying the time threshold for emitting the 105 * <code>s3:Replication:OperationMissedThreshold</code> event. </p> 106 */ WithEventThreshold(ReplicationTimeValue && value)107 inline Metrics& WithEventThreshold(ReplicationTimeValue&& value) { SetEventThreshold(std::move(value)); return *this;} 108 109 private: 110 111 MetricsStatus m_status; 112 bool m_statusHasBeenSet; 113 114 ReplicationTimeValue m_eventThreshold; 115 bool m_eventThresholdHasBeenSet; 116 }; 117 118 } // namespace Model 119 } // namespace S3Crt 120 } // namespace Aws 121