Skip to content

Commit bb42b9c

Browse files
authored
Generated 5.6.x.3020673 API. (#619)
1 parent bf93957 commit bb42b9c

File tree

100 files changed

+602
-94
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

100 files changed

+602
-94
lines changed

ds3-sdk-integration/src/integrationTest/java/com/spectralogic/ds3client/integration/GetJobManagement_Test.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,12 +74,7 @@
7474
import com.spectralogic.ds3client.utils.Platform;
7575
import com.spectralogic.ds3client.utils.ResourceUtils;
7676
import org.apache.commons.io.FileUtils;
77-
import org.junit.After;
78-
import org.junit.AfterClass;
79-
import org.junit.Assume;
80-
import org.junit.Before;
81-
import org.junit.BeforeClass;
82-
import org.junit.Test;
77+
import org.junit.*;
8378
import org.slf4j.Logger;
8479
import org.slf4j.LoggerFactory;
8580

ds3-sdk-integration/src/integrationTest/java/com/spectralogic/ds3client/integration/PutJobManagement_Test.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2077,7 +2077,7 @@ private static ImmutableList<Ds3Object> generateDs3Objects(final Path destinatio
20772077
}
20782078

20792079
@Test
2080-
public static void testCancelingJob() throws URISyntaxException, InterruptedException {
2080+
public void testCancelingJob() throws URISyntaxException, InterruptedException {
20812081
final String tempPathPrefix = null;
20822082
Path tempDirectory;
20832083

ds3-sdk/src/main/java/com/spectralogic/ds3client/Ds3Client.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -795,6 +795,12 @@ PutBulkJobSpectraS3Response putBulkJobSpectraS3(final PutBulkJobSpectraS3Request
795795
VerifyBulkJobSpectraS3Response verifyBulkJobSpectraS3(final VerifyBulkJobSpectraS3Request request)
796796
throws IOException;
797797

798+
@Action("DELETE")
799+
@Resource("JOB_CREATION_FAILED")
800+
801+
DeleteJobCreationFailureSpectraS3Response deleteJobCreationFailureSpectraS3(final DeleteJobCreationFailureSpectraS3Request request)
802+
throws IOException;
803+
798804
@ResponsePayloadModel("ActiveJob")
799805
@Action("SHOW")
800806
@Resource("ACTIVE_JOB")
@@ -858,6 +864,13 @@ GetJobChunkSpectraS3Response getJobChunkSpectraS3(final GetJobChunkSpectraS3Requ
858864
GetJobChunksReadyForClientProcessingSpectraS3Response getJobChunksReadyForClientProcessingSpectraS3(final GetJobChunksReadyForClientProcessingSpectraS3Request request)
859865
throws IOException;
860866

867+
@ResponsePayloadModel("JobCreationFailedList")
868+
@Action("LIST")
869+
@Resource("JOB_CREATION_FAILED")
870+
871+
GetJobCreationFailuresSpectraS3Response getJobCreationFailuresSpectraS3(final GetJobCreationFailuresSpectraS3Request request)
872+
throws IOException;
873+
861874
@ResponsePayloadModel("MasterObjectList")
862875
@Action("SHOW")
863876
@Resource("JOB")

ds3-sdk/src/main/java/com/spectralogic/ds3client/Ds3ClientImpl.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -514,6 +514,10 @@ public VerifyBulkJobSpectraS3Response verifyBulkJobSpectraS3(final VerifyBulkJob
514514
return new VerifyBulkJobSpectraS3ResponseParser().response(this.netClient.getResponse(request));
515515
}
516516
@Override
517+
public DeleteJobCreationFailureSpectraS3Response deleteJobCreationFailureSpectraS3(final DeleteJobCreationFailureSpectraS3Request request) throws IOException {
518+
return new DeleteJobCreationFailureSpectraS3ResponseParser().response(this.netClient.getResponse(request));
519+
}
520+
@Override
517521
public GetActiveJobSpectraS3Response getActiveJobSpectraS3(final GetActiveJobSpectraS3Request request) throws IOException {
518522
return new GetActiveJobSpectraS3ResponseParser().response(this.netClient.getResponse(request));
519523
}
@@ -550,6 +554,10 @@ public GetJobChunksReadyForClientProcessingSpectraS3Response getJobChunksReadyFo
550554
return new GetJobChunksReadyForClientProcessingSpectraS3ResponseParser().response(this.netClient.getResponse(request));
551555
}
552556
@Override
557+
public GetJobCreationFailuresSpectraS3Response getJobCreationFailuresSpectraS3(final GetJobCreationFailuresSpectraS3Request request) throws IOException {
558+
return new GetJobCreationFailuresSpectraS3ResponseParser().response(this.netClient.getResponse(request));
559+
}
560+
@Override
553561
public GetJobSpectraS3Response getJobSpectraS3(final GetJobSpectraS3Request request) throws IOException {
554562
return new GetJobSpectraS3ResponseParser().response(this.netClient.getResponse(request));
555563
}

ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/CompleteMultiPartUploadRequest.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,8 @@
2222
import java.io.InputStream;
2323
import com.spectralogic.ds3client.serializer.XmlOutput;
2424
import java.nio.charset.Charset;
25-
import com.spectralogic.ds3client.commands.interfaces.AbstractRequest;
26-
2725
import java.nio.charset.StandardCharsets;
26+
import com.spectralogic.ds3client.commands.interfaces.AbstractRequest;
2827
import java.util.UUID;
2928

3029
public class CompleteMultiPartUploadRequest extends AbstractRequest {
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
/*
2+
* ******************************************************************************
3+
* Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
4+
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
5+
* this file except in compliance with the License. A copy of the License is located at
6+
*
7+
* http://www.apache.org/licenses/LICENSE-2.0
8+
*
9+
* or in the "license" file accompanying this file.
10+
* This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
11+
* CONDITIONS OF ANY KIND, either express or implied. See the License for the
12+
* specific language governing permissions and limitations under the License.
13+
* ****************************************************************************
14+
*/
15+
16+
// This code is auto-generated, do not modify
17+
package com.spectralogic.ds3client.commands.parsers;
18+
19+
import com.spectralogic.ds3client.commands.parsers.interfaces.AbstractResponseParser;
20+
import com.spectralogic.ds3client.commands.parsers.utils.ResponseParserUtils;
21+
import com.spectralogic.ds3client.commands.spectrads3.DeleteJobCreationFailureSpectraS3Response;
22+
import com.spectralogic.ds3client.networking.WebResponse;
23+
import java.io.IOException;
24+
25+
public class DeleteJobCreationFailureSpectraS3ResponseParser extends AbstractResponseParser<DeleteJobCreationFailureSpectraS3Response> {
26+
private final int[] expectedStatusCodes = new int[]{204};
27+
28+
@Override
29+
public DeleteJobCreationFailureSpectraS3Response parseXmlResponse(final WebResponse response) throws IOException {
30+
final int statusCode = response.getStatusCode();
31+
if (ResponseParserUtils.validateStatusCode(statusCode, expectedStatusCodes)) {
32+
switch (statusCode) {
33+
case 204:
34+
//There is no payload, return an empty response handler
35+
return new DeleteJobCreationFailureSpectraS3Response(this.getChecksum(), this.getChecksumType());
36+
37+
default:
38+
assert false: "validateStatusCode should have made it impossible to reach this line";
39+
}
40+
}
41+
42+
throw ResponseParserUtils.createFailedRequest(response, expectedStatusCodes);
43+
}
44+
}

ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetBlobPersistenceSpectraS3ResponseParser.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
import com.spectralogic.ds3client.commands.parsers.utils.ResponseParserUtils;
2121
import com.spectralogic.ds3client.commands.spectrads3.GetBlobPersistenceSpectraS3Response;
2222
import com.spectralogic.ds3client.networking.WebResponse;
23-
23+
import com.spectralogic.ds3client.serializer.XmlOutput;
2424
import java.io.IOException;
2525
import java.io.InputStream;
2626
import java.lang.String;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
/*
2+
* ******************************************************************************
3+
* Copyright 2014-2019 Spectra Logic Corporation. All Rights Reserved.
4+
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
5+
* this file except in compliance with the License. A copy of the License is located at
6+
*
7+
* http://www.apache.org/licenses/LICENSE-2.0
8+
*
9+
* or in the "license" file accompanying this file.
10+
* This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
11+
* CONDITIONS OF ANY KIND, either express or implied. See the License for the
12+
* specific language governing permissions and limitations under the License.
13+
* ****************************************************************************
14+
*/
15+
16+
// This code is auto-generated, do not modify
17+
package com.spectralogic.ds3client.commands.parsers;
18+
19+
import com.spectralogic.ds3client.commands.parsers.interfaces.AbstractResponseParser;
20+
import com.spectralogic.ds3client.commands.parsers.utils.ResponseParserUtils;
21+
import com.spectralogic.ds3client.commands.spectrads3.GetJobCreationFailuresSpectraS3Response;
22+
import com.spectralogic.ds3client.models.JobCreationFailedList;
23+
import com.spectralogic.ds3client.networking.WebResponse;
24+
import com.spectralogic.ds3client.serializer.XmlOutput;
25+
import java.io.IOException;
26+
import java.io.InputStream;
27+
28+
public class GetJobCreationFailuresSpectraS3ResponseParser extends AbstractResponseParser<GetJobCreationFailuresSpectraS3Response> {
29+
private final int[] expectedStatusCodes = new int[]{200};
30+
31+
@Override
32+
public GetJobCreationFailuresSpectraS3Response parseXmlResponse(final WebResponse response) throws IOException {
33+
final int statusCode = response.getStatusCode();
34+
final Integer pagingTruncated = parseIntHeader("page-truncated");
35+
final Integer pagingTotalResultCount = parseIntHeader("total-result-count");
36+
if (ResponseParserUtils.validateStatusCode(statusCode, expectedStatusCodes)) {
37+
switch (statusCode) {
38+
case 200:
39+
try (final InputStream inputStream = response.getResponseStream()) {
40+
final JobCreationFailedList result = XmlOutput.fromXml(inputStream, JobCreationFailedList.class);
41+
return new GetJobCreationFailuresSpectraS3Response(result, pagingTotalResultCount, pagingTruncated, this.getChecksum(), this.getChecksumType());
42+
}
43+
44+
default:
45+
assert false: "validateStatusCode should have made it impossible to reach this line";
46+
}
47+
}
48+
49+
throw ResponseParserUtils.createFailedRequest(response, expectedStatusCodes);
50+
}
51+
}

ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/parsers/GetJobToReplicateSpectraS3ResponseParser.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
import com.spectralogic.ds3client.commands.parsers.utils.ResponseParserUtils;
2121
import com.spectralogic.ds3client.commands.spectrads3.GetJobToReplicateSpectraS3Response;
2222
import com.spectralogic.ds3client.networking.WebResponse;
23-
23+
import com.spectralogic.ds3client.serializer.XmlOutput;
2424
import java.io.IOException;
2525
import java.io.InputStream;
2626
import java.lang.String;

ds3-sdk/src/main/java/com/spectralogic/ds3client/commands/spectrads3/DelegateCreateUserSpectraS3Request.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818

1919
import com.spectralogic.ds3client.networking.HttpVerb;
2020
import com.spectralogic.ds3client.commands.interfaces.AbstractRequest;
21-
2221
import java.util.UUID;
2322

2423
public class DelegateCreateUserSpectraS3Request extends AbstractRequest {

0 commit comments

Comments
 (0)