AWS SDK for C++  0.14.3
AWS SDK for C++
Redirect.h
Go to the documentation of this file.
1 /*
2 * Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License").
5 * You may not use this file except in compliance with the License.
6 * A copy of the License is located at
7 *
8 * http://aws.amazon.com/apache2.0
9 *
10 * or in the "license" file accompanying this file. This file is distributed
11 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12 * express or implied. See the License for the specific language governing
13 * permissions and limitations under the License.
14 */
15 #pragma once
16 #include <aws/s3/S3_EXPORTS.h>
18 #include <aws/s3/model/Protocol.h>
19 
20 namespace Aws
21 {
22 namespace Utils
23 {
24 namespace Xml
25 {
26  class XmlNode;
27 } // namespace Xml
28 } // namespace Utils
29 namespace S3
30 {
31 namespace Model
32 {
33 
35  {
36  public:
37  Redirect();
38  Redirect(const Aws::Utils::Xml::XmlNode& xmlNode);
39  Redirect& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
40 
41  void AddToNode(Aws::Utils::Xml::XmlNode& parentNode) const;
42 
46  inline const Aws::String& GetHostName() const{ return m_hostName; }
47 
51  inline void SetHostName(const Aws::String& value) { m_hostNameHasBeenSet = true; m_hostName = value; }
52 
56  inline void SetHostName(Aws::String&& value) { m_hostNameHasBeenSet = true; m_hostName = value; }
57 
61  inline void SetHostName(const char* value) { m_hostNameHasBeenSet = true; m_hostName.assign(value); }
62 
66  inline Redirect& WithHostName(const Aws::String& value) { SetHostName(value); return *this;}
67 
71  inline Redirect& WithHostName(Aws::String&& value) { SetHostName(value); return *this;}
72 
76  inline Redirect& WithHostName(const char* value) { SetHostName(value); return *this;}
77 
82  inline const Aws::String& GetHttpRedirectCode() const{ return m_httpRedirectCode; }
83 
88  inline void SetHttpRedirectCode(const Aws::String& value) { m_httpRedirectCodeHasBeenSet = true; m_httpRedirectCode = value; }
89 
94  inline void SetHttpRedirectCode(Aws::String&& value) { m_httpRedirectCodeHasBeenSet = true; m_httpRedirectCode = value; }
95 
100  inline void SetHttpRedirectCode(const char* value) { m_httpRedirectCodeHasBeenSet = true; m_httpRedirectCode.assign(value); }
101 
106  inline Redirect& WithHttpRedirectCode(const Aws::String& value) { SetHttpRedirectCode(value); return *this;}
107 
112  inline Redirect& WithHttpRedirectCode(Aws::String&& value) { SetHttpRedirectCode(value); return *this;}
113 
118  inline Redirect& WithHttpRedirectCode(const char* value) { SetHttpRedirectCode(value); return *this;}
119 
124  inline const Protocol& GetProtocol() const{ return m_protocol; }
125 
130  inline void SetProtocol(const Protocol& value) { m_protocolHasBeenSet = true; m_protocol = value; }
131 
136  inline void SetProtocol(Protocol&& value) { m_protocolHasBeenSet = true; m_protocol = value; }
137 
142  inline Redirect& WithProtocol(const Protocol& value) { SetProtocol(value); return *this;}
143 
148  inline Redirect& WithProtocol(Protocol&& value) { SetProtocol(value); return *this;}
149 
157  inline const Aws::String& GetReplaceKeyPrefixWith() const{ return m_replaceKeyPrefixWith; }
158 
166  inline void SetReplaceKeyPrefixWith(const Aws::String& value) { m_replaceKeyPrefixWithHasBeenSet = true; m_replaceKeyPrefixWith = value; }
167 
175  inline void SetReplaceKeyPrefixWith(Aws::String&& value) { m_replaceKeyPrefixWithHasBeenSet = true; m_replaceKeyPrefixWith = value; }
176 
184  inline void SetReplaceKeyPrefixWith(const char* value) { m_replaceKeyPrefixWithHasBeenSet = true; m_replaceKeyPrefixWith.assign(value); }
185 
193  inline Redirect& WithReplaceKeyPrefixWith(const Aws::String& value) { SetReplaceKeyPrefixWith(value); return *this;}
194 
202  inline Redirect& WithReplaceKeyPrefixWith(Aws::String&& value) { SetReplaceKeyPrefixWith(value); return *this;}
203 
211  inline Redirect& WithReplaceKeyPrefixWith(const char* value) { SetReplaceKeyPrefixWith(value); return *this;}
212 
218  inline const Aws::String& GetReplaceKeyWith() const{ return m_replaceKeyWith; }
219 
225  inline void SetReplaceKeyWith(const Aws::String& value) { m_replaceKeyWithHasBeenSet = true; m_replaceKeyWith = value; }
226 
232  inline void SetReplaceKeyWith(Aws::String&& value) { m_replaceKeyWithHasBeenSet = true; m_replaceKeyWith = value; }
233 
239  inline void SetReplaceKeyWith(const char* value) { m_replaceKeyWithHasBeenSet = true; m_replaceKeyWith.assign(value); }
240 
246  inline Redirect& WithReplaceKeyWith(const Aws::String& value) { SetReplaceKeyWith(value); return *this;}
247 
253  inline Redirect& WithReplaceKeyWith(Aws::String&& value) { SetReplaceKeyWith(value); return *this;}
254 
260  inline Redirect& WithReplaceKeyWith(const char* value) { SetReplaceKeyWith(value); return *this;}
261 
262  private:
263  Aws::String m_hostName;
264  bool m_hostNameHasBeenSet;
265  Aws::String m_httpRedirectCode;
266  bool m_httpRedirectCodeHasBeenSet;
267  Protocol m_protocol;
268  bool m_protocolHasBeenSet;
269  Aws::String m_replaceKeyPrefixWith;
270  bool m_replaceKeyPrefixWithHasBeenSet;
271  Aws::String m_replaceKeyWith;
272  bool m_replaceKeyWithHasBeenSet;
273  };
274 
275 } // namespace Model
276 } // namespace S3
277 } // namespace Aws
void SetReplaceKeyPrefixWith(const char *value)
Definition: Redirect.h:184
Redirect & WithHttpRedirectCode(const char *value)
Definition: Redirect.h:118
void SetProtocol(const Protocol &value)
Definition: Redirect.h:130
Redirect & WithProtocol(Protocol &&value)
Definition: Redirect.h:148
Redirect & WithHostName(const Aws::String &value)
Definition: Redirect.h:66
Redirect & WithReplaceKeyPrefixWith(const Aws::String &value)
Definition: Redirect.h:193
const Aws::String & GetReplaceKeyWith() const
Definition: Redirect.h:218
const Aws::String & GetHostName() const
Definition: Redirect.h:46
void SetHostName(const Aws::String &value)
Definition: Redirect.h:51
const Protocol & GetProtocol() const
Definition: Redirect.h:124
#define AWS_S3_API
Definition: S3_EXPORTS.h:37
Redirect & WithHttpRedirectCode(Aws::String &&value)
Definition: Redirect.h:112
Redirect & WithReplaceKeyWith(Aws::String &&value)
Definition: Redirect.h:253
void SetHttpRedirectCode(Aws::String &&value)
Definition: Redirect.h:94
Redirect & WithHostName(Aws::String &&value)
Definition: Redirect.h:71
void SetHttpRedirectCode(const char *value)
Definition: Redirect.h:100
void SetReplaceKeyWith(const char *value)
Definition: Redirect.h:239
const Aws::String & GetHttpRedirectCode() const
Definition: Redirect.h:82
void SetReplaceKeyPrefixWith(Aws::String &&value)
Definition: Redirect.h:175
void SetReplaceKeyWith(const Aws::String &value)
Definition: Redirect.h:225
void SetHostName(const char *value)
Definition: Redirect.h:61
Redirect & WithHttpRedirectCode(const Aws::String &value)
Definition: Redirect.h:106
void SetHttpRedirectCode(const Aws::String &value)
Definition: Redirect.h:88
Redirect & WithReplaceKeyWith(const char *value)
Definition: Redirect.h:260
Redirect & WithHostName(const char *value)
Definition: Redirect.h:76
Redirect & WithProtocol(const Protocol &value)
Definition: Redirect.h:142
Redirect & WithReplaceKeyPrefixWith(const char *value)
Definition: Redirect.h:211
void SetReplaceKeyPrefixWith(const Aws::String &value)
Definition: Redirect.h:166
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
const Aws::String & GetReplaceKeyPrefixWith() const
Definition: Redirect.h:157
void SetReplaceKeyWith(Aws::String &&value)
Definition: Redirect.h:232
Redirect & WithReplaceKeyWith(const Aws::String &value)
Definition: Redirect.h:246
void SetProtocol(Protocol &&value)
Definition: Redirect.h:136
JSON (JavaScript Object Notation).
Redirect & WithReplaceKeyPrefixWith(Aws::String &&value)
Definition: Redirect.h:202
void SetHostName(Aws::String &&value)
Definition: Redirect.h:56