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/events/CloudWatchEvents_EXPORTS.h> 8 #include <aws/events/CloudWatchEventsRequest.h> 9 #include <aws/core/utils/memory/stl/AWSString.h> 10 #include <aws/events/model/ConnectionState.h> 11 #include <utility> 12 13 namespace Aws 14 { 15 namespace CloudWatchEvents 16 { 17 namespace Model 18 { 19 20 /** 21 */ 22 class AWS_CLOUDWATCHEVENTS_API ListConnectionsRequest : public CloudWatchEventsRequest 23 { 24 public: 25 ListConnectionsRequest(); 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 "ListConnections"; } 32 33 Aws::String SerializePayload() const override; 34 35 Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; 36 37 38 /** 39 * <p>A name prefix to filter results returned. Only connections with a name that 40 * starts with the prefix are returned.</p> 41 */ GetNamePrefix()42 inline const Aws::String& GetNamePrefix() const{ return m_namePrefix; } 43 44 /** 45 * <p>A name prefix to filter results returned. Only connections with a name that 46 * starts with the prefix are returned.</p> 47 */ NamePrefixHasBeenSet()48 inline bool NamePrefixHasBeenSet() const { return m_namePrefixHasBeenSet; } 49 50 /** 51 * <p>A name prefix to filter results returned. Only connections with a name that 52 * starts with the prefix are returned.</p> 53 */ SetNamePrefix(const Aws::String & value)54 inline void SetNamePrefix(const Aws::String& value) { m_namePrefixHasBeenSet = true; m_namePrefix = value; } 55 56 /** 57 * <p>A name prefix to filter results returned. Only connections with a name that 58 * starts with the prefix are returned.</p> 59 */ SetNamePrefix(Aws::String && value)60 inline void SetNamePrefix(Aws::String&& value) { m_namePrefixHasBeenSet = true; m_namePrefix = std::move(value); } 61 62 /** 63 * <p>A name prefix to filter results returned. Only connections with a name that 64 * starts with the prefix are returned.</p> 65 */ SetNamePrefix(const char * value)66 inline void SetNamePrefix(const char* value) { m_namePrefixHasBeenSet = true; m_namePrefix.assign(value); } 67 68 /** 69 * <p>A name prefix to filter results returned. Only connections with a name that 70 * starts with the prefix are returned.</p> 71 */ WithNamePrefix(const Aws::String & value)72 inline ListConnectionsRequest& WithNamePrefix(const Aws::String& value) { SetNamePrefix(value); return *this;} 73 74 /** 75 * <p>A name prefix to filter results returned. Only connections with a name that 76 * starts with the prefix are returned.</p> 77 */ WithNamePrefix(Aws::String && value)78 inline ListConnectionsRequest& WithNamePrefix(Aws::String&& value) { SetNamePrefix(std::move(value)); return *this;} 79 80 /** 81 * <p>A name prefix to filter results returned. Only connections with a name that 82 * starts with the prefix are returned.</p> 83 */ WithNamePrefix(const char * value)84 inline ListConnectionsRequest& WithNamePrefix(const char* value) { SetNamePrefix(value); return *this;} 85 86 87 /** 88 * <p>The state of the connection.</p> 89 */ GetConnectionState()90 inline const ConnectionState& GetConnectionState() const{ return m_connectionState; } 91 92 /** 93 * <p>The state of the connection.</p> 94 */ ConnectionStateHasBeenSet()95 inline bool ConnectionStateHasBeenSet() const { return m_connectionStateHasBeenSet; } 96 97 /** 98 * <p>The state of the connection.</p> 99 */ SetConnectionState(const ConnectionState & value)100 inline void SetConnectionState(const ConnectionState& value) { m_connectionStateHasBeenSet = true; m_connectionState = value; } 101 102 /** 103 * <p>The state of the connection.</p> 104 */ SetConnectionState(ConnectionState && value)105 inline void SetConnectionState(ConnectionState&& value) { m_connectionStateHasBeenSet = true; m_connectionState = std::move(value); } 106 107 /** 108 * <p>The state of the connection.</p> 109 */ WithConnectionState(const ConnectionState & value)110 inline ListConnectionsRequest& WithConnectionState(const ConnectionState& value) { SetConnectionState(value); return *this;} 111 112 /** 113 * <p>The state of the connection.</p> 114 */ WithConnectionState(ConnectionState && value)115 inline ListConnectionsRequest& WithConnectionState(ConnectionState&& value) { SetConnectionState(std::move(value)); return *this;} 116 117 118 /** 119 * <p>The token returned by a previous call to retrieve the next set of 120 * results.</p> 121 */ GetNextToken()122 inline const Aws::String& GetNextToken() const{ return m_nextToken; } 123 124 /** 125 * <p>The token returned by a previous call to retrieve the next set of 126 * results.</p> 127 */ NextTokenHasBeenSet()128 inline bool NextTokenHasBeenSet() const { return m_nextTokenHasBeenSet; } 129 130 /** 131 * <p>The token returned by a previous call to retrieve the next set of 132 * results.</p> 133 */ SetNextToken(const Aws::String & value)134 inline void SetNextToken(const Aws::String& value) { m_nextTokenHasBeenSet = true; m_nextToken = value; } 135 136 /** 137 * <p>The token returned by a previous call to retrieve the next set of 138 * results.</p> 139 */ SetNextToken(Aws::String && value)140 inline void SetNextToken(Aws::String&& value) { m_nextTokenHasBeenSet = true; m_nextToken = std::move(value); } 141 142 /** 143 * <p>The token returned by a previous call to retrieve the next set of 144 * results.</p> 145 */ SetNextToken(const char * value)146 inline void SetNextToken(const char* value) { m_nextTokenHasBeenSet = true; m_nextToken.assign(value); } 147 148 /** 149 * <p>The token returned by a previous call to retrieve the next set of 150 * results.</p> 151 */ WithNextToken(const Aws::String & value)152 inline ListConnectionsRequest& WithNextToken(const Aws::String& value) { SetNextToken(value); return *this;} 153 154 /** 155 * <p>The token returned by a previous call to retrieve the next set of 156 * results.</p> 157 */ WithNextToken(Aws::String && value)158 inline ListConnectionsRequest& WithNextToken(Aws::String&& value) { SetNextToken(std::move(value)); return *this;} 159 160 /** 161 * <p>The token returned by a previous call to retrieve the next set of 162 * results.</p> 163 */ WithNextToken(const char * value)164 inline ListConnectionsRequest& WithNextToken(const char* value) { SetNextToken(value); return *this;} 165 166 167 /** 168 * <p>The maximum number of connections to return.</p> 169 */ GetLimit()170 inline int GetLimit() const{ return m_limit; } 171 172 /** 173 * <p>The maximum number of connections to return.</p> 174 */ LimitHasBeenSet()175 inline bool LimitHasBeenSet() const { return m_limitHasBeenSet; } 176 177 /** 178 * <p>The maximum number of connections to return.</p> 179 */ SetLimit(int value)180 inline void SetLimit(int value) { m_limitHasBeenSet = true; m_limit = value; } 181 182 /** 183 * <p>The maximum number of connections to return.</p> 184 */ WithLimit(int value)185 inline ListConnectionsRequest& WithLimit(int value) { SetLimit(value); return *this;} 186 187 private: 188 189 Aws::String m_namePrefix; 190 bool m_namePrefixHasBeenSet; 191 192 ConnectionState m_connectionState; 193 bool m_connectionStateHasBeenSet; 194 195 Aws::String m_nextToken; 196 bool m_nextTokenHasBeenSet; 197 198 int m_limit; 199 bool m_limitHasBeenSet; 200 }; 201 202 } // namespace Model 203 } // namespace CloudWatchEvents 204 } // namespace Aws 205