xref: /aosp_15_r20/external/aws-crt-java/src/main/java/software/amazon/awssdk/crt/s3/S3MetaRequestProgress.java (revision 3c7ae9de214676c52d19f01067dc1a404272dc11)
1 /**
2  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  * SPDX-License-Identifier: Apache-2.0.
4  */
5 package software.amazon.awssdk.crt.s3;
6 
7 /**
8  * Information about the meta request progress.
9  */
10 public class S3MetaRequestProgress {
11 
12     private long bytesTransferred;
13     private long contentLength;
14 
15     /**
16      * @param bytesTransferred bytes transferred since the previous progress update
17      * @return this progress object
18      */
withBytesTransferred(long bytesTransferred)19     public S3MetaRequestProgress withBytesTransferred(long bytesTransferred) {
20         this.bytesTransferred = bytesTransferred;
21         return this;
22     }
23 
24     /**
25      * @return bytes transferred since the previous progress update
26      */
getBytesTransferred()27     public long getBytesTransferred() {
28         return bytesTransferred;
29     }
30 
31     /**
32      * @param contentLength length of the entire meta request operation
33      * @return this progress object
34      */
withContentLength(long contentLength)35     public S3MetaRequestProgress withContentLength(long contentLength) {
36         this.contentLength = contentLength;
37         return this;
38     }
39 
40     /**
41      *
42      * @return length of the entire meta request operation
43      */
getContentLength()44     public long getContentLength() {
45         return contentLength;
46     }
47 }
48