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/AWSString.h> 9 #include <utility> 10 11 namespace Aws 12 { 13 namespace Utils 14 { 15 namespace Json 16 { 17 class JsonValue; 18 class JsonView; 19 } // namespace Json 20 } // namespace Utils 21 namespace XRay 22 { 23 namespace Model 24 { 25 26 /** 27 * <p>Information about an HTTP request.</p><p><h3>See Also:</h3> <a 28 * href="http://docs.aws.amazon.com/goto/WebAPI/xray-2016-04-12/Http">AWS API 29 * Reference</a></p> 30 */ 31 class AWS_XRAY_API Http 32 { 33 public: 34 Http(); 35 Http(Aws::Utils::Json::JsonView jsonValue); 36 Http& operator=(Aws::Utils::Json::JsonView jsonValue); 37 Aws::Utils::Json::JsonValue Jsonize() const; 38 39 40 /** 41 * <p>The request URL.</p> 42 */ GetHttpURL()43 inline const Aws::String& GetHttpURL() const{ return m_httpURL; } 44 45 /** 46 * <p>The request URL.</p> 47 */ HttpURLHasBeenSet()48 inline bool HttpURLHasBeenSet() const { return m_httpURLHasBeenSet; } 49 50 /** 51 * <p>The request URL.</p> 52 */ SetHttpURL(const Aws::String & value)53 inline void SetHttpURL(const Aws::String& value) { m_httpURLHasBeenSet = true; m_httpURL = value; } 54 55 /** 56 * <p>The request URL.</p> 57 */ SetHttpURL(Aws::String && value)58 inline void SetHttpURL(Aws::String&& value) { m_httpURLHasBeenSet = true; m_httpURL = std::move(value); } 59 60 /** 61 * <p>The request URL.</p> 62 */ SetHttpURL(const char * value)63 inline void SetHttpURL(const char* value) { m_httpURLHasBeenSet = true; m_httpURL.assign(value); } 64 65 /** 66 * <p>The request URL.</p> 67 */ WithHttpURL(const Aws::String & value)68 inline Http& WithHttpURL(const Aws::String& value) { SetHttpURL(value); return *this;} 69 70 /** 71 * <p>The request URL.</p> 72 */ WithHttpURL(Aws::String && value)73 inline Http& WithHttpURL(Aws::String&& value) { SetHttpURL(std::move(value)); return *this;} 74 75 /** 76 * <p>The request URL.</p> 77 */ WithHttpURL(const char * value)78 inline Http& WithHttpURL(const char* value) { SetHttpURL(value); return *this;} 79 80 81 /** 82 * <p>The response status.</p> 83 */ GetHttpStatus()84 inline int GetHttpStatus() const{ return m_httpStatus; } 85 86 /** 87 * <p>The response status.</p> 88 */ HttpStatusHasBeenSet()89 inline bool HttpStatusHasBeenSet() const { return m_httpStatusHasBeenSet; } 90 91 /** 92 * <p>The response status.</p> 93 */ SetHttpStatus(int value)94 inline void SetHttpStatus(int value) { m_httpStatusHasBeenSet = true; m_httpStatus = value; } 95 96 /** 97 * <p>The response status.</p> 98 */ WithHttpStatus(int value)99 inline Http& WithHttpStatus(int value) { SetHttpStatus(value); return *this;} 100 101 102 /** 103 * <p>The request method.</p> 104 */ GetHttpMethod()105 inline const Aws::String& GetHttpMethod() const{ return m_httpMethod; } 106 107 /** 108 * <p>The request method.</p> 109 */ HttpMethodHasBeenSet()110 inline bool HttpMethodHasBeenSet() const { return m_httpMethodHasBeenSet; } 111 112 /** 113 * <p>The request method.</p> 114 */ SetHttpMethod(const Aws::String & value)115 inline void SetHttpMethod(const Aws::String& value) { m_httpMethodHasBeenSet = true; m_httpMethod = value; } 116 117 /** 118 * <p>The request method.</p> 119 */ SetHttpMethod(Aws::String && value)120 inline void SetHttpMethod(Aws::String&& value) { m_httpMethodHasBeenSet = true; m_httpMethod = std::move(value); } 121 122 /** 123 * <p>The request method.</p> 124 */ SetHttpMethod(const char * value)125 inline void SetHttpMethod(const char* value) { m_httpMethodHasBeenSet = true; m_httpMethod.assign(value); } 126 127 /** 128 * <p>The request method.</p> 129 */ WithHttpMethod(const Aws::String & value)130 inline Http& WithHttpMethod(const Aws::String& value) { SetHttpMethod(value); return *this;} 131 132 /** 133 * <p>The request method.</p> 134 */ WithHttpMethod(Aws::String && value)135 inline Http& WithHttpMethod(Aws::String&& value) { SetHttpMethod(std::move(value)); return *this;} 136 137 /** 138 * <p>The request method.</p> 139 */ WithHttpMethod(const char * value)140 inline Http& WithHttpMethod(const char* value) { SetHttpMethod(value); return *this;} 141 142 143 /** 144 * <p>The request's user agent string.</p> 145 */ GetUserAgent()146 inline const Aws::String& GetUserAgent() const{ return m_userAgent; } 147 148 /** 149 * <p>The request's user agent string.</p> 150 */ UserAgentHasBeenSet()151 inline bool UserAgentHasBeenSet() const { return m_userAgentHasBeenSet; } 152 153 /** 154 * <p>The request's user agent string.</p> 155 */ SetUserAgent(const Aws::String & value)156 inline void SetUserAgent(const Aws::String& value) { m_userAgentHasBeenSet = true; m_userAgent = value; } 157 158 /** 159 * <p>The request's user agent string.</p> 160 */ SetUserAgent(Aws::String && value)161 inline void SetUserAgent(Aws::String&& value) { m_userAgentHasBeenSet = true; m_userAgent = std::move(value); } 162 163 /** 164 * <p>The request's user agent string.</p> 165 */ SetUserAgent(const char * value)166 inline void SetUserAgent(const char* value) { m_userAgentHasBeenSet = true; m_userAgent.assign(value); } 167 168 /** 169 * <p>The request's user agent string.</p> 170 */ WithUserAgent(const Aws::String & value)171 inline Http& WithUserAgent(const Aws::String& value) { SetUserAgent(value); return *this;} 172 173 /** 174 * <p>The request's user agent string.</p> 175 */ WithUserAgent(Aws::String && value)176 inline Http& WithUserAgent(Aws::String&& value) { SetUserAgent(std::move(value)); return *this;} 177 178 /** 179 * <p>The request's user agent string.</p> 180 */ WithUserAgent(const char * value)181 inline Http& WithUserAgent(const char* value) { SetUserAgent(value); return *this;} 182 183 184 /** 185 * <p>The IP address of the requestor.</p> 186 */ GetClientIp()187 inline const Aws::String& GetClientIp() const{ return m_clientIp; } 188 189 /** 190 * <p>The IP address of the requestor.</p> 191 */ ClientIpHasBeenSet()192 inline bool ClientIpHasBeenSet() const { return m_clientIpHasBeenSet; } 193 194 /** 195 * <p>The IP address of the requestor.</p> 196 */ SetClientIp(const Aws::String & value)197 inline void SetClientIp(const Aws::String& value) { m_clientIpHasBeenSet = true; m_clientIp = value; } 198 199 /** 200 * <p>The IP address of the requestor.</p> 201 */ SetClientIp(Aws::String && value)202 inline void SetClientIp(Aws::String&& value) { m_clientIpHasBeenSet = true; m_clientIp = std::move(value); } 203 204 /** 205 * <p>The IP address of the requestor.</p> 206 */ SetClientIp(const char * value)207 inline void SetClientIp(const char* value) { m_clientIpHasBeenSet = true; m_clientIp.assign(value); } 208 209 /** 210 * <p>The IP address of the requestor.</p> 211 */ WithClientIp(const Aws::String & value)212 inline Http& WithClientIp(const Aws::String& value) { SetClientIp(value); return *this;} 213 214 /** 215 * <p>The IP address of the requestor.</p> 216 */ WithClientIp(Aws::String && value)217 inline Http& WithClientIp(Aws::String&& value) { SetClientIp(std::move(value)); return *this;} 218 219 /** 220 * <p>The IP address of the requestor.</p> 221 */ WithClientIp(const char * value)222 inline Http& WithClientIp(const char* value) { SetClientIp(value); return *this;} 223 224 private: 225 226 Aws::String m_httpURL; 227 bool m_httpURLHasBeenSet; 228 229 int m_httpStatus; 230 bool m_httpStatusHasBeenSet; 231 232 Aws::String m_httpMethod; 233 bool m_httpMethodHasBeenSet; 234 235 Aws::String m_userAgent; 236 bool m_userAgentHasBeenSet; 237 238 Aws::String m_clientIp; 239 bool m_clientIpHasBeenSet; 240 }; 241 242 } // namespace Model 243 } // namespace XRay 244 } // namespace Aws 245