Skip to content

Commit

Permalink
Generated 5.6.x.3020673 API.
Browse files Browse the repository at this point in the history
  • Loading branch information
RachelTucker committed Sep 15, 2023
1 parent bf93957 commit 0be328d
Show file tree
Hide file tree
Showing 100 changed files with 602 additions and 94 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,7 @@
import com.spectralogic.ds3client.utils.Platform;
import com.spectralogic.ds3client.utils.ResourceUtils;
import org.apache.commons.io.FileUtils;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Assume;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2077,7 +2077,7 @@ private static ImmutableList<Ds3Object> generateDs3Objects(final Path destinatio
}

@Test
public static void testCancelingJob() throws URISyntaxException, InterruptedException {
public void testCancelingJob() throws URISyntaxException, InterruptedException {
final String tempPathPrefix = null;
Path tempDirectory;

Expand Down
13 changes: 13 additions & 0 deletions ds3-sdk/src/main/java/com/spectralogic/ds3client/Ds3Client.java
Original file line number Diff line number Diff line change
Expand Up @@ -795,6 +795,12 @@ PutBulkJobSpectraS3Response putBulkJobSpectraS3(final PutBulkJobSpectraS3Request
VerifyBulkJobSpectraS3Response verifyBulkJobSpectraS3(final VerifyBulkJobSpectraS3Request request)
throws IOException;

@Action("DELETE")
@Resource("JOB_CREATION_FAILED")

DeleteJobCreationFailureSpectraS3Response deleteJobCreationFailureSpectraS3(final DeleteJobCreationFailureSpectraS3Request request)
throws IOException;

@ResponsePayloadModel("ActiveJob")
@Action("SHOW")
@Resource("ACTIVE_JOB")
Expand Down Expand Up @@ -858,6 +864,13 @@ GetJobChunkSpectraS3Response getJobChunkSpectraS3(final GetJobChunkSpectraS3Requ
GetJobChunksReadyForClientProcessingSpectraS3Response getJobChunksReadyForClientProcessingSpectraS3(final GetJobChunksReadyForClientProcessingSpectraS3Request request)
throws IOException;

@ResponsePayloadModel("JobCreationFailedList")
@Action("LIST")
@Resource("JOB_CREATION_FAILED")

GetJobCreationFailuresSpectraS3Response getJobCreationFailuresSpectraS3(final GetJobCreationFailuresSpectraS3Request request)
throws IOException;

@ResponsePayloadModel("MasterObjectList")
@Action("SHOW")
@Resource("JOB")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -514,6 +514,10 @@ public VerifyBulkJobSpectraS3Response verifyBulkJobSpectraS3(final VerifyBulkJob
return new VerifyBulkJobSpectraS3ResponseParser().response(this.netClient.getResponse(request));
}
@Override
public DeleteJobCreationFailureSpectraS3Response deleteJobCreationFailureSpectraS3(final DeleteJobCreationFailureSpectraS3Request request) throws IOException {
return new DeleteJobCreationFailureSpectraS3ResponseParser().response(this.netClient.getResponse(request));
}
@Override
public GetActiveJobSpectraS3Response getActiveJobSpectraS3(final GetActiveJobSpectraS3Request request) throws IOException {
return new GetActiveJobSpectraS3ResponseParser().response(this.netClient.getResponse(request));
}
Expand Down Expand Up @@ -550,6 +554,10 @@ public GetJobChunksReadyForClientProcessingSpectraS3Response getJobChunksReadyFo
return new GetJobChunksReadyForClientProcessingSpectraS3ResponseParser().response(this.netClient.getResponse(request));
}
@Override
public GetJobCreationFailuresSpectraS3Response getJobCreationFailuresSpectraS3(final GetJobCreationFailuresSpectraS3Request request) throws IOException {
return new GetJobCreationFailuresSpectraS3ResponseParser().response(this.netClient.getResponse(request));
}
@Override
public GetJobSpectraS3Response getJobSpectraS3(final GetJobSpectraS3Request request) throws IOException {
return new GetJobSpectraS3ResponseParser().response(this.netClient.getResponse(request));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,8 @@
import java.io.InputStream;
import com.spectralogic.ds3client.serializer.XmlOutput;
import java.nio.charset.Charset;
import com.spectralogic.ds3client.commands.interfaces.AbstractRequest;

import java.nio.charset.StandardCharsets;
import com.spectralogic.ds3client.commands.interfaces.AbstractRequest;
import java.util.UUID;

public class CompleteMultiPartUploadRequest extends AbstractRequest {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
/*
* ******************************************************************************
* 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.DeleteJobCreationFailureSpectraS3Response;
import com.spectralogic.ds3client.networking.WebResponse;
import java.io.IOException;

public class DeleteJobCreationFailureSpectraS3ResponseParser extends AbstractResponseParser<DeleteJobCreationFailureSpectraS3Response> {
private final int[] expectedStatusCodes = new int[]{204};

@Override
public DeleteJobCreationFailureSpectraS3Response 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 DeleteJobCreationFailureSpectraS3Response(this.getChecksum(), this.getChecksumType());

default:
assert false: "validateStatusCode should have made it impossible to reach this line";
}
}

throw ResponseParserUtils.createFailedRequest(response, expectedStatusCodes);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import com.spectralogic.ds3client.commands.parsers.utils.ResponseParserUtils;
import com.spectralogic.ds3client.commands.spectrads3.GetBlobPersistenceSpectraS3Response;
import com.spectralogic.ds3client.networking.WebResponse;

import com.spectralogic.ds3client.serializer.XmlOutput;
import java.io.IOException;
import java.io.InputStream;
import java.lang.String;
Expand Down
Original file line number Diff line number Diff line change
@@ -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.GetJobCreationFailuresSpectraS3Response;
import com.spectralogic.ds3client.models.JobCreationFailedList;
import com.spectralogic.ds3client.networking.WebResponse;
import com.spectralogic.ds3client.serializer.XmlOutput;
import java.io.IOException;
import java.io.InputStream;

public class GetJobCreationFailuresSpectraS3ResponseParser extends AbstractResponseParser<GetJobCreationFailuresSpectraS3Response> {
private final int[] expectedStatusCodes = new int[]{200};

@Override
public GetJobCreationFailuresSpectraS3Response 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 JobCreationFailedList result = XmlOutput.fromXml(inputStream, JobCreationFailedList.class);
return new GetJobCreationFailuresSpectraS3Response(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);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import com.spectralogic.ds3client.commands.parsers.utils.ResponseParserUtils;
import com.spectralogic.ds3client.commands.spectrads3.GetJobToReplicateSpectraS3Response;
import com.spectralogic.ds3client.networking.WebResponse;

import com.spectralogic.ds3client.serializer.XmlOutput;
import java.io.IOException;
import java.io.InputStream;
import java.lang.String;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

import com.spectralogic.ds3client.networking.HttpVerb;
import com.spectralogic.ds3client.commands.interfaces.AbstractRequest;

import java.util.UUID;

public class DelegateCreateUserSpectraS3Request extends AbstractRequest {
Expand Down
Original file line number Diff line number Diff line change
@@ -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 DeleteJobCreationFailureSpectraS3Request extends AbstractRequest {

// Variables

private final String jobCreationFailed;

// Constructor


public DeleteJobCreationFailureSpectraS3Request(final String jobCreationFailed) {
this.jobCreationFailed = jobCreationFailed;

}


@Override
public HttpVerb getVerb() {
return HttpVerb.DELETE;
}

@Override
public String getPath() {
return "/_rest_/job_creation_failed/" + jobCreationFailed;
}

public String getJobCreationFailed() {
return this.jobCreationFailed;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*
* ******************************************************************************
* 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.ChecksumType;
import com.spectralogic.ds3client.commands.interfaces.AbstractResponse;

public class DeleteJobCreationFailureSpectraS3Response extends AbstractResponse {

public DeleteJobCreationFailureSpectraS3Response(final String checksum, final ChecksumType.Type checksumType) {
super(checksum, checksumType);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@

import java.io.ByteArrayInputStream;
import java.io.InputStream;
import java.nio.charset.StandardCharsets;
import java.util.List;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import com.spectralogic.ds3client.commands.interfaces.AbstractRequest;

public class EjectStorageDomainBlobsSpectraS3Request extends AbstractRequest {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

import com.spectralogic.ds3client.networking.HttpVerb;
import com.spectralogic.ds3client.commands.interfaces.AbstractRequest;

import java.util.UUID;

public class EjectTapeSpectraS3Request extends AbstractRequest {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
import com.spectralogic.ds3client.networking.HttpVerb;
import com.spectralogic.ds3client.commands.interfaces.AbstractPaginationRequest;
import java.util.UUID;

import com.spectralogic.ds3client.models.DataPlacementRuleState;
import com.spectralogic.ds3client.models.DataReplicationRuleType;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

import com.spectralogic.ds3client.networking.HttpVerb;
import com.spectralogic.ds3client.commands.interfaces.AbstractPaginationRequest;

import java.util.UUID;

public class GetAzureTargetBucketNamesSpectraS3Request extends AbstractPaginationRequest {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

import com.spectralogic.ds3client.networking.HttpVerb;
import com.spectralogic.ds3client.commands.interfaces.AbstractPaginationRequest;

import java.util.UUID;
import com.spectralogic.ds3client.models.TargetFailureType;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

import com.spectralogic.ds3client.networking.HttpVerb;
import com.spectralogic.ds3client.commands.interfaces.AbstractPaginationRequest;

import java.util.UUID;
import com.spectralogic.ds3client.models.TargetReadPreferenceType;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,8 @@
import java.io.ByteArrayInputStream;
import java.io.InputStream;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;

import com.spectralogic.ds3client.utils.Guard;
import java.nio.charset.StandardCharsets;
import com.spectralogic.ds3client.commands.interfaces.AbstractRequest;

public class GetBlobPersistenceSpectraS3Request extends AbstractRequest {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

import com.spectralogic.ds3client.networking.HttpVerb;
import com.spectralogic.ds3client.commands.interfaces.AbstractPaginationRequest;

import java.util.UUID;
import com.spectralogic.ds3client.models.BucketAclPermission;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

import com.spectralogic.ds3client.networking.HttpVerb;
import com.spectralogic.ds3client.commands.interfaces.AbstractRequest;

import java.util.UUID;
import com.spectralogic.ds3client.models.PoolHealth;
import com.spectralogic.ds3client.models.PoolState;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

import com.spectralogic.ds3client.networking.HttpVerb;
import com.spectralogic.ds3client.commands.interfaces.AbstractPaginationRequest;

import java.util.UUID;

public class GetBucketHistorySpectraS3Request extends AbstractPaginationRequest {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
import com.spectralogic.ds3client.networking.HttpVerb;
import com.spectralogic.ds3client.commands.interfaces.AbstractPaginationRequest;
import java.util.UUID;

import com.spectralogic.ds3client.models.DataIsolationLevel;
import com.spectralogic.ds3client.models.DataPlacementRuleState;
import com.spectralogic.ds3client.models.DataPersistenceRuleType;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
import com.spectralogic.ds3client.networking.HttpVerb;
import com.spectralogic.ds3client.commands.interfaces.AbstractPaginationRequest;
import com.spectralogic.ds3client.models.ChecksumType;

import java.util.UUID;

public class GetDataPoliciesSpectraS3Request extends AbstractPaginationRequest {
Expand Down
Loading

0 comments on commit 0be328d

Please sign in to comment.