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/logs/CloudWatchLogs_EXPORTS.h> 8 #include <aws/logs/CloudWatchLogsRequest.h> 9 #include <aws/core/utils/memory/stl/AWSString.h> 10 #include <aws/logs/model/OrderBy.h> 11 #include <utility> 12 13 namespace Aws 14 { 15 namespace CloudWatchLogs 16 { 17 namespace Model 18 { 19 20 /** 21 */ 22 class AWS_CLOUDWATCHLOGS_API DescribeLogStreamsRequest : public CloudWatchLogsRequest 23 { 24 public: 25 DescribeLogStreamsRequest(); 26 27 // Service request name is the Operation name which will send this request out, 28 // each operation should has unique request name, so that we can get operation's name from this request. 29 // Note: this is not true for response, multiple operations may have the same response name, 30 // so we can not get operation's name from response. GetServiceRequestName()31 inline virtual const char* GetServiceRequestName() const override { return "DescribeLogStreams"; } 32 33 Aws::String SerializePayload() const override; 34 35 Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; 36 37 38 /** 39 * <p>The name of the log group.</p> 40 */ GetLogGroupName()41 inline const Aws::String& GetLogGroupName() const{ return m_logGroupName; } 42 43 /** 44 * <p>The name of the log group.</p> 45 */ LogGroupNameHasBeenSet()46 inline bool LogGroupNameHasBeenSet() const { return m_logGroupNameHasBeenSet; } 47 48 /** 49 * <p>The name of the log group.</p> 50 */ SetLogGroupName(const Aws::String & value)51 inline void SetLogGroupName(const Aws::String& value) { m_logGroupNameHasBeenSet = true; m_logGroupName = value; } 52 53 /** 54 * <p>The name of the log group.</p> 55 */ SetLogGroupName(Aws::String && value)56 inline void SetLogGroupName(Aws::String&& value) { m_logGroupNameHasBeenSet = true; m_logGroupName = std::move(value); } 57 58 /** 59 * <p>The name of the log group.</p> 60 */ SetLogGroupName(const char * value)61 inline void SetLogGroupName(const char* value) { m_logGroupNameHasBeenSet = true; m_logGroupName.assign(value); } 62 63 /** 64 * <p>The name of the log group.</p> 65 */ WithLogGroupName(const Aws::String & value)66 inline DescribeLogStreamsRequest& WithLogGroupName(const Aws::String& value) { SetLogGroupName(value); return *this;} 67 68 /** 69 * <p>The name of the log group.</p> 70 */ WithLogGroupName(Aws::String && value)71 inline DescribeLogStreamsRequest& WithLogGroupName(Aws::String&& value) { SetLogGroupName(std::move(value)); return *this;} 72 73 /** 74 * <p>The name of the log group.</p> 75 */ WithLogGroupName(const char * value)76 inline DescribeLogStreamsRequest& WithLogGroupName(const char* value) { SetLogGroupName(value); return *this;} 77 78 79 /** 80 * <p>The prefix to match.</p> <p>If <code>orderBy</code> is 81 * <code>LastEventTime</code>, you cannot specify this parameter.</p> 82 */ GetLogStreamNamePrefix()83 inline const Aws::String& GetLogStreamNamePrefix() const{ return m_logStreamNamePrefix; } 84 85 /** 86 * <p>The prefix to match.</p> <p>If <code>orderBy</code> is 87 * <code>LastEventTime</code>, you cannot specify this parameter.</p> 88 */ LogStreamNamePrefixHasBeenSet()89 inline bool LogStreamNamePrefixHasBeenSet() const { return m_logStreamNamePrefixHasBeenSet; } 90 91 /** 92 * <p>The prefix to match.</p> <p>If <code>orderBy</code> is 93 * <code>LastEventTime</code>, you cannot specify this parameter.</p> 94 */ SetLogStreamNamePrefix(const Aws::String & value)95 inline void SetLogStreamNamePrefix(const Aws::String& value) { m_logStreamNamePrefixHasBeenSet = true; m_logStreamNamePrefix = value; } 96 97 /** 98 * <p>The prefix to match.</p> <p>If <code>orderBy</code> is 99 * <code>LastEventTime</code>, you cannot specify this parameter.</p> 100 */ SetLogStreamNamePrefix(Aws::String && value)101 inline void SetLogStreamNamePrefix(Aws::String&& value) { m_logStreamNamePrefixHasBeenSet = true; m_logStreamNamePrefix = std::move(value); } 102 103 /** 104 * <p>The prefix to match.</p> <p>If <code>orderBy</code> is 105 * <code>LastEventTime</code>, you cannot specify this parameter.</p> 106 */ SetLogStreamNamePrefix(const char * value)107 inline void SetLogStreamNamePrefix(const char* value) { m_logStreamNamePrefixHasBeenSet = true; m_logStreamNamePrefix.assign(value); } 108 109 /** 110 * <p>The prefix to match.</p> <p>If <code>orderBy</code> is 111 * <code>LastEventTime</code>, you cannot specify this parameter.</p> 112 */ WithLogStreamNamePrefix(const Aws::String & value)113 inline DescribeLogStreamsRequest& WithLogStreamNamePrefix(const Aws::String& value) { SetLogStreamNamePrefix(value); return *this;} 114 115 /** 116 * <p>The prefix to match.</p> <p>If <code>orderBy</code> is 117 * <code>LastEventTime</code>, you cannot specify this parameter.</p> 118 */ WithLogStreamNamePrefix(Aws::String && value)119 inline DescribeLogStreamsRequest& WithLogStreamNamePrefix(Aws::String&& value) { SetLogStreamNamePrefix(std::move(value)); return *this;} 120 121 /** 122 * <p>The prefix to match.</p> <p>If <code>orderBy</code> is 123 * <code>LastEventTime</code>, you cannot specify this parameter.</p> 124 */ WithLogStreamNamePrefix(const char * value)125 inline DescribeLogStreamsRequest& WithLogStreamNamePrefix(const char* value) { SetLogStreamNamePrefix(value); return *this;} 126 127 128 /** 129 * <p>If the value is <code>LogStreamName</code>, the results are ordered by log 130 * stream name. If the value is <code>LastEventTime</code>, the results are ordered 131 * by the event time. The default value is <code>LogStreamName</code>.</p> <p>If 132 * you order the results by event time, you cannot specify the 133 * <code>logStreamNamePrefix</code> parameter.</p> <p> 134 * <code>lastEventTimestamp</code> represents the time of the most recent log event 135 * in the log stream in CloudWatch Logs. This number is expressed as the number of 136 * milliseconds after Jan 1, 1970 00:00:00 UTC. <code>lastEventTimestamp</code> 137 * updates on an eventual consistency basis. It typically updates in less than an 138 * hour from ingestion, but in rare situations might take longer.</p> 139 */ GetOrderBy()140 inline const OrderBy& GetOrderBy() const{ return m_orderBy; } 141 142 /** 143 * <p>If the value is <code>LogStreamName</code>, the results are ordered by log 144 * stream name. If the value is <code>LastEventTime</code>, the results are ordered 145 * by the event time. The default value is <code>LogStreamName</code>.</p> <p>If 146 * you order the results by event time, you cannot specify the 147 * <code>logStreamNamePrefix</code> parameter.</p> <p> 148 * <code>lastEventTimestamp</code> represents the time of the most recent log event 149 * in the log stream in CloudWatch Logs. This number is expressed as the number of 150 * milliseconds after Jan 1, 1970 00:00:00 UTC. <code>lastEventTimestamp</code> 151 * updates on an eventual consistency basis. It typically updates in less than an 152 * hour from ingestion, but in rare situations might take longer.</p> 153 */ OrderByHasBeenSet()154 inline bool OrderByHasBeenSet() const { return m_orderByHasBeenSet; } 155 156 /** 157 * <p>If the value is <code>LogStreamName</code>, the results are ordered by log 158 * stream name. If the value is <code>LastEventTime</code>, the results are ordered 159 * by the event time. The default value is <code>LogStreamName</code>.</p> <p>If 160 * you order the results by event time, you cannot specify the 161 * <code>logStreamNamePrefix</code> parameter.</p> <p> 162 * <code>lastEventTimestamp</code> represents the time of the most recent log event 163 * in the log stream in CloudWatch Logs. This number is expressed as the number of 164 * milliseconds after Jan 1, 1970 00:00:00 UTC. <code>lastEventTimestamp</code> 165 * updates on an eventual consistency basis. It typically updates in less than an 166 * hour from ingestion, but in rare situations might take longer.</p> 167 */ SetOrderBy(const OrderBy & value)168 inline void SetOrderBy(const OrderBy& value) { m_orderByHasBeenSet = true; m_orderBy = value; } 169 170 /** 171 * <p>If the value is <code>LogStreamName</code>, the results are ordered by log 172 * stream name. If the value is <code>LastEventTime</code>, the results are ordered 173 * by the event time. The default value is <code>LogStreamName</code>.</p> <p>If 174 * you order the results by event time, you cannot specify the 175 * <code>logStreamNamePrefix</code> parameter.</p> <p> 176 * <code>lastEventTimestamp</code> represents the time of the most recent log event 177 * in the log stream in CloudWatch Logs. This number is expressed as the number of 178 * milliseconds after Jan 1, 1970 00:00:00 UTC. <code>lastEventTimestamp</code> 179 * updates on an eventual consistency basis. It typically updates in less than an 180 * hour from ingestion, but in rare situations might take longer.</p> 181 */ SetOrderBy(OrderBy && value)182 inline void SetOrderBy(OrderBy&& value) { m_orderByHasBeenSet = true; m_orderBy = std::move(value); } 183 184 /** 185 * <p>If the value is <code>LogStreamName</code>, the results are ordered by log 186 * stream name. If the value is <code>LastEventTime</code>, the results are ordered 187 * by the event time. The default value is <code>LogStreamName</code>.</p> <p>If 188 * you order the results by event time, you cannot specify the 189 * <code>logStreamNamePrefix</code> parameter.</p> <p> 190 * <code>lastEventTimestamp</code> represents the time of the most recent log event 191 * in the log stream in CloudWatch Logs. This number is expressed as the number of 192 * milliseconds after Jan 1, 1970 00:00:00 UTC. <code>lastEventTimestamp</code> 193 * updates on an eventual consistency basis. It typically updates in less than an 194 * hour from ingestion, but in rare situations might take longer.</p> 195 */ WithOrderBy(const OrderBy & value)196 inline DescribeLogStreamsRequest& WithOrderBy(const OrderBy& value) { SetOrderBy(value); return *this;} 197 198 /** 199 * <p>If the value is <code>LogStreamName</code>, the results are ordered by log 200 * stream name. If the value is <code>LastEventTime</code>, the results are ordered 201 * by the event time. The default value is <code>LogStreamName</code>.</p> <p>If 202 * you order the results by event time, you cannot specify the 203 * <code>logStreamNamePrefix</code> parameter.</p> <p> 204 * <code>lastEventTimestamp</code> represents the time of the most recent log event 205 * in the log stream in CloudWatch Logs. This number is expressed as the number of 206 * milliseconds after Jan 1, 1970 00:00:00 UTC. <code>lastEventTimestamp</code> 207 * updates on an eventual consistency basis. It typically updates in less than an 208 * hour from ingestion, but in rare situations might take longer.</p> 209 */ WithOrderBy(OrderBy && value)210 inline DescribeLogStreamsRequest& WithOrderBy(OrderBy&& value) { SetOrderBy(std::move(value)); return *this;} 211 212 213 /** 214 * <p>If the value is true, results are returned in descending order. If the value 215 * is to false, results are returned in ascending order. The default value is 216 * false.</p> 217 */ GetDescending()218 inline bool GetDescending() const{ return m_descending; } 219 220 /** 221 * <p>If the value is true, results are returned in descending order. If the value 222 * is to false, results are returned in ascending order. The default value is 223 * false.</p> 224 */ DescendingHasBeenSet()225 inline bool DescendingHasBeenSet() const { return m_descendingHasBeenSet; } 226 227 /** 228 * <p>If the value is true, results are returned in descending order. If the value 229 * is to false, results are returned in ascending order. The default value is 230 * false.</p> 231 */ SetDescending(bool value)232 inline void SetDescending(bool value) { m_descendingHasBeenSet = true; m_descending = value; } 233 234 /** 235 * <p>If the value is true, results are returned in descending order. If the value 236 * is to false, results are returned in ascending order. The default value is 237 * false.</p> 238 */ WithDescending(bool value)239 inline DescribeLogStreamsRequest& WithDescending(bool value) { SetDescending(value); return *this;} 240 241 242 /** 243 * <p>The token for the next set of items to return. (You received this token from 244 * a previous call.)</p> 245 */ GetNextToken()246 inline const Aws::String& GetNextToken() const{ return m_nextToken; } 247 248 /** 249 * <p>The token for the next set of items to return. (You received this token from 250 * a previous call.)</p> 251 */ NextTokenHasBeenSet()252 inline bool NextTokenHasBeenSet() const { return m_nextTokenHasBeenSet; } 253 254 /** 255 * <p>The token for the next set of items to return. (You received this token from 256 * a previous call.)</p> 257 */ SetNextToken(const Aws::String & value)258 inline void SetNextToken(const Aws::String& value) { m_nextTokenHasBeenSet = true; m_nextToken = value; } 259 260 /** 261 * <p>The token for the next set of items to return. (You received this token from 262 * a previous call.)</p> 263 */ SetNextToken(Aws::String && value)264 inline void SetNextToken(Aws::String&& value) { m_nextTokenHasBeenSet = true; m_nextToken = std::move(value); } 265 266 /** 267 * <p>The token for the next set of items to return. (You received this token from 268 * a previous call.)</p> 269 */ SetNextToken(const char * value)270 inline void SetNextToken(const char* value) { m_nextTokenHasBeenSet = true; m_nextToken.assign(value); } 271 272 /** 273 * <p>The token for the next set of items to return. (You received this token from 274 * a previous call.)</p> 275 */ WithNextToken(const Aws::String & value)276 inline DescribeLogStreamsRequest& WithNextToken(const Aws::String& value) { SetNextToken(value); return *this;} 277 278 /** 279 * <p>The token for the next set of items to return. (You received this token from 280 * a previous call.)</p> 281 */ WithNextToken(Aws::String && value)282 inline DescribeLogStreamsRequest& WithNextToken(Aws::String&& value) { SetNextToken(std::move(value)); return *this;} 283 284 /** 285 * <p>The token for the next set of items to return. (You received this token from 286 * a previous call.)</p> 287 */ WithNextToken(const char * value)288 inline DescribeLogStreamsRequest& WithNextToken(const char* value) { SetNextToken(value); return *this;} 289 290 291 /** 292 * <p>The maximum number of items returned. If you don't specify a value, the 293 * default is up to 50 items.</p> 294 */ GetLimit()295 inline int GetLimit() const{ return m_limit; } 296 297 /** 298 * <p>The maximum number of items returned. If you don't specify a value, the 299 * default is up to 50 items.</p> 300 */ LimitHasBeenSet()301 inline bool LimitHasBeenSet() const { return m_limitHasBeenSet; } 302 303 /** 304 * <p>The maximum number of items returned. If you don't specify a value, the 305 * default is up to 50 items.</p> 306 */ SetLimit(int value)307 inline void SetLimit(int value) { m_limitHasBeenSet = true; m_limit = value; } 308 309 /** 310 * <p>The maximum number of items returned. If you don't specify a value, the 311 * default is up to 50 items.</p> 312 */ WithLimit(int value)313 inline DescribeLogStreamsRequest& WithLimit(int value) { SetLimit(value); return *this;} 314 315 private: 316 317 Aws::String m_logGroupName; 318 bool m_logGroupNameHasBeenSet; 319 320 Aws::String m_logStreamNamePrefix; 321 bool m_logStreamNamePrefixHasBeenSet; 322 323 OrderBy m_orderBy; 324 bool m_orderByHasBeenSet; 325 326 bool m_descending; 327 bool m_descendingHasBeenSet; 328 329 Aws::String m_nextToken; 330 bool m_nextTokenHasBeenSet; 331 332 int m_limit; 333 bool m_limitHasBeenSet; 334 }; 335 336 } // namespace Model 337 } // namespace CloudWatchLogs 338 } // namespace Aws 339