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/datasync/DataSync_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 DataSync
22 {
23 namespace Model
24 {
25 
26   /**
27    * <p>This exception is thrown when the client submits a malformed
28    * request.</p><p><h3>See Also:</h3>   <a
29    * href="http://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/InvalidRequestException">AWS
30    * API Reference</a></p>
31    */
32   class AWS_DATASYNC_API InvalidRequestException
33   {
34   public:
35     InvalidRequestException();
36     InvalidRequestException(Aws::Utils::Json::JsonView jsonValue);
37     InvalidRequestException& operator=(Aws::Utils::Json::JsonView jsonValue);
38     Aws::Utils::Json::JsonValue Jsonize() const;
39 
40 
41 
GetMessage()42     inline const Aws::String& GetMessage() const{ return m_message; }
43 
44 
MessageHasBeenSet()45     inline bool MessageHasBeenSet() const { return m_messageHasBeenSet; }
46 
47 
SetMessage(const Aws::String & value)48     inline void SetMessage(const Aws::String& value) { m_messageHasBeenSet = true; m_message = value; }
49 
50 
SetMessage(Aws::String && value)51     inline void SetMessage(Aws::String&& value) { m_messageHasBeenSet = true; m_message = std::move(value); }
52 
53 
SetMessage(const char * value)54     inline void SetMessage(const char* value) { m_messageHasBeenSet = true; m_message.assign(value); }
55 
56 
WithMessage(const Aws::String & value)57     inline InvalidRequestException& WithMessage(const Aws::String& value) { SetMessage(value); return *this;}
58 
59 
WithMessage(Aws::String && value)60     inline InvalidRequestException& WithMessage(Aws::String&& value) { SetMessage(std::move(value)); return *this;}
61 
62 
WithMessage(const char * value)63     inline InvalidRequestException& WithMessage(const char* value) { SetMessage(value); return *this;}
64 
65 
66 
GetErrorCode()67     inline const Aws::String& GetErrorCode() const{ return m_errorCode; }
68 
69 
ErrorCodeHasBeenSet()70     inline bool ErrorCodeHasBeenSet() const { return m_errorCodeHasBeenSet; }
71 
72 
SetErrorCode(const Aws::String & value)73     inline void SetErrorCode(const Aws::String& value) { m_errorCodeHasBeenSet = true; m_errorCode = value; }
74 
75 
SetErrorCode(Aws::String && value)76     inline void SetErrorCode(Aws::String&& value) { m_errorCodeHasBeenSet = true; m_errorCode = std::move(value); }
77 
78 
SetErrorCode(const char * value)79     inline void SetErrorCode(const char* value) { m_errorCodeHasBeenSet = true; m_errorCode.assign(value); }
80 
81 
WithErrorCode(const Aws::String & value)82     inline InvalidRequestException& WithErrorCode(const Aws::String& value) { SetErrorCode(value); return *this;}
83 
84 
WithErrorCode(Aws::String && value)85     inline InvalidRequestException& WithErrorCode(Aws::String&& value) { SetErrorCode(std::move(value)); return *this;}
86 
87 
WithErrorCode(const char * value)88     inline InvalidRequestException& WithErrorCode(const char* value) { SetErrorCode(value); return *this;}
89 
90   private:
91 
92     Aws::String m_message;
93     bool m_messageHasBeenSet;
94 
95     Aws::String m_errorCode;
96     bool m_errorCodeHasBeenSet;
97   };
98 
99 } // namespace Model
100 } // namespace DataSync
101 } // namespace Aws
102