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/glacier/Glacier_EXPORTS.h>
8 #include <aws/core/utils/stream/ResponseStream.h>
9 #include <aws/core/utils/Array.h>
10 #include <aws/core/utils/memory/stl/AWSString.h>
11 #include <utility>
12 
13 namespace Aws
14 {
15 template<typename RESULT_TYPE>
16 class AmazonWebServiceResult;
17 
18 namespace Glacier
19 {
20 namespace Model
21 {
22   /**
23    * <p>Contains the Amazon S3 Glacier response to your request.</p><p><h3>See
24    * Also:</h3>   <a
25    * href="http://docs.aws.amazon.com/goto/WebAPI/glacier-2012-06-01/GetJobOutputOutput">AWS
26    * API Reference</a></p>
27    */
28   class AWS_GLACIER_API GetJobOutputResult
29   {
30   public:
31     GetJobOutputResult();
32     //We have to define these because Microsoft doesn't auto generate them
33     GetJobOutputResult(GetJobOutputResult&&);
34     GetJobOutputResult& operator=(GetJobOutputResult&&);
35     //we delete these because Microsoft doesn't handle move generation correctly
36     //and we therefore don't trust them to get it right here either.
37     GetJobOutputResult(const GetJobOutputResult&) = delete;
38     GetJobOutputResult& operator=(const GetJobOutputResult&) = delete;
39 
40 
41     GetJobOutputResult(Aws::AmazonWebServiceResult<Aws::Utils::Stream::ResponseStream>&& result);
42     GetJobOutputResult& operator=(Aws::AmazonWebServiceResult<Aws::Utils::Stream::ResponseStream>&& result);
43 
44 
45 
46     /**
47      * <p>The job data, either archive data or inventory data.</p>
48      */
GetBody()49     inline Aws::IOStream& GetBody() { return m_body.GetUnderlyingStream(); }
50 
51     /**
52      * <p>The job data, either archive data or inventory data.</p>
53      */
ReplaceBody(Aws::IOStream * body)54     inline void ReplaceBody(Aws::IOStream* body) { m_body = Aws::Utils::Stream::ResponseStream(body); }
55 
56 
57     /**
58      * <p>The checksum of the data in the response. This header is returned only when
59      * retrieving the output for an archive retrieval job. Furthermore, this header
60      * appears only under the following conditions:</p> <ul> <li> <p>You get the entire
61      * range of the archive.</p> </li> <li> <p>You request a range to return of the
62      * archive that starts and ends on a multiple of 1 MB. For example, if you have an
63      * 3.1 MB archive and you specify a range to return that starts at 1 MB and ends at
64      * 2 MB, then the x-amz-sha256-tree-hash is returned as a response header.</p>
65      * </li> <li> <p>You request a range of the archive to return that starts on a
66      * multiple of 1 MB and goes to the end of the archive. For example, if you have a
67      * 3.1 MB archive and you specify a range that starts at 2 MB and ends at 3.1 MB
68      * (the end of the archive), then the x-amz-sha256-tree-hash is returned as a
69      * response header.</p> </li> </ul>
70      */
GetChecksum()71     inline const Aws::String& GetChecksum() const{ return m_checksum; }
72 
73     /**
74      * <p>The checksum of the data in the response. This header is returned only when
75      * retrieving the output for an archive retrieval job. Furthermore, this header
76      * appears only under the following conditions:</p> <ul> <li> <p>You get the entire
77      * range of the archive.</p> </li> <li> <p>You request a range to return of the
78      * archive that starts and ends on a multiple of 1 MB. For example, if you have an
79      * 3.1 MB archive and you specify a range to return that starts at 1 MB and ends at
80      * 2 MB, then the x-amz-sha256-tree-hash is returned as a response header.</p>
81      * </li> <li> <p>You request a range of the archive to return that starts on a
82      * multiple of 1 MB and goes to the end of the archive. For example, if you have a
83      * 3.1 MB archive and you specify a range that starts at 2 MB and ends at 3.1 MB
84      * (the end of the archive), then the x-amz-sha256-tree-hash is returned as a
85      * response header.</p> </li> </ul>
86      */
SetChecksum(const Aws::String & value)87     inline void SetChecksum(const Aws::String& value) { m_checksum = value; }
88 
89     /**
90      * <p>The checksum of the data in the response. This header is returned only when
91      * retrieving the output for an archive retrieval job. Furthermore, this header
92      * appears only under the following conditions:</p> <ul> <li> <p>You get the entire
93      * range of the archive.</p> </li> <li> <p>You request a range to return of the
94      * archive that starts and ends on a multiple of 1 MB. For example, if you have an
95      * 3.1 MB archive and you specify a range to return that starts at 1 MB and ends at
96      * 2 MB, then the x-amz-sha256-tree-hash is returned as a response header.</p>
97      * </li> <li> <p>You request a range of the archive to return that starts on a
98      * multiple of 1 MB and goes to the end of the archive. For example, if you have a
99      * 3.1 MB archive and you specify a range that starts at 2 MB and ends at 3.1 MB
100      * (the end of the archive), then the x-amz-sha256-tree-hash is returned as a
101      * response header.</p> </li> </ul>
102      */
SetChecksum(Aws::String && value)103     inline void SetChecksum(Aws::String&& value) { m_checksum = std::move(value); }
104 
105     /**
106      * <p>The checksum of the data in the response. This header is returned only when
107      * retrieving the output for an archive retrieval job. Furthermore, this header
108      * appears only under the following conditions:</p> <ul> <li> <p>You get the entire
109      * range of the archive.</p> </li> <li> <p>You request a range to return of the
110      * archive that starts and ends on a multiple of 1 MB. For example, if you have an
111      * 3.1 MB archive and you specify a range to return that starts at 1 MB and ends at
112      * 2 MB, then the x-amz-sha256-tree-hash is returned as a response header.</p>
113      * </li> <li> <p>You request a range of the archive to return that starts on a
114      * multiple of 1 MB and goes to the end of the archive. For example, if you have a
115      * 3.1 MB archive and you specify a range that starts at 2 MB and ends at 3.1 MB
116      * (the end of the archive), then the x-amz-sha256-tree-hash is returned as a
117      * response header.</p> </li> </ul>
118      */
SetChecksum(const char * value)119     inline void SetChecksum(const char* value) { m_checksum.assign(value); }
120 
121     /**
122      * <p>The checksum of the data in the response. This header is returned only when
123      * retrieving the output for an archive retrieval job. Furthermore, this header
124      * appears only under the following conditions:</p> <ul> <li> <p>You get the entire
125      * range of the archive.</p> </li> <li> <p>You request a range to return of the
126      * archive that starts and ends on a multiple of 1 MB. For example, if you have an
127      * 3.1 MB archive and you specify a range to return that starts at 1 MB and ends at
128      * 2 MB, then the x-amz-sha256-tree-hash is returned as a response header.</p>
129      * </li> <li> <p>You request a range of the archive to return that starts on a
130      * multiple of 1 MB and goes to the end of the archive. For example, if you have a
131      * 3.1 MB archive and you specify a range that starts at 2 MB and ends at 3.1 MB
132      * (the end of the archive), then the x-amz-sha256-tree-hash is returned as a
133      * response header.</p> </li> </ul>
134      */
WithChecksum(const Aws::String & value)135     inline GetJobOutputResult& WithChecksum(const Aws::String& value) { SetChecksum(value); return *this;}
136 
137     /**
138      * <p>The checksum of the data in the response. This header is returned only when
139      * retrieving the output for an archive retrieval job. Furthermore, this header
140      * appears only under the following conditions:</p> <ul> <li> <p>You get the entire
141      * range of the archive.</p> </li> <li> <p>You request a range to return of the
142      * archive that starts and ends on a multiple of 1 MB. For example, if you have an
143      * 3.1 MB archive and you specify a range to return that starts at 1 MB and ends at
144      * 2 MB, then the x-amz-sha256-tree-hash is returned as a response header.</p>
145      * </li> <li> <p>You request a range of the archive to return that starts on a
146      * multiple of 1 MB and goes to the end of the archive. For example, if you have a
147      * 3.1 MB archive and you specify a range that starts at 2 MB and ends at 3.1 MB
148      * (the end of the archive), then the x-amz-sha256-tree-hash is returned as a
149      * response header.</p> </li> </ul>
150      */
WithChecksum(Aws::String && value)151     inline GetJobOutputResult& WithChecksum(Aws::String&& value) { SetChecksum(std::move(value)); return *this;}
152 
153     /**
154      * <p>The checksum of the data in the response. This header is returned only when
155      * retrieving the output for an archive retrieval job. Furthermore, this header
156      * appears only under the following conditions:</p> <ul> <li> <p>You get the entire
157      * range of the archive.</p> </li> <li> <p>You request a range to return of the
158      * archive that starts and ends on a multiple of 1 MB. For example, if you have an
159      * 3.1 MB archive and you specify a range to return that starts at 1 MB and ends at
160      * 2 MB, then the x-amz-sha256-tree-hash is returned as a response header.</p>
161      * </li> <li> <p>You request a range of the archive to return that starts on a
162      * multiple of 1 MB and goes to the end of the archive. For example, if you have a
163      * 3.1 MB archive and you specify a range that starts at 2 MB and ends at 3.1 MB
164      * (the end of the archive), then the x-amz-sha256-tree-hash is returned as a
165      * response header.</p> </li> </ul>
166      */
WithChecksum(const char * value)167     inline GetJobOutputResult& WithChecksum(const char* value) { SetChecksum(value); return *this;}
168 
169 
170     /**
171      * <p>The HTTP response code for a job output request. The value depends on whether
172      * a range was specified in the request.</p>
173      */
GetStatus()174     inline int GetStatus() const{ return m_status; }
175 
176     /**
177      * <p>The HTTP response code for a job output request. The value depends on whether
178      * a range was specified in the request.</p>
179      */
SetStatus(int value)180     inline void SetStatus(int value) { m_status = value; }
181 
182     /**
183      * <p>The HTTP response code for a job output request. The value depends on whether
184      * a range was specified in the request.</p>
185      */
WithStatus(int value)186     inline GetJobOutputResult& WithStatus(int value) { SetStatus(value); return *this;}
187 
188 
189     /**
190      * <p>The range of bytes returned by Amazon S3 Glacier. If only partial output is
191      * downloaded, the response provides the range of bytes Amazon S3 Glacier returned.
192      * For example, bytes 0-1048575/8388608 returns the first 1 MB from 8 MB.</p>
193      */
GetContentRange()194     inline const Aws::String& GetContentRange() const{ return m_contentRange; }
195 
196     /**
197      * <p>The range of bytes returned by Amazon S3 Glacier. If only partial output is
198      * downloaded, the response provides the range of bytes Amazon S3 Glacier returned.
199      * For example, bytes 0-1048575/8388608 returns the first 1 MB from 8 MB.</p>
200      */
SetContentRange(const Aws::String & value)201     inline void SetContentRange(const Aws::String& value) { m_contentRange = value; }
202 
203     /**
204      * <p>The range of bytes returned by Amazon S3 Glacier. If only partial output is
205      * downloaded, the response provides the range of bytes Amazon S3 Glacier returned.
206      * For example, bytes 0-1048575/8388608 returns the first 1 MB from 8 MB.</p>
207      */
SetContentRange(Aws::String && value)208     inline void SetContentRange(Aws::String&& value) { m_contentRange = std::move(value); }
209 
210     /**
211      * <p>The range of bytes returned by Amazon S3 Glacier. If only partial output is
212      * downloaded, the response provides the range of bytes Amazon S3 Glacier returned.
213      * For example, bytes 0-1048575/8388608 returns the first 1 MB from 8 MB.</p>
214      */
SetContentRange(const char * value)215     inline void SetContentRange(const char* value) { m_contentRange.assign(value); }
216 
217     /**
218      * <p>The range of bytes returned by Amazon S3 Glacier. If only partial output is
219      * downloaded, the response provides the range of bytes Amazon S3 Glacier returned.
220      * For example, bytes 0-1048575/8388608 returns the first 1 MB from 8 MB.</p>
221      */
WithContentRange(const Aws::String & value)222     inline GetJobOutputResult& WithContentRange(const Aws::String& value) { SetContentRange(value); return *this;}
223 
224     /**
225      * <p>The range of bytes returned by Amazon S3 Glacier. If only partial output is
226      * downloaded, the response provides the range of bytes Amazon S3 Glacier returned.
227      * For example, bytes 0-1048575/8388608 returns the first 1 MB from 8 MB.</p>
228      */
WithContentRange(Aws::String && value)229     inline GetJobOutputResult& WithContentRange(Aws::String&& value) { SetContentRange(std::move(value)); return *this;}
230 
231     /**
232      * <p>The range of bytes returned by Amazon S3 Glacier. If only partial output is
233      * downloaded, the response provides the range of bytes Amazon S3 Glacier returned.
234      * For example, bytes 0-1048575/8388608 returns the first 1 MB from 8 MB.</p>
235      */
WithContentRange(const char * value)236     inline GetJobOutputResult& WithContentRange(const char* value) { SetContentRange(value); return *this;}
237 
238 
239     /**
240      * <p>Indicates the range units accepted. For more information, see <a
241      * href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html">RFC2616</a>. </p>
242      */
GetAcceptRanges()243     inline const Aws::String& GetAcceptRanges() const{ return m_acceptRanges; }
244 
245     /**
246      * <p>Indicates the range units accepted. For more information, see <a
247      * href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html">RFC2616</a>. </p>
248      */
SetAcceptRanges(const Aws::String & value)249     inline void SetAcceptRanges(const Aws::String& value) { m_acceptRanges = value; }
250 
251     /**
252      * <p>Indicates the range units accepted. For more information, see <a
253      * href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html">RFC2616</a>. </p>
254      */
SetAcceptRanges(Aws::String && value)255     inline void SetAcceptRanges(Aws::String&& value) { m_acceptRanges = std::move(value); }
256 
257     /**
258      * <p>Indicates the range units accepted. For more information, see <a
259      * href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html">RFC2616</a>. </p>
260      */
SetAcceptRanges(const char * value)261     inline void SetAcceptRanges(const char* value) { m_acceptRanges.assign(value); }
262 
263     /**
264      * <p>Indicates the range units accepted. For more information, see <a
265      * href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html">RFC2616</a>. </p>
266      */
WithAcceptRanges(const Aws::String & value)267     inline GetJobOutputResult& WithAcceptRanges(const Aws::String& value) { SetAcceptRanges(value); return *this;}
268 
269     /**
270      * <p>Indicates the range units accepted. For more information, see <a
271      * href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html">RFC2616</a>. </p>
272      */
WithAcceptRanges(Aws::String && value)273     inline GetJobOutputResult& WithAcceptRanges(Aws::String&& value) { SetAcceptRanges(std::move(value)); return *this;}
274 
275     /**
276      * <p>Indicates the range units accepted. For more information, see <a
277      * href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html">RFC2616</a>. </p>
278      */
WithAcceptRanges(const char * value)279     inline GetJobOutputResult& WithAcceptRanges(const char* value) { SetAcceptRanges(value); return *this;}
280 
281 
282     /**
283      * <p>The Content-Type depends on whether the job output is an archive or a vault
284      * inventory. For archive data, the Content-Type is application/octet-stream. For
285      * vault inventory, if you requested CSV format when you initiated the job, the
286      * Content-Type is text/csv. Otherwise, by default, vault inventory is returned as
287      * JSON, and the Content-Type is application/json.</p>
288      */
GetContentType()289     inline const Aws::String& GetContentType() const{ return m_contentType; }
290 
291     /**
292      * <p>The Content-Type depends on whether the job output is an archive or a vault
293      * inventory. For archive data, the Content-Type is application/octet-stream. For
294      * vault inventory, if you requested CSV format when you initiated the job, the
295      * Content-Type is text/csv. Otherwise, by default, vault inventory is returned as
296      * JSON, and the Content-Type is application/json.</p>
297      */
SetContentType(const Aws::String & value)298     inline void SetContentType(const Aws::String& value) { m_contentType = value; }
299 
300     /**
301      * <p>The Content-Type depends on whether the job output is an archive or a vault
302      * inventory. For archive data, the Content-Type is application/octet-stream. For
303      * vault inventory, if you requested CSV format when you initiated the job, the
304      * Content-Type is text/csv. Otherwise, by default, vault inventory is returned as
305      * JSON, and the Content-Type is application/json.</p>
306      */
SetContentType(Aws::String && value)307     inline void SetContentType(Aws::String&& value) { m_contentType = std::move(value); }
308 
309     /**
310      * <p>The Content-Type depends on whether the job output is an archive or a vault
311      * inventory. For archive data, the Content-Type is application/octet-stream. For
312      * vault inventory, if you requested CSV format when you initiated the job, the
313      * Content-Type is text/csv. Otherwise, by default, vault inventory is returned as
314      * JSON, and the Content-Type is application/json.</p>
315      */
SetContentType(const char * value)316     inline void SetContentType(const char* value) { m_contentType.assign(value); }
317 
318     /**
319      * <p>The Content-Type depends on whether the job output is an archive or a vault
320      * inventory. For archive data, the Content-Type is application/octet-stream. For
321      * vault inventory, if you requested CSV format when you initiated the job, the
322      * Content-Type is text/csv. Otherwise, by default, vault inventory is returned as
323      * JSON, and the Content-Type is application/json.</p>
324      */
WithContentType(const Aws::String & value)325     inline GetJobOutputResult& WithContentType(const Aws::String& value) { SetContentType(value); return *this;}
326 
327     /**
328      * <p>The Content-Type depends on whether the job output is an archive or a vault
329      * inventory. For archive data, the Content-Type is application/octet-stream. For
330      * vault inventory, if you requested CSV format when you initiated the job, the
331      * Content-Type is text/csv. Otherwise, by default, vault inventory is returned as
332      * JSON, and the Content-Type is application/json.</p>
333      */
WithContentType(Aws::String && value)334     inline GetJobOutputResult& WithContentType(Aws::String&& value) { SetContentType(std::move(value)); return *this;}
335 
336     /**
337      * <p>The Content-Type depends on whether the job output is an archive or a vault
338      * inventory. For archive data, the Content-Type is application/octet-stream. For
339      * vault inventory, if you requested CSV format when you initiated the job, the
340      * Content-Type is text/csv. Otherwise, by default, vault inventory is returned as
341      * JSON, and the Content-Type is application/json.</p>
342      */
WithContentType(const char * value)343     inline GetJobOutputResult& WithContentType(const char* value) { SetContentType(value); return *this;}
344 
345 
346     /**
347      * <p>The description of an archive.</p>
348      */
GetArchiveDescription()349     inline const Aws::String& GetArchiveDescription() const{ return m_archiveDescription; }
350 
351     /**
352      * <p>The description of an archive.</p>
353      */
SetArchiveDescription(const Aws::String & value)354     inline void SetArchiveDescription(const Aws::String& value) { m_archiveDescription = value; }
355 
356     /**
357      * <p>The description of an archive.</p>
358      */
SetArchiveDescription(Aws::String && value)359     inline void SetArchiveDescription(Aws::String&& value) { m_archiveDescription = std::move(value); }
360 
361     /**
362      * <p>The description of an archive.</p>
363      */
SetArchiveDescription(const char * value)364     inline void SetArchiveDescription(const char* value) { m_archiveDescription.assign(value); }
365 
366     /**
367      * <p>The description of an archive.</p>
368      */
WithArchiveDescription(const Aws::String & value)369     inline GetJobOutputResult& WithArchiveDescription(const Aws::String& value) { SetArchiveDescription(value); return *this;}
370 
371     /**
372      * <p>The description of an archive.</p>
373      */
WithArchiveDescription(Aws::String && value)374     inline GetJobOutputResult& WithArchiveDescription(Aws::String&& value) { SetArchiveDescription(std::move(value)); return *this;}
375 
376     /**
377      * <p>The description of an archive.</p>
378      */
WithArchiveDescription(const char * value)379     inline GetJobOutputResult& WithArchiveDescription(const char* value) { SetArchiveDescription(value); return *this;}
380 
381   private:
382 
383   Aws::Utils::Stream::ResponseStream m_body;
384 
385     Aws::String m_checksum;
386 
387     int m_status;
388 
389     Aws::String m_contentRange;
390 
391     Aws::String m_acceptRanges;
392 
393     Aws::String m_contentType;
394 
395     Aws::String m_archiveDescription;
396   };
397 
398 } // namespace Model
399 } // namespace Glacier
400 } // namespace Aws
401