From 494dc3b9ef25c829e9fb8ae75d9e531d22974fe1 Mon Sep 17 00:00:00 2001 From: Rachel Tucker Date: Tue, 19 May 2026 14:13:28 -0600 Subject: [PATCH] Update to BP API 6.0 3255543. --- .../integration/PutJobManagement_Test.java | 123 -------- .../com/spectralogic/ds3client/Ds3Client.java | 78 +++-- .../spectralogic/ds3client/Ds3ClientImpl.java | 52 ++-- .../CompleteMultiPartUploadRequest.java | 114 -------- .../ListMultiPartUploadPartsRequest.java | 109 ------- .../commands/ListMultiPartUploadsRequest.java | 122 -------- .../PutMultiPartUploadPartRequest.java | 159 ----------- ...eThrottleRuleSpectraS3ResponseParser.java} | 8 +- ...eThrottleRuleSpectraS3ResponseParser.java} | 12 +- ...eThrottleRulesSpectraS3ResponseParser.java | 51 ++++ .../GetJobEntriesSpectraS3ResponseParser.java | 51 ++++ ...GetJobSummarySpectraS3ResponseParser.java} | 12 +- ...eThrottleRuleSpectraS3ResponseParser.java} | 12 +- ...eThrottleRuleSpectraS3ResponseParser.java} | 16 +- .../PutMultiPartUploadPartResponseParser.java | 44 --- ...eteCacheThrottleRuleSpectraS3Request.java} | 27 +- ...teCacheThrottleRuleSpectraS3Response.java} | 6 +- .../FormatAllTapesSpectraS3Request.java | 18 ++ .../FormatTapeSpectraS3Request.java | 18 ++ .../GetCacheThrottleRuleSpectraS3Request.java | 51 ++++ ...etCacheThrottleRuleSpectraS3Response.java} | 14 +- ...GetCacheThrottleRulesSpectraS3Request.java | 184 ++++++++++++ ...tCacheThrottleRulesSpectraS3Response.java} | 22 +- ...PlannerBlobStoreTasksSpectraS3Request.java | 22 ++ .../GetJobEntriesSpectraS3Request.java | 129 +++++++++ .../GetJobEntriesSpectraS3Response.java} | 22 +- .../GetJobSummarySpectraS3Request.java} | 50 ++-- .../GetJobSummarySpectraS3Response.java} | 16 +- ...difyCacheThrottleRuleSpectraS3Request.java | 124 ++++++++ ...fyCacheThrottleRuleSpectraS3Response.java} | 16 +- .../ModifyTapeSpectraS3Request.java | 14 + .../PutCacheThrottleRuleSpectraS3Request.java | 112 ++++++++ ...PutCacheThrottleRuleSpectraS3Response.java | 36 +++ .../ds3client/models/ActiveJob.java | 24 +- .../models/BlobStoreTaskInformation.java | 40 +++ .../ds3client/models/CacheEntryState.java | 3 +- .../ds3client/models/CacheThrottleRule.java | 105 +++++++ ...Result.java => CacheThrottleRuleList.java} | 46 +-- .../models/CompleteMultipartUploadResult.java | 80 ------ .../ds3client/models/DestinationSummary.java | 86 ++++++ .../ds3client/models/Duration.java | 92 ++++++ .../models/{JobRestore.java => IomType.java} | 2 +- .../models/JobCreationFailedType.java | 1 + .../ds3client/models/JobEntry.java | 189 ++++++++++++ ...iPartUploadPart.java => JobEntryList.java} | 45 +-- .../ds3client/models/JobSummaryApiBean.java | 269 ++++++++++++++++++ .../models/ListMultiPartUploadsResult.java | 170 ----------- .../ds3client/models/ListPartsResult.java | 145 ---------- .../ds3client/models/MultiPartUpload.java | 82 ------ .../spectralogic/ds3client/models/Tape.java | 12 + .../ds3client/models/TapeDrive.java | 12 + .../ds3client/models/TapeFailureType.java | 4 +- .../ds3client/Ds3Client_Test.java | 91 ------ libs.versions.toml | 2 +- 54 files changed, 1848 insertions(+), 1496 deletions(-) delete mode 100644 ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/CompleteMultiPartUploadRequest.java delete mode 100644 ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/ListMultiPartUploadPartsRequest.java delete mode 100644 ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/ListMultiPartUploadsRequest.java delete mode 100644 ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/PutMultiPartUploadPartRequest.java rename ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/{AbortMultiPartUploadResponseParser.java => DeleteCacheThrottleRuleSpectraS3ResponseParser.java} (78%) rename ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/{InitiateMultiPartUploadResponseParser.java => GetCacheThrottleRuleSpectraS3ResponseParser.java} (74%) create mode 100644 ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetCacheThrottleRulesSpectraS3ResponseParser.java create mode 100644 ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetJobEntriesSpectraS3ResponseParser.java rename ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/{ListMultiPartUploadPartsResponseParser.java => GetJobSummarySpectraS3ResponseParser.java} (75%) rename ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/{ListMultiPartUploadsResponseParser.java => ModifyCacheThrottleRuleSpectraS3ResponseParser.java} (73%) rename ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/{CompleteMultiPartUploadResponseParser.java => PutCacheThrottleRuleSpectraS3ResponseParser.java} (70%) delete mode 100644 ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/PutMultiPartUploadPartResponseParser.java rename ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/{InitiateMultiPartUploadRequest.java => spectrads3/DeleteCacheThrottleRuleSpectraS3Request.java} (63%) rename ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/{AbortMultiPartUploadResponse.java => spectrads3/DeleteCacheThrottleRuleSpectraS3Response.java} (79%) create mode 100644 ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/spectrads3/GetCacheThrottleRuleSpectraS3Request.java rename ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/{PutMultiPartUploadPartResponse.java => spectrads3/GetCacheThrottleRuleSpectraS3Response.java} (62%) create mode 100644 ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/spectrads3/GetCacheThrottleRulesSpectraS3Request.java rename ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/{CompleteMultiPartUploadResponse.java => spectrads3/GetCacheThrottleRulesSpectraS3Response.java} (50%) create mode 100644 ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/spectrads3/GetJobEntriesSpectraS3Request.java rename ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/{InitiateMultiPartUploadResponse.java => spectrads3/GetJobEntriesSpectraS3Response.java} (53%) rename ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/{AbortMultiPartUploadRequest.java => spectrads3/GetJobSummarySpectraS3Request.java} (52%) rename ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/{ListMultiPartUploadPartsResponse.java => spectrads3/GetJobSummarySpectraS3Response.java} (63%) create mode 100644 ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/spectrads3/ModifyCacheThrottleRuleSpectraS3Request.java rename ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/{ListMultiPartUploadsResponse.java => spectrads3/ModifyCacheThrottleRuleSpectraS3Response.java} (64%) create mode 100644 ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/spectrads3/PutCacheThrottleRuleSpectraS3Request.java create mode 100644 ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/spectrads3/PutCacheThrottleRuleSpectraS3Response.java create mode 100644 ds3-sdk/src/main/java/com/spectralogic/ds3client/models/CacheThrottleRule.java rename ds3-sdk/src/main/java/com/spectralogic/ds3client/models/{InitiateMultipartUploadResult.java => CacheThrottleRuleList.java} (58%) delete mode 100644 ds3-sdk/src/main/java/com/spectralogic/ds3client/models/CompleteMultipartUploadResult.java create mode 100644 ds3-sdk/src/main/java/com/spectralogic/ds3client/models/DestinationSummary.java create mode 100644 ds3-sdk/src/main/java/com/spectralogic/ds3client/models/Duration.java rename ds3-sdk/src/main/java/com/spectralogic/ds3client/models/{JobRestore.java => IomType.java} (97%) create mode 100644 ds3-sdk/src/main/java/com/spectralogic/ds3client/models/JobEntry.java rename ds3-sdk/src/main/java/com/spectralogic/ds3client/models/{MultiPartUploadPart.java => JobEntryList.java} (60%) create mode 100644 ds3-sdk/src/main/java/com/spectralogic/ds3client/models/JobSummaryApiBean.java delete mode 100644 ds3-sdk/src/main/java/com/spectralogic/ds3client/models/ListMultiPartUploadsResult.java delete mode 100644 ds3-sdk/src/main/java/com/spectralogic/ds3client/models/ListPartsResult.java delete mode 100644 ds3-sdk/src/main/java/com/spectralogic/ds3client/models/MultiPartUpload.java diff --git a/ds3-sdk-integration/src/integrationTest/java/com/spectralogic/ds3client/integration/PutJobManagement_Test.java b/ds3-sdk-integration/src/integrationTest/java/com/spectralogic/ds3client/integration/PutJobManagement_Test.java index 866632954..d2b524bd6 100644 --- a/ds3-sdk-integration/src/integrationTest/java/com/spectralogic/ds3client/integration/PutJobManagement_Test.java +++ b/ds3-sdk-integration/src/integrationTest/java/com/spectralogic/ds3client/integration/PutJobManagement_Test.java @@ -820,129 +820,6 @@ public void deleteJobCompletedNotification() throws IOException { assertThat(response, is(notNullValue())); } - @Test - public void initiateMultipartUpload() throws IOException { - try { - final InitiateMultiPartUploadResponse multiPartUploadResponse = client.initiateMultiPartUpload( - new InitiateMultiPartUploadRequest(BUCKET_NAME, "beowulf")); - - assertThat(multiPartUploadResponse.getInitiateMultipartUploadResult(), is(notNullValue())); - } catch (final FailedRequestException e) { - - assertThat(getCacheBytesAvailable(), lessThan(5000000000000L)); - assertThat(e.getStatusCode(), is(400)); - - } finally { - cancelAllJobsForBucket(client, BUCKET_NAME); - deleteAllContents(client, BUCKET_NAME); - } - } - - @Test - public void abortMultipartUpload() throws IOException { - String uploadID = null; - try { - try { - final InitiateMultiPartUploadResponse multiPartUploadResponse = client.initiateMultiPartUpload( - new InitiateMultiPartUploadRequest(BUCKET_NAME, "beowulf")); - uploadID = multiPartUploadResponse.getInitiateMultipartUploadResult().getUploadId(); - } catch (final FailedRequestException e) { - assertThat(getCacheBytesAvailable(), lessThan(5000000000000L)); - assertThat(e.getStatusCode(), is(400)); - } - - final UUID uuid; - if (uploadID != null) { - uuid = UUID.fromString(uploadID); - } else { - uuid = UUID.randomUUID(); - } - - final AbortMultiPartUploadResponse abortResponse = client.abortMultiPartUpload( - new AbortMultiPartUploadRequest(BUCKET_NAME, "beowulf", uuid)); - - assertThat(abortResponse, is(notNullValue())); - - } catch (final FailedRequestException e) { - - assertThat(e.getStatusCode(), is(404)); - - } finally { - deleteAllContents(client, BUCKET_NAME); - } - } - - @Test //TODO expand positive test if test target >5 TB cache is available - public void listMultiPartUploadParts() throws IOException { - try { - final ListMultiPartUploadPartsResponse response = client.listMultiPartUploadParts( - new ListMultiPartUploadPartsRequest(BUCKET_NAME, "beowulf", UUID.randomUUID())); - - assertThat(response.getListPartsResult(), is(notNullValue())); - assertTrue(response.getListPartsResult().getParts().isEmpty()); - - } finally { - deleteAllContents(client, BUCKET_NAME); - } - } - - @Test //TODO expand positive test if test target >5 TB cache is available - public void completeMultiPartUpload() throws IOException { - try { - client.completeMultiPartUpload( - //Passing in a null request payload, which is sufficient for checking error code - new CompleteMultiPartUploadRequest(BUCKET_NAME, "beowulf", null, UUID.randomUUID())); - - fail("Response should have failed because upload part does not exist"); - - } catch (final FailedRequestException e) { - - assertThat(e.getStatusCode(), is(404)); - - } finally { - deleteAllContents(client, BUCKET_NAME); - } - } - - @Test //TODO expand positive test if test target >5 TB cache is available - public void listMultiPartUploads() throws IOException { - try { - final ListMultiPartUploadsResponse response = client.listMultiPartUploads( - new ListMultiPartUploadsRequest(BUCKET_NAME)); - - assertThat(response.getListMultiPartUploadsResult(), is(notNullValue())); - assertTrue(response.getListMultiPartUploadsResult().getUploads().isEmpty()); - - } finally { - deleteAllContents(client, BUCKET_NAME); - } - } - - @Test //TODO expand positive test if test target >5 TB cache is available - public void putMultiPartUploadPart() throws IOException { - try { - final int length = 1024; - final Ds3Object obj = new Ds3Object("obj.txt", length); - final byte[] randomData = IOUtils.toByteArray(new RandomDataInputStream(System.currentTimeMillis(), obj.getSize())); - final ByteBuffer randomBuffer = ByteBuffer.wrap(randomData); - - final ByteArraySeekableByteChannel channel = new ByteArraySeekableByteChannel(length); - channel.write(randomBuffer); - - client.putMultiPartUploadPart( - new PutMultiPartUploadPartRequest(BUCKET_NAME, obj.getName(), channel, 5, length, UUID.randomUUID())); - - fail("Response should have failed because part does not exist"); - - } catch (final FailedRequestException e) { - - assertThat(e.getStatusCode(), is(404)); - - } finally { - deleteAllContents(client, BUCKET_NAME); - } - } - @Test public void testWriteJobWithRetries() throws Exception { final int maxNumObjectTransferAttempts = 3; diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/Ds3Client.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/Ds3Client.java index fb393c706..d993e1dc9 100644 --- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/Ds3Client.java +++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/Ds3Client.java @@ -37,31 +37,16 @@ public interface Ds3Client extends Closeable { - AbortMultiPartUploadResponse abortMultiPartUpload(final AbortMultiPartUploadRequest request) - throws IOException; - - - CompleteBlobResponse completeBlob(final CompleteBlobRequest request) throws IOException; - CompleteMultiPartUploadResponse completeMultiPartUpload(final CompleteMultiPartUploadRequest request) - throws IOException; - - - PutBucketResponse putBucket(final PutBucketRequest request) throws IOException; - PutMultiPartUploadPartResponse putMultiPartUploadPart(final PutMultiPartUploadPartRequest request) - throws IOException; - - - PutObjectResponse putObject(final PutObjectRequest request) throws IOException; @@ -100,21 +85,6 @@ HeadBucketResponse headBucket(final HeadBucketRequest request) HeadObjectResponse headObject(final HeadObjectRequest request) throws IOException; - - - InitiateMultiPartUploadResponse initiateMultiPartUpload(final InitiateMultiPartUploadRequest request) - throws IOException; - - - - ListMultiPartUploadPartsResponse listMultiPartUploadParts(final ListMultiPartUploadPartsRequest request) - throws IOException; - - - - ListMultiPartUploadsResponse listMultiPartUploads(final ListMultiPartUploadsRequest request) - throws IOException; - @ResponsePayloadModel("BucketAcl") @Action("CREATE") @Resource("BUCKET_ACL") @@ -245,6 +215,19 @@ GetBucketsSpectraS3Response getBucketsSpectraS3(final GetBucketsSpectraS3Request ModifyBucketSpectraS3Response modifyBucketSpectraS3(final ModifyBucketSpectraS3Request request) throws IOException; + @ResponsePayloadModel("CacheThrottleRule") + @Action("CREATE") + @Resource("CACHE_THROTTLE_RULE") + + PutCacheThrottleRuleSpectraS3Response putCacheThrottleRuleSpectraS3(final PutCacheThrottleRuleSpectraS3Request request) + throws IOException; + + @Action("DELETE") + @Resource("CACHE_THROTTLE_RULE") + + DeleteCacheThrottleRuleSpectraS3Response deleteCacheThrottleRuleSpectraS3(final DeleteCacheThrottleRuleSpectraS3Request request) + throws IOException; + @Action("BULK_MODIFY") @Resource("CACHE_FILESYSTEM") @@ -272,6 +255,20 @@ GetCacheFilesystemsSpectraS3Response getCacheFilesystemsSpectraS3(final GetCache GetCacheStateSpectraS3Response getCacheStateSpectraS3(final GetCacheStateSpectraS3Request request) throws IOException; + @ResponsePayloadModel("CacheThrottleRule") + @Action("SHOW") + @Resource("CACHE_THROTTLE_RULE") + + GetCacheThrottleRuleSpectraS3Response getCacheThrottleRuleSpectraS3(final GetCacheThrottleRuleSpectraS3Request request) + throws IOException; + + @ResponsePayloadModel("CacheThrottleRuleList") + @Action("LIST") + @Resource("CACHE_THROTTLE_RULE") + + GetCacheThrottleRulesSpectraS3Response getCacheThrottleRulesSpectraS3(final GetCacheThrottleRulesSpectraS3Request request) + throws IOException; + @ResponsePayloadModel("CacheFilesystem") @Action("MODIFY") @Resource("CACHE_FILESYSTEM") @@ -279,6 +276,13 @@ GetCacheStateSpectraS3Response getCacheStateSpectraS3(final GetCacheStateSpectra ModifyCacheFilesystemSpectraS3Response modifyCacheFilesystemSpectraS3(final ModifyCacheFilesystemSpectraS3Request request) throws IOException; + @ResponsePayloadModel("CacheThrottleRule") + @Action("MODIFY") + @Resource("CACHE_THROTTLE_RULE") + + ModifyCacheThrottleRuleSpectraS3Response modifyCacheThrottleRuleSpectraS3(final ModifyCacheThrottleRuleSpectraS3Request request) + throws IOException; + @ResponsePayloadModel("CapacitySummaryContainer") @Action("LIST") @Resource("CAPACITY_SUMMARY") @@ -871,6 +875,13 @@ GetJobChunksReadyForClientProcessingSpectraS3Response getJobChunksReadyForClient GetJobCreationFailuresSpectraS3Response getJobCreationFailuresSpectraS3(final GetJobCreationFailuresSpectraS3Request request) throws IOException; + @ResponsePayloadModel("JobEntryList") + @Action("LIST") + @Resource("JOB_CHUNK_DAO") + + GetJobEntriesSpectraS3Response getJobEntriesSpectraS3(final GetJobEntriesSpectraS3Request request) + throws IOException; + @ResponsePayloadModel("MasterObjectList") @Action("SHOW") @Resource("JOB") @@ -878,6 +889,13 @@ GetJobCreationFailuresSpectraS3Response getJobCreationFailuresSpectraS3(final Ge GetJobSpectraS3Response getJobSpectraS3(final GetJobSpectraS3Request request) throws IOException; + @ResponsePayloadModel("JobSummaryApiBean") + @Action("SHOW") + @Resource("JOB") + + GetJobSummarySpectraS3Response getJobSummarySpectraS3(final GetJobSummarySpectraS3Request request) + throws IOException; + @ResponsePayloadModel("String") @Action("SHOW") @Resource("JOB") diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/Ds3ClientImpl.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/Ds3ClientImpl.java index e7dcbbe27..9d301d095 100644 --- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/Ds3ClientImpl.java +++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/Ds3ClientImpl.java @@ -45,27 +45,15 @@ public ConnectionDetails getConnectionDetails() { return this.netClient.getConnectionDetails(); } - @Override - public AbortMultiPartUploadResponse abortMultiPartUpload(final AbortMultiPartUploadRequest request) throws IOException { - return new AbortMultiPartUploadResponseParser().response(this.netClient.getResponse(request)); - } @Override public CompleteBlobResponse completeBlob(final CompleteBlobRequest request) throws IOException { return new CompleteBlobResponseParser().response(this.netClient.getResponse(request)); } @Override - public CompleteMultiPartUploadResponse completeMultiPartUpload(final CompleteMultiPartUploadRequest request) throws IOException { - return new CompleteMultiPartUploadResponseParser().response(this.netClient.getResponse(request)); - } - @Override public PutBucketResponse putBucket(final PutBucketRequest request) throws IOException { return new PutBucketResponseParser().response(this.netClient.getResponse(request)); } @Override - public PutMultiPartUploadPartResponse putMultiPartUploadPart(final PutMultiPartUploadPartRequest request) throws IOException { - return new PutMultiPartUploadPartResponseParser().response(this.netClient.getResponse(request)); - } - @Override public PutObjectResponse putObject(final PutObjectRequest request) throws IOException { return new PutObjectResponseParser().response(this.netClient.getResponse(request)); } @@ -98,18 +86,6 @@ public HeadObjectResponse headObject(final HeadObjectRequest request) throws IOE return new HeadObjectResponseParser().response(this.netClient.getResponse(request)); } @Override - public InitiateMultiPartUploadResponse initiateMultiPartUpload(final InitiateMultiPartUploadRequest request) throws IOException { - return new InitiateMultiPartUploadResponseParser().response(this.netClient.getResponse(request)); - } - @Override - public ListMultiPartUploadPartsResponse listMultiPartUploadParts(final ListMultiPartUploadPartsRequest request) throws IOException { - return new ListMultiPartUploadPartsResponseParser().response(this.netClient.getResponse(request)); - } - @Override - public ListMultiPartUploadsResponse listMultiPartUploads(final ListMultiPartUploadsRequest request) throws IOException { - return new ListMultiPartUploadsResponseParser().response(this.netClient.getResponse(request)); - } - @Override public PutBucketAclForGroupSpectraS3Response putBucketAclForGroupSpectraS3(final PutBucketAclForGroupSpectraS3Request request) throws IOException { return new PutBucketAclForGroupSpectraS3ResponseParser().response(this.netClient.getResponse(request)); } @@ -186,6 +162,14 @@ public ModifyBucketSpectraS3Response modifyBucketSpectraS3(final ModifyBucketSpe return new ModifyBucketSpectraS3ResponseParser().response(this.netClient.getResponse(request)); } @Override + public PutCacheThrottleRuleSpectraS3Response putCacheThrottleRuleSpectraS3(final PutCacheThrottleRuleSpectraS3Request request) throws IOException { + return new PutCacheThrottleRuleSpectraS3ResponseParser().response(this.netClient.getResponse(request)); + } + @Override + public DeleteCacheThrottleRuleSpectraS3Response deleteCacheThrottleRuleSpectraS3(final DeleteCacheThrottleRuleSpectraS3Request request) throws IOException { + return new DeleteCacheThrottleRuleSpectraS3ResponseParser().response(this.netClient.getResponse(request)); + } + @Override public ForceFullCacheReclaimSpectraS3Response forceFullCacheReclaimSpectraS3(final ForceFullCacheReclaimSpectraS3Request request) throws IOException { return new ForceFullCacheReclaimSpectraS3ResponseParser().response(this.netClient.getResponse(request)); } @@ -202,10 +186,22 @@ public GetCacheStateSpectraS3Response getCacheStateSpectraS3(final GetCacheState return new GetCacheStateSpectraS3ResponseParser().response(this.netClient.getResponse(request)); } @Override + public GetCacheThrottleRuleSpectraS3Response getCacheThrottleRuleSpectraS3(final GetCacheThrottleRuleSpectraS3Request request) throws IOException { + return new GetCacheThrottleRuleSpectraS3ResponseParser().response(this.netClient.getResponse(request)); + } + @Override + public GetCacheThrottleRulesSpectraS3Response getCacheThrottleRulesSpectraS3(final GetCacheThrottleRulesSpectraS3Request request) throws IOException { + return new GetCacheThrottleRulesSpectraS3ResponseParser().response(this.netClient.getResponse(request)); + } + @Override public ModifyCacheFilesystemSpectraS3Response modifyCacheFilesystemSpectraS3(final ModifyCacheFilesystemSpectraS3Request request) throws IOException { return new ModifyCacheFilesystemSpectraS3ResponseParser().response(this.netClient.getResponse(request)); } @Override + public ModifyCacheThrottleRuleSpectraS3Response modifyCacheThrottleRuleSpectraS3(final ModifyCacheThrottleRuleSpectraS3Request request) throws IOException { + return new ModifyCacheThrottleRuleSpectraS3ResponseParser().response(this.netClient.getResponse(request)); + } + @Override public GetBucketCapacitySummarySpectraS3Response getBucketCapacitySummarySpectraS3(final GetBucketCapacitySummarySpectraS3Request request) throws IOException { return new GetBucketCapacitySummarySpectraS3ResponseParser().response(this.netClient.getResponse(request)); } @@ -558,10 +554,18 @@ public GetJobCreationFailuresSpectraS3Response getJobCreationFailuresSpectraS3(f return new GetJobCreationFailuresSpectraS3ResponseParser().response(this.netClient.getResponse(request)); } @Override + public GetJobEntriesSpectraS3Response getJobEntriesSpectraS3(final GetJobEntriesSpectraS3Request request) throws IOException { + return new GetJobEntriesSpectraS3ResponseParser().response(this.netClient.getResponse(request)); + } + @Override public GetJobSpectraS3Response getJobSpectraS3(final GetJobSpectraS3Request request) throws IOException { return new GetJobSpectraS3ResponseParser().response(this.netClient.getResponse(request)); } @Override + public GetJobSummarySpectraS3Response getJobSummarySpectraS3(final GetJobSummarySpectraS3Request request) throws IOException { + return new GetJobSummarySpectraS3ResponseParser().response(this.netClient.getResponse(request)); + } + @Override public GetJobToReplicateSpectraS3Response getJobToReplicateSpectraS3(final GetJobToReplicateSpectraS3Request request) throws IOException { return new GetJobToReplicateSpectraS3ResponseParser().response(this.netClient.getResponse(request)); } diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/CompleteMultiPartUploadRequest.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/CompleteMultiPartUploadRequest.java deleted file mode 100644 index 8a86f5b26..000000000 --- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/CompleteMultiPartUploadRequest.java +++ /dev/null @@ -1,114 +0,0 @@ -/* - * ****************************************************************************** - * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"). You may not use - * this file except in compliance with the License. A copy of the License is located at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * or in the "license" file accompanying this file. - * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - * **************************************************************************** - */ - -// This code is auto-generated, do not modify -package com.spectralogic.ds3client.commands; - -import com.spectralogic.ds3client.networking.HttpVerb; -import com.spectralogic.ds3client.models.multipart.CompleteMultipartUpload; -import java.io.ByteArrayInputStream; -import java.io.InputStream; -import com.spectralogic.ds3client.serializer.XmlOutput; -import java.nio.charset.Charset; -import java.nio.charset.StandardCharsets; -import com.spectralogic.ds3client.commands.interfaces.AbstractRequest; -import java.util.UUID; - -public class CompleteMultiPartUploadRequest extends AbstractRequest { - - // Variables - - private final String bucketName; - - private final String objectName; - - private final String uploadId; - - private final CompleteMultipartUpload requestPayload; - private long size = 0; - - // Constructor - - - public CompleteMultiPartUploadRequest(final String bucketName, final String objectName, final CompleteMultipartUpload requestPayload, final UUID uploadId) { - this.bucketName = bucketName; - this.objectName = objectName; - this.uploadId = uploadId.toString(); - this.requestPayload = requestPayload; - - this.updateQueryParam("upload_id", uploadId); - - } - - - public CompleteMultiPartUploadRequest(final String bucketName, final String objectName, final CompleteMultipartUpload requestPayload, final String uploadId) { - this.bucketName = bucketName; - this.objectName = objectName; - this.uploadId = uploadId; - this.requestPayload = requestPayload; - - this.updateQueryParam("upload_id", uploadId); - - } - - - @Override - public HttpVerb getVerb() { - return HttpVerb.POST; - } - - @Override - public String getPath() { - return "/" + this.bucketName + "/" + this.objectName; - } - @Override - public long getSize() { - return this.size; - } - - @Override - public InputStream getStream() { - if (requestPayload == null) { - return null; - } - - final String xmlOutput = XmlOutput.toXml(requestPayload); - - final byte[] stringBytes = xmlOutput.getBytes(StandardCharsets.UTF_8); - this.size = stringBytes.length; - return new ByteArrayInputStream(stringBytes); - } - - - public String getBucketName() { - return this.bucketName; - } - - - public String getObjectName() { - return this.objectName; - } - - - public String getUploadId() { - return this.uploadId; - } - - - public CompleteMultipartUpload getRequestPayload() { - return this.requestPayload; - } - -} \ No newline at end of file diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/ListMultiPartUploadPartsRequest.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/ListMultiPartUploadPartsRequest.java deleted file mode 100644 index eb2bb1795..000000000 --- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/ListMultiPartUploadPartsRequest.java +++ /dev/null @@ -1,109 +0,0 @@ -/* - * ****************************************************************************** - * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"). You may not use - * this file except in compliance with the License. A copy of the License is located at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * or in the "license" file accompanying this file. - * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - * **************************************************************************** - */ - -// This code is auto-generated, do not modify -package com.spectralogic.ds3client.commands; - -import com.spectralogic.ds3client.networking.HttpVerb; -import com.spectralogic.ds3client.commands.interfaces.AbstractRequest; -import java.util.UUID; -import java.lang.Integer; - -public class ListMultiPartUploadPartsRequest extends AbstractRequest { - - // Variables - - private final String bucketName; - - private final String objectName; - - private final String uploadId; - - private int maxParts; - - private Integer partNumberMarker; - - // Constructor - - - public ListMultiPartUploadPartsRequest(final String bucketName, final String objectName, final UUID uploadId) { - this.bucketName = bucketName; - this.objectName = objectName; - this.uploadId = uploadId.toString(); - - this.updateQueryParam("upload_id", uploadId); - - } - - - public ListMultiPartUploadPartsRequest(final String bucketName, final String objectName, final String uploadId) { - this.bucketName = bucketName; - this.objectName = objectName; - this.uploadId = uploadId; - - this.updateQueryParam("upload_id", uploadId); - - } - - public ListMultiPartUploadPartsRequest withMaxParts(final int maxParts) { - this.maxParts = maxParts; - this.updateQueryParam("max_parts", maxParts); - return this; - } - - - public ListMultiPartUploadPartsRequest withPartNumberMarker(final Integer partNumberMarker) { - this.partNumberMarker = partNumberMarker; - this.updateQueryParam("part_number_marker", partNumberMarker); - return this; - } - - - - @Override - public HttpVerb getVerb() { - return HttpVerb.GET; - } - - @Override - public String getPath() { - return "/" + this.bucketName + "/" + this.objectName; - } - - public String getBucketName() { - return this.bucketName; - } - - - public String getObjectName() { - return this.objectName; - } - - - public String getUploadId() { - return this.uploadId; - } - - - public int getMaxParts() { - return this.maxParts; - } - - - public Integer getPartNumberMarker() { - return this.partNumberMarker; - } - -} \ No newline at end of file diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/ListMultiPartUploadsRequest.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/ListMultiPartUploadsRequest.java deleted file mode 100644 index 9812311e0..000000000 --- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/ListMultiPartUploadsRequest.java +++ /dev/null @@ -1,122 +0,0 @@ -/* - * ****************************************************************************** - * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"). You may not use - * this file except in compliance with the License. A copy of the License is located at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * or in the "license" file accompanying this file. - * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - * **************************************************************************** - */ - -// This code is auto-generated, do not modify -package com.spectralogic.ds3client.commands; - -import com.spectralogic.ds3client.networking.HttpVerb; -import com.spectralogic.ds3client.commands.interfaces.AbstractRequest; - -public class ListMultiPartUploadsRequest extends AbstractRequest { - - // Variables - - private final String bucketName; - - private String delimiter; - - private String keyMarker; - - private int maxUploads; - - private String prefix; - - private String uploadIdMarker; - - // Constructor - - - public ListMultiPartUploadsRequest(final String bucketName) { - this.bucketName = bucketName; - - this.getQueryParams().put("uploads", null); - } - - public ListMultiPartUploadsRequest withDelimiter(final String delimiter) { - this.delimiter = delimiter; - this.updateQueryParam("delimiter", delimiter); - return this; - } - - - public ListMultiPartUploadsRequest withKeyMarker(final String keyMarker) { - this.keyMarker = keyMarker; - this.updateQueryParam("key_marker", keyMarker); - return this; - } - - - public ListMultiPartUploadsRequest withMaxUploads(final int maxUploads) { - this.maxUploads = maxUploads; - this.updateQueryParam("max_uploads", maxUploads); - return this; - } - - - public ListMultiPartUploadsRequest withPrefix(final String prefix) { - this.prefix = prefix; - this.updateQueryParam("prefix", prefix); - return this; - } - - - public ListMultiPartUploadsRequest withUploadIdMarker(final String uploadIdMarker) { - this.uploadIdMarker = uploadIdMarker; - this.updateQueryParam("upload_id_marker", uploadIdMarker); - return this; - } - - - - @Override - public HttpVerb getVerb() { - return HttpVerb.GET; - } - - @Override - public String getPath() { - return "/" + this.bucketName; - } - - public String getBucketName() { - return this.bucketName; - } - - - public String getDelimiter() { - return this.delimiter; - } - - - public String getKeyMarker() { - return this.keyMarker; - } - - - public int getMaxUploads() { - return this.maxUploads; - } - - - public String getPrefix() { - return this.prefix; - } - - - public String getUploadIdMarker() { - return this.uploadIdMarker; - } - -} \ No newline at end of file diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/PutMultiPartUploadPartRequest.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/PutMultiPartUploadPartRequest.java deleted file mode 100644 index 9dfae1fd7..000000000 --- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/PutMultiPartUploadPartRequest.java +++ /dev/null @@ -1,159 +0,0 @@ -/* - * ****************************************************************************** - * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"). You may not use - * this file except in compliance with the License. A copy of the License is located at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * or in the "license" file accompanying this file. - * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - * **************************************************************************** - */ - -// This code is auto-generated, do not modify -package com.spectralogic.ds3client.commands; - -import com.spectralogic.ds3client.networking.HttpVerb; -import com.spectralogic.ds3client.commands.interfaces.AbstractRequest; -import java.util.UUID; -import javax.annotation.Nonnull; -import com.google.common.base.Preconditions; -import com.spectralogic.ds3client.utils.SeekableByteChannelInputStream; -import java.nio.channels.SeekableByteChannel; -import java.io.InputStream; - -public class PutMultiPartUploadPartRequest extends AbstractRequest { - - // Variables - - private final String bucketName; - - private final String objectName; - - private final int partNumber; - - private final String uploadId; - - private final long size; - - private final InputStream stream; - - private SeekableByteChannel channel; - - // Constructor - - - public PutMultiPartUploadPartRequest(final String bucketName, final String objectName, @Nonnull final SeekableByteChannel channel, final int partNumber, final long size, final UUID uploadId) { - Preconditions.checkNotNull(channel, "Channel may not be null."); - this.bucketName = bucketName; - this.objectName = objectName; - this.partNumber = partNumber; - this.uploadId = uploadId.toString(); - this.size = size; - this.channel = channel; - - this.updateQueryParam("part_number", partNumber); - - this.updateQueryParam("upload_id", uploadId); - - this.stream = new SeekableByteChannelInputStream(channel); - } - - - public PutMultiPartUploadPartRequest(final String bucketName, final String objectName, @Nonnull final SeekableByteChannel channel, final int partNumber, final long size, final String uploadId) { - Preconditions.checkNotNull(channel, "Channel may not be null."); - this.bucketName = bucketName; - this.objectName = objectName; - this.partNumber = partNumber; - this.uploadId = uploadId; - this.size = size; - this.channel = channel; - - this.updateQueryParam("part_number", partNumber); - - this.updateQueryParam("upload_id", uploadId); - - this.stream = new SeekableByteChannelInputStream(channel); - } - - - public PutMultiPartUploadPartRequest(final String bucketName, final String objectName, final int partNumber, final long size, @Nonnull final InputStream stream, final UUID uploadId) { - Preconditions.checkNotNull(stream, "Stream may not be null."); - this.bucketName = bucketName; - this.objectName = objectName; - this.partNumber = partNumber; - this.uploadId = uploadId.toString(); - this.size = size; - this.stream = stream; - - this.updateQueryParam("part_number", partNumber); - - this.updateQueryParam("upload_id", uploadId); - - } - - - public PutMultiPartUploadPartRequest(final String bucketName, final String objectName, final int partNumber, final long size, @Nonnull final InputStream stream, final String uploadId) { - Preconditions.checkNotNull(stream, "Stream may not be null."); - this.bucketName = bucketName; - this.objectName = objectName; - this.partNumber = partNumber; - this.uploadId = uploadId; - this.size = size; - this.stream = stream; - - this.updateQueryParam("part_number", partNumber); - - this.updateQueryParam("upload_id", uploadId); - - } - - - @Override - public HttpVerb getVerb() { - return HttpVerb.PUT; - } - - @Override - public String getPath() { - return "/" + this.bucketName + "/" + this.objectName; - } - - public String getBucketName() { - return this.bucketName; - } - - - public String getObjectName() { - return this.objectName; - } - - - public int getPartNumber() { - return this.partNumber; - } - - - public String getUploadId() { - return this.uploadId; - } - - - public long getSize() { - return this.size; - } - - - public InputStream getStream() { - return this.stream; - } - - - public SeekableByteChannel getChannel() { - return this.channel; - } - -} \ No newline at end of file diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/AbortMultiPartUploadResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteCacheThrottleRuleSpectraS3ResponseParser.java similarity index 78% rename from ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/AbortMultiPartUploadResponseParser.java rename to ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteCacheThrottleRuleSpectraS3ResponseParser.java index 615aaac10..2c32f93be 100644 --- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/AbortMultiPartUploadResponseParser.java +++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/DeleteCacheThrottleRuleSpectraS3ResponseParser.java @@ -16,23 +16,23 @@ // This code is auto-generated, do not modify package com.spectralogic.ds3client.commands.parsers; -import com.spectralogic.ds3client.commands.AbortMultiPartUploadResponse; import com.spectralogic.ds3client.commands.parsers.interfaces.AbstractResponseParser; import com.spectralogic.ds3client.commands.parsers.utils.ResponseParserUtils; +import com.spectralogic.ds3client.commands.spectrads3.DeleteCacheThrottleRuleSpectraS3Response; import com.spectralogic.ds3client.networking.WebResponse; import java.io.IOException; -public class AbortMultiPartUploadResponseParser extends AbstractResponseParser { +public class DeleteCacheThrottleRuleSpectraS3ResponseParser extends AbstractResponseParser { private final int[] expectedStatusCodes = new int[]{204}; @Override - public AbortMultiPartUploadResponse parseXmlResponse(final WebResponse response) throws IOException { + public DeleteCacheThrottleRuleSpectraS3Response parseXmlResponse(final WebResponse response) throws IOException { final int statusCode = response.getStatusCode(); if (ResponseParserUtils.validateStatusCode(statusCode, expectedStatusCodes)) { switch (statusCode) { case 204: //There is no payload, return an empty response handler - return new AbortMultiPartUploadResponse(this.getChecksum(), this.getChecksumType()); + return new DeleteCacheThrottleRuleSpectraS3Response(this.getChecksum(), this.getChecksumType()); default: assert false: "validateStatusCode should have made it impossible to reach this line"; diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/InitiateMultiPartUploadResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetCacheThrottleRuleSpectraS3ResponseParser.java similarity index 74% rename from ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/InitiateMultiPartUploadResponseParser.java rename to ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetCacheThrottleRuleSpectraS3ResponseParser.java index 57055cd8e..416273a92 100644 --- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/InitiateMultiPartUploadResponseParser.java +++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetCacheThrottleRuleSpectraS3ResponseParser.java @@ -16,27 +16,27 @@ // This code is auto-generated, do not modify package com.spectralogic.ds3client.commands.parsers; -import com.spectralogic.ds3client.commands.InitiateMultiPartUploadResponse; import com.spectralogic.ds3client.commands.parsers.interfaces.AbstractResponseParser; import com.spectralogic.ds3client.commands.parsers.utils.ResponseParserUtils; -import com.spectralogic.ds3client.models.InitiateMultipartUploadResult; +import com.spectralogic.ds3client.commands.spectrads3.GetCacheThrottleRuleSpectraS3Response; +import com.spectralogic.ds3client.models.CacheThrottleRule; import com.spectralogic.ds3client.networking.WebResponse; import com.spectralogic.ds3client.serializer.XmlOutput; import java.io.IOException; import java.io.InputStream; -public class InitiateMultiPartUploadResponseParser extends AbstractResponseParser { +public class GetCacheThrottleRuleSpectraS3ResponseParser extends AbstractResponseParser { private final int[] expectedStatusCodes = new int[]{200}; @Override - public InitiateMultiPartUploadResponse parseXmlResponse(final WebResponse response) throws IOException { + public GetCacheThrottleRuleSpectraS3Response parseXmlResponse(final WebResponse response) throws IOException { final int statusCode = response.getStatusCode(); if (ResponseParserUtils.validateStatusCode(statusCode, expectedStatusCodes)) { switch (statusCode) { case 200: try (final InputStream inputStream = response.getResponseStream()) { - final InitiateMultipartUploadResult result = XmlOutput.fromXml(inputStream, InitiateMultipartUploadResult.class); - return new InitiateMultiPartUploadResponse(result, this.getChecksum(), this.getChecksumType()); + final CacheThrottleRule result = XmlOutput.fromXml(inputStream, CacheThrottleRule.class); + return new GetCacheThrottleRuleSpectraS3Response(result, this.getChecksum(), this.getChecksumType()); } default: diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetCacheThrottleRulesSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetCacheThrottleRulesSpectraS3ResponseParser.java new file mode 100644 index 000000000..e6c65bb63 --- /dev/null +++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetCacheThrottleRulesSpectraS3ResponseParser.java @@ -0,0 +1,51 @@ +/* + * ****************************************************************************** + * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"). You may not use + * this file except in compliance with the License. A copy of the License is located at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * or in the "license" file accompanying this file. + * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + * **************************************************************************** + */ + +// This code is auto-generated, do not modify +package com.spectralogic.ds3client.commands.parsers; + +import com.spectralogic.ds3client.commands.parsers.interfaces.AbstractResponseParser; +import com.spectralogic.ds3client.commands.parsers.utils.ResponseParserUtils; +import com.spectralogic.ds3client.commands.spectrads3.GetCacheThrottleRulesSpectraS3Response; +import com.spectralogic.ds3client.models.CacheThrottleRuleList; +import com.spectralogic.ds3client.networking.WebResponse; +import com.spectralogic.ds3client.serializer.XmlOutput; +import java.io.IOException; +import java.io.InputStream; + +public class GetCacheThrottleRulesSpectraS3ResponseParser extends AbstractResponseParser { + private final int[] expectedStatusCodes = new int[]{200}; + + @Override + public GetCacheThrottleRulesSpectraS3Response parseXmlResponse(final WebResponse response) throws IOException { + final int statusCode = response.getStatusCode(); + final Integer pagingTruncated = parseIntHeader("page-truncated"); + final Integer pagingTotalResultCount = parseIntHeader("total-result-count"); + if (ResponseParserUtils.validateStatusCode(statusCode, expectedStatusCodes)) { + switch (statusCode) { + case 200: + try (final InputStream inputStream = response.getResponseStream()) { + final CacheThrottleRuleList result = XmlOutput.fromXml(inputStream, CacheThrottleRuleList.class); + return new GetCacheThrottleRulesSpectraS3Response(result, pagingTotalResultCount, pagingTruncated, this.getChecksum(), this.getChecksumType()); + } + + default: + assert false: "validateStatusCode should have made it impossible to reach this line"; + } + } + + throw ResponseParserUtils.createFailedRequest(response, expectedStatusCodes); + } +} \ No newline at end of file diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetJobEntriesSpectraS3ResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetJobEntriesSpectraS3ResponseParser.java new file mode 100644 index 000000000..ebafbba61 --- /dev/null +++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetJobEntriesSpectraS3ResponseParser.java @@ -0,0 +1,51 @@ +/* + * ****************************************************************************** + * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"). You may not use + * this file except in compliance with the License. A copy of the License is located at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * or in the "license" file accompanying this file. + * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + * **************************************************************************** + */ + +// This code is auto-generated, do not modify +package com.spectralogic.ds3client.commands.parsers; + +import com.spectralogic.ds3client.commands.parsers.interfaces.AbstractResponseParser; +import com.spectralogic.ds3client.commands.parsers.utils.ResponseParserUtils; +import com.spectralogic.ds3client.commands.spectrads3.GetJobEntriesSpectraS3Response; +import com.spectralogic.ds3client.models.JobEntryList; +import com.spectralogic.ds3client.networking.WebResponse; +import com.spectralogic.ds3client.serializer.XmlOutput; +import java.io.IOException; +import java.io.InputStream; + +public class GetJobEntriesSpectraS3ResponseParser extends AbstractResponseParser { + private final int[] expectedStatusCodes = new int[]{200}; + + @Override + public GetJobEntriesSpectraS3Response parseXmlResponse(final WebResponse response) throws IOException { + final int statusCode = response.getStatusCode(); + final Integer pagingTruncated = parseIntHeader("page-truncated"); + final Integer pagingTotalResultCount = parseIntHeader("total-result-count"); + if (ResponseParserUtils.validateStatusCode(statusCode, expectedStatusCodes)) { + switch (statusCode) { + case 200: + try (final InputStream inputStream = response.getResponseStream()) { + final JobEntryList result = XmlOutput.fromXml(inputStream, JobEntryList.class); + return new GetJobEntriesSpectraS3Response(result, pagingTotalResultCount, pagingTruncated, this.getChecksum(), this.getChecksumType()); + } + + default: + assert false: "validateStatusCode should have made it impossible to reach this line"; + } + } + + throw ResponseParserUtils.createFailedRequest(response, expectedStatusCodes); + } +} \ No newline at end of file diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/ListMultiPartUploadPartsResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetJobSummarySpectraS3ResponseParser.java similarity index 75% rename from ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/ListMultiPartUploadPartsResponseParser.java rename to ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetJobSummarySpectraS3ResponseParser.java index e8da0857c..dcd9b3cd9 100644 --- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/ListMultiPartUploadPartsResponseParser.java +++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetJobSummarySpectraS3ResponseParser.java @@ -16,27 +16,27 @@ // This code is auto-generated, do not modify package com.spectralogic.ds3client.commands.parsers; -import com.spectralogic.ds3client.commands.ListMultiPartUploadPartsResponse; import com.spectralogic.ds3client.commands.parsers.interfaces.AbstractResponseParser; import com.spectralogic.ds3client.commands.parsers.utils.ResponseParserUtils; -import com.spectralogic.ds3client.models.ListPartsResult; +import com.spectralogic.ds3client.commands.spectrads3.GetJobSummarySpectraS3Response; +import com.spectralogic.ds3client.models.JobSummaryApiBean; import com.spectralogic.ds3client.networking.WebResponse; import com.spectralogic.ds3client.serializer.XmlOutput; import java.io.IOException; import java.io.InputStream; -public class ListMultiPartUploadPartsResponseParser extends AbstractResponseParser { +public class GetJobSummarySpectraS3ResponseParser extends AbstractResponseParser { private final int[] expectedStatusCodes = new int[]{200}; @Override - public ListMultiPartUploadPartsResponse parseXmlResponse(final WebResponse response) throws IOException { + public GetJobSummarySpectraS3Response parseXmlResponse(final WebResponse response) throws IOException { final int statusCode = response.getStatusCode(); if (ResponseParserUtils.validateStatusCode(statusCode, expectedStatusCodes)) { switch (statusCode) { case 200: try (final InputStream inputStream = response.getResponseStream()) { - final ListPartsResult result = XmlOutput.fromXml(inputStream, ListPartsResult.class); - return new ListMultiPartUploadPartsResponse(result, this.getChecksum(), this.getChecksumType()); + final JobSummaryApiBean result = XmlOutput.fromXml(inputStream, JobSummaryApiBean.class); + return new GetJobSummarySpectraS3Response(result, this.getChecksum(), this.getChecksumType()); } default: diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/ListMultiPartUploadsResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/ModifyCacheThrottleRuleSpectraS3ResponseParser.java similarity index 73% rename from ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/ListMultiPartUploadsResponseParser.java rename to ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/ModifyCacheThrottleRuleSpectraS3ResponseParser.java index fb6198198..1640af7f7 100644 --- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/ListMultiPartUploadsResponseParser.java +++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/ModifyCacheThrottleRuleSpectraS3ResponseParser.java @@ -16,27 +16,27 @@ // This code is auto-generated, do not modify package com.spectralogic.ds3client.commands.parsers; -import com.spectralogic.ds3client.commands.ListMultiPartUploadsResponse; import com.spectralogic.ds3client.commands.parsers.interfaces.AbstractResponseParser; import com.spectralogic.ds3client.commands.parsers.utils.ResponseParserUtils; -import com.spectralogic.ds3client.models.ListMultiPartUploadsResult; +import com.spectralogic.ds3client.commands.spectrads3.ModifyCacheThrottleRuleSpectraS3Response; +import com.spectralogic.ds3client.models.CacheThrottleRule; import com.spectralogic.ds3client.networking.WebResponse; import com.spectralogic.ds3client.serializer.XmlOutput; import java.io.IOException; import java.io.InputStream; -public class ListMultiPartUploadsResponseParser extends AbstractResponseParser { +public class ModifyCacheThrottleRuleSpectraS3ResponseParser extends AbstractResponseParser { private final int[] expectedStatusCodes = new int[]{200}; @Override - public ListMultiPartUploadsResponse parseXmlResponse(final WebResponse response) throws IOException { + public ModifyCacheThrottleRuleSpectraS3Response parseXmlResponse(final WebResponse response) throws IOException { final int statusCode = response.getStatusCode(); if (ResponseParserUtils.validateStatusCode(statusCode, expectedStatusCodes)) { switch (statusCode) { case 200: try (final InputStream inputStream = response.getResponseStream()) { - final ListMultiPartUploadsResult result = XmlOutput.fromXml(inputStream, ListMultiPartUploadsResult.class); - return new ListMultiPartUploadsResponse(result, this.getChecksum(), this.getChecksumType()); + final CacheThrottleRule result = XmlOutput.fromXml(inputStream, CacheThrottleRule.class); + return new ModifyCacheThrottleRuleSpectraS3Response(result, this.getChecksum(), this.getChecksumType()); } default: diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/CompleteMultiPartUploadResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/PutCacheThrottleRuleSpectraS3ResponseParser.java similarity index 70% rename from ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/CompleteMultiPartUploadResponseParser.java rename to ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/PutCacheThrottleRuleSpectraS3ResponseParser.java index 4d9afd826..585780ec2 100644 --- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/CompleteMultiPartUploadResponseParser.java +++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/PutCacheThrottleRuleSpectraS3ResponseParser.java @@ -16,27 +16,27 @@ // This code is auto-generated, do not modify package com.spectralogic.ds3client.commands.parsers; -import com.spectralogic.ds3client.commands.CompleteMultiPartUploadResponse; import com.spectralogic.ds3client.commands.parsers.interfaces.AbstractResponseParser; import com.spectralogic.ds3client.commands.parsers.utils.ResponseParserUtils; -import com.spectralogic.ds3client.models.CompleteMultipartUploadResult; +import com.spectralogic.ds3client.commands.spectrads3.PutCacheThrottleRuleSpectraS3Response; +import com.spectralogic.ds3client.models.CacheThrottleRule; import com.spectralogic.ds3client.networking.WebResponse; import com.spectralogic.ds3client.serializer.XmlOutput; import java.io.IOException; import java.io.InputStream; -public class CompleteMultiPartUploadResponseParser extends AbstractResponseParser { - private final int[] expectedStatusCodes = new int[]{200}; +public class PutCacheThrottleRuleSpectraS3ResponseParser extends AbstractResponseParser { + private final int[] expectedStatusCodes = new int[]{201}; @Override - public CompleteMultiPartUploadResponse parseXmlResponse(final WebResponse response) throws IOException { + public PutCacheThrottleRuleSpectraS3Response parseXmlResponse(final WebResponse response) throws IOException { final int statusCode = response.getStatusCode(); if (ResponseParserUtils.validateStatusCode(statusCode, expectedStatusCodes)) { switch (statusCode) { - case 200: + case 201: try (final InputStream inputStream = response.getResponseStream()) { - final CompleteMultipartUploadResult result = XmlOutput.fromXml(inputStream, CompleteMultipartUploadResult.class); - return new CompleteMultiPartUploadResponse(result, this.getChecksum(), this.getChecksumType()); + final CacheThrottleRule result = XmlOutput.fromXml(inputStream, CacheThrottleRule.class); + return new PutCacheThrottleRuleSpectraS3Response(result, this.getChecksum(), this.getChecksumType()); } default: diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/PutMultiPartUploadPartResponseParser.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/PutMultiPartUploadPartResponseParser.java deleted file mode 100644 index acf0f6a0c..000000000 --- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/PutMultiPartUploadPartResponseParser.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * ****************************************************************************** - * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"). You may not use - * this file except in compliance with the License. A copy of the License is located at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * or in the "license" file accompanying this file. - * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - * **************************************************************************** - */ - -// This code is auto-generated, do not modify -package com.spectralogic.ds3client.commands.parsers; - -import com.spectralogic.ds3client.commands.PutMultiPartUploadPartResponse; -import com.spectralogic.ds3client.commands.parsers.interfaces.AbstractResponseParser; -import com.spectralogic.ds3client.commands.parsers.utils.ResponseParserUtils; -import com.spectralogic.ds3client.networking.WebResponse; -import java.io.IOException; - -public class PutMultiPartUploadPartResponseParser extends AbstractResponseParser { - private final int[] expectedStatusCodes = new int[]{200}; - - @Override - public PutMultiPartUploadPartResponse parseXmlResponse(final WebResponse response) throws IOException { - final int statusCode = response.getStatusCode(); - if (ResponseParserUtils.validateStatusCode(statusCode, expectedStatusCodes)) { - switch (statusCode) { - case 200: - //There is no payload, return an empty response handler - return new PutMultiPartUploadPartResponse(this.getChecksum(), this.getChecksumType()); - - default: - assert false: "validateStatusCode should have made it impossible to reach this line"; - } - } - - throw ResponseParserUtils.createFailedRequest(response, expectedStatusCodes); - } -} \ No newline at end of file diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/InitiateMultiPartUploadRequest.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/spectrads3/DeleteCacheThrottleRuleSpectraS3Request.java similarity index 63% rename from ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/InitiateMultiPartUploadRequest.java rename to ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/spectrads3/DeleteCacheThrottleRuleSpectraS3Request.java index e6c8bb4e5..02bdc9cbd 100644 --- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/InitiateMultiPartUploadRequest.java +++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/spectrads3/DeleteCacheThrottleRuleSpectraS3Request.java @@ -14,47 +14,38 @@ */ // This code is auto-generated, do not modify -package com.spectralogic.ds3client.commands; +package com.spectralogic.ds3client.commands.spectrads3; import com.spectralogic.ds3client.networking.HttpVerb; import com.spectralogic.ds3client.commands.interfaces.AbstractRequest; -public class InitiateMultiPartUploadRequest extends AbstractRequest { +public class DeleteCacheThrottleRuleSpectraS3Request extends AbstractRequest { // Variables - private final String bucketName; - - private final String objectName; + private final String cacheThrottleRule; // Constructor - public InitiateMultiPartUploadRequest(final String bucketName, final String objectName) { - this.bucketName = bucketName; - this.objectName = objectName; + public DeleteCacheThrottleRuleSpectraS3Request(final String cacheThrottleRule) { + this.cacheThrottleRule = cacheThrottleRule; - this.getQueryParams().put("uploads", null); } @Override public HttpVerb getVerb() { - return HttpVerb.POST; + return HttpVerb.DELETE; } @Override public String getPath() { - return "/" + this.bucketName + "/" + this.objectName; + return "/_rest_/cache_throttle_rule/" + cacheThrottleRule; } - public String getBucketName() { - return this.bucketName; - } - - - public String getObjectName() { - return this.objectName; + public String getCacheThrottleRule() { + return this.cacheThrottleRule; } } \ No newline at end of file diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/AbortMultiPartUploadResponse.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/spectrads3/DeleteCacheThrottleRuleSpectraS3Response.java similarity index 79% rename from ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/AbortMultiPartUploadResponse.java rename to ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/spectrads3/DeleteCacheThrottleRuleSpectraS3Response.java index 37303bc37..c96a01e76 100644 --- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/AbortMultiPartUploadResponse.java +++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/spectrads3/DeleteCacheThrottleRuleSpectraS3Response.java @@ -14,14 +14,14 @@ */ // This code is auto-generated, do not modify -package com.spectralogic.ds3client.commands; +package com.spectralogic.ds3client.commands.spectrads3; import com.spectralogic.ds3client.models.ChecksumType; import com.spectralogic.ds3client.commands.interfaces.AbstractResponse; -public class AbortMultiPartUploadResponse extends AbstractResponse { +public class DeleteCacheThrottleRuleSpectraS3Response extends AbstractResponse { - public AbortMultiPartUploadResponse(final String checksum, final ChecksumType.Type checksumType) { + public DeleteCacheThrottleRuleSpectraS3Response(final String checksum, final ChecksumType.Type checksumType) { super(checksum, checksumType); } diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/spectrads3/FormatAllTapesSpectraS3Request.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/spectrads3/FormatAllTapesSpectraS3Request.java index 6de67c5bc..ab5b70ab6 100644 --- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/spectrads3/FormatAllTapesSpectraS3Request.java +++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/spectrads3/FormatAllTapesSpectraS3Request.java @@ -23,6 +23,8 @@ public class FormatAllTapesSpectraS3Request extends AbstractRequest { // Variables + private boolean characterize; + private boolean force; // Constructor @@ -34,6 +36,17 @@ public FormatAllTapesSpectraS3Request() { } + public FormatAllTapesSpectraS3Request withCharacterize(final boolean characterize) { + this.characterize = characterize; + if (this.characterize) { + this.getQueryParams().put("characterize", null); + } else { + this.getQueryParams().remove("characterize"); + } + return this; + } + + public FormatAllTapesSpectraS3Request withForce(final boolean force) { this.force = force; if (this.force) { @@ -56,6 +69,11 @@ public String getPath() { return "/_rest_/tape"; } + public boolean getCharacterize() { + return this.characterize; + } + + public boolean getForce() { return this.force; } diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/spectrads3/FormatTapeSpectraS3Request.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/spectrads3/FormatTapeSpectraS3Request.java index cb00f2104..b68affb15 100644 --- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/spectrads3/FormatTapeSpectraS3Request.java +++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/spectrads3/FormatTapeSpectraS3Request.java @@ -26,6 +26,8 @@ public class FormatTapeSpectraS3Request extends AbstractRequest { private final String tapeId; + private boolean characterize; + private boolean force; // Constructor @@ -46,6 +48,17 @@ public FormatTapeSpectraS3Request(final String tapeId) { } + public FormatTapeSpectraS3Request withCharacterize(final boolean characterize) { + this.characterize = characterize; + if (this.characterize) { + this.getQueryParams().put("characterize", null); + } else { + this.getQueryParams().remove("characterize"); + } + return this; + } + + public FormatTapeSpectraS3Request withForce(final boolean force) { this.force = force; if (this.force) { @@ -73,6 +86,11 @@ public String getTapeId() { } + public boolean getCharacterize() { + return this.characterize; + } + + public boolean getForce() { return this.force; } diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/spectrads3/GetCacheThrottleRuleSpectraS3Request.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/spectrads3/GetCacheThrottleRuleSpectraS3Request.java new file mode 100644 index 000000000..2ca783c5a --- /dev/null +++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/spectrads3/GetCacheThrottleRuleSpectraS3Request.java @@ -0,0 +1,51 @@ +/* + * ****************************************************************************** + * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"). You may not use + * this file except in compliance with the License. A copy of the License is located at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * or in the "license" file accompanying this file. + * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + * **************************************************************************** + */ + +// This code is auto-generated, do not modify +package com.spectralogic.ds3client.commands.spectrads3; + +import com.spectralogic.ds3client.networking.HttpVerb; +import com.spectralogic.ds3client.commands.interfaces.AbstractRequest; + +public class GetCacheThrottleRuleSpectraS3Request extends AbstractRequest { + + // Variables + + private final String cacheThrottleRule; + + // Constructor + + + public GetCacheThrottleRuleSpectraS3Request(final String cacheThrottleRule) { + this.cacheThrottleRule = cacheThrottleRule; + + } + + + @Override + public HttpVerb getVerb() { + return HttpVerb.GET; + } + + @Override + public String getPath() { + return "/_rest_/cache_throttle_rule/" + cacheThrottleRule; + } + + public String getCacheThrottleRule() { + return this.cacheThrottleRule; + } + +} \ No newline at end of file diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/PutMultiPartUploadPartResponse.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/spectrads3/GetCacheThrottleRuleSpectraS3Response.java similarity index 62% rename from ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/PutMultiPartUploadPartResponse.java rename to ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/spectrads3/GetCacheThrottleRuleSpectraS3Response.java index 1c690d7f5..fa0a7e41a 100644 --- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/PutMultiPartUploadPartResponse.java +++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/spectrads3/GetCacheThrottleRuleSpectraS3Response.java @@ -14,15 +14,23 @@ */ // This code is auto-generated, do not modify -package com.spectralogic.ds3client.commands; +package com.spectralogic.ds3client.commands.spectrads3; +import com.spectralogic.ds3client.models.CacheThrottleRule; import com.spectralogic.ds3client.models.ChecksumType; import com.spectralogic.ds3client.commands.interfaces.AbstractResponse; -public class PutMultiPartUploadPartResponse extends AbstractResponse { +public class GetCacheThrottleRuleSpectraS3Response extends AbstractResponse { - public PutMultiPartUploadPartResponse(final String checksum, final ChecksumType.Type checksumType) { + private final CacheThrottleRule cacheThrottleRuleResult; + + public GetCacheThrottleRuleSpectraS3Response(final CacheThrottleRule cacheThrottleRuleResult, final String checksum, final ChecksumType.Type checksumType) { super(checksum, checksumType); + this.cacheThrottleRuleResult = cacheThrottleRuleResult; + } + + public CacheThrottleRule getCacheThrottleRuleResult() { + return this.cacheThrottleRuleResult; } } \ No newline at end of file diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/spectrads3/GetCacheThrottleRulesSpectraS3Request.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/spectrads3/GetCacheThrottleRulesSpectraS3Request.java new file mode 100644 index 000000000..92c4865d2 --- /dev/null +++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/spectrads3/GetCacheThrottleRulesSpectraS3Request.java @@ -0,0 +1,184 @@ +/* + * ****************************************************************************** + * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"). You may not use + * this file except in compliance with the License. A copy of the License is located at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * or in the "license" file accompanying this file. + * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + * **************************************************************************** + */ + +// This code is auto-generated, do not modify +package com.spectralogic.ds3client.commands.spectrads3; + +import com.spectralogic.ds3client.networking.HttpVerb; +import com.spectralogic.ds3client.commands.interfaces.AbstractPaginationRequest; +import java.lang.Double; +import java.util.UUID; +import com.spectralogic.ds3client.models.Priority; +import com.spectralogic.ds3client.models.JobRequestType; + +public class GetCacheThrottleRulesSpectraS3Request extends AbstractPaginationRequest { + + // Variables + + private String bucketId; + + private Double burstThreshold; + + private boolean lastPage; + + private double maxCachePercent; + + private int pageLength; + + private int pageOffset; + + private String pageStartMarker; + + private Priority priority; + + private JobRequestType requestType; + + // Constructor + + + public GetCacheThrottleRulesSpectraS3Request() { + + } + + public GetCacheThrottleRulesSpectraS3Request withBucketId(final String bucketId) { + this.bucketId = bucketId; + this.updateQueryParam("bucket_id", bucketId); + return this; + } + + + public GetCacheThrottleRulesSpectraS3Request withBurstThreshold(final Double burstThreshold) { + this.burstThreshold = burstThreshold; + this.updateQueryParam("burst_threshold", burstThreshold); + return this; + } + + + public GetCacheThrottleRulesSpectraS3Request withLastPage(final boolean lastPage) { + this.lastPage = lastPage; + if (this.lastPage) { + this.getQueryParams().put("last_page", null); + } else { + this.getQueryParams().remove("last_page"); + } + return this; + } + + + public GetCacheThrottleRulesSpectraS3Request withMaxCachePercent(final double maxCachePercent) { + this.maxCachePercent = maxCachePercent; + this.updateQueryParam("max_cache_percent", maxCachePercent); + return this; + } + + + public GetCacheThrottleRulesSpectraS3Request withPageLength(final int pageLength) { + this.pageLength = pageLength; + this.updateQueryParam("page_length", pageLength); + return this; + } + + + public GetCacheThrottleRulesSpectraS3Request withPageOffset(final int pageOffset) { + this.pageOffset = pageOffset; + this.updateQueryParam("page_offset", pageOffset); + return this; + } + + + public GetCacheThrottleRulesSpectraS3Request withPageStartMarker(final UUID pageStartMarker) { + this.pageStartMarker = pageStartMarker.toString(); + this.updateQueryParam("page_start_marker", pageStartMarker); + return this; + } + + + public GetCacheThrottleRulesSpectraS3Request withPageStartMarker(final String pageStartMarker) { + this.pageStartMarker = pageStartMarker; + this.updateQueryParam("page_start_marker", pageStartMarker); + return this; + } + + + public GetCacheThrottleRulesSpectraS3Request withPriority(final Priority priority) { + this.priority = priority; + this.updateQueryParam("priority", priority); + return this; + } + + + public GetCacheThrottleRulesSpectraS3Request withRequestType(final JobRequestType requestType) { + this.requestType = requestType; + this.updateQueryParam("request_type", requestType); + return this; + } + + + + @Override + public HttpVerb getVerb() { + return HttpVerb.GET; + } + + @Override + public String getPath() { + return "/_rest_/cache_throttle_rule"; + } + + public String getBucketId() { + return this.bucketId; + } + + + public Double getBurstThreshold() { + return this.burstThreshold; + } + + + public boolean getLastPage() { + return this.lastPage; + } + + + public double getMaxCachePercent() { + return this.maxCachePercent; + } + + + public int getPageLength() { + return this.pageLength; + } + + + public int getPageOffset() { + return this.pageOffset; + } + + + public String getPageStartMarker() { + return this.pageStartMarker; + } + + + public Priority getPriority() { + return this.priority; + } + + + public JobRequestType getRequestType() { + return this.requestType; + } + +} \ No newline at end of file diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/CompleteMultiPartUploadResponse.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/spectrads3/GetCacheThrottleRulesSpectraS3Response.java similarity index 50% rename from ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/CompleteMultiPartUploadResponse.java rename to ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/spectrads3/GetCacheThrottleRulesSpectraS3Response.java index 32bc308b5..f244ffa1f 100644 --- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/CompleteMultiPartUploadResponse.java +++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/spectrads3/GetCacheThrottleRulesSpectraS3Response.java @@ -14,23 +14,23 @@ */ // This code is auto-generated, do not modify -package com.spectralogic.ds3client.commands; +package com.spectralogic.ds3client.commands.spectrads3; -import com.spectralogic.ds3client.models.CompleteMultipartUploadResult; +import com.spectralogic.ds3client.models.CacheThrottleRuleList; import com.spectralogic.ds3client.models.ChecksumType; -import com.spectralogic.ds3client.commands.interfaces.AbstractResponse; +import com.spectralogic.ds3client.commands.interfaces.AbstractPaginationResponse; -public class CompleteMultiPartUploadResponse extends AbstractResponse { - - private final CompleteMultipartUploadResult completeMultipartUploadResult; +public class GetCacheThrottleRulesSpectraS3Response extends AbstractPaginationResponse { - public CompleteMultiPartUploadResponse(final CompleteMultipartUploadResult completeMultipartUploadResult, final String checksum, final ChecksumType.Type checksumType) { - super(checksum, checksumType); - this.completeMultipartUploadResult = completeMultipartUploadResult; + private final CacheThrottleRuleList cacheThrottleRuleListResult; + + public GetCacheThrottleRulesSpectraS3Response(final CacheThrottleRuleList cacheThrottleRuleListResult, final Integer pagingTotalResultCount, final Integer pagingTruncated, final String checksum, final ChecksumType.Type checksumType) { + super(pagingTotalResultCount, pagingTruncated, checksum, checksumType); + this.cacheThrottleRuleListResult = cacheThrottleRuleListResult; } - public CompleteMultipartUploadResult getCompleteMultipartUploadResult() { - return this.completeMultipartUploadResult; + public CacheThrottleRuleList getCacheThrottleRuleListResult() { + return this.cacheThrottleRuleListResult; } } \ No newline at end of file diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/spectrads3/GetDataPlannerBlobStoreTasksSpectraS3Request.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/spectrads3/GetDataPlannerBlobStoreTasksSpectraS3Request.java index 65a18c12f..3e6a5778c 100644 --- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/spectrads3/GetDataPlannerBlobStoreTasksSpectraS3Request.java +++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/spectrads3/GetDataPlannerBlobStoreTasksSpectraS3Request.java @@ -18,6 +18,7 @@ import com.spectralogic.ds3client.networking.HttpVerb; import com.spectralogic.ds3client.commands.interfaces.AbstractRequest; +import java.util.UUID; public class GetDataPlannerBlobStoreTasksSpectraS3Request extends AbstractRequest { @@ -25,6 +26,8 @@ public class GetDataPlannerBlobStoreTasksSpectraS3Request extends AbstractReques private boolean fullDetails; + private String job; + // Constructor @@ -43,6 +46,20 @@ public GetDataPlannerBlobStoreTasksSpectraS3Request withFullDetails(final boolea } + public GetDataPlannerBlobStoreTasksSpectraS3Request withJob(final UUID job) { + this.job = job.toString(); + this.updateQueryParam("job", job); + return this; + } + + + public GetDataPlannerBlobStoreTasksSpectraS3Request withJob(final String job) { + this.job = job; + this.updateQueryParam("job", job); + return this; + } + + @Override public HttpVerb getVerb() { @@ -58,4 +75,9 @@ public boolean getFullDetails() { return this.fullDetails; } + + public String getJob() { + return this.job; + } + } \ No newline at end of file diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/spectrads3/GetJobEntriesSpectraS3Request.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/spectrads3/GetJobEntriesSpectraS3Request.java new file mode 100644 index 000000000..1c6df07d7 --- /dev/null +++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/spectrads3/GetJobEntriesSpectraS3Request.java @@ -0,0 +1,129 @@ +/* + * ****************************************************************************** + * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"). You may not use + * this file except in compliance with the License. A copy of the License is located at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * or in the "license" file accompanying this file. + * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + * **************************************************************************** + */ + +// This code is auto-generated, do not modify +package com.spectralogic.ds3client.commands.spectrads3; + +import com.spectralogic.ds3client.networking.HttpVerb; +import com.spectralogic.ds3client.commands.interfaces.AbstractPaginationRequest; +import java.util.UUID; + +public class GetJobEntriesSpectraS3Request extends AbstractPaginationRequest { + + // Variables + + private final String jobId; + + private boolean lastPage; + + private int pageLength; + + private int pageOffset; + + private String pageStartMarker; + + // Constructor + + + public GetJobEntriesSpectraS3Request(final UUID jobId) { + this.jobId = jobId.toString(); + + this.updateQueryParam("job_id", jobId); + + } + + + public GetJobEntriesSpectraS3Request(final String jobId) { + this.jobId = jobId; + + this.updateQueryParam("job_id", jobId); + + } + + public GetJobEntriesSpectraS3Request withLastPage(final boolean lastPage) { + this.lastPage = lastPage; + if (this.lastPage) { + this.getQueryParams().put("last_page", null); + } else { + this.getQueryParams().remove("last_page"); + } + return this; + } + + + public GetJobEntriesSpectraS3Request withPageLength(final int pageLength) { + this.pageLength = pageLength; + this.updateQueryParam("page_length", pageLength); + return this; + } + + + public GetJobEntriesSpectraS3Request withPageOffset(final int pageOffset) { + this.pageOffset = pageOffset; + this.updateQueryParam("page_offset", pageOffset); + return this; + } + + + public GetJobEntriesSpectraS3Request withPageStartMarker(final UUID pageStartMarker) { + this.pageStartMarker = pageStartMarker.toString(); + this.updateQueryParam("page_start_marker", pageStartMarker); + return this; + } + + + public GetJobEntriesSpectraS3Request withPageStartMarker(final String pageStartMarker) { + this.pageStartMarker = pageStartMarker; + this.updateQueryParam("page_start_marker", pageStartMarker); + return this; + } + + + + @Override + public HttpVerb getVerb() { + return HttpVerb.GET; + } + + @Override + public String getPath() { + return "/_rest_/job_chunk_dao"; + } + + public String getJobId() { + return this.jobId; + } + + + public boolean getLastPage() { + return this.lastPage; + } + + + public int getPageLength() { + return this.pageLength; + } + + + public int getPageOffset() { + return this.pageOffset; + } + + + public String getPageStartMarker() { + return this.pageStartMarker; + } + +} \ No newline at end of file diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/InitiateMultiPartUploadResponse.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/spectrads3/GetJobEntriesSpectraS3Response.java similarity index 53% rename from ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/InitiateMultiPartUploadResponse.java rename to ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/spectrads3/GetJobEntriesSpectraS3Response.java index 2af5ca2a9..209bb5280 100644 --- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/InitiateMultiPartUploadResponse.java +++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/spectrads3/GetJobEntriesSpectraS3Response.java @@ -14,23 +14,23 @@ */ // This code is auto-generated, do not modify -package com.spectralogic.ds3client.commands; +package com.spectralogic.ds3client.commands.spectrads3; -import com.spectralogic.ds3client.models.InitiateMultipartUploadResult; +import com.spectralogic.ds3client.models.JobEntryList; import com.spectralogic.ds3client.models.ChecksumType; -import com.spectralogic.ds3client.commands.interfaces.AbstractResponse; +import com.spectralogic.ds3client.commands.interfaces.AbstractPaginationResponse; -public class InitiateMultiPartUploadResponse extends AbstractResponse { - - private final InitiateMultipartUploadResult initiateMultipartUploadResult; +public class GetJobEntriesSpectraS3Response extends AbstractPaginationResponse { - public InitiateMultiPartUploadResponse(final InitiateMultipartUploadResult initiateMultipartUploadResult, final String checksum, final ChecksumType.Type checksumType) { - super(checksum, checksumType); - this.initiateMultipartUploadResult = initiateMultipartUploadResult; + private final JobEntryList jobEntryListResult; + + public GetJobEntriesSpectraS3Response(final JobEntryList jobEntryListResult, final Integer pagingTotalResultCount, final Integer pagingTruncated, final String checksum, final ChecksumType.Type checksumType) { + super(pagingTotalResultCount, pagingTruncated, checksum, checksumType); + this.jobEntryListResult = jobEntryListResult; } - public InitiateMultipartUploadResult getInitiateMultipartUploadResult() { - return this.initiateMultipartUploadResult; + public JobEntryList getJobEntryListResult() { + return this.jobEntryListResult; } } \ No newline at end of file diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/AbortMultiPartUploadRequest.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/spectrads3/GetJobSummarySpectraS3Request.java similarity index 52% rename from ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/AbortMultiPartUploadRequest.java rename to ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/spectrads3/GetJobSummarySpectraS3Request.java index 7c8dccb4a..d71080cff 100644 --- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/AbortMultiPartUploadRequest.java +++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/spectrads3/GetJobSummarySpectraS3Request.java @@ -14,67 +14,59 @@ */ // This code is auto-generated, do not modify -package com.spectralogic.ds3client.commands; +package com.spectralogic.ds3client.commands.spectrads3; import com.spectralogic.ds3client.networking.HttpVerb; import com.spectralogic.ds3client.commands.interfaces.AbstractRequest; import java.util.UUID; -public class AbortMultiPartUploadRequest extends AbstractRequest { +public class GetJobSummarySpectraS3Request extends AbstractRequest { // Variables - private final String bucketName; - - private final String objectName; - - private final String uploadId; + private final String jobId; // Constructor - public AbortMultiPartUploadRequest(final String bucketName, final String objectName, final UUID uploadId) { - this.bucketName = bucketName; - this.objectName = objectName; - this.uploadId = uploadId.toString(); + public GetJobSummarySpectraS3Request(final UUID jobId) { + this.jobId = jobId.toString(); - this.updateQueryParam("upload_id", uploadId); - + this.getQueryParams().put("summary", null); } - public AbortMultiPartUploadRequest(final String bucketName, final String objectName, final String uploadId) { - this.bucketName = bucketName; - this.objectName = objectName; - this.uploadId = uploadId; + public GetJobSummarySpectraS3Request(final String jobId) { + this.jobId = jobId; - this.updateQueryParam("upload_id", uploadId); - + this.getQueryParams().put("summary", null); } @Override public HttpVerb getVerb() { - return HttpVerb.DELETE; + return HttpVerb.GET; } @Override public String getPath() { - return "/" + this.bucketName + "/" + this.objectName; + return "/_rest_/job/" + jobId; } - public String getBucketName() { - return this.bucketName; + public String getJobId() { + return this.jobId; } - public String getObjectName() { - return this.objectName; + @Override + public int hashCode() { + return jobId.hashCode(); } - - public String getUploadId() { - return this.uploadId; + @Override + public boolean equals(final Object obj) { + if (! (obj instanceof GetJobSummarySpectraS3Request)) return false; + final GetJobSummarySpectraS3Request other = (GetJobSummarySpectraS3Request) obj; + return other.getJobId().equals(this.getJobId()); } - } \ No newline at end of file diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/ListMultiPartUploadPartsResponse.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/spectrads3/GetJobSummarySpectraS3Response.java similarity index 63% rename from ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/ListMultiPartUploadPartsResponse.java rename to ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/spectrads3/GetJobSummarySpectraS3Response.java index b5613a349..d17b95b15 100644 --- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/ListMultiPartUploadPartsResponse.java +++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/spectrads3/GetJobSummarySpectraS3Response.java @@ -14,23 +14,23 @@ */ // This code is auto-generated, do not modify -package com.spectralogic.ds3client.commands; +package com.spectralogic.ds3client.commands.spectrads3; -import com.spectralogic.ds3client.models.ListPartsResult; +import com.spectralogic.ds3client.models.JobSummaryApiBean; import com.spectralogic.ds3client.models.ChecksumType; import com.spectralogic.ds3client.commands.interfaces.AbstractResponse; -public class ListMultiPartUploadPartsResponse extends AbstractResponse { +public class GetJobSummarySpectraS3Response extends AbstractResponse { - private final ListPartsResult listPartsResult; + private final JobSummaryApiBean jobSummaryApiBeanResult; - public ListMultiPartUploadPartsResponse(final ListPartsResult listPartsResult, final String checksum, final ChecksumType.Type checksumType) { + public GetJobSummarySpectraS3Response(final JobSummaryApiBean jobSummaryApiBeanResult, final String checksum, final ChecksumType.Type checksumType) { super(checksum, checksumType); - this.listPartsResult = listPartsResult; + this.jobSummaryApiBeanResult = jobSummaryApiBeanResult; } - public ListPartsResult getListPartsResult() { - return this.listPartsResult; + public JobSummaryApiBean getJobSummaryApiBeanResult() { + return this.jobSummaryApiBeanResult; } } \ No newline at end of file diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/spectrads3/ModifyCacheThrottleRuleSpectraS3Request.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/spectrads3/ModifyCacheThrottleRuleSpectraS3Request.java new file mode 100644 index 000000000..3cf9da5c3 --- /dev/null +++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/spectrads3/ModifyCacheThrottleRuleSpectraS3Request.java @@ -0,0 +1,124 @@ +/* + * ****************************************************************************** + * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"). You may not use + * this file except in compliance with the License. A copy of the License is located at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * or in the "license" file accompanying this file. + * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + * **************************************************************************** + */ + +// This code is auto-generated, do not modify +package com.spectralogic.ds3client.commands.spectrads3; + +import com.spectralogic.ds3client.networking.HttpVerb; +import com.spectralogic.ds3client.commands.interfaces.AbstractRequest; +import java.lang.Double; +import com.spectralogic.ds3client.models.Priority; +import com.spectralogic.ds3client.models.JobRequestType; + +public class ModifyCacheThrottleRuleSpectraS3Request extends AbstractRequest { + + // Variables + + private final String cacheThrottleRule; + + private String bucketId; + + private Double burstThreshold; + + private double maxCachePercent; + + private Priority priority; + + private JobRequestType requestType; + + // Constructor + + + public ModifyCacheThrottleRuleSpectraS3Request(final String cacheThrottleRule) { + this.cacheThrottleRule = cacheThrottleRule; + + } + + public ModifyCacheThrottleRuleSpectraS3Request withBucketId(final String bucketId) { + this.bucketId = bucketId; + this.updateQueryParam("bucket_id", bucketId); + return this; + } + + + public ModifyCacheThrottleRuleSpectraS3Request withBurstThreshold(final Double burstThreshold) { + this.burstThreshold = burstThreshold; + this.updateQueryParam("burst_threshold", burstThreshold); + return this; + } + + + public ModifyCacheThrottleRuleSpectraS3Request withMaxCachePercent(final double maxCachePercent) { + this.maxCachePercent = maxCachePercent; + this.updateQueryParam("max_cache_percent", maxCachePercent); + return this; + } + + + public ModifyCacheThrottleRuleSpectraS3Request withPriority(final Priority priority) { + this.priority = priority; + this.updateQueryParam("priority", priority); + return this; + } + + + public ModifyCacheThrottleRuleSpectraS3Request withRequestType(final JobRequestType requestType) { + this.requestType = requestType; + this.updateQueryParam("request_type", requestType); + return this; + } + + + + @Override + public HttpVerb getVerb() { + return HttpVerb.PUT; + } + + @Override + public String getPath() { + return "/_rest_/cache_throttle_rule/" + cacheThrottleRule; + } + + public String getCacheThrottleRule() { + return this.cacheThrottleRule; + } + + + public String getBucketId() { + return this.bucketId; + } + + + public Double getBurstThreshold() { + return this.burstThreshold; + } + + + public double getMaxCachePercent() { + return this.maxCachePercent; + } + + + public Priority getPriority() { + return this.priority; + } + + + public JobRequestType getRequestType() { + return this.requestType; + } + +} \ No newline at end of file diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/ListMultiPartUploadsResponse.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/spectrads3/ModifyCacheThrottleRuleSpectraS3Response.java similarity index 64% rename from ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/ListMultiPartUploadsResponse.java rename to ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/spectrads3/ModifyCacheThrottleRuleSpectraS3Response.java index b2305e738..f4157865b 100644 --- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/ListMultiPartUploadsResponse.java +++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/spectrads3/ModifyCacheThrottleRuleSpectraS3Response.java @@ -14,23 +14,23 @@ */ // This code is auto-generated, do not modify -package com.spectralogic.ds3client.commands; +package com.spectralogic.ds3client.commands.spectrads3; -import com.spectralogic.ds3client.models.ListMultiPartUploadsResult; +import com.spectralogic.ds3client.models.CacheThrottleRule; import com.spectralogic.ds3client.models.ChecksumType; import com.spectralogic.ds3client.commands.interfaces.AbstractResponse; -public class ListMultiPartUploadsResponse extends AbstractResponse { +public class ModifyCacheThrottleRuleSpectraS3Response extends AbstractResponse { - private final ListMultiPartUploadsResult listMultiPartUploadsResult; + private final CacheThrottleRule cacheThrottleRuleResult; - public ListMultiPartUploadsResponse(final ListMultiPartUploadsResult listMultiPartUploadsResult, final String checksum, final ChecksumType.Type checksumType) { + public ModifyCacheThrottleRuleSpectraS3Response(final CacheThrottleRule cacheThrottleRuleResult, final String checksum, final ChecksumType.Type checksumType) { super(checksum, checksumType); - this.listMultiPartUploadsResult = listMultiPartUploadsResult; + this.cacheThrottleRuleResult = cacheThrottleRuleResult; } - public ListMultiPartUploadsResult getListMultiPartUploadsResult() { - return this.listMultiPartUploadsResult; + public CacheThrottleRule getCacheThrottleRuleResult() { + return this.cacheThrottleRuleResult; } } \ No newline at end of file diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/spectrads3/ModifyTapeSpectraS3Request.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/spectrads3/ModifyTapeSpectraS3Request.java index e2176e17a..5ba419426 100644 --- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/spectrads3/ModifyTapeSpectraS3Request.java +++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/spectrads3/ModifyTapeSpectraS3Request.java @@ -28,6 +28,8 @@ public class ModifyTapeSpectraS3Request extends AbstractRequest { private final String tapeId; + private boolean allowRollback; + private String ejectLabel; private String ejectLocation; @@ -50,6 +52,13 @@ public ModifyTapeSpectraS3Request(final String tapeId) { } + public ModifyTapeSpectraS3Request withAllowRollback(final boolean allowRollback) { + this.allowRollback = allowRollback; + this.updateQueryParam("allow_rollback", allowRollback); + return this; + } + + public ModifyTapeSpectraS3Request withEjectLabel(final String ejectLabel) { this.ejectLabel = ejectLabel; this.updateQueryParam("eject_label", ejectLabel); @@ -94,6 +103,11 @@ public String getTapeId() { } + public boolean getAllowRollback() { + return this.allowRollback; + } + + public String getEjectLabel() { return this.ejectLabel; } diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/spectrads3/PutCacheThrottleRuleSpectraS3Request.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/spectrads3/PutCacheThrottleRuleSpectraS3Request.java new file mode 100644 index 000000000..a55d400e4 --- /dev/null +++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/spectrads3/PutCacheThrottleRuleSpectraS3Request.java @@ -0,0 +1,112 @@ +/* + * ****************************************************************************** + * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"). You may not use + * this file except in compliance with the License. A copy of the License is located at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * or in the "license" file accompanying this file. + * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + * **************************************************************************** + */ + +// This code is auto-generated, do not modify +package com.spectralogic.ds3client.commands.spectrads3; + +import com.spectralogic.ds3client.networking.HttpVerb; +import com.spectralogic.ds3client.commands.interfaces.AbstractRequest; +import java.lang.Double; +import com.spectralogic.ds3client.models.Priority; +import com.spectralogic.ds3client.models.JobRequestType; + +public class PutCacheThrottleRuleSpectraS3Request extends AbstractRequest { + + // Variables + + private final double maxCachePercent; + + private String bucketId; + + private Double burstThreshold; + + private Priority priority; + + private JobRequestType requestType; + + // Constructor + + + public PutCacheThrottleRuleSpectraS3Request(final double maxCachePercent) { + this.maxCachePercent = maxCachePercent; + + this.updateQueryParam("max_cache_percent", maxCachePercent); + + } + + public PutCacheThrottleRuleSpectraS3Request withBucketId(final String bucketId) { + this.bucketId = bucketId; + this.updateQueryParam("bucket_id", bucketId); + return this; + } + + + public PutCacheThrottleRuleSpectraS3Request withBurstThreshold(final Double burstThreshold) { + this.burstThreshold = burstThreshold; + this.updateQueryParam("burst_threshold", burstThreshold); + return this; + } + + + public PutCacheThrottleRuleSpectraS3Request withPriority(final Priority priority) { + this.priority = priority; + this.updateQueryParam("priority", priority); + return this; + } + + + public PutCacheThrottleRuleSpectraS3Request withRequestType(final JobRequestType requestType) { + this.requestType = requestType; + this.updateQueryParam("request_type", requestType); + return this; + } + + + + @Override + public HttpVerb getVerb() { + return HttpVerb.POST; + } + + @Override + public String getPath() { + return "/_rest_/cache_throttle_rule"; + } + + public double getMaxCachePercent() { + return this.maxCachePercent; + } + + + public String getBucketId() { + return this.bucketId; + } + + + public Double getBurstThreshold() { + return this.burstThreshold; + } + + + public Priority getPriority() { + return this.priority; + } + + + public JobRequestType getRequestType() { + return this.requestType; + } + +} \ No newline at end of file diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/spectrads3/PutCacheThrottleRuleSpectraS3Response.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/spectrads3/PutCacheThrottleRuleSpectraS3Response.java new file mode 100644 index 000000000..024be8cae --- /dev/null +++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/spectrads3/PutCacheThrottleRuleSpectraS3Response.java @@ -0,0 +1,36 @@ +/* + * ****************************************************************************** + * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"). You may not use + * this file except in compliance with the License. A copy of the License is located at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * or in the "license" file accompanying this file. + * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + * **************************************************************************** + */ + +// This code is auto-generated, do not modify +package com.spectralogic.ds3client.commands.spectrads3; + +import com.spectralogic.ds3client.models.CacheThrottleRule; +import com.spectralogic.ds3client.models.ChecksumType; +import com.spectralogic.ds3client.commands.interfaces.AbstractResponse; + +public class PutCacheThrottleRuleSpectraS3Response extends AbstractResponse { + + private final CacheThrottleRule cacheThrottleRuleResult; + + public PutCacheThrottleRuleSpectraS3Response(final CacheThrottleRule cacheThrottleRuleResult, final String checksum, final ChecksumType.Type checksumType) { + super(checksum, checksumType); + this.cacheThrottleRuleResult = cacheThrottleRuleResult; + } + + public CacheThrottleRule getCacheThrottleRuleResult() { + return this.cacheThrottleRuleResult; + } + +} \ No newline at end of file diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/models/ActiveJob.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/models/ActiveJob.java index bd3624c08..d731fd5fd 100644 --- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/models/ActiveJob.java +++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/models/ActiveJob.java @@ -55,6 +55,9 @@ public class ActiveJob { @JsonProperty("ImplicitJobIdResolution") private boolean implicitJobIdResolution; + @JsonProperty("Restore") + private IomType iomType; + @JsonProperty("MinimizeSpanningAcrossMedia") private boolean minimizeSpanningAcrossMedia; @@ -82,9 +85,6 @@ public class ActiveJob { @JsonProperty("RequestType") private JobRequestType requestType; - @JsonProperty("Restore") - private JobRestore restore; - @JsonProperty("Truncated") private boolean truncated; @@ -194,6 +194,15 @@ public void setImplicitJobIdResolution(final boolean implicitJobIdResolution) { } + public IomType getIomType() { + return this.iomType; + } + + public void setIomType(final IomType iomType) { + this.iomType = iomType; + } + + public boolean getMinimizeSpanningAcrossMedia() { return this.minimizeSpanningAcrossMedia; } @@ -275,15 +284,6 @@ public void setRequestType(final JobRequestType requestType) { } - public JobRestore getRestore() { - return this.restore; - } - - public void setRestore(final JobRestore restore) { - this.restore = restore; - } - - public boolean getTruncated() { return this.truncated; } diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/models/BlobStoreTaskInformation.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/models/BlobStoreTaskInformation.java index 07b499fdb..f6b90771e 100644 --- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/models/BlobStoreTaskInformation.java +++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/models/BlobStoreTaskInformation.java @@ -20,6 +20,9 @@ import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.util.Date; import java.util.UUID; +import java.util.List; +import java.util.ArrayList; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper; @JacksonXmlRootElement(namespace = "Data") public class BlobStoreTaskInformation { @@ -37,9 +40,19 @@ public class BlobStoreTaskInformation { @JsonProperty("DriveId") private UUID driveId; + @JsonProperty("DurationInProgress") + private Duration durationInProgress; + + @JsonProperty("DurationScheduled") + private Duration durationScheduled; + @JsonProperty("Id") private long id; + @JsonProperty("JobIds") + @JacksonXmlElementWrapper(useWrapping = true) + private List jobIds = new ArrayList<>(); + @JsonProperty("Name") private String name; @@ -104,6 +117,24 @@ public void setDriveId(final UUID driveId) { } + public Duration getDurationInProgress() { + return this.durationInProgress; + } + + public void setDurationInProgress(final Duration durationInProgress) { + this.durationInProgress = durationInProgress; + } + + + public Duration getDurationScheduled() { + return this.durationScheduled; + } + + public void setDurationScheduled(final Duration durationScheduled) { + this.durationScheduled = durationScheduled; + } + + public long getId() { return this.id; } @@ -113,6 +144,15 @@ public void setId(final long id) { } + public List getJobIds() { + return this.jobIds; + } + + public void setJobIds(final List jobIds) { + this.jobIds = jobIds; + } + + public String getName() { return this.name; } diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/models/CacheEntryState.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/models/CacheEntryState.java index 71cdb7b35..50481e289 100644 --- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/models/CacheEntryState.java +++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/models/CacheEntryState.java @@ -18,5 +18,6 @@ public enum CacheEntryState { ALLOCATED, - IN_CACHE + IN_CACHE, + PENDING_DELETE } \ No newline at end of file diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/models/CacheThrottleRule.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/models/CacheThrottleRule.java new file mode 100644 index 000000000..c38095b6d --- /dev/null +++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/models/CacheThrottleRule.java @@ -0,0 +1,105 @@ +/* + * ****************************************************************************** + * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"). You may not use + * this file except in compliance with the License. A copy of the License is located at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * or in the "license" file accompanying this file. + * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + * **************************************************************************** + */ + +// This code is auto-generated, do not modify +package com.spectralogic.ds3client.models; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; +import java.util.UUID; + +@JacksonXmlRootElement(namespace = "Data") +public class CacheThrottleRule { + + // Variables + @JsonProperty("BucketId") + private UUID bucketId; + + @JsonProperty("BurstThreshold") + private Double burstThreshold; + + @JsonProperty("Id") + private UUID id; + + @JsonProperty("MaxCachePercent") + private double maxCachePercent; + + @JsonProperty("Priority") + private Priority priority; + + @JsonProperty("RequestType") + private JobRequestType requestType; + + // Constructor + public CacheThrottleRule() { + //pass + } + + // Getters and Setters + + public UUID getBucketId() { + return this.bucketId; + } + + public void setBucketId(final UUID bucketId) { + this.bucketId = bucketId; + } + + + public Double getBurstThreshold() { + return this.burstThreshold; + } + + public void setBurstThreshold(final Double burstThreshold) { + this.burstThreshold = burstThreshold; + } + + + public UUID getId() { + return this.id; + } + + public void setId(final UUID id) { + this.id = id; + } + + + public double getMaxCachePercent() { + return this.maxCachePercent; + } + + public void setMaxCachePercent(final double maxCachePercent) { + this.maxCachePercent = maxCachePercent; + } + + + public Priority getPriority() { + return this.priority; + } + + public void setPriority(final Priority priority) { + this.priority = priority; + } + + + public JobRequestType getRequestType() { + return this.requestType; + } + + public void setRequestType(final JobRequestType requestType) { + this.requestType = requestType; + } + +} \ No newline at end of file diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/models/InitiateMultipartUploadResult.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/models/CacheThrottleRuleList.java similarity index 58% rename from ds3-sdk/src/main/java/com/spectralogic/ds3client/models/InitiateMultipartUploadResult.java rename to ds3-sdk/src/main/java/com/spectralogic/ds3client/models/CacheThrottleRuleList.java index fa204d45b..9d8152628 100644 --- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/models/InitiateMultipartUploadResult.java +++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/models/CacheThrottleRuleList.java @@ -18,51 +18,31 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; +import java.util.List; +import java.util.ArrayList; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper; -@JacksonXmlRootElement(namespace = "InitiateMultipartUploadResult") -public class InitiateMultipartUploadResult { +@JacksonXmlRootElement(namespace = "Data") +public class CacheThrottleRuleList { // Variables - @JsonProperty("Bucket") - private String bucket; - - @JsonProperty("Key") - private String key; - - @JsonProperty("UploadId") - private String uploadId; + @JsonProperty("CacheThrottleRule") + @JacksonXmlElementWrapper(useWrapping = false) + private List cacheThrottleRules = new ArrayList<>(); // Constructor - public InitiateMultipartUploadResult() { + public CacheThrottleRuleList() { //pass } // Getters and Setters - public String getBucket() { - return this.bucket; - } - - public void setBucket(final String bucket) { - this.bucket = bucket; - } - - - public String getKey() { - return this.key; - } - - public void setKey(final String key) { - this.key = key; - } - - - public String getUploadId() { - return this.uploadId; + public List getCacheThrottleRules() { + return this.cacheThrottleRules; } - public void setUploadId(final String uploadId) { - this.uploadId = uploadId; + public void setCacheThrottleRules(final List cacheThrottleRules) { + this.cacheThrottleRules = cacheThrottleRules; } } \ No newline at end of file diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/models/CompleteMultipartUploadResult.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/models/CompleteMultipartUploadResult.java deleted file mode 100644 index 280eda4f6..000000000 --- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/models/CompleteMultipartUploadResult.java +++ /dev/null @@ -1,80 +0,0 @@ -/* - * ****************************************************************************** - * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"). You may not use - * this file except in compliance with the License. A copy of the License is located at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * or in the "license" file accompanying this file. - * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - * **************************************************************************** - */ - -// This code is auto-generated, do not modify -package com.spectralogic.ds3client.models; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; - -@JacksonXmlRootElement(namespace = "CompleteMultipartUploadResult") -public class CompleteMultipartUploadResult { - - // Variables - @JsonProperty("Bucket") - private String bucket; - - @JsonProperty("ETag") - private String eTag; - - @JsonProperty("Key") - private String key; - - @JsonProperty("Location") - private String location; - - // Constructor - public CompleteMultipartUploadResult() { - //pass - } - - // Getters and Setters - - public String getBucket() { - return this.bucket; - } - - public void setBucket(final String bucket) { - this.bucket = bucket; - } - - - public String getETag() { - return this.eTag; - } - - public void setETag(final String eTag) { - this.eTag = eTag; - } - - - public String getKey() { - return this.key; - } - - public void setKey(final String key) { - this.key = key; - } - - - public String getLocation() { - return this.location; - } - - public void setLocation(final String location) { - this.location = location; - } - -} \ No newline at end of file diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/models/DestinationSummary.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/models/DestinationSummary.java new file mode 100644 index 000000000..0b51834f9 --- /dev/null +++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/models/DestinationSummary.java @@ -0,0 +1,86 @@ +/* + * ****************************************************************************** + * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"). You may not use + * this file except in compliance with the License. A copy of the License is located at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * or in the "license" file accompanying this file. + * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + * **************************************************************************** + */ + +// This code is auto-generated, do not modify +package com.spectralogic.ds3client.models; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; +import java.util.List; +import java.util.ArrayList; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper; +import java.util.UUID; + +@JacksonXmlRootElement(namespace = "Data") +public class DestinationSummary { + + // Variables + @JsonProperty("CompletedChunks") + @JacksonXmlElementWrapper(useWrapping = true) + private List completedChunks = new ArrayList<>(); + + @JsonProperty("Id") + private UUID id; + + @JsonProperty("IncompleteChunks") + @JacksonXmlElementWrapper(useWrapping = true) + private List incompleteChunks = new ArrayList<>(); + + @JsonProperty("Name") + private String name; + + // Constructor + public DestinationSummary() { + //pass + } + + // Getters and Setters + + public List getCompletedChunks() { + return this.completedChunks; + } + + public void setCompletedChunks(final List completedChunks) { + this.completedChunks = completedChunks; + } + + + public UUID getId() { + return this.id; + } + + public void setId(final UUID id) { + this.id = id; + } + + + public List getIncompleteChunks() { + return this.incompleteChunks; + } + + public void setIncompleteChunks(final List incompleteChunks) { + this.incompleteChunks = incompleteChunks; + } + + + public String getName() { + return this.name; + } + + public void setName(final String name) { + this.name = name; + } + +} \ No newline at end of file diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/models/Duration.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/models/Duration.java new file mode 100644 index 000000000..a05b70b9f --- /dev/null +++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/models/Duration.java @@ -0,0 +1,92 @@ +/* + * ****************************************************************************** + * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"). You may not use + * this file except in compliance with the License. A copy of the License is located at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * or in the "license" file accompanying this file. + * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + * **************************************************************************** + */ + +// This code is auto-generated, do not modify +package com.spectralogic.ds3client.models; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; + +@JacksonXmlRootElement(namespace = "Data") +public class Duration { + + // Variables + @JsonProperty("ElapsedHours") + private int elapsedHours; + + @JsonProperty("ElapsedMillis") + private long elapsedMillis; + + @JsonProperty("ElapsedMinutes") + private int elapsedMinutes; + + @JsonProperty("ElapsedNanos") + private long elapsedNanos; + + @JsonProperty("ElapsedSeconds") + private int elapsedSeconds; + + // Constructor + public Duration() { + //pass + } + + // Getters and Setters + + public int getElapsedHours() { + return this.elapsedHours; + } + + public void setElapsedHours(final int elapsedHours) { + this.elapsedHours = elapsedHours; + } + + + public long getElapsedMillis() { + return this.elapsedMillis; + } + + public void setElapsedMillis(final long elapsedMillis) { + this.elapsedMillis = elapsedMillis; + } + + + public int getElapsedMinutes() { + return this.elapsedMinutes; + } + + public void setElapsedMinutes(final int elapsedMinutes) { + this.elapsedMinutes = elapsedMinutes; + } + + + public long getElapsedNanos() { + return this.elapsedNanos; + } + + public void setElapsedNanos(final long elapsedNanos) { + this.elapsedNanos = elapsedNanos; + } + + + public int getElapsedSeconds() { + return this.elapsedSeconds; + } + + public void setElapsedSeconds(final int elapsedSeconds) { + this.elapsedSeconds = elapsedSeconds; + } + +} \ No newline at end of file diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/models/JobRestore.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/models/IomType.java similarity index 97% rename from ds3-sdk/src/main/java/com/spectralogic/ds3client/models/JobRestore.java rename to ds3-sdk/src/main/java/com/spectralogic/ds3client/models/IomType.java index 5cd939f01..65bdd7a26 100644 --- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/models/JobRestore.java +++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/models/IomType.java @@ -16,7 +16,7 @@ // This code is auto-generated, do not modify package com.spectralogic.ds3client.models; -public enum JobRestore { +public enum IomType { NO, YES, PERMANENT_ONLY diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/models/JobCreationFailedType.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/models/JobCreationFailedType.java index 5f0d8881d..4afc868b2 100644 --- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/models/JobCreationFailedType.java +++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/models/JobCreationFailedType.java @@ -17,5 +17,6 @@ package com.spectralogic.ds3client.models; public enum JobCreationFailedType { + DATA_UNAVAILABLE, TAPES_MUST_BE_ONLINED } \ No newline at end of file diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/models/JobEntry.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/models/JobEntry.java new file mode 100644 index 000000000..b07a3a138 --- /dev/null +++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/models/JobEntry.java @@ -0,0 +1,189 @@ +/* + * ****************************************************************************** + * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"). You may not use + * this file except in compliance with the License. A copy of the License is located at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * or in the "license" file accompanying this file. + * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + * **************************************************************************** + */ + +// This code is auto-generated, do not modify +package com.spectralogic.ds3client.models; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; +import java.util.UUID; + +@JacksonXmlRootElement(namespace = "Data") +public class JobEntry { + + // Variables + @JsonProperty("BlobId") + private UUID blobId; + + @JsonProperty("BlobStoreState") + private JobChunkBlobStoreState blobStoreState; + + @JsonProperty("ChunkId") + private UUID chunkId; + + @JsonProperty("ChunkNumber") + private int chunkNumber; + + @JsonProperty("Id") + private UUID id; + + @JsonProperty("JobId") + private UUID jobId; + + @JsonProperty("NodeId") + private UUID nodeId; + + @JsonProperty("PendingTargetCommit") + private boolean pendingTargetCommit; + + @JsonProperty("ReadFromAzureTargetId") + private UUID readFromAzureTargetId; + + @JsonProperty("ReadFromDs3TargetId") + private UUID readFromDs3TargetId; + + @JsonProperty("ReadFromPoolId") + private UUID readFromPoolId; + + @JsonProperty("ReadFromS3TargetId") + private UUID readFromS3TargetId; + + @JsonProperty("ReadFromTapeId") + private UUID readFromTapeId; + + // Constructor + public JobEntry() { + //pass + } + + // Getters and Setters + + public UUID getBlobId() { + return this.blobId; + } + + public void setBlobId(final UUID blobId) { + this.blobId = blobId; + } + + + public JobChunkBlobStoreState getBlobStoreState() { + return this.blobStoreState; + } + + public void setBlobStoreState(final JobChunkBlobStoreState blobStoreState) { + this.blobStoreState = blobStoreState; + } + + + public UUID getChunkId() { + return this.chunkId; + } + + public void setChunkId(final UUID chunkId) { + this.chunkId = chunkId; + } + + + public int getChunkNumber() { + return this.chunkNumber; + } + + public void setChunkNumber(final int chunkNumber) { + this.chunkNumber = chunkNumber; + } + + + public UUID getId() { + return this.id; + } + + public void setId(final UUID id) { + this.id = id; + } + + + public UUID getJobId() { + return this.jobId; + } + + public void setJobId(final UUID jobId) { + this.jobId = jobId; + } + + + public UUID getNodeId() { + return this.nodeId; + } + + public void setNodeId(final UUID nodeId) { + this.nodeId = nodeId; + } + + + public boolean getPendingTargetCommit() { + return this.pendingTargetCommit; + } + + public void setPendingTargetCommit(final boolean pendingTargetCommit) { + this.pendingTargetCommit = pendingTargetCommit; + } + + + public UUID getReadFromAzureTargetId() { + return this.readFromAzureTargetId; + } + + public void setReadFromAzureTargetId(final UUID readFromAzureTargetId) { + this.readFromAzureTargetId = readFromAzureTargetId; + } + + + public UUID getReadFromDs3TargetId() { + return this.readFromDs3TargetId; + } + + public void setReadFromDs3TargetId(final UUID readFromDs3TargetId) { + this.readFromDs3TargetId = readFromDs3TargetId; + } + + + public UUID getReadFromPoolId() { + return this.readFromPoolId; + } + + public void setReadFromPoolId(final UUID readFromPoolId) { + this.readFromPoolId = readFromPoolId; + } + + + public UUID getReadFromS3TargetId() { + return this.readFromS3TargetId; + } + + public void setReadFromS3TargetId(final UUID readFromS3TargetId) { + this.readFromS3TargetId = readFromS3TargetId; + } + + + public UUID getReadFromTapeId() { + return this.readFromTapeId; + } + + public void setReadFromTapeId(final UUID readFromTapeId) { + this.readFromTapeId = readFromTapeId; + } + +} \ No newline at end of file diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/models/MultiPartUploadPart.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/models/JobEntryList.java similarity index 60% rename from ds3-sdk/src/main/java/com/spectralogic/ds3client/models/MultiPartUploadPart.java rename to ds3-sdk/src/main/java/com/spectralogic/ds3client/models/JobEntryList.java index 086577f76..0d9167c9b 100644 --- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/models/MultiPartUploadPart.java +++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/models/JobEntryList.java @@ -18,52 +18,31 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; -import java.util.Date; +import java.util.List; +import java.util.ArrayList; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper; @JacksonXmlRootElement(namespace = "Data") -public class MultiPartUploadPart { +public class JobEntryList { // Variables - @JsonProperty("ETag") - private String eTag; - - @JsonProperty("LastModified") - private Date lastModified; - - @JsonProperty("PartNumber") - private int partNumber; + @JsonProperty("JobEntry") + @JacksonXmlElementWrapper(useWrapping = false) + private List jobEntries = new ArrayList<>(); // Constructor - public MultiPartUploadPart() { + public JobEntryList() { //pass } // Getters and Setters - public String getETag() { - return this.eTag; - } - - public void setETag(final String eTag) { - this.eTag = eTag; - } - - - public Date getLastModified() { - return this.lastModified; - } - - public void setLastModified(final Date lastModified) { - this.lastModified = lastModified; - } - - - public int getPartNumber() { - return this.partNumber; + public List getJobEntries() { + return this.jobEntries; } - public void setPartNumber(final int partNumber) { - this.partNumber = partNumber; + public void setJobEntries(final List jobEntries) { + this.jobEntries = jobEntries; } } \ No newline at end of file diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/models/JobSummaryApiBean.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/models/JobSummaryApiBean.java new file mode 100644 index 000000000..2ea1ffd08 --- /dev/null +++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/models/JobSummaryApiBean.java @@ -0,0 +1,269 @@ +/* + * ****************************************************************************** + * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"). You may not use + * this file except in compliance with the License. A copy of the License is located at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * or in the "license" file accompanying this file. + * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + * **************************************************************************** + */ + +// This code is auto-generated, do not modify +package com.spectralogic.ds3client.models; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import java.util.List; +import java.util.ArrayList; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper; +import java.lang.Boolean; +import java.util.UUID; +import java.util.Date; + +@JacksonXmlRootElement(namespace = "JobSummary") +public class JobSummaryApiBean { + + // Variables + @JacksonXmlProperty(isAttribute = true, localName = "Aggregating") + private boolean aggregating; + + @JacksonXmlProperty(isAttribute = true, localName = "BucketName") + private String bucketName; + + @JacksonXmlProperty(isAttribute = true, localName = "CachedSizeInBytes") + private long cachedSizeInBytes; + + @JacksonXmlProperty(isAttribute = true, localName = "ChunkClientProcessingOrderGuarantee") + private JobChunkClientProcessingOrderGuarantee chunkClientProcessingOrderGuarantee; + + @JacksonXmlProperty(isAttribute = true, localName = "CompletedSizeInBytes") + private long completedSizeInBytes; + + @JsonProperty("DestinationSummaries") + @JacksonXmlElementWrapper(useWrapping = true) + private List destinationSummaries = new ArrayList<>(); + + @JacksonXmlProperty(isAttribute = true, localName = "EntirelyInCache") + private Boolean entirelyInCache; + + @JacksonXmlProperty(isAttribute = true, localName = "JobId") + private UUID jobId; + + @JacksonXmlProperty(isAttribute = true, localName = "Naked") + private boolean naked; + + @JacksonXmlProperty(isAttribute = true, localName = "Name") + private String name; + + @JsonProperty("Nodes") + @JacksonXmlElementWrapper(useWrapping = true) + private List nodes = new ArrayList<>(); + + @JacksonXmlProperty(isAttribute = true, localName = "OriginalSizeInBytes") + private long originalSizeInBytes; + + @JacksonXmlProperty(isAttribute = true, localName = "Priority") + private Priority priority; + + @JacksonXmlProperty(isAttribute = true, localName = "RequestType") + private JobRequestType requestType; + + @JacksonXmlProperty(isAttribute = true, localName = "StartDate") + private Date startDate; + + @JacksonXmlProperty(isAttribute = true, localName = "Status") + private JobStatus status; + + @JsonProperty("Summary") + private String summary; + + @JacksonXmlProperty(isAttribute = true, localName = "UserId") + private UUID userId; + + @JacksonXmlProperty(isAttribute = true, localName = "UserName") + private String userName; + + // Constructor + public JobSummaryApiBean() { + //pass + } + + // Getters and Setters + + public boolean getAggregating() { + return this.aggregating; + } + + public void setAggregating(final boolean aggregating) { + this.aggregating = aggregating; + } + + + public String getBucketName() { + return this.bucketName; + } + + public void setBucketName(final String bucketName) { + this.bucketName = bucketName; + } + + + public long getCachedSizeInBytes() { + return this.cachedSizeInBytes; + } + + public void setCachedSizeInBytes(final long cachedSizeInBytes) { + this.cachedSizeInBytes = cachedSizeInBytes; + } + + + public JobChunkClientProcessingOrderGuarantee getChunkClientProcessingOrderGuarantee() { + return this.chunkClientProcessingOrderGuarantee; + } + + public void setChunkClientProcessingOrderGuarantee(final JobChunkClientProcessingOrderGuarantee chunkClientProcessingOrderGuarantee) { + this.chunkClientProcessingOrderGuarantee = chunkClientProcessingOrderGuarantee; + } + + + public long getCompletedSizeInBytes() { + return this.completedSizeInBytes; + } + + public void setCompletedSizeInBytes(final long completedSizeInBytes) { + this.completedSizeInBytes = completedSizeInBytes; + } + + + public List getDestinationSummaries() { + return this.destinationSummaries; + } + + public void setDestinationSummaries(final List destinationSummaries) { + this.destinationSummaries = destinationSummaries; + } + + + public Boolean getEntirelyInCache() { + return this.entirelyInCache; + } + + public void setEntirelyInCache(final Boolean entirelyInCache) { + this.entirelyInCache = entirelyInCache; + } + + + public UUID getJobId() { + return this.jobId; + } + + public void setJobId(final UUID jobId) { + this.jobId = jobId; + } + + + public boolean getNaked() { + return this.naked; + } + + public void setNaked(final boolean naked) { + this.naked = naked; + } + + + public String getName() { + return this.name; + } + + public void setName(final String name) { + this.name = name; + } + + + public List getNodes() { + return this.nodes; + } + + public void setNodes(final List nodes) { + this.nodes = nodes; + } + + + public long getOriginalSizeInBytes() { + return this.originalSizeInBytes; + } + + public void setOriginalSizeInBytes(final long originalSizeInBytes) { + this.originalSizeInBytes = originalSizeInBytes; + } + + + public Priority getPriority() { + return this.priority; + } + + public void setPriority(final Priority priority) { + this.priority = priority; + } + + + public JobRequestType getRequestType() { + return this.requestType; + } + + public void setRequestType(final JobRequestType requestType) { + this.requestType = requestType; + } + + + public Date getStartDate() { + return this.startDate; + } + + public void setStartDate(final Date startDate) { + this.startDate = startDate; + } + + + public JobStatus getStatus() { + return this.status; + } + + public void setStatus(final JobStatus status) { + this.status = status; + } + + + public String getSummary() { + return this.summary; + } + + public void setSummary(final String summary) { + this.summary = summary; + } + + + public UUID getUserId() { + return this.userId; + } + + public void setUserId(final UUID userId) { + this.userId = userId; + } + + + public String getUserName() { + return this.userName; + } + + public void setUserName(final String userName) { + this.userName = userName; + } + +} \ No newline at end of file diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/models/ListMultiPartUploadsResult.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/models/ListMultiPartUploadsResult.java deleted file mode 100644 index cbf27334c..000000000 --- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/models/ListMultiPartUploadsResult.java +++ /dev/null @@ -1,170 +0,0 @@ -/* - * ****************************************************************************** - * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"). You may not use - * this file except in compliance with the License. A copy of the License is located at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * or in the "license" file accompanying this file. - * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - * **************************************************************************** - */ - -// This code is auto-generated, do not modify -package com.spectralogic.ds3client.models; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; -import java.util.List; -import java.util.ArrayList; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper; -import com.spectralogic.ds3client.models.common.CommonPrefixes; - -@JacksonXmlRootElement(namespace = "ListMultipartUploadsResult") -public class ListMultiPartUploadsResult { - - // Variables - @JsonProperty("Bucket") - private String bucket; - - @JsonProperty("CommonPrefixes") - @JacksonXmlElementWrapper(useWrapping = false) - private List commonPrefixes = new ArrayList<>(); - - @JsonProperty("Delimiter") - private String delimiter; - - @JsonProperty("KeyMarker") - private String keyMarker; - - @JsonProperty("MaxUploads") - private int maxUploads; - - @JsonProperty("NextKeyMarker") - private String nextKeyMarker; - - @JsonProperty("NextUploadIdMarker") - private String nextUploadIdMarker; - - @JsonProperty("Prefix") - private String prefix; - - @JsonProperty("IsTruncated") - private boolean truncated; - - @JsonProperty("UploadIdMarker") - private String uploadIdMarker; - - @JsonProperty("Upload") - @JacksonXmlElementWrapper(useWrapping = false) - private List uploads = new ArrayList<>(); - - // Constructor - public ListMultiPartUploadsResult() { - //pass - } - - // Getters and Setters - - public String getBucket() { - return this.bucket; - } - - public void setBucket(final String bucket) { - this.bucket = bucket; - } - - - public List getCommonPrefixes() { - return this.commonPrefixes; - } - - public void setCommonPrefixes(final List commonPrefixes) { - this.commonPrefixes = commonPrefixes; - } - - - public String getDelimiter() { - return this.delimiter; - } - - public void setDelimiter(final String delimiter) { - this.delimiter = delimiter; - } - - - public String getKeyMarker() { - return this.keyMarker; - } - - public void setKeyMarker(final String keyMarker) { - this.keyMarker = keyMarker; - } - - - public int getMaxUploads() { - return this.maxUploads; - } - - public void setMaxUploads(final int maxUploads) { - this.maxUploads = maxUploads; - } - - - public String getNextKeyMarker() { - return this.nextKeyMarker; - } - - public void setNextKeyMarker(final String nextKeyMarker) { - this.nextKeyMarker = nextKeyMarker; - } - - - public String getNextUploadIdMarker() { - return this.nextUploadIdMarker; - } - - public void setNextUploadIdMarker(final String nextUploadIdMarker) { - this.nextUploadIdMarker = nextUploadIdMarker; - } - - - public String getPrefix() { - return this.prefix; - } - - public void setPrefix(final String prefix) { - this.prefix = prefix; - } - - - public boolean getTruncated() { - return this.truncated; - } - - public void setTruncated(final boolean truncated) { - this.truncated = truncated; - } - - - public String getUploadIdMarker() { - return this.uploadIdMarker; - } - - public void setUploadIdMarker(final String uploadIdMarker) { - this.uploadIdMarker = uploadIdMarker; - } - - - public List getUploads() { - return this.uploads; - } - - public void setUploads(final List uploads) { - this.uploads = uploads; - } - -} \ No newline at end of file diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/models/ListPartsResult.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/models/ListPartsResult.java deleted file mode 100644 index 16682062c..000000000 --- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/models/ListPartsResult.java +++ /dev/null @@ -1,145 +0,0 @@ -/* - * ****************************************************************************** - * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"). You may not use - * this file except in compliance with the License. A copy of the License is located at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * or in the "license" file accompanying this file. - * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - * **************************************************************************** - */ - -// This code is auto-generated, do not modify -package com.spectralogic.ds3client.models; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; -import java.util.List; -import java.util.ArrayList; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper; -import java.util.UUID; - -@JacksonXmlRootElement(namespace = "ListPartsResult") -public class ListPartsResult { - - // Variables - @JsonProperty("Bucket") - private String bucket; - - @JsonProperty("Key") - private String key; - - @JsonProperty("MaxParts") - private int maxParts; - - @JsonProperty("NextPartNumberMarker") - private int nextPartNumberMarker; - - @JsonProperty("Owner") - private User owner; - - @JsonProperty("PartNumberMarker") - private Integer partNumberMarker; - - @JsonProperty("Part") - @JacksonXmlElementWrapper(useWrapping = false) - private List parts = new ArrayList<>(); - - @JsonProperty("IsTruncated") - private boolean truncated; - - @JsonProperty("UploadId") - private UUID uploadId; - - // Constructor - public ListPartsResult() { - //pass - } - - // Getters and Setters - - public String getBucket() { - return this.bucket; - } - - public void setBucket(final String bucket) { - this.bucket = bucket; - } - - - public String getKey() { - return this.key; - } - - public void setKey(final String key) { - this.key = key; - } - - - public int getMaxParts() { - return this.maxParts; - } - - public void setMaxParts(final int maxParts) { - this.maxParts = maxParts; - } - - - public int getNextPartNumberMarker() { - return this.nextPartNumberMarker; - } - - public void setNextPartNumberMarker(final int nextPartNumberMarker) { - this.nextPartNumberMarker = nextPartNumberMarker; - } - - - public User getOwner() { - return this.owner; - } - - public void setOwner(final User owner) { - this.owner = owner; - } - - - public Integer getPartNumberMarker() { - return this.partNumberMarker; - } - - public void setPartNumberMarker(final Integer partNumberMarker) { - this.partNumberMarker = partNumberMarker; - } - - - public List getParts() { - return this.parts; - } - - public void setParts(final List parts) { - this.parts = parts; - } - - - public boolean getTruncated() { - return this.truncated; - } - - public void setTruncated(final boolean truncated) { - this.truncated = truncated; - } - - - public UUID getUploadId() { - return this.uploadId; - } - - public void setUploadId(final UUID uploadId) { - this.uploadId = uploadId; - } - -} \ No newline at end of file diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/models/MultiPartUpload.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/models/MultiPartUpload.java deleted file mode 100644 index 11cd1bc98..000000000 --- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/models/MultiPartUpload.java +++ /dev/null @@ -1,82 +0,0 @@ -/* - * ****************************************************************************** - * Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"). You may not use - * this file except in compliance with the License. A copy of the License is located at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * or in the "license" file accompanying this file. - * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - * **************************************************************************** - */ - -// This code is auto-generated, do not modify -package com.spectralogic.ds3client.models; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; -import java.util.Date; -import java.util.UUID; - -@JacksonXmlRootElement(namespace = "Data") -public class MultiPartUpload { - - // Variables - @JsonProperty("Initiated") - private Date initiated; - - @JsonProperty("Key") - private String key; - - @JsonProperty("Owner") - private User owner; - - @JsonProperty("UploadId") - private UUID uploadId; - - // Constructor - public MultiPartUpload() { - //pass - } - - // Getters and Setters - - public Date getInitiated() { - return this.initiated; - } - - public void setInitiated(final Date initiated) { - this.initiated = initiated; - } - - - public String getKey() { - return this.key; - } - - public void setKey(final String key) { - this.key = key; - } - - - public User getOwner() { - return this.owner; - } - - public void setOwner(final User owner) { - this.owner = owner; - } - - - public UUID getUploadId() { - return this.uploadId; - } - - public void setUploadId(final UUID uploadId) { - this.uploadId = uploadId; - } - -} \ No newline at end of file diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/models/Tape.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/models/Tape.java index 47e29f6c6..e3380667a 100644 --- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/models/Tape.java +++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/models/Tape.java @@ -40,6 +40,9 @@ public class Tape { @JsonProperty("BucketId") private UUID bucketId; + @JsonProperty("CharacterizationVer") + private String characterizationVer; + @JsonProperty("DescriptionForIdentification") private String descriptionForIdentification; @@ -161,6 +164,15 @@ public void setBucketId(final UUID bucketId) { } + public String getCharacterizationVer() { + return this.characterizationVer; + } + + public void setCharacterizationVer(final String characterizationVer) { + this.characterizationVer = characterizationVer; + } + + public String getDescriptionForIdentification() { return this.descriptionForIdentification; } diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/models/TapeDrive.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/models/TapeDrive.java index 8d081255b..539e48dda 100644 --- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/models/TapeDrive.java +++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/models/TapeDrive.java @@ -25,6 +25,9 @@ public class TapeDrive { // Variables + @JsonProperty("CharacterizationVer") + private String characterizationVer; + @JsonProperty("CleaningRequired") private boolean cleaningRequired; @@ -77,6 +80,15 @@ public TapeDrive() { // Getters and Setters + public String getCharacterizationVer() { + return this.characterizationVer; + } + + public void setCharacterizationVer(final String characterizationVer) { + this.characterizationVer = characterizationVer; + } + + public boolean getCleaningRequired() { return this.cleaningRequired; } diff --git a/ds3-sdk/src/main/java/com/spectralogic/ds3client/models/TapeFailureType.java b/ds3-sdk/src/main/java/com/spectralogic/ds3client/models/TapeFailureType.java index d144ab668..9f5eb7371 100644 --- a/ds3-sdk/src/main/java/com/spectralogic/ds3client/models/TapeFailureType.java +++ b/ds3-sdk/src/main/java/com/spectralogic/ds3client/models/TapeFailureType.java @@ -47,6 +47,8 @@ public enum TapeFailureType { READ_FAILED, REIMPORT_REQUIRED, SERIAL_NUMBER_MISMATCH, + SINGLE_PARTITION, VERIFY_FAILED, - WRITE_FAILED + WRITE_FAILED, + WRITE_SOURCE_FAILED } \ No newline at end of file diff --git a/ds3-sdk/src/test/java/com/spectralogic/ds3client/Ds3Client_Test.java b/ds3-sdk/src/test/java/com/spectralogic/ds3client/Ds3Client_Test.java index 0ad2f9dc3..a28193a8b 100644 --- a/ds3-sdk/src/test/java/com/spectralogic/ds3client/Ds3Client_Test.java +++ b/ds3-sdk/src/test/java/com/spectralogic/ds3client/Ds3Client_Test.java @@ -1264,73 +1264,6 @@ public void markSuspectBlobTapesAsDegradedSpectraS3Test() throws IOException { .markSuspectBlobTapesAsDegradedSpectraS3(new MarkSuspectBlobTapesAsDegradedSpectraS3Request(IDS_REQUEST_PAYLOAD_LIST)); } - @Test - public void completeMultiPartUploadTest() throws IOException { - final String expectedRequestContent = "17a112844c1a2327e617f530cb06dccf827162e29f4e40da7f521d0794b57770ba"; - final String expectedResponse = "http://my-server/bucketName/objectbucketNameobjectb54357faf0632cce46e942fa68356b38"; - - final List parts = new ArrayList<>(); - parts.add(new Part(1, "7a112844c1a2327e617f530cb06dccf8")); - parts.add(new Part(2, "7162e29f4e40da7f521d0794b57770ba")); - - final String bucketName = "bucketName"; - final String objectName = "object"; - final String uploadId = "VXBsb2FkIElEIGZvciA2aWWpbmcncyBteS1tb3ZpZS5tMnRzIHVwbG9hZA"; - final String etag = "b54357faf0632cce46e942fa68356b38"; - final String location = "http://my-server/bucketName/object"; - - final CompleteMultipartUpload completeMultipartUpload = new CompleteMultipartUpload(parts); - - final Map queryParams = new HashMap<>(); - queryParams.put("upload_id", uploadId); - - final Map responseHeaders = new HashMap<>(); - responseHeaders.put("etag", etag); - - final CompleteMultiPartUploadResponse response = MockNetwork - .expecting(HttpVerb.POST, "/bucketName/object", queryParams, expectedRequestContent) - .returning(200, expectedResponse, responseHeaders) - .asClient() - .completeMultiPartUpload(new CompleteMultiPartUploadRequest( - bucketName, - objectName, - completeMultipartUpload, - uploadId)); - - assertThat(response.getCompleteMultipartUploadResult().getLocation(), is(location)); - assertThat(response.getCompleteMultipartUploadResult().getBucket(), is(bucketName)); - assertThat(response.getCompleteMultipartUploadResult().getKey(), is(objectName)); - assertThat(response.getCompleteMultipartUploadResult().getETag(), is(etag)); - } - - @Test - public void putMultiPartUploadPartTest() throws IOException { - final String requestContent = "this is the part content"; - final String bucketName = "bucketName"; - final String objectName = "object"; - final int partNumber = 2; - final String uploadId = "VXBsb2FkIElEIGZvciA2aWWpbmcncyBteS1tb3ZpZS5tMnRzIHVwbG9hZA"; - final String eTag = "b54357faf0632cce46e942fa68356b38"; - - final Map queryParams = new HashMap<>(); - queryParams.put("part_number", String.valueOf(partNumber)); - queryParams.put("upload_id", uploadId); - - final Map responseHeaders = new HashMap<>(); - responseHeaders.put("etag", eTag); - - MockNetwork - .expecting(HttpVerb.PUT, "/bucketName/object", queryParams, requestContent) - .returning(200, "", responseHeaders) - .asClient() - .putMultiPartUploadPart(new PutMultiPartUploadPartRequest( - bucketName, - objectName, - new ByteArraySeekableByteChannel(requestContent.getBytes()), - partNumber, requestContent.getBytes().length, - uploadId)); - } - @Test public void getBulkJobSpectraS3WithMixedPayloadTest() throws IOException { final List objects = Arrays.asList( @@ -1667,30 +1600,6 @@ public void putObjectNullStreamStringConstructorTest() { () -> new PutObjectRequest("BucketName", "ObjectName", "JobId", 0, 0, null)); } - @Test - public void putMultiPartUploadNullChannelUuidConstructorTest() { - testNonnullStreamChannelExceptions("Channel", - () -> new PutMultiPartUploadPartRequest("BucketName", "ObjectName", null, 0, 0, UUID.randomUUID())); - } - - @Test - public void putMultiPartUploadNullChannelStringConstructorTest() { - testNonnullStreamChannelExceptions("Channel", - () -> new PutMultiPartUploadPartRequest("BucketName", "ObjectName", null, 0, 0, "UploadId")); - } - - @Test - public void putMultiPartUploadNullStreamUuidConstructorTest() { - testNonnullStreamChannelExceptions("Stream", - () -> new PutMultiPartUploadPartRequest("BucketName", "ObjectName", 0, 0, null, UUID.randomUUID())); - } - - @Test - public void putMultiPartUploadNullStreamStringConstructorTest() { - testNonnullStreamChannelExceptions("Stream", - () -> new PutMultiPartUploadPartRequest("BucketName", "ObjectName", 0, 0, null, "UploadId")); - } - private static void testNonnullStreamChannelExceptions(final String paramName, final Runnable runnable) { try { runnable.run(); diff --git a/libs.versions.toml b/libs.versions.toml index 9cf963eed..3eac4dfdb 100644 --- a/libs.versions.toml +++ b/libs.versions.toml @@ -16,7 +16,7 @@ # # project version # -ds3SdkVersion = "5.9.0" +ds3SdkVersion = "6.0.0" # # dependency versions #