-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bf93957
commit 0be328d
Showing
100 changed files
with
602 additions
and
94 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
...ctralogic/ds3client/commands/parsers/DeleteJobCreationFailureSpectraS3ResponseParser.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 51 additions & 0 deletions
51
...pectralogic/ds3client/commands/parsers/GetJobCreationFailuresSpectraS3ResponseParser.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 51 additions & 0 deletions
51
.../spectralogic/ds3client/commands/spectrads3/DeleteJobCreationFailureSpectraS3Request.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
|
||
} |
28 changes: 28 additions & 0 deletions
28
...spectralogic/ds3client/commands/spectrads3/DeleteJobCreationFailureSpectraS3Response.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.