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/states/SFN_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 SFN
22 {
23 namespace Model
24 {
25 
26   /**
27    * <p>Contains details about a task failure event.</p><p><h3>See Also:</h3>   <a
28    * href="http://docs.aws.amazon.com/goto/WebAPI/states-2016-11-23/TaskFailedEventDetails">AWS
29    * API Reference</a></p>
30    */
31   class AWS_SFN_API TaskFailedEventDetails
32   {
33   public:
34     TaskFailedEventDetails();
35     TaskFailedEventDetails(Aws::Utils::Json::JsonView jsonValue);
36     TaskFailedEventDetails& operator=(Aws::Utils::Json::JsonView jsonValue);
37     Aws::Utils::Json::JsonValue Jsonize() const;
38 
39 
40     /**
41      * <p>The action of the resource called by a task state.</p>
42      */
GetResourceType()43     inline const Aws::String& GetResourceType() const{ return m_resourceType; }
44 
45     /**
46      * <p>The action of the resource called by a task state.</p>
47      */
ResourceTypeHasBeenSet()48     inline bool ResourceTypeHasBeenSet() const { return m_resourceTypeHasBeenSet; }
49 
50     /**
51      * <p>The action of the resource called by a task state.</p>
52      */
SetResourceType(const Aws::String & value)53     inline void SetResourceType(const Aws::String& value) { m_resourceTypeHasBeenSet = true; m_resourceType = value; }
54 
55     /**
56      * <p>The action of the resource called by a task state.</p>
57      */
SetResourceType(Aws::String && value)58     inline void SetResourceType(Aws::String&& value) { m_resourceTypeHasBeenSet = true; m_resourceType = std::move(value); }
59 
60     /**
61      * <p>The action of the resource called by a task state.</p>
62      */
SetResourceType(const char * value)63     inline void SetResourceType(const char* value) { m_resourceTypeHasBeenSet = true; m_resourceType.assign(value); }
64 
65     /**
66      * <p>The action of the resource called by a task state.</p>
67      */
WithResourceType(const Aws::String & value)68     inline TaskFailedEventDetails& WithResourceType(const Aws::String& value) { SetResourceType(value); return *this;}
69 
70     /**
71      * <p>The action of the resource called by a task state.</p>
72      */
WithResourceType(Aws::String && value)73     inline TaskFailedEventDetails& WithResourceType(Aws::String&& value) { SetResourceType(std::move(value)); return *this;}
74 
75     /**
76      * <p>The action of the resource called by a task state.</p>
77      */
WithResourceType(const char * value)78     inline TaskFailedEventDetails& WithResourceType(const char* value) { SetResourceType(value); return *this;}
79 
80 
81     /**
82      * <p>The service name of the resource in a task state.</p>
83      */
GetResource()84     inline const Aws::String& GetResource() const{ return m_resource; }
85 
86     /**
87      * <p>The service name of the resource in a task state.</p>
88      */
ResourceHasBeenSet()89     inline bool ResourceHasBeenSet() const { return m_resourceHasBeenSet; }
90 
91     /**
92      * <p>The service name of the resource in a task state.</p>
93      */
SetResource(const Aws::String & value)94     inline void SetResource(const Aws::String& value) { m_resourceHasBeenSet = true; m_resource = value; }
95 
96     /**
97      * <p>The service name of the resource in a task state.</p>
98      */
SetResource(Aws::String && value)99     inline void SetResource(Aws::String&& value) { m_resourceHasBeenSet = true; m_resource = std::move(value); }
100 
101     /**
102      * <p>The service name of the resource in a task state.</p>
103      */
SetResource(const char * value)104     inline void SetResource(const char* value) { m_resourceHasBeenSet = true; m_resource.assign(value); }
105 
106     /**
107      * <p>The service name of the resource in a task state.</p>
108      */
WithResource(const Aws::String & value)109     inline TaskFailedEventDetails& WithResource(const Aws::String& value) { SetResource(value); return *this;}
110 
111     /**
112      * <p>The service name of the resource in a task state.</p>
113      */
WithResource(Aws::String && value)114     inline TaskFailedEventDetails& WithResource(Aws::String&& value) { SetResource(std::move(value)); return *this;}
115 
116     /**
117      * <p>The service name of the resource in a task state.</p>
118      */
WithResource(const char * value)119     inline TaskFailedEventDetails& WithResource(const char* value) { SetResource(value); return *this;}
120 
121 
122     /**
123      * <p>The error code of the failure.</p>
124      */
GetError()125     inline const Aws::String& GetError() const{ return m_error; }
126 
127     /**
128      * <p>The error code of the failure.</p>
129      */
ErrorHasBeenSet()130     inline bool ErrorHasBeenSet() const { return m_errorHasBeenSet; }
131 
132     /**
133      * <p>The error code of the failure.</p>
134      */
SetError(const Aws::String & value)135     inline void SetError(const Aws::String& value) { m_errorHasBeenSet = true; m_error = value; }
136 
137     /**
138      * <p>The error code of the failure.</p>
139      */
SetError(Aws::String && value)140     inline void SetError(Aws::String&& value) { m_errorHasBeenSet = true; m_error = std::move(value); }
141 
142     /**
143      * <p>The error code of the failure.</p>
144      */
SetError(const char * value)145     inline void SetError(const char* value) { m_errorHasBeenSet = true; m_error.assign(value); }
146 
147     /**
148      * <p>The error code of the failure.</p>
149      */
WithError(const Aws::String & value)150     inline TaskFailedEventDetails& WithError(const Aws::String& value) { SetError(value); return *this;}
151 
152     /**
153      * <p>The error code of the failure.</p>
154      */
WithError(Aws::String && value)155     inline TaskFailedEventDetails& WithError(Aws::String&& value) { SetError(std::move(value)); return *this;}
156 
157     /**
158      * <p>The error code of the failure.</p>
159      */
WithError(const char * value)160     inline TaskFailedEventDetails& WithError(const char* value) { SetError(value); return *this;}
161 
162 
163     /**
164      * <p>A more detailed explanation of the cause of the failure.</p>
165      */
GetCause()166     inline const Aws::String& GetCause() const{ return m_cause; }
167 
168     /**
169      * <p>A more detailed explanation of the cause of the failure.</p>
170      */
CauseHasBeenSet()171     inline bool CauseHasBeenSet() const { return m_causeHasBeenSet; }
172 
173     /**
174      * <p>A more detailed explanation of the cause of the failure.</p>
175      */
SetCause(const Aws::String & value)176     inline void SetCause(const Aws::String& value) { m_causeHasBeenSet = true; m_cause = value; }
177 
178     /**
179      * <p>A more detailed explanation of the cause of the failure.</p>
180      */
SetCause(Aws::String && value)181     inline void SetCause(Aws::String&& value) { m_causeHasBeenSet = true; m_cause = std::move(value); }
182 
183     /**
184      * <p>A more detailed explanation of the cause of the failure.</p>
185      */
SetCause(const char * value)186     inline void SetCause(const char* value) { m_causeHasBeenSet = true; m_cause.assign(value); }
187 
188     /**
189      * <p>A more detailed explanation of the cause of the failure.</p>
190      */
WithCause(const Aws::String & value)191     inline TaskFailedEventDetails& WithCause(const Aws::String& value) { SetCause(value); return *this;}
192 
193     /**
194      * <p>A more detailed explanation of the cause of the failure.</p>
195      */
WithCause(Aws::String && value)196     inline TaskFailedEventDetails& WithCause(Aws::String&& value) { SetCause(std::move(value)); return *this;}
197 
198     /**
199      * <p>A more detailed explanation of the cause of the failure.</p>
200      */
WithCause(const char * value)201     inline TaskFailedEventDetails& WithCause(const char* value) { SetCause(value); return *this;}
202 
203   private:
204 
205     Aws::String m_resourceType;
206     bool m_resourceTypeHasBeenSet;
207 
208     Aws::String m_resource;
209     bool m_resourceHasBeenSet;
210 
211     Aws::String m_error;
212     bool m_errorHasBeenSet;
213 
214     Aws::String m_cause;
215     bool m_causeHasBeenSet;
216   };
217 
218 } // namespace Model
219 } // namespace SFN
220 } // namespace Aws
221