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/appstream/AppStream_EXPORTS.h>
8 #include <aws/appstream/model/StackErrorCode.h>
9 #include <aws/core/utils/memory/stl/AWSString.h>
10 #include <utility>
11 
12 namespace Aws
13 {
14 namespace Utils
15 {
16 namespace Json
17 {
18   class JsonValue;
19   class JsonView;
20 } // namespace Json
21 } // namespace Utils
22 namespace AppStream
23 {
24 namespace Model
25 {
26 
27   /**
28    * <p>Describes a stack error.</p><p><h3>See Also:</h3>   <a
29    * href="http://docs.aws.amazon.com/goto/WebAPI/appstream-2016-12-01/StackError">AWS
30    * API Reference</a></p>
31    */
32   class AWS_APPSTREAM_API StackError
33   {
34   public:
35     StackError();
36     StackError(Aws::Utils::Json::JsonView jsonValue);
37     StackError& operator=(Aws::Utils::Json::JsonView jsonValue);
38     Aws::Utils::Json::JsonValue Jsonize() const;
39 
40 
41     /**
42      * <p>The error code.</p>
43      */
GetErrorCode()44     inline const StackErrorCode& GetErrorCode() const{ return m_errorCode; }
45 
46     /**
47      * <p>The error code.</p>
48      */
ErrorCodeHasBeenSet()49     inline bool ErrorCodeHasBeenSet() const { return m_errorCodeHasBeenSet; }
50 
51     /**
52      * <p>The error code.</p>
53      */
SetErrorCode(const StackErrorCode & value)54     inline void SetErrorCode(const StackErrorCode& value) { m_errorCodeHasBeenSet = true; m_errorCode = value; }
55 
56     /**
57      * <p>The error code.</p>
58      */
SetErrorCode(StackErrorCode && value)59     inline void SetErrorCode(StackErrorCode&& value) { m_errorCodeHasBeenSet = true; m_errorCode = std::move(value); }
60 
61     /**
62      * <p>The error code.</p>
63      */
WithErrorCode(const StackErrorCode & value)64     inline StackError& WithErrorCode(const StackErrorCode& value) { SetErrorCode(value); return *this;}
65 
66     /**
67      * <p>The error code.</p>
68      */
WithErrorCode(StackErrorCode && value)69     inline StackError& WithErrorCode(StackErrorCode&& value) { SetErrorCode(std::move(value)); return *this;}
70 
71 
72     /**
73      * <p>The error message.</p>
74      */
GetErrorMessage()75     inline const Aws::String& GetErrorMessage() const{ return m_errorMessage; }
76 
77     /**
78      * <p>The error message.</p>
79      */
ErrorMessageHasBeenSet()80     inline bool ErrorMessageHasBeenSet() const { return m_errorMessageHasBeenSet; }
81 
82     /**
83      * <p>The error message.</p>
84      */
SetErrorMessage(const Aws::String & value)85     inline void SetErrorMessage(const Aws::String& value) { m_errorMessageHasBeenSet = true; m_errorMessage = value; }
86 
87     /**
88      * <p>The error message.</p>
89      */
SetErrorMessage(Aws::String && value)90     inline void SetErrorMessage(Aws::String&& value) { m_errorMessageHasBeenSet = true; m_errorMessage = std::move(value); }
91 
92     /**
93      * <p>The error message.</p>
94      */
SetErrorMessage(const char * value)95     inline void SetErrorMessage(const char* value) { m_errorMessageHasBeenSet = true; m_errorMessage.assign(value); }
96 
97     /**
98      * <p>The error message.</p>
99      */
WithErrorMessage(const Aws::String & value)100     inline StackError& WithErrorMessage(const Aws::String& value) { SetErrorMessage(value); return *this;}
101 
102     /**
103      * <p>The error message.</p>
104      */
WithErrorMessage(Aws::String && value)105     inline StackError& WithErrorMessage(Aws::String&& value) { SetErrorMessage(std::move(value)); return *this;}
106 
107     /**
108      * <p>The error message.</p>
109      */
WithErrorMessage(const char * value)110     inline StackError& WithErrorMessage(const char* value) { SetErrorMessage(value); return *this;}
111 
112   private:
113 
114     StackErrorCode m_errorCode;
115     bool m_errorCodeHasBeenSet;
116 
117     Aws::String m_errorMessage;
118     bool m_errorMessageHasBeenSet;
119   };
120 
121 } // namespace Model
122 } // namespace AppStream
123 } // namespace Aws
124