Skip to content

Commit a96a401

Browse files
Josh SennettJosh Sennett
andauthored
Change BytesPerSecond to use int64 format to allow larger values (#24)
Co-authored-by: Josh Sennett <[email protected]>
1 parent bb5ce33 commit a96a401

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

aws-datasync-task/aws-datasync-task.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@
7878
"BytesPerSecond": {
7979
"description": "A value that limits the bandwidth used by AWS DataSync.",
8080
"type": "integer",
81+
"format": "int64",
8182
"minimum": -1
8283
},
8384
"Gid": {

aws-datasync-task/src/main/java/software/amazon/datasync/task/Translator.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,9 @@ public static software.amazon.datasync.task.Options translateToResourceModelOpti
9090
final software.amazon.awssdk.services.datasync.model.Options options) {
9191
if (options == null)
9292
return software.amazon.datasync.task.Options.builder().build();
93-
Integer bytesPerSecond = options.bytesPerSecond() != null ? options.bytesPerSecond().intValue() : null;
9493
return software.amazon.datasync.task.Options.builder()
9594
.atime(options.atimeAsString())
96-
.bytesPerSecond(bytesPerSecond)
95+
.bytesPerSecond(options.bytesPerSecond())
9796
.gid(options.gidAsString())
9897
.logLevel(options.logLevelAsString())
9998
.mtime(options.mtimeAsString())
@@ -112,11 +111,9 @@ private static software.amazon.awssdk.services.datasync.model.Options translateT
112111
final software.amazon.datasync.task.Options options) {
113112
if (options == null)
114113
return software.amazon.awssdk.services.datasync.model.Options.builder().build();
115-
116-
Long bytesPerSecond = options.getBytesPerSecond() != null ? options.getBytesPerSecond().longValue() : null;
117114
return software.amazon.awssdk.services.datasync.model.Options.builder()
118115
.atime(options.getAtime())
119-
.bytesPerSecond(bytesPerSecond)
116+
.bytesPerSecond(options.getBytesPerSecond())
120117
.gid(options.getGid())
121118
.logLevel(options.getLogLevel())
122119
.mtime(options.getMtime())

0 commit comments

Comments
 (0)