1 /*
2  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  * 
4  * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
5  * the License. A copy of the License is located at
6  * 
7  * http://aws.amazon.com/apache2.0
8  * 
9  * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
10  * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
11  * and limitations under the License.
12  */

13
14 package software.amazon.awssdk.services.s3.model;
15
16 import java.time.Instant;
17 import java.util.Arrays;
18 import java.util.Collections;
19 import java.util.List;
20 import java.util.Objects;
21 import java.util.Optional;
22 import java.util.function.BiConsumer;
23 import java.util.function.Consumer;
24 import java.util.function.Function;
25 import software.amazon.awssdk.annotations.Generated;
26 import software.amazon.awssdk.awscore.AwsRequestOverrideConfiguration;
27 import software.amazon.awssdk.core.SdkField;
28 import software.amazon.awssdk.core.SdkPojo;
29 import software.amazon.awssdk.core.protocol.MarshallLocation;
30 import software.amazon.awssdk.core.protocol.MarshallingType;
31 import software.amazon.awssdk.core.traits.LocationTrait;
32 import software.amazon.awssdk.utils.ToString;
33 import software.amazon.awssdk.utils.builder.CopyableBuilder;
34 import software.amazon.awssdk.utils.builder.ToCopyableBuilder;
35
36 /**
37  */

38 @Generated("software.amazon.awssdk:codegen")
39 public final class GetObjectRequest extends S3Request implements ToCopyableBuilder<GetObjectRequest.Builder, GetObjectRequest> {
40     private static final SdkField<String> BUCKET_FIELD = SdkField
41             .<String> builder(MarshallingType.STRING)
42             .getter(getter(GetObjectRequest::bucket))
43             .setter(setter(Builder::bucket))
44             .traits(LocationTrait.builder().location(MarshallLocation.PATH).locationName("Bucket")
45                     .unmarshallLocationName("Bucket").build()).build();
46
47     private static final SdkField<String> IF_MATCH_FIELD = SdkField
48             .<String> builder(MarshallingType.STRING)
49             .getter(getter(GetObjectRequest::ifMatch))
50             .setter(setter(Builder::ifMatch))
51             .traits(LocationTrait.builder().location(MarshallLocation.HEADER).locationName("If-Match")
52                     .unmarshallLocationName("If-Match").build()).build();
53
54     private static final SdkField<Instant> IF_MODIFIED_SINCE_FIELD = SdkField
55             .<Instant> builder(MarshallingType.INSTANT)
56             .getter(getter(GetObjectRequest::ifModifiedSince))
57             .setter(setter(Builder::ifModifiedSince))
58             .traits(LocationTrait.builder().location(MarshallLocation.HEADER).locationName("If-Modified-Since")
59                     .unmarshallLocationName("If-Modified-Since").build()).build();
60
61     private static final SdkField<String> IF_NONE_MATCH_FIELD = SdkField
62             .<String> builder(MarshallingType.STRING)
63             .getter(getter(GetObjectRequest::ifNoneMatch))
64             .setter(setter(Builder::ifNoneMatch))
65             .traits(LocationTrait.builder().location(MarshallLocation.HEADER).locationName("If-None-Match")
66                     .unmarshallLocationName("If-None-Match").build()).build();
67
68     private static final SdkField<Instant> IF_UNMODIFIED_SINCE_FIELD = SdkField
69             .<Instant> builder(MarshallingType.INSTANT)
70             .getter(getter(GetObjectRequest::ifUnmodifiedSince))
71             .setter(setter(Builder::ifUnmodifiedSince))
72             .traits(LocationTrait.builder().location(MarshallLocation.HEADER).locationName("If-Unmodified-Since")
73                     .unmarshallLocationName("If-Unmodified-Since").build()).build();
74
75     private static final SdkField<String> KEY_FIELD = SdkField
76             .<String> builder(MarshallingType.STRING)
77             .getter(getter(GetObjectRequest::key))
78             .setter(setter(Builder::key))
79             .traits(LocationTrait.builder().location(MarshallLocation.GREEDY_PATH).locationName("Key")
80                     .unmarshallLocationName("Key").build()).build();
81
82     private static final SdkField<String> RANGE_FIELD = SdkField
83             .<String> builder(MarshallingType.STRING)
84             .getter(getter(GetObjectRequest::range))
85             .setter(setter(Builder::range))
86             .traits(LocationTrait.builder().location(MarshallLocation.HEADER).locationName("Range")
87                     .unmarshallLocationName("Range").build()).build();
88
89     private static final SdkField<String> RESPONSE_CACHE_CONTROL_FIELD = SdkField
90             .<String> builder(MarshallingType.STRING)
91             .getter(getter(GetObjectRequest::responseCacheControl))
92             .setter(setter(Builder::responseCacheControl))
93             .traits(LocationTrait.builder().location(MarshallLocation.QUERY_PARAM).locationName("response-cache-control")
94                     .unmarshallLocationName("response-cache-control").build()).build();
95
96     private static final SdkField<String> RESPONSE_CONTENT_DISPOSITION_FIELD = SdkField
97             .<String> builder(MarshallingType.STRING)
98             .getter(getter(GetObjectRequest::responseContentDisposition))
99             .setter(setter(Builder::responseContentDisposition))
100             .traits(LocationTrait.builder().location(MarshallLocation.QUERY_PARAM).locationName("response-content-disposition")
101                     .unmarshallLocationName("response-content-disposition").build()).build();
102
103     private static final SdkField<String> RESPONSE_CONTENT_ENCODING_FIELD = SdkField
104             .<String> builder(MarshallingType.STRING)
105             .getter(getter(GetObjectRequest::responseContentEncoding))
106             .setter(setter(Builder::responseContentEncoding))
107             .traits(LocationTrait.builder().location(MarshallLocation.QUERY_PARAM).locationName("response-content-encoding")
108                     .unmarshallLocationName("response-content-encoding").build()).build();
109
110     private static final SdkField<String> RESPONSE_CONTENT_LANGUAGE_FIELD = SdkField
111             .<String> builder(MarshallingType.STRING)
112             .getter(getter(GetObjectRequest::responseContentLanguage))
113             .setter(setter(Builder::responseContentLanguage))
114             .traits(LocationTrait.builder().location(MarshallLocation.QUERY_PARAM).locationName("response-content-language")
115                     .unmarshallLocationName("response-content-language").build()).build();
116
117     private static final SdkField<String> RESPONSE_CONTENT_TYPE_FIELD = SdkField
118             .<String> builder(MarshallingType.STRING)
119             .getter(getter(GetObjectRequest::responseContentType))
120             .setter(setter(Builder::responseContentType))
121             .traits(LocationTrait.builder().location(MarshallLocation.QUERY_PARAM).locationName("response-content-type")
122                     .unmarshallLocationName("response-content-type").build()).build();
123
124     private static final SdkField<Instant> RESPONSE_EXPIRES_FIELD = SdkField
125             .<Instant> builder(MarshallingType.INSTANT)
126             .getter(getter(GetObjectRequest::responseExpires))
127             .setter(setter(Builder::responseExpires))
128             .traits(LocationTrait.builder().location(MarshallLocation.QUERY_PARAM).locationName("response-expires")
129                     .unmarshallLocationName("response-expires").build()).build();
130
131     private static final SdkField<String> VERSION_ID_FIELD = SdkField
132             .<String> builder(MarshallingType.STRING)
133             .getter(getter(GetObjectRequest::versionId))
134             .setter(setter(Builder::versionId))
135             .traits(LocationTrait.builder().location(MarshallLocation.QUERY_PARAM).locationName("versionId")
136                     .unmarshallLocationName("versionId").build()).build();
137
138     private static final SdkField<String> SSE_CUSTOMER_ALGORITHM_FIELD = SdkField
139             .<String> builder(MarshallingType.STRING)
140             .getter(getter(GetObjectRequest::sseCustomerAlgorithm))
141             .setter(setter(Builder::sseCustomerAlgorithm))
142             .traits(LocationTrait.builder().location(MarshallLocation.HEADER)
143                     .locationName("x-amz-server-side-encryption-customer-algorithm")
144                     .unmarshallLocationName("x-amz-server-side-encryption-customer-algorithm").build()).build();
145
146     private static final SdkField<String> SSE_CUSTOMER_KEY_FIELD = SdkField
147             .<String> builder(MarshallingType.STRING)
148             .getter(getter(GetObjectRequest::sseCustomerKey))
149             .setter(setter(Builder::sseCustomerKey))
150             .traits(LocationTrait.builder().location(MarshallLocation.HEADER)
151                     .locationName("x-amz-server-side-encryption-customer-key")
152                     .unmarshallLocationName("x-amz-server-side-encryption-customer-key").build()).build();
153
154     private static final SdkField<String> SSE_CUSTOMER_KEY_MD5_FIELD = SdkField
155             .<String> builder(MarshallingType.STRING)
156             .getter(getter(GetObjectRequest::sseCustomerKeyMD5))
157             .setter(setter(Builder::sseCustomerKeyMD5))
158             .traits(LocationTrait.builder().location(MarshallLocation.HEADER)
159                     .locationName("x-amz-server-side-encryption-customer-key-MD5")
160                     .unmarshallLocationName("x-amz-server-side-encryption-customer-key-MD5").build()).build();
161
162     private static final SdkField<String> REQUEST_PAYER_FIELD = SdkField
163             .<String> builder(MarshallingType.STRING)
164             .getter(getter(GetObjectRequest::requestPayerAsString))
165             .setter(setter(Builder::requestPayer))
166             .traits(LocationTrait.builder().location(MarshallLocation.HEADER).locationName("x-amz-request-payer")
167                     .unmarshallLocationName("x-amz-request-payer").build()).build();
168
169     private static final SdkField<Integer> PART_NUMBER_FIELD = SdkField
170             .<Integer> builder(MarshallingType.INTEGER)
171             .getter(getter(GetObjectRequest::partNumber))
172             .setter(setter(Builder::partNumber))
173             .traits(LocationTrait.builder().location(MarshallLocation.QUERY_PARAM).locationName("partNumber")
174                     .unmarshallLocationName("partNumber").build()).build();
175
176     private static final List<SdkField<?>> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(BUCKET_FIELD, IF_MATCH_FIELD,
177             IF_MODIFIED_SINCE_FIELD, IF_NONE_MATCH_FIELD, IF_UNMODIFIED_SINCE_FIELD, KEY_FIELD, RANGE_FIELD,
178             RESPONSE_CACHE_CONTROL_FIELD, RESPONSE_CONTENT_DISPOSITION_FIELD, RESPONSE_CONTENT_ENCODING_FIELD,
179             RESPONSE_CONTENT_LANGUAGE_FIELD, RESPONSE_CONTENT_TYPE_FIELD, RESPONSE_EXPIRES_FIELD, VERSION_ID_FIELD,
180             SSE_CUSTOMER_ALGORITHM_FIELD, SSE_CUSTOMER_KEY_FIELD, SSE_CUSTOMER_KEY_MD5_FIELD, REQUEST_PAYER_FIELD,
181             PART_NUMBER_FIELD));
182
183     private final String bucket;
184
185     private final String ifMatch;
186
187     private final Instant ifModifiedSince;
188
189     private final String ifNoneMatch;
190
191     private final Instant ifUnmodifiedSince;
192
193     private final String key;
194
195     private final String range;
196
197     private final String responseCacheControl;
198
199     private final String responseContentDisposition;
200
201     private final String responseContentEncoding;
202
203     private final String responseContentLanguage;
204
205     private final String responseContentType;
206
207     private final Instant responseExpires;
208
209     private final String versionId;
210
211     private final String sseCustomerAlgorithm;
212
213     private final String sseCustomerKey;
214
215     private final String sseCustomerKeyMD5;
216
217     private final String requestPayer;
218
219     private final Integer partNumber;
220
221     private GetObjectRequest(BuilderImpl builder) {
222         super(builder);
223         this.bucket = builder.bucket;
224         this.ifMatch = builder.ifMatch;
225         this.ifModifiedSince = builder.ifModifiedSince;
226         this.ifNoneMatch = builder.ifNoneMatch;
227         this.ifUnmodifiedSince = builder.ifUnmodifiedSince;
228         this.key = builder.key;
229         this.range = builder.range;
230         this.responseCacheControl = builder.responseCacheControl;
231         this.responseContentDisposition = builder.responseContentDisposition;
232         this.responseContentEncoding = builder.responseContentEncoding;
233         this.responseContentLanguage = builder.responseContentLanguage;
234         this.responseContentType = builder.responseContentType;
235         this.responseExpires = builder.responseExpires;
236         this.versionId = builder.versionId;
237         this.sseCustomerAlgorithm = builder.sseCustomerAlgorithm;
238         this.sseCustomerKey = builder.sseCustomerKey;
239         this.sseCustomerKeyMD5 = builder.sseCustomerKeyMD5;
240         this.requestPayer = builder.requestPayer;
241         this.partNumber = builder.partNumber;
242     }
243
244     /**
245      * <p>
246      * The bucket name containing the object.
247      * </p>
248      * <p>
249      * When using this API with an access point, you must direct requests to the access point hostname. The access point
250      * hostname takes the form <i>AccessPointName</i>-<i>AccountId</i>.s3-accesspoint.<i>Region</i>.amazonaws.com. When
251      * using this operation using an access point through the AWS SDKs, you provide the access point ARN in place of the
252      * bucket name. For more information about access point ARNs, see <a
253      * href="https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html">Using Access Points</a> in the
254      * <i>Amazon Simple Storage Service Developer Guide</i>.
255      * </p>
256      * 
257      * @return The bucket name containing the object. </p>
258      *         <p>
259      *         When using this API with an access point, you must direct requests to the access point hostname. The
260      *         access point hostname takes the form
261      *         <i>AccessPointName</i>-<i>AccountId</i>.s3-accesspoint.<i>Region</i>.amazonaws.com. When using this
262      *         operation using an access point through the AWS SDKs, you provide the access point ARN in place of the
263      *         bucket name. For more information about access point ARNs, see <a
264      *         href="https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html">Using Access Points</a>
265      *         in the <i>Amazon Simple Storage Service Developer Guide</i>.
266      */

267     public String bucket() {
268         return bucket;
269     }
270
271     /**
272      * <p>
273      * Return the object only if its entity tag (ETag) is the same as the one specified, otherwise return a 412
274      * (precondition failed).
275      * </p>
276      * 
277      * @return Return the object only if its entity tag (ETag) is the same as the one specified, otherwise return a 412
278      *         (precondition failed).
279      */

280     public String ifMatch() {
281         return ifMatch;
282     }
283
284     /**
285      * <p>
286      * Return the object only if it has been modified since the specified time, otherwise return a 304 (not modified).
287      * </p>
288      * 
289      * @return Return the object only if it has been modified since the specified time, otherwise return a 304 (not
290      *         modified).
291      */

292     public Instant ifModifiedSince() {
293         return ifModifiedSince;
294     }
295
296     /**
297      * <p>
298      * Return the object only if its entity tag (ETag) is different from the one specified, otherwise return a 304 (not
299      * modified).
300      * </p>
301      * 
302      * @return Return the object only if its entity tag (ETag) is different from the one specified, otherwise return a
303      *         304 (not modified).
304      */

305     public String ifNoneMatch() {
306         return ifNoneMatch;
307     }
308
309     /**
310      * <p>
311      * Return the object only if it has not been modified since the specified time, otherwise return a 412 (precondition
312      * failed).
313      * </p>
314      * 
315      * @return Return the object only if it has not been modified since the specified time, otherwise return a 412
316      *         (precondition failed).
317      */

318     public Instant ifUnmodifiedSince() {
319         return ifUnmodifiedSince;
320     }
321
322     /**
323      * <p>
324      * Key of the object to get.
325      * </p>
326      * 
327      * @return Key of the object to get.
328      */

329     public String key() {
330         return key;
331     }
332
333     /**
334      * <p>
335      * Downloads the specified range bytes of an object. For more information about the HTTP Range header, see <a
336      * href="https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35"
337      * >https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35</a>.
338      * </p>
339      * <note>
340      * <p>
341      * Amazon S3 doesn't support retrieving multiple ranges of data per <code>GET</code> request.
342      * </p>
343      * </note>
344      * 
345      * @return Downloads the specified range bytes of an object. For more information about the HTTP Range header, see
346      *         <a href="https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35">https://www.w3.org/Protocols/
347      *         rfc2616/rfc2616-sec14.html#sec14.35</a>.</p> <note>
348      *         <p>
349      *         Amazon S3 doesn't support retrieving multiple ranges of data per <code>GET</code> request.
350      *         </p>
351      */

352     public String range() {
353         return range;
354     }
355
356     /**
357      * <p>
358      * Sets the <code>Cache-Control</code> header of the response.
359      * </p>
360      * 
361      * @return Sets the <code>Cache-Control</code> header of the response.
362      */

363     public String responseCacheControl() {
364         return responseCacheControl;
365     }
366
367     /**
368      * <p>
369      * Sets the <code>Content-Disposition</code> header of the response
370      * </p>
371      * 
372      * @return Sets the <code>Content-Disposition</code> header of the response
373      */

374     public String responseContentDisposition() {
375         return responseContentDisposition;
376     }
377
378     /**
379      * <p>
380      * Sets the <code>Content-Encoding</code> header of the response.
381      * </p>
382      * 
383      * @return Sets the <code>Content-Encoding</code> header of the response.
384      */

385     public String responseContentEncoding() {
386         return responseContentEncoding;
387     }
388
389     /**
390      * <p>
391      * Sets the <code>Content-Language</code> header of the response.
392      * </p>
393      * 
394      * @return Sets the <code>Content-Language</code> header of the response.
395      */

396     public String responseContentLanguage() {
397         return responseContentLanguage;
398     }
399
400     /**
401      * <p>
402      * Sets the <code>Content-Type</code> header of the response.
403      * </p>
404      * 
405      * @return Sets the <code>Content-Type</code> header of the response.
406      */

407     public String responseContentType() {
408         return responseContentType;
409     }
410
411     /**
412      * <p>
413      * Sets the <code>Expires</code> header of the response.
414      * </p>
415      * 
416      * @return Sets the <code>Expires</code> header of the response.
417      */

418     public Instant responseExpires() {
419         return responseExpires;
420     }
421
422     /**
423      * <p>
424      * VersionId used to reference a specific version of the object.
425      * </p>
426      * 
427      * @return VersionId used to reference a specific version of the object.
428      */

429     public String versionId() {
430         return versionId;
431     }
432
433     /**
434      * <p>
435      * Specifies the algorithm to use to when encrypting the object (for example, AES256).
436      * </p>
437      * 
438      * @return Specifies the algorithm to use to when encrypting the object (for example, AES256).
439      */

440     public String sseCustomerAlgorithm() {
441         return sseCustomerAlgorithm;
442     }
443
444     /**
445      * <p>
446      * Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This value is used to
447      * store the object and then it is discarded; Amazon S3 does not store the encryption key. The key must be
448      * appropriate for use with the algorithm specified in the
449      * <code>x-amz-server-side​-encryption​-customer-algorithm</code> header.
450      * </p>
451      * 
452      * @return Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This value is
453      *         used to store the object and then it is discarded; Amazon S3 does not store the encryption key. The key
454      *         must be appropriate for use with the algorithm specified in the
455      *         <code>x-amz-server-side​-encryption​-customer-algorithm</code> header.
456      */

457     public String sseCustomerKey() {
458         return sseCustomerKey;
459     }
460
461     /**
462      * <p>
463      * Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses this header for a
464      * message integrity check to ensure that the encryption key was transmitted without error.
465      * </p>
466      * 
467      * @return Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses this header
468      *         for a message integrity check to ensure that the encryption key was transmitted without error.
469      */

470     public String sseCustomerKeyMD5() {
471         return sseCustomerKeyMD5;
472     }
473
474     /**
475      * Returns the value of the RequestPayer property for this object.
476      * <p>
477      * If the service returns an enum value that is not available in the current SDK version, {@link #requestPayer} will
478      * return {@link RequestPayer#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from
479      * {@link #requestPayerAsString}.
480      * </p>
481      * 
482      * @return The value of the RequestPayer property for this object.
483      * @see RequestPayer
484      */

485     public RequestPayer requestPayer() {
486         return RequestPayer.fromValue(requestPayer);
487     }
488
489     /**
490      * Returns the value of the RequestPayer property for this object.
491      * <p>
492      * If the service returns an enum value that is not available in the current SDK version, {@link #requestPayer} will
493      * return {@link RequestPayer#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from
494      * {@link #requestPayerAsString}.
495      * </p>
496      * 
497      * @return The value of the RequestPayer property for this object.
498      * @see RequestPayer
499      */

500     public String requestPayerAsString() {
501         return requestPayer;
502     }
503
504     /**
505      * <p>
506      * Part number of the object being read. This is a positive integer between 1 and 10,000. Effectively performs a
507      * 'ranged' GET request for the part specified. Useful for downloading just a part of an object.
508      * </p>
509      * 
510      * @return Part number of the object being read. This is a positive integer between 1 and 10,000. Effectively
511      *         performs a 'ranged' GET request for the part specified. Useful for downloading just a part of an object.
512      */

513     public Integer partNumber() {
514         return partNumber;
515     }
516
517     @Override
518     public Builder toBuilder() {
519         return new BuilderImpl(this);
520     }
521
522     public static Builder builder() {
523         return new BuilderImpl();
524     }
525
526     public static Class<? extends Builder> serializableBuilderClass() {
527         return BuilderImpl.class;
528     }
529
530     @Override
531     public int hashCode() {
532         int hashCode = 1;
533         hashCode = 31 * hashCode + super.hashCode();
534         hashCode = 31 * hashCode + Objects.hashCode(bucket());
535         hashCode = 31 * hashCode + Objects.hashCode(ifMatch());
536         hashCode = 31 * hashCode + Objects.hashCode(ifModifiedSince());
537         hashCode = 31 * hashCode + Objects.hashCode(ifNoneMatch());
538         hashCode = 31 * hashCode + Objects.hashCode(ifUnmodifiedSince());
539         hashCode = 31 * hashCode + Objects.hashCode(key());
540         hashCode = 31 * hashCode + Objects.hashCode(range());
541         hashCode = 31 * hashCode + Objects.hashCode(responseCacheControl());
542         hashCode = 31 * hashCode + Objects.hashCode(responseContentDisposition());
543         hashCode = 31 * hashCode + Objects.hashCode(responseContentEncoding());
544         hashCode = 31 * hashCode + Objects.hashCode(responseContentLanguage());
545         hashCode = 31 * hashCode + Objects.hashCode(responseContentType());
546         hashCode = 31 * hashCode + Objects.hashCode(responseExpires());
547         hashCode = 31 * hashCode + Objects.hashCode(versionId());
548         hashCode = 31 * hashCode + Objects.hashCode(sseCustomerAlgorithm());
549         hashCode = 31 * hashCode + Objects.hashCode(sseCustomerKey());
550         hashCode = 31 * hashCode + Objects.hashCode(sseCustomerKeyMD5());
551         hashCode = 31 * hashCode + Objects.hashCode(requestPayerAsString());
552         hashCode = 31 * hashCode + Objects.hashCode(partNumber());
553         return hashCode;
554     }
555
556     @Override
557     public boolean equals(Object obj) {
558         return super.equals(obj) && equalsBySdkFields(obj);
559     }
560
561     @Override
562     public boolean equalsBySdkFields(Object obj) {
563         if (this == obj) {
564             return true;
565         }
566         if (obj == null) {
567             return false;
568         }
569         if (!(obj instanceof GetObjectRequest)) {
570             return false;
571         }
572         GetObjectRequest other = (GetObjectRequest) obj;
573         return Objects.equals(bucket(), other.bucket()) && Objects.equals(ifMatch(), other.ifMatch())
574                 && Objects.equals(ifModifiedSince(), other.ifModifiedSince())
575                 && Objects.equals(ifNoneMatch(), other.ifNoneMatch())
576                 && Objects.equals(ifUnmodifiedSince(), other.ifUnmodifiedSince()) && Objects.equals(key(), other.key())
577                 && Objects.equals(range(), other.range()) && Objects.equals(responseCacheControl(), other.responseCacheControl())
578                 && Objects.equals(responseContentDisposition(), other.responseContentDisposition())
579                 && Objects.equals(responseContentEncoding(), other.responseContentEncoding())
580                 && Objects.equals(responseContentLanguage(), other.responseContentLanguage())
581                 && Objects.equals(responseContentType(), other.responseContentType())
582                 && Objects.equals(responseExpires(), other.responseExpires()) && Objects.equals(versionId(), other.versionId())
583                 && Objects.equals(sseCustomerAlgorithm(), other.sseCustomerAlgorithm())
584                 && Objects.equals(sseCustomerKey(), other.sseCustomerKey())
585                 && Objects.equals(sseCustomerKeyMD5(), other.sseCustomerKeyMD5())
586                 && Objects.equals(requestPayerAsString(), other.requestPayerAsString())
587                 && Objects.equals(partNumber(), other.partNumber());
588     }
589
590     /**
591      * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be
592      * redacted from this string using a placeholder value.
593      */

594     @Override
595     public String toString() {
596         return ToString.builder("GetObjectRequest").add("Bucket", bucket()).add("IfMatch", ifMatch())
597                 .add("IfModifiedSince", ifModifiedSince()).add("IfNoneMatch", ifNoneMatch())
598                 .add("IfUnmodifiedSince", ifUnmodifiedSince()).add("Key", key()).add("Range", range())
599                 .add("ResponseCacheControl", responseCacheControl())
600                 .add("ResponseContentDisposition", responseContentDisposition())
601                 .add("ResponseContentEncoding", responseContentEncoding())
602                 .add("ResponseContentLanguage", responseContentLanguage()).add("ResponseContentType", responseContentType())
603                 .add("ResponseExpires", responseExpires()).add("VersionId", versionId())
604                 .add("SSECustomerAlgorithm", sseCustomerAlgorithm())
605                 .add("SSECustomerKey", sseCustomerKey() == null ? null : "*** Sensitive Data Redacted ***")
606                 .add("SSECustomerKeyMD5", sseCustomerKeyMD5()).add("RequestPayer", requestPayerAsString())
607                 .add("PartNumber", partNumber()).build();
608     }
609
610     public <T> Optional<T> getValueForField(String fieldName, Class<T> clazz) {
611         switch (fieldName) {
612         case "Bucket":
613             return Optional.ofNullable(clazz.cast(bucket()));
614         case "IfMatch":
615             return Optional.ofNullable(clazz.cast(ifMatch()));
616         case "IfModifiedSince":
617             return Optional.ofNullable(clazz.cast(ifModifiedSince()));
618         case "IfNoneMatch":
619             return Optional.ofNullable(clazz.cast(ifNoneMatch()));
620         case "IfUnmodifiedSince":
621             return Optional.ofNullable(clazz.cast(ifUnmodifiedSince()));
622         case "Key":
623             return Optional.ofNullable(clazz.cast(key()));
624         case "Range":
625             return Optional.ofNullable(clazz.cast(range()));
626         case "ResponseCacheControl":
627             return Optional.ofNullable(clazz.cast(responseCacheControl()));
628         case "ResponseContentDisposition":
629             return Optional.ofNullable(clazz.cast(responseContentDisposition()));
630         case "ResponseContentEncoding":
631             return Optional.ofNullable(clazz.cast(responseContentEncoding()));
632         case "ResponseContentLanguage":
633             return Optional.ofNullable(clazz.cast(responseContentLanguage()));
634         case "ResponseContentType":
635             return Optional.ofNullable(clazz.cast(responseContentType()));
636         case "ResponseExpires":
637             return Optional.ofNullable(clazz.cast(responseExpires()));
638         case "VersionId":
639             return Optional.ofNullable(clazz.cast(versionId()));
640         case "SSECustomerAlgorithm":
641             return Optional.ofNullable(clazz.cast(sseCustomerAlgorithm()));
642         case "SSECustomerKey":
643             return Optional.ofNullable(clazz.cast(sseCustomerKey()));
644         case "SSECustomerKeyMD5":
645             return Optional.ofNullable(clazz.cast(sseCustomerKeyMD5()));
646         case "RequestPayer":
647             return Optional.ofNullable(clazz.cast(requestPayerAsString()));
648         case "PartNumber":
649             return Optional.ofNullable(clazz.cast(partNumber()));
650         default:
651             return Optional.empty();
652         }
653     }
654
655     @Override
656     public List<SdkField<?>> sdkFields() {
657         return SDK_FIELDS;
658     }
659
660     private static <T> Function<Object, T> getter(Function<GetObjectRequest, T> g) {
661         return obj -> g.apply((GetObjectRequest) obj);
662     }
663
664     private static <T> BiConsumer<Object, T> setter(BiConsumer<Builder, T> s) {
665         return (obj, val) -> s.accept((Builder) obj, val);
666     }
667
668     public interface Builder extends S3Request.Builder, SdkPojo, CopyableBuilder<Builder, GetObjectRequest> {
669         /**
670          * <p>
671          * The bucket name containing the object.
672          * </p>
673          * <p>
674          * When using this API with an access point, you must direct requests to the access point hostname. The access
675          * point hostname takes the form
676          * <i>AccessPointName</i>-<i>AccountId</i>.s3-accesspoint.<i>Region</i>.amazonaws.com. When using this operation
677          * using an access point through the AWS SDKs, you provide the access point ARN in place of the bucket name. For
678          * more information about access point ARNs, see <a
679          * href="https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html">Using Access Points</a> in
680          * the <i>Amazon Simple Storage Service Developer Guide</i>.
681          * </p>
682          * 
683          * @param bucket
684          *        The bucket name containing the object. </p>
685          *        <p>
686          *        When using this API with an access point, you must direct requests to the access point hostname. The
687          *        access point hostname takes the form
688          *        <i>AccessPointName</i>-<i>AccountId</i>.s3-accesspoint.<i>Region</i>.amazonaws.com. When using this
689          *        operation using an access point through the AWS SDKs, you provide the access point ARN in place of the
690          *        bucket name. For more information about access point ARNs, see <a
691          *        href="https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html">Using Access
692          *        Points</a> in the <i>Amazon Simple Storage Service Developer Guide</i>.
693          * @return Returns a reference to this object so that method calls can be chained together.
694          */

695         Builder bucket(String bucket);
696
697         /**
698          * <p>
699          * Return the object only if its entity tag (ETag) is the same as the one specified, otherwise return a 412
700          * (precondition failed).
701          * </p>
702          * 
703          * @param ifMatch
704          *        Return the object only if its entity tag (ETag) is the same as the one specified, otherwise return a
705          *        412 (precondition failed).
706          * @return Returns a reference to this object so that method calls can be chained together.
707          */

708         Builder ifMatch(String ifMatch);
709
710         /**
711          * <p>
712          * Return the object only if it has been modified since the specified time, otherwise return a 304 (not
713          * modified).
714          * </p>
715          * 
716          * @param ifModifiedSince
717          *        Return the object only if it has been modified since the specified time, otherwise return a 304 (not
718          *        modified).
719          * @return Returns a reference to this object so that method calls can be chained together.
720          */

721         Builder ifModifiedSince(Instant ifModifiedSince);
722
723         /**
724          * <p>
725          * Return the object only if its entity tag (ETag) is different from the one specified, otherwise return a 304
726          * (not modified).
727          * </p>
728          * 
729          * @param ifNoneMatch
730          *        Return the object only if its entity tag (ETag) is different from the one specified, otherwise return
731          *        a 304 (not modified).
732          * @return Returns a reference to this object so that method calls can be chained together.
733          */

734         Builder ifNoneMatch(String ifNoneMatch);
735
736         /**
737          * <p>
738          * Return the object only if it has not been modified since the specified time, otherwise return a 412
739          * (precondition failed).
740          * </p>
741          * 
742          * @param ifUnmodifiedSince
743          *        Return the object only if it has not been modified since the specified time, otherwise return a 412
744          *        (precondition failed).
745          * @return Returns a reference to this object so that method calls can be chained together.
746          */

747         Builder ifUnmodifiedSince(Instant ifUnmodifiedSince);
748
749         /**
750          * <p>
751          * Key of the object to get.
752          * </p>
753          * 
754          * @param key
755          *        Key of the object to get.
756          * @return Returns a reference to this object so that method calls can be chained together.
757          */

758         Builder key(String key);
759
760         /**
761          * <p>
762          * Downloads the specified range bytes of an object. For more information about the HTTP Range header, see <a
763          * href="https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35">https://www.w3.org/Protocols/rfc2616/
764          * rfc2616-sec14.html#sec14.35</a>.
765          * </p>
766          * <note>
767          * <p>
768          * Amazon S3 doesn't support retrieving multiple ranges of data per <code>GET</code> request.
769          * </p>
770          * </note>
771          * 
772          * @param range
773          *        Downloads the specified range bytes of an object. For more information about the HTTP Range header,
774          *        see <a
775          *        href="https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35">https://www.w3.org/Protocols
776          *        /rfc2616/rfc2616-sec14.html#sec14.35</a>.</p> <note>
777          *        <p>
778          *        Amazon S3 doesn't support retrieving multiple ranges of data per <code>GET</code> request.
779          *        </p>
780          * @return Returns a reference to this object so that method calls can be chained together.
781          */

782         Builder range(String range);
783
784         /**
785          * <p>
786          * Sets the <code>Cache-Control</code> header of the response.
787          * </p>
788          * 
789          * @param responseCacheControl
790          *        Sets the <code>Cache-Control</code> header of the response.
791          * @return Returns a reference to this object so that method calls can be chained together.
792          */

793         Builder responseCacheControl(String responseCacheControl);
794
795         /**
796          * <p>
797          * Sets the <code>Content-Disposition</code> header of the response
798          * </p>
799          * 
800          * @param responseContentDisposition
801          *        Sets the <code>Content-Disposition</code> header of the response
802          * @return Returns a reference to this object so that method calls can be chained together.
803          */

804         Builder responseContentDisposition(String responseContentDisposition);
805
806         /**
807          * <p>
808          * Sets the <code>Content-Encoding</code> header of the response.
809          * </p>
810          * 
811          * @param responseContentEncoding
812          *        Sets the <code>Content-Encoding</code> header of the response.
813          * @return Returns a reference to this object so that method calls can be chained together.
814          */

815         Builder responseContentEncoding(String responseContentEncoding);
816
817         /**
818          * <p>
819          * Sets the <code>Content-Language</code> header of the response.
820          * </p>
821          * 
822          * @param responseContentLanguage
823          *        Sets the <code>Content-Language</code> header of the response.
824          * @return Returns a reference to this object so that method calls can be chained together.
825          */

826         Builder responseContentLanguage(String responseContentLanguage);
827
828         /**
829          * <p>
830          * Sets the <code>Content-Type</code> header of the response.
831          * </p>
832          * 
833          * @param responseContentType
834          *        Sets the <code>Content-Type</code> header of the response.
835          * @return Returns a reference to this object so that method calls can be chained together.
836          */

837         Builder responseContentType(String responseContentType);
838
839         /**
840          * <p>
841          * Sets the <code>Expires</code> header of the response.
842          * </p>
843          * 
844          * @param responseExpires
845          *        Sets the <code>Expires</code> header of the response.
846          * @return Returns a reference to this object so that method calls can be chained together.
847          */

848         Builder responseExpires(Instant responseExpires);
849
850         /**
851          * <p>
852          * VersionId used to reference a specific version of the object.
853          * </p>
854          * 
855          * @param versionId
856          *        VersionId used to reference a specific version of the object.
857          * @return Returns a reference to this object so that method calls can be chained together.
858          */

859         Builder versionId(String versionId);
860
861         /**
862          * <p>
863          * Specifies the algorithm to use to when encrypting the object (for example, AES256).
864          * </p>
865          * 
866          * @param sseCustomerAlgorithm
867          *        Specifies the algorithm to use to when encrypting the object (for example, AES256).
868          * @return Returns a reference to this object so that method calls can be chained together.
869          */

870         Builder sseCustomerAlgorithm(String sseCustomerAlgorithm);
871
872         /**
873          * <p>
874          * Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This value is used to
875          * store the object and then it is discarded; Amazon S3 does not store the encryption key. The key must be
876          * appropriate for use with the algorithm specified in the
877          * <code>x-amz-server-side​-encryption​-customer-algorithm</code> header.
878          * </p>
879          * 
880          * @param sseCustomerKey
881          *        Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This value is
882          *        used to store the object and then it is discarded; Amazon S3 does not store the encryption key. The
883          *        key must be appropriate for use with the algorithm specified in the
884          *        <code>x-amz-server-side​-encryption​-customer-algorithm</code> header.
885          * @return Returns a reference to this object so that method calls can be chained together.
886          */

887         Builder sseCustomerKey(String sseCustomerKey);
888
889         /**
890          * <p>
891          * Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses this header for
892          * a message integrity check to ensure that the encryption key was transmitted without error.
893          * </p>
894          * 
895          * @param sseCustomerKeyMD5
896          *        Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses this
897          *        header for a message integrity check to ensure that the encryption key was transmitted without error.
898          * @return Returns a reference to this object so that method calls can be chained together.
899          */

900         Builder sseCustomerKeyMD5(String sseCustomerKeyMD5);
901
902         /**
903          * Sets the value of the RequestPayer property for this object.
904          *
905          * @param requestPayer
906          *        The new value for the RequestPayer property for this object.
907          * @see RequestPayer
908          * @return Returns a reference to this object so that method calls can be chained together.
909          * @see RequestPayer
910          */

911         Builder requestPayer(String requestPayer);
912
913         /**
914          * Sets the value of the RequestPayer property for this object.
915          *
916          * @param requestPayer
917          *        The new value for the RequestPayer property for this object.
918          * @see RequestPayer
919          * @return Returns a reference to this object so that method calls can be chained together.
920          * @see RequestPayer
921          */

922         Builder requestPayer(RequestPayer requestPayer);
923
924         /**
925          * <p>
926          * Part number of the object being read. This is a positive integer between 1 and 10,000. Effectively performs a
927          * 'ranged' GET request for the part specified. Useful for downloading just a part of an object.
928          * </p>
929          * 
930          * @param partNumber
931          *        Part number of the object being read. This is a positive integer between 1 and 10,000. Effectively
932          *        performs a 'ranged' GET request for the part specified. Useful for downloading just a part of an
933          *        object.
934          * @return Returns a reference to this object so that method calls can be chained together.
935          */

936         Builder partNumber(Integer partNumber);
937
938         @Override
939         Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration);
940
941         @Override
942         Builder overrideConfiguration(Consumer<AwsRequestOverrideConfiguration.Builder> builderConsumer);
943     }
944
945     static final class BuilderImpl extends S3Request.BuilderImpl implements Builder {
946         private String bucket;
947
948         private String ifMatch;
949
950         private Instant ifModifiedSince;
951
952         private String ifNoneMatch;
953
954         private Instant ifUnmodifiedSince;
955
956         private String key;
957
958         private String range;
959
960         private String responseCacheControl;
961
962         private String responseContentDisposition;
963
964         private String responseContentEncoding;
965
966         private String responseContentLanguage;
967
968         private String responseContentType;
969
970         private Instant responseExpires;
971
972         private String versionId;
973
974         private String sseCustomerAlgorithm;
975
976         private String sseCustomerKey;
977
978         private String sseCustomerKeyMD5;
979
980         private String requestPayer;
981
982         private Integer partNumber;
983
984         private BuilderImpl() {
985         }
986
987         private BuilderImpl(GetObjectRequest model) {
988             super(model);
989             bucket(model.bucket);
990             ifMatch(model.ifMatch);
991             ifModifiedSince(model.ifModifiedSince);
992             ifNoneMatch(model.ifNoneMatch);
993             ifUnmodifiedSince(model.ifUnmodifiedSince);
994             key(model.key);
995             range(model.range);
996             responseCacheControl(model.responseCacheControl);
997             responseContentDisposition(model.responseContentDisposition);
998             responseContentEncoding(model.responseContentEncoding);
999             responseContentLanguage(model.responseContentLanguage);
1000             responseContentType(model.responseContentType);
1001             responseExpires(model.responseExpires);
1002             versionId(model.versionId);
1003             sseCustomerAlgorithm(model.sseCustomerAlgorithm);
1004             sseCustomerKey(model.sseCustomerKey);
1005             sseCustomerKeyMD5(model.sseCustomerKeyMD5);
1006             requestPayer(model.requestPayer);
1007             partNumber(model.partNumber);
1008         }
1009
1010         public final String getBucket() {
1011             return bucket;
1012         }
1013
1014         @Override
1015         public final Builder bucket(String bucket) {
1016             this.bucket = bucket;
1017             return this;
1018         }
1019
1020         public final void setBucket(String bucket) {
1021             this.bucket = bucket;
1022         }
1023
1024         public final String getIfMatch() {
1025             return ifMatch;
1026         }
1027
1028         @Override
1029         public final Builder ifMatch(String ifMatch) {
1030             this.ifMatch = ifMatch;
1031             return this;
1032         }
1033
1034         public final void setIfMatch(String ifMatch) {
1035             this.ifMatch = ifMatch;
1036         }
1037
1038         public final Instant getIfModifiedSince() {
1039             return ifModifiedSince;
1040         }
1041
1042         @Override
1043         public final Builder ifModifiedSince(Instant ifModifiedSince) {
1044             this.ifModifiedSince = ifModifiedSince;
1045             return this;
1046         }
1047
1048         public final void setIfModifiedSince(Instant ifModifiedSince) {
1049             this.ifModifiedSince = ifModifiedSince;
1050         }
1051
1052         public final String getIfNoneMatch() {
1053             return ifNoneMatch;
1054         }
1055
1056         @Override
1057         public final Builder ifNoneMatch(String ifNoneMatch) {
1058             this.ifNoneMatch = ifNoneMatch;
1059             return this;
1060         }
1061
1062         public final void setIfNoneMatch(String ifNoneMatch) {
1063             this.ifNoneMatch = ifNoneMatch;
1064         }
1065
1066         public final Instant getIfUnmodifiedSince() {
1067             return ifUnmodifiedSince;
1068         }
1069
1070         @Override
1071         public final Builder ifUnmodifiedSince(Instant ifUnmodifiedSince) {
1072             this.ifUnmodifiedSince = ifUnmodifiedSince;
1073             return this;
1074         }
1075
1076         public final void setIfUnmodifiedSince(Instant ifUnmodifiedSince) {
1077             this.ifUnmodifiedSince = ifUnmodifiedSince;
1078         }
1079
1080         public final String getKey() {
1081             return key;
1082         }
1083
1084         @Override
1085         public final Builder key(String key) {
1086             this.key = key;
1087             return this;
1088         }
1089
1090         public final void setKey(String key) {
1091             this.key = key;
1092         }
1093
1094         public final String getRange() {
1095             return range;
1096         }
1097
1098         @Override
1099         public final Builder range(String range) {
1100             this.range = range;
1101             return this;
1102         }
1103
1104         public final void setRange(String range) {
1105             this.range = range;
1106         }
1107
1108         public final String getResponseCacheControl() {
1109             return responseCacheControl;
1110         }
1111
1112         @Override
1113         public final Builder responseCacheControl(String responseCacheControl) {
1114             this.responseCacheControl = responseCacheControl;
1115             return this;
1116         }
1117
1118         public final void setResponseCacheControl(String responseCacheControl) {
1119             this.responseCacheControl = responseCacheControl;
1120         }
1121
1122         public final String getResponseContentDisposition() {
1123             return responseContentDisposition;
1124         }
1125
1126         @Override
1127         public final Builder responseContentDisposition(String responseContentDisposition) {
1128             this.responseContentDisposition = responseContentDisposition;
1129             return this;
1130         }
1131
1132         public final void setResponseContentDisposition(String responseContentDisposition) {
1133             this.responseContentDisposition = responseContentDisposition;
1134         }
1135
1136         public final String getResponseContentEncoding() {
1137             return responseContentEncoding;
1138         }
1139
1140         @Override
1141         public final Builder responseContentEncoding(String responseContentEncoding) {
1142             this.responseContentEncoding = responseContentEncoding;
1143             return this;
1144         }
1145
1146         public final void setResponseContentEncoding(String responseContentEncoding) {
1147             this.responseContentEncoding = responseContentEncoding;
1148         }
1149
1150         public final String getResponseContentLanguage() {
1151             return responseContentLanguage;
1152         }
1153
1154         @Override
1155         public final Builder responseContentLanguage(String responseContentLanguage) {
1156             this.responseContentLanguage = responseContentLanguage;
1157             return this;
1158         }
1159
1160         public final void setResponseContentLanguage(String responseContentLanguage) {
1161             this.responseContentLanguage = responseContentLanguage;
1162         }
1163
1164         public final String getResponseContentType() {
1165             return responseContentType;
1166         }
1167
1168         @Override
1169         public final Builder responseContentType(String responseContentType) {
1170             this.responseContentType = responseContentType;
1171             return this;
1172         }
1173
1174         public final void setResponseContentType(String responseContentType) {
1175             this.responseContentType = responseContentType;
1176         }
1177
1178         public final Instant getResponseExpires() {
1179             return responseExpires;
1180         }
1181
1182         @Override
1183         public final Builder responseExpires(Instant responseExpires) {
1184             this.responseExpires = responseExpires;
1185             return this;
1186         }
1187
1188         public final void setResponseExpires(Instant responseExpires) {
1189             this.responseExpires = responseExpires;
1190         }
1191
1192         public final String getVersionId() {
1193             return versionId;
1194         }
1195
1196         @Override
1197         public final Builder versionId(String versionId) {
1198             this.versionId = versionId;
1199             return this;
1200         }
1201
1202         public final void setVersionId(String versionId) {
1203             this.versionId = versionId;
1204         }
1205
1206         public final String getSseCustomerAlgorithm() {
1207             return sseCustomerAlgorithm;
1208         }
1209
1210         @Override
1211         public final Builder sseCustomerAlgorithm(String sseCustomerAlgorithm) {
1212             this.sseCustomerAlgorithm = sseCustomerAlgorithm;
1213             return this;
1214         }
1215
1216         public final void setSseCustomerAlgorithm(String sseCustomerAlgorithm) {
1217             this.sseCustomerAlgorithm = sseCustomerAlgorithm;
1218         }
1219
1220         public final String getSseCustomerKey() {
1221             return sseCustomerKey;
1222         }
1223
1224         @Override
1225         public final Builder sseCustomerKey(String sseCustomerKey) {
1226             this.sseCustomerKey = sseCustomerKey;
1227             return this;
1228         }
1229
1230         public final void setSseCustomerKey(String sseCustomerKey) {
1231             this.sseCustomerKey = sseCustomerKey;
1232         }
1233
1234         public final String getSseCustomerKeyMD5() {
1235             return sseCustomerKeyMD5;
1236         }
1237
1238         @Override
1239         public final Builder sseCustomerKeyMD5(String sseCustomerKeyMD5) {
1240             this.sseCustomerKeyMD5 = sseCustomerKeyMD5;
1241             return this;
1242         }
1243
1244         public final void setSseCustomerKeyMD5(String sseCustomerKeyMD5) {
1245             this.sseCustomerKeyMD5 = sseCustomerKeyMD5;
1246         }
1247
1248         public final String getRequestPayer() {
1249             return requestPayer;
1250         }
1251
1252         @Override
1253         public final Builder requestPayer(String requestPayer) {
1254             this.requestPayer = requestPayer;
1255             return this;
1256         }
1257
1258         @Override
1259         public final Builder requestPayer(RequestPayer requestPayer) {
1260             this.requestPayer(requestPayer == null ? null : requestPayer.toString());
1261             return this;
1262         }
1263
1264         public final void setRequestPayer(String requestPayer) {
1265             this.requestPayer = requestPayer;
1266         }
1267
1268         public final Integer getPartNumber() {
1269             return partNumber;
1270         }
1271
1272         @Override
1273         public final Builder partNumber(Integer partNumber) {
1274             this.partNumber = partNumber;
1275             return this;
1276         }
1277
1278         public final void setPartNumber(Integer partNumber) {
1279             this.partNumber = partNumber;
1280         }
1281
1282         @Override
1283         public Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration) {
1284             super.overrideConfiguration(overrideConfiguration);
1285             return this;
1286         }
1287
1288         @Override
1289         public Builder overrideConfiguration(Consumer<AwsRequestOverrideConfiguration.Builder> builderConsumer) {
1290             super.overrideConfiguration(builderConsumer);
1291             return this;
1292         }
1293
1294         @Override
1295         public GetObjectRequest build() {
1296             return new GetObjectRequest(this);
1297         }
1298
1299         @Override
1300         public List<SdkField<?>> sdkFields() {
1301             return SDK_FIELDS;
1302         }
1303     }
1304 }
1305