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/kendra/Kendra_EXPORTS.h>
8 #include <aws/core/utils/memory/stl/AWSString.h>
9 #include <aws/kendra/model/DocumentStatus.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 kendra
23 {
24 namespace Model
25 {
26 
27   /**
28    * <p>Provides information about the status of documents submitted for
29    * indexing.</p><p><h3>See Also:</h3>   <a
30    * href="http://docs.aws.amazon.com/goto/WebAPI/kendra-2019-02-03/Status">AWS API
31    * Reference</a></p>
32    */
33   class AWS_KENDRA_API Status
34   {
35   public:
36     Status();
37     Status(Aws::Utils::Json::JsonView jsonValue);
38     Status& operator=(Aws::Utils::Json::JsonView jsonValue);
39     Aws::Utils::Json::JsonValue Jsonize() const;
40 
41 
42     /**
43      * <p>The unique identifier of the document.</p>
44      */
GetDocumentId()45     inline const Aws::String& GetDocumentId() const{ return m_documentId; }
46 
47     /**
48      * <p>The unique identifier of the document.</p>
49      */
DocumentIdHasBeenSet()50     inline bool DocumentIdHasBeenSet() const { return m_documentIdHasBeenSet; }
51 
52     /**
53      * <p>The unique identifier of the document.</p>
54      */
SetDocumentId(const Aws::String & value)55     inline void SetDocumentId(const Aws::String& value) { m_documentIdHasBeenSet = true; m_documentId = value; }
56 
57     /**
58      * <p>The unique identifier of the document.</p>
59      */
SetDocumentId(Aws::String && value)60     inline void SetDocumentId(Aws::String&& value) { m_documentIdHasBeenSet = true; m_documentId = std::move(value); }
61 
62     /**
63      * <p>The unique identifier of the document.</p>
64      */
SetDocumentId(const char * value)65     inline void SetDocumentId(const char* value) { m_documentIdHasBeenSet = true; m_documentId.assign(value); }
66 
67     /**
68      * <p>The unique identifier of the document.</p>
69      */
WithDocumentId(const Aws::String & value)70     inline Status& WithDocumentId(const Aws::String& value) { SetDocumentId(value); return *this;}
71 
72     /**
73      * <p>The unique identifier of the document.</p>
74      */
WithDocumentId(Aws::String && value)75     inline Status& WithDocumentId(Aws::String&& value) { SetDocumentId(std::move(value)); return *this;}
76 
77     /**
78      * <p>The unique identifier of the document.</p>
79      */
WithDocumentId(const char * value)80     inline Status& WithDocumentId(const char* value) { SetDocumentId(value); return *this;}
81 
82 
83     /**
84      * <p>The current status of a document.</p> <p>If the document was submitted for
85      * deletion, the status is <code>NOT_FOUND</code> after the document is
86      * deleted.</p>
87      */
GetDocumentStatus()88     inline const DocumentStatus& GetDocumentStatus() const{ return m_documentStatus; }
89 
90     /**
91      * <p>The current status of a document.</p> <p>If the document was submitted for
92      * deletion, the status is <code>NOT_FOUND</code> after the document is
93      * deleted.</p>
94      */
DocumentStatusHasBeenSet()95     inline bool DocumentStatusHasBeenSet() const { return m_documentStatusHasBeenSet; }
96 
97     /**
98      * <p>The current status of a document.</p> <p>If the document was submitted for
99      * deletion, the status is <code>NOT_FOUND</code> after the document is
100      * deleted.</p>
101      */
SetDocumentStatus(const DocumentStatus & value)102     inline void SetDocumentStatus(const DocumentStatus& value) { m_documentStatusHasBeenSet = true; m_documentStatus = value; }
103 
104     /**
105      * <p>The current status of a document.</p> <p>If the document was submitted for
106      * deletion, the status is <code>NOT_FOUND</code> after the document is
107      * deleted.</p>
108      */
SetDocumentStatus(DocumentStatus && value)109     inline void SetDocumentStatus(DocumentStatus&& value) { m_documentStatusHasBeenSet = true; m_documentStatus = std::move(value); }
110 
111     /**
112      * <p>The current status of a document.</p> <p>If the document was submitted for
113      * deletion, the status is <code>NOT_FOUND</code> after the document is
114      * deleted.</p>
115      */
WithDocumentStatus(const DocumentStatus & value)116     inline Status& WithDocumentStatus(const DocumentStatus& value) { SetDocumentStatus(value); return *this;}
117 
118     /**
119      * <p>The current status of a document.</p> <p>If the document was submitted for
120      * deletion, the status is <code>NOT_FOUND</code> after the document is
121      * deleted.</p>
122      */
WithDocumentStatus(DocumentStatus && value)123     inline Status& WithDocumentStatus(DocumentStatus&& value) { SetDocumentStatus(std::move(value)); return *this;}
124 
125 
126     /**
127      * <p>Indicates the source of the error.</p>
128      */
GetFailureCode()129     inline const Aws::String& GetFailureCode() const{ return m_failureCode; }
130 
131     /**
132      * <p>Indicates the source of the error.</p>
133      */
FailureCodeHasBeenSet()134     inline bool FailureCodeHasBeenSet() const { return m_failureCodeHasBeenSet; }
135 
136     /**
137      * <p>Indicates the source of the error.</p>
138      */
SetFailureCode(const Aws::String & value)139     inline void SetFailureCode(const Aws::String& value) { m_failureCodeHasBeenSet = true; m_failureCode = value; }
140 
141     /**
142      * <p>Indicates the source of the error.</p>
143      */
SetFailureCode(Aws::String && value)144     inline void SetFailureCode(Aws::String&& value) { m_failureCodeHasBeenSet = true; m_failureCode = std::move(value); }
145 
146     /**
147      * <p>Indicates the source of the error.</p>
148      */
SetFailureCode(const char * value)149     inline void SetFailureCode(const char* value) { m_failureCodeHasBeenSet = true; m_failureCode.assign(value); }
150 
151     /**
152      * <p>Indicates the source of the error.</p>
153      */
WithFailureCode(const Aws::String & value)154     inline Status& WithFailureCode(const Aws::String& value) { SetFailureCode(value); return *this;}
155 
156     /**
157      * <p>Indicates the source of the error.</p>
158      */
WithFailureCode(Aws::String && value)159     inline Status& WithFailureCode(Aws::String&& value) { SetFailureCode(std::move(value)); return *this;}
160 
161     /**
162      * <p>Indicates the source of the error.</p>
163      */
WithFailureCode(const char * value)164     inline Status& WithFailureCode(const char* value) { SetFailureCode(value); return *this;}
165 
166 
167     /**
168      * <p>Provides detailed information about why the document couldn't be indexed. Use
169      * this information to correct the error before you resubmit the document for
170      * indexing.</p>
171      */
GetFailureReason()172     inline const Aws::String& GetFailureReason() const{ return m_failureReason; }
173 
174     /**
175      * <p>Provides detailed information about why the document couldn't be indexed. Use
176      * this information to correct the error before you resubmit the document for
177      * indexing.</p>
178      */
FailureReasonHasBeenSet()179     inline bool FailureReasonHasBeenSet() const { return m_failureReasonHasBeenSet; }
180 
181     /**
182      * <p>Provides detailed information about why the document couldn't be indexed. Use
183      * this information to correct the error before you resubmit the document for
184      * indexing.</p>
185      */
SetFailureReason(const Aws::String & value)186     inline void SetFailureReason(const Aws::String& value) { m_failureReasonHasBeenSet = true; m_failureReason = value; }
187 
188     /**
189      * <p>Provides detailed information about why the document couldn't be indexed. Use
190      * this information to correct the error before you resubmit the document for
191      * indexing.</p>
192      */
SetFailureReason(Aws::String && value)193     inline void SetFailureReason(Aws::String&& value) { m_failureReasonHasBeenSet = true; m_failureReason = std::move(value); }
194 
195     /**
196      * <p>Provides detailed information about why the document couldn't be indexed. Use
197      * this information to correct the error before you resubmit the document for
198      * indexing.</p>
199      */
SetFailureReason(const char * value)200     inline void SetFailureReason(const char* value) { m_failureReasonHasBeenSet = true; m_failureReason.assign(value); }
201 
202     /**
203      * <p>Provides detailed information about why the document couldn't be indexed. Use
204      * this information to correct the error before you resubmit the document for
205      * indexing.</p>
206      */
WithFailureReason(const Aws::String & value)207     inline Status& WithFailureReason(const Aws::String& value) { SetFailureReason(value); return *this;}
208 
209     /**
210      * <p>Provides detailed information about why the document couldn't be indexed. Use
211      * this information to correct the error before you resubmit the document for
212      * indexing.</p>
213      */
WithFailureReason(Aws::String && value)214     inline Status& WithFailureReason(Aws::String&& value) { SetFailureReason(std::move(value)); return *this;}
215 
216     /**
217      * <p>Provides detailed information about why the document couldn't be indexed. Use
218      * this information to correct the error before you resubmit the document for
219      * indexing.</p>
220      */
WithFailureReason(const char * value)221     inline Status& WithFailureReason(const char* value) { SetFailureReason(value); return *this;}
222 
223   private:
224 
225     Aws::String m_documentId;
226     bool m_documentIdHasBeenSet;
227 
228     DocumentStatus m_documentStatus;
229     bool m_documentStatusHasBeenSet;
230 
231     Aws::String m_failureCode;
232     bool m_failureCodeHasBeenSet;
233 
234     Aws::String m_failureReason;
235     bool m_failureReasonHasBeenSet;
236   };
237 
238 } // namespace Model
239 } // namespace kendra
240 } // namespace Aws
241