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/xray/XRay_EXPORTS.h> 8 #include <aws/core/utils/memory/stl/AWSVector.h> 9 #include <aws/core/utils/DateTime.h> 10 #include <aws/xray/model/SamplingTargetDocument.h> 11 #include <aws/xray/model/UnprocessedStatistics.h> 12 #include <utility> 13 14 namespace Aws 15 { 16 template<typename RESULT_TYPE> 17 class AmazonWebServiceResult; 18 19 namespace Utils 20 { 21 namespace Json 22 { 23 class JsonValue; 24 } // namespace Json 25 } // namespace Utils 26 namespace XRay 27 { 28 namespace Model 29 { 30 class AWS_XRAY_API GetSamplingTargetsResult 31 { 32 public: 33 GetSamplingTargetsResult(); 34 GetSamplingTargetsResult(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result); 35 GetSamplingTargetsResult& operator=(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result); 36 37 38 /** 39 * <p>Updated rules that the service should use to sample requests.</p> 40 */ GetSamplingTargetDocuments()41 inline const Aws::Vector<SamplingTargetDocument>& GetSamplingTargetDocuments() const{ return m_samplingTargetDocuments; } 42 43 /** 44 * <p>Updated rules that the service should use to sample requests.</p> 45 */ SetSamplingTargetDocuments(const Aws::Vector<SamplingTargetDocument> & value)46 inline void SetSamplingTargetDocuments(const Aws::Vector<SamplingTargetDocument>& value) { m_samplingTargetDocuments = value; } 47 48 /** 49 * <p>Updated rules that the service should use to sample requests.</p> 50 */ SetSamplingTargetDocuments(Aws::Vector<SamplingTargetDocument> && value)51 inline void SetSamplingTargetDocuments(Aws::Vector<SamplingTargetDocument>&& value) { m_samplingTargetDocuments = std::move(value); } 52 53 /** 54 * <p>Updated rules that the service should use to sample requests.</p> 55 */ WithSamplingTargetDocuments(const Aws::Vector<SamplingTargetDocument> & value)56 inline GetSamplingTargetsResult& WithSamplingTargetDocuments(const Aws::Vector<SamplingTargetDocument>& value) { SetSamplingTargetDocuments(value); return *this;} 57 58 /** 59 * <p>Updated rules that the service should use to sample requests.</p> 60 */ WithSamplingTargetDocuments(Aws::Vector<SamplingTargetDocument> && value)61 inline GetSamplingTargetsResult& WithSamplingTargetDocuments(Aws::Vector<SamplingTargetDocument>&& value) { SetSamplingTargetDocuments(std::move(value)); return *this;} 62 63 /** 64 * <p>Updated rules that the service should use to sample requests.</p> 65 */ AddSamplingTargetDocuments(const SamplingTargetDocument & value)66 inline GetSamplingTargetsResult& AddSamplingTargetDocuments(const SamplingTargetDocument& value) { m_samplingTargetDocuments.push_back(value); return *this; } 67 68 /** 69 * <p>Updated rules that the service should use to sample requests.</p> 70 */ AddSamplingTargetDocuments(SamplingTargetDocument && value)71 inline GetSamplingTargetsResult& AddSamplingTargetDocuments(SamplingTargetDocument&& value) { m_samplingTargetDocuments.push_back(std::move(value)); return *this; } 72 73 74 /** 75 * <p>The last time a user changed the sampling rule configuration. If the sampling 76 * rule configuration changed since the service last retrieved it, the service 77 * should call <a 78 * href="https://docs.aws.amazon.com/xray/latest/api/API_GetSamplingRules.html">GetSamplingRules</a> 79 * to get the latest version.</p> 80 */ GetLastRuleModification()81 inline const Aws::Utils::DateTime& GetLastRuleModification() const{ return m_lastRuleModification; } 82 83 /** 84 * <p>The last time a user changed the sampling rule configuration. If the sampling 85 * rule configuration changed since the service last retrieved it, the service 86 * should call <a 87 * href="https://docs.aws.amazon.com/xray/latest/api/API_GetSamplingRules.html">GetSamplingRules</a> 88 * to get the latest version.</p> 89 */ SetLastRuleModification(const Aws::Utils::DateTime & value)90 inline void SetLastRuleModification(const Aws::Utils::DateTime& value) { m_lastRuleModification = value; } 91 92 /** 93 * <p>The last time a user changed the sampling rule configuration. If the sampling 94 * rule configuration changed since the service last retrieved it, the service 95 * should call <a 96 * href="https://docs.aws.amazon.com/xray/latest/api/API_GetSamplingRules.html">GetSamplingRules</a> 97 * to get the latest version.</p> 98 */ SetLastRuleModification(Aws::Utils::DateTime && value)99 inline void SetLastRuleModification(Aws::Utils::DateTime&& value) { m_lastRuleModification = std::move(value); } 100 101 /** 102 * <p>The last time a user changed the sampling rule configuration. If the sampling 103 * rule configuration changed since the service last retrieved it, the service 104 * should call <a 105 * href="https://docs.aws.amazon.com/xray/latest/api/API_GetSamplingRules.html">GetSamplingRules</a> 106 * to get the latest version.</p> 107 */ WithLastRuleModification(const Aws::Utils::DateTime & value)108 inline GetSamplingTargetsResult& WithLastRuleModification(const Aws::Utils::DateTime& value) { SetLastRuleModification(value); return *this;} 109 110 /** 111 * <p>The last time a user changed the sampling rule configuration. If the sampling 112 * rule configuration changed since the service last retrieved it, the service 113 * should call <a 114 * href="https://docs.aws.amazon.com/xray/latest/api/API_GetSamplingRules.html">GetSamplingRules</a> 115 * to get the latest version.</p> 116 */ WithLastRuleModification(Aws::Utils::DateTime && value)117 inline GetSamplingTargetsResult& WithLastRuleModification(Aws::Utils::DateTime&& value) { SetLastRuleModification(std::move(value)); return *this;} 118 119 120 /** 121 * <p>Information about <a 122 * href="https://docs.aws.amazon.com/xray/latest/api/API_SamplingStatisticsDocument.html">SamplingStatisticsDocument</a> 123 * that X-Ray could not process.</p> 124 */ GetUnprocessedStatistics()125 inline const Aws::Vector<UnprocessedStatistics>& GetUnprocessedStatistics() const{ return m_unprocessedStatistics; } 126 127 /** 128 * <p>Information about <a 129 * href="https://docs.aws.amazon.com/xray/latest/api/API_SamplingStatisticsDocument.html">SamplingStatisticsDocument</a> 130 * that X-Ray could not process.</p> 131 */ SetUnprocessedStatistics(const Aws::Vector<UnprocessedStatistics> & value)132 inline void SetUnprocessedStatistics(const Aws::Vector<UnprocessedStatistics>& value) { m_unprocessedStatistics = value; } 133 134 /** 135 * <p>Information about <a 136 * href="https://docs.aws.amazon.com/xray/latest/api/API_SamplingStatisticsDocument.html">SamplingStatisticsDocument</a> 137 * that X-Ray could not process.</p> 138 */ SetUnprocessedStatistics(Aws::Vector<UnprocessedStatistics> && value)139 inline void SetUnprocessedStatistics(Aws::Vector<UnprocessedStatistics>&& value) { m_unprocessedStatistics = std::move(value); } 140 141 /** 142 * <p>Information about <a 143 * href="https://docs.aws.amazon.com/xray/latest/api/API_SamplingStatisticsDocument.html">SamplingStatisticsDocument</a> 144 * that X-Ray could not process.</p> 145 */ WithUnprocessedStatistics(const Aws::Vector<UnprocessedStatistics> & value)146 inline GetSamplingTargetsResult& WithUnprocessedStatistics(const Aws::Vector<UnprocessedStatistics>& value) { SetUnprocessedStatistics(value); return *this;} 147 148 /** 149 * <p>Information about <a 150 * href="https://docs.aws.amazon.com/xray/latest/api/API_SamplingStatisticsDocument.html">SamplingStatisticsDocument</a> 151 * that X-Ray could not process.</p> 152 */ WithUnprocessedStatistics(Aws::Vector<UnprocessedStatistics> && value)153 inline GetSamplingTargetsResult& WithUnprocessedStatistics(Aws::Vector<UnprocessedStatistics>&& value) { SetUnprocessedStatistics(std::move(value)); return *this;} 154 155 /** 156 * <p>Information about <a 157 * href="https://docs.aws.amazon.com/xray/latest/api/API_SamplingStatisticsDocument.html">SamplingStatisticsDocument</a> 158 * that X-Ray could not process.</p> 159 */ AddUnprocessedStatistics(const UnprocessedStatistics & value)160 inline GetSamplingTargetsResult& AddUnprocessedStatistics(const UnprocessedStatistics& value) { m_unprocessedStatistics.push_back(value); return *this; } 161 162 /** 163 * <p>Information about <a 164 * href="https://docs.aws.amazon.com/xray/latest/api/API_SamplingStatisticsDocument.html">SamplingStatisticsDocument</a> 165 * that X-Ray could not process.</p> 166 */ AddUnprocessedStatistics(UnprocessedStatistics && value)167 inline GetSamplingTargetsResult& AddUnprocessedStatistics(UnprocessedStatistics&& value) { m_unprocessedStatistics.push_back(std::move(value)); return *this; } 168 169 private: 170 171 Aws::Vector<SamplingTargetDocument> m_samplingTargetDocuments; 172 173 Aws::Utils::DateTime m_lastRuleModification; 174 175 Aws::Vector<UnprocessedStatistics> m_unprocessedStatistics; 176 }; 177 178 } // namespace Model 179 } // namespace XRay 180 } // namespace Aws 181