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/s3control/S3Control_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 Xml
16 {
17   class XmlNode;
18 } // namespace Xml
19 } // namespace Utils
20 namespace S3Control
21 {
22 namespace Model
23 {
24 
25   /**
26    * <p>If this job failed, this element indicates why the job failed.</p><p><h3>See
27    * Also:</h3>   <a
28    * href="http://docs.aws.amazon.com/goto/WebAPI/s3control-2018-08-20/JobFailure">AWS
29    * API Reference</a></p>
30    */
31   class AWS_S3CONTROL_API JobFailure
32   {
33   public:
34     JobFailure();
35     JobFailure(const Aws::Utils::Xml::XmlNode& xmlNode);
36     JobFailure& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
37 
38     void AddToNode(Aws::Utils::Xml::XmlNode& parentNode) const;
39 
40 
41     /**
42      * <p>The failure code, if any, for the specified job.</p>
43      */
GetFailureCode()44     inline const Aws::String& GetFailureCode() const{ return m_failureCode; }
45 
46     /**
47      * <p>The failure code, if any, for the specified job.</p>
48      */
FailureCodeHasBeenSet()49     inline bool FailureCodeHasBeenSet() const { return m_failureCodeHasBeenSet; }
50 
51     /**
52      * <p>The failure code, if any, for the specified job.</p>
53      */
SetFailureCode(const Aws::String & value)54     inline void SetFailureCode(const Aws::String& value) { m_failureCodeHasBeenSet = true; m_failureCode = value; }
55 
56     /**
57      * <p>The failure code, if any, for the specified job.</p>
58      */
SetFailureCode(Aws::String && value)59     inline void SetFailureCode(Aws::String&& value) { m_failureCodeHasBeenSet = true; m_failureCode = std::move(value); }
60 
61     /**
62      * <p>The failure code, if any, for the specified job.</p>
63      */
SetFailureCode(const char * value)64     inline void SetFailureCode(const char* value) { m_failureCodeHasBeenSet = true; m_failureCode.assign(value); }
65 
66     /**
67      * <p>The failure code, if any, for the specified job.</p>
68      */
WithFailureCode(const Aws::String & value)69     inline JobFailure& WithFailureCode(const Aws::String& value) { SetFailureCode(value); return *this;}
70 
71     /**
72      * <p>The failure code, if any, for the specified job.</p>
73      */
WithFailureCode(Aws::String && value)74     inline JobFailure& WithFailureCode(Aws::String&& value) { SetFailureCode(std::move(value)); return *this;}
75 
76     /**
77      * <p>The failure code, if any, for the specified job.</p>
78      */
WithFailureCode(const char * value)79     inline JobFailure& WithFailureCode(const char* value) { SetFailureCode(value); return *this;}
80 
81 
82     /**
83      * <p>The failure reason, if any, for the specified job.</p>
84      */
GetFailureReason()85     inline const Aws::String& GetFailureReason() const{ return m_failureReason; }
86 
87     /**
88      * <p>The failure reason, if any, for the specified job.</p>
89      */
FailureReasonHasBeenSet()90     inline bool FailureReasonHasBeenSet() const { return m_failureReasonHasBeenSet; }
91 
92     /**
93      * <p>The failure reason, if any, for the specified job.</p>
94      */
SetFailureReason(const Aws::String & value)95     inline void SetFailureReason(const Aws::String& value) { m_failureReasonHasBeenSet = true; m_failureReason = value; }
96 
97     /**
98      * <p>The failure reason, if any, for the specified job.</p>
99      */
SetFailureReason(Aws::String && value)100     inline void SetFailureReason(Aws::String&& value) { m_failureReasonHasBeenSet = true; m_failureReason = std::move(value); }
101 
102     /**
103      * <p>The failure reason, if any, for the specified job.</p>
104      */
SetFailureReason(const char * value)105     inline void SetFailureReason(const char* value) { m_failureReasonHasBeenSet = true; m_failureReason.assign(value); }
106 
107     /**
108      * <p>The failure reason, if any, for the specified job.</p>
109      */
WithFailureReason(const Aws::String & value)110     inline JobFailure& WithFailureReason(const Aws::String& value) { SetFailureReason(value); return *this;}
111 
112     /**
113      * <p>The failure reason, if any, for the specified job.</p>
114      */
WithFailureReason(Aws::String && value)115     inline JobFailure& WithFailureReason(Aws::String&& value) { SetFailureReason(std::move(value)); return *this;}
116 
117     /**
118      * <p>The failure reason, if any, for the specified job.</p>
119      */
WithFailureReason(const char * value)120     inline JobFailure& WithFailureReason(const char* value) { SetFailureReason(value); return *this;}
121 
122   private:
123 
124     Aws::String m_failureCode;
125     bool m_failureCodeHasBeenSet;
126 
127     Aws::String m_failureReason;
128     bool m_failureReasonHasBeenSet;
129   };
130 
131 } // namespace Model
132 } // namespace S3Control
133 } // namespace Aws
134