Skip to content

Commit

Permalink
Merge pull request #346 from RachelTucker/BP-API-5-3
Browse files Browse the repository at this point in the history
Generated 5.3.x BP API from contract commit 1996817.
  • Loading branch information
Sharon Shabtai authored May 18, 2021
2 parents bfb0778 + e397d6d commit fe57d9f
Show file tree
Hide file tree
Showing 18 changed files with 239 additions and 4 deletions.
63 changes: 63 additions & 0 deletions Ds3/Calls/MarkTapeForCompactionSpectraS3Request.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
/*
* ******************************************************************************
* Copyright 2014-2017 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
using Ds3.Models;
using System;
using System.Net;

namespace Ds3.Calls
{
public class MarkTapeForCompactionSpectraS3Request : Ds3Request
{

public string TapeId { get; private set; }





public MarkTapeForCompactionSpectraS3Request(Guid tapeId)
{
this.TapeId = tapeId.ToString();
this.QueryParams.Add("operation", "mark_for_compaction");

}


public MarkTapeForCompactionSpectraS3Request(string tapeId)
{
this.TapeId = tapeId;
this.QueryParams.Add("operation", "mark_for_compaction");

}

internal override HttpVerb Verb
{
get
{
return HttpVerb.PUT;
}
}

internal override string Path
{
get
{
return "/_rest_/tape/" + TapeId;
}
}
}
}
30 changes: 30 additions & 0 deletions Ds3/Calls/MarkTapeForCompactionSpectraS3Response.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/*
* ******************************************************************************
* Copyright 2014-2017 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
using Ds3.Models;

namespace Ds3.Calls
{
public class MarkTapeForCompactionSpectraS3Response
{
public Tape ResponsePayload { get; private set; }

public MarkTapeForCompactionSpectraS3Response(Tape responsePayload)
{
this.ResponsePayload = responsePayload;
}
}
}
22 changes: 22 additions & 0 deletions Ds3/Calls/ModifyTapeDriveSpectraS3Request.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,13 @@ public class ModifyTapeDriveSpectraS3Request : Ds3Request
public string TapeDriveId { get; private set; }


private int? _maxFailedTapes;
public int? MaxFailedTapes
{
get { return _maxFailedTapes; }
set { WithMaxFailedTapes(value); }
}

private Priority? _minimumTaskPriority;
public Priority? MinimumTaskPriority
{
Expand All @@ -48,6 +55,21 @@ public ReservedTaskType? ReservedTaskType
}


public ModifyTapeDriveSpectraS3Request WithMaxFailedTapes(int? maxFailedTapes)
{
this._maxFailedTapes = maxFailedTapes;
if (maxFailedTapes != null)
{
this.QueryParams.Add("max_failed_tapes", maxFailedTapes.ToString());
}
else
{
this.QueryParams.Remove("max_failed_tapes");
}
return this;
}


public ModifyTapeDriveSpectraS3Request WithMinimumTaskPriority(Priority? minimumTaskPriority)
{
this._minimumTaskPriority = minimumTaskPriority;
Expand Down
44 changes: 44 additions & 0 deletions Ds3/Calls/ModifyTapePartitionSpectraS3Request.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,20 @@ public bool? AutoCompactionEnabled
set { WithAutoCompactionEnabled(value); }
}

private bool? _autoQuiesceEnabled;
public bool? AutoQuiesceEnabled
{
get { return _autoQuiesceEnabled; }
set { WithAutoQuiesceEnabled(value); }
}

private int? _driveIdleTimeoutInMinutes;
public int? DriveIdleTimeoutInMinutes
{
get { return _driveIdleTimeoutInMinutes; }
set { WithDriveIdleTimeoutInMinutes(value); }
}

private int? _minimumReadReservedDrives;
public int? MinimumReadReservedDrives
{
Expand Down Expand Up @@ -77,6 +91,36 @@ public ModifyTapePartitionSpectraS3Request WithAutoCompactionEnabled(bool? autoC
}


public ModifyTapePartitionSpectraS3Request WithAutoQuiesceEnabled(bool? autoQuiesceEnabled)
{
this._autoQuiesceEnabled = autoQuiesceEnabled;
if (autoQuiesceEnabled != null)
{
this.QueryParams.Add("auto_quiesce_enabled", autoQuiesceEnabled.ToString());
}
else
{
this.QueryParams.Remove("auto_quiesce_enabled");
}
return this;
}


public ModifyTapePartitionSpectraS3Request WithDriveIdleTimeoutInMinutes(int? driveIdleTimeoutInMinutes)
{
this._driveIdleTimeoutInMinutes = driveIdleTimeoutInMinutes;
if (driveIdleTimeoutInMinutes != null)
{
this.QueryParams.Add("drive_idle_timeout_in_minutes", driveIdleTimeoutInMinutes.ToString());
}
else
{
this.QueryParams.Remove("drive_idle_timeout_in_minutes");
}
return this;
}


public ModifyTapePartitionSpectraS3Request WithMinimumReadReservedDrives(int? minimumReadReservedDrives)
{
this._minimumReadReservedDrives = minimumReadReservedDrives;
Expand Down
5 changes: 4 additions & 1 deletion Ds3/Ds3.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,8 @@
<Compile Include="Calls\ListMultiPartUploadPartsResponse.cs" />
<Compile Include="Calls\ListMultiPartUploadsRequest.cs" />
<Compile Include="Calls\ListMultiPartUploadsResponse.cs" />
<Compile Include="Calls\MarkTapeForCompactionSpectraS3Request.cs" />
<Compile Include="Calls\MarkTapeForCompactionSpectraS3Response.cs" />
<Compile Include="Calls\MarkSuspectBlobAzureTargetsAsDegradedSpectraS3Request.cs" />
<Compile Include="Calls\MarkSuspectBlobDs3TargetsAsDegradedSpectraS3Request.cs" />
<Compile Include="Calls\MarkSuspectBlobPoolsAsDegradedSpectraS3Request.cs" />
Expand Down Expand Up @@ -1141,6 +1143,7 @@
<Compile Include="ResponseParsers\InspectTapeSpectraS3ResponseParser.cs" />
<Compile Include="ResponseParsers\ListMultiPartUploadPartsResponseParser.cs" />
<Compile Include="ResponseParsers\ListMultiPartUploadsResponseParser.cs" />
<Compile Include="ResponseParsers\MarkTapeForCompactionSpectraS3ResponseParser.cs" />
<Compile Include="ResponseParsers\ModelParsers.cs" />
<Compile Include="ResponseParsers\ModifyActiveJobSpectraS3ResponseParser.cs" />
<Compile Include="ResponseParsers\ModifyAzureDataReplicationRuleSpectraS3ResponseParser.cs" />
Expand Down Expand Up @@ -1352,4 +1355,4 @@
<Target Name="AfterBuild">
</Target>
-->
</Project>
</Project>
5 changes: 5 additions & 0 deletions Ds3/Ds3Client.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1146,6 +1146,11 @@ public InspectTapeSpectraS3Response InspectTapeSpectraS3(InspectTapeSpectraS3Req
return new InspectTapeSpectraS3ResponseParser().Parse(request, _netLayer.Invoke(request));
}

public MarkTapeForCompactionSpectraS3Response MarkTapeForCompactionSpectraS3(MarkTapeForCompactionSpectraS3Request request)
{
return new MarkTapeForCompactionSpectraS3ResponseParser().Parse(request, _netLayer.Invoke(request));
}

public ModifyTapeDriveSpectraS3Response ModifyTapeDriveSpectraS3(ModifyTapeDriveSpectraS3Request request)
{
return new ModifyTapeDriveSpectraS3ResponseParser().Parse(request, _netLayer.Invoke(request));
Expand Down
2 changes: 2 additions & 0 deletions Ds3/IDs3Client.cs
Original file line number Diff line number Diff line change
Expand Up @@ -471,6 +471,8 @@ public interface IDs3Client

InspectTapeSpectraS3Response InspectTapeSpectraS3(InspectTapeSpectraS3Request request);

MarkTapeForCompactionSpectraS3Response MarkTapeForCompactionSpectraS3(MarkTapeForCompactionSpectraS3Request request);

ModifyTapeDriveSpectraS3Response ModifyTapeDriveSpectraS3(ModifyTapeDriveSpectraS3Request request);

ModifyTapePartitionSpectraS3Response ModifyTapePartitionSpectraS3(ModifyTapePartitionSpectraS3Request request);
Expand Down
1 change: 1 addition & 0 deletions Ds3/Models/CacheFilesystemInformation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ public class CacheFilesystemInformation
public long AvailableCapacityInBytes { get; set; }
public CacheFilesystem CacheFilesystem { get; set; }
public IEnumerable<CacheEntryInformation> Entries { get; set; }
public long JobLockedCacheInBytes { get; set; }
public string Summary { get; set; }
public long TotalCapacityInBytes { get; set; }
public long UnavailableCapacityInBytes { get; set; }
Expand Down
2 changes: 2 additions & 0 deletions Ds3/Models/DetailedTapePartition.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ namespace Ds3.Models
public class DetailedTapePartition
{
public bool AutoCompactionEnabled { get; set; }
public bool AutoQuiesceEnabled { get; set; }
public int? DriveIdleTimeoutInMinutes { get; set; }
public TapeDriveType? DriveType { get; set; }
public IEnumerable<TapeDriveType> DriveTypes { get; set; }
public string ErrorMessage { get; set; }
Expand Down
2 changes: 2 additions & 0 deletions Ds3/Models/NamedDetailedTapePartition.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ namespace Ds3.Models
public class NamedDetailedTapePartition
{
public bool AutoCompactionEnabled { get; set; }
public bool AutoQuiesceEnabled { get; set; }
public int? DriveIdleTimeoutInMinutes { get; set; }
public TapeDriveType? DriveType { get; set; }
public IEnumerable<TapeDriveType> DriveTypes { get; set; }
public string ErrorMessage { get; set; }
Expand Down
1 change: 1 addition & 0 deletions Ds3/Models/RestOperationType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ public enum RestOperationType
GET_PHYSICAL_PLACEMENT,
IMPORT,
INSPECT,
MARK_FOR_COMPACTION,
ONLINE,
PAIR_BACK,
REGENERATE_SECRET_KEY,
Expand Down
1 change: 1 addition & 0 deletions Ds3/Models/TapeDrive.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ public class TapeDrive
public bool ForceTapeRemoval { get; set; }
public Guid Id { get; set; }
public DateTime? LastCleaned { get; set; }
public int? MaxFailedTapes { get; set; }
public string MfgSerialNumber { get; set; }
public Priority? MinimumTaskPriority { get; set; }
public Guid PartitionId { get; set; }
Expand Down
4 changes: 4 additions & 0 deletions Ds3/Models/TapeFailureType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,17 @@ public enum TapeFailureType
DELAYED_OWNERSHIP_FAILURE,
DRIVE_CLEAN_FAILED,
DRIVE_CLEANED,
ENCRYPTION_ERROR,
FORMAT_FAILED,
GET_TAPE_INFORMATION_FAILED,
HARDWARE_ERROR,
IMPORT_FAILED,
IMPORT_INCOMPLETE,
IMPORT_FAILED_DUE_TO_TAKE_OWNERSHIP_FAILURE,
IMPORT_FAILED_DUE_TO_DATA_INTEGRITY,
INCOMPATIBLE,
INSPECT_FAILED,
QUIESCING_DRIVE,
READ_FAILED,
REIMPORT_REQUIRED,
SERIAL_NUMBER_MISMATCH,
Expand Down
2 changes: 2 additions & 0 deletions Ds3/Models/TapePartition.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ namespace Ds3.Models
public class TapePartition
{
public bool AutoCompactionEnabled { get; set; }
public bool AutoQuiesceEnabled { get; set; }
public int? DriveIdleTimeoutInMinutes { get; set; }
public TapeDriveType? DriveType { get; set; }
public string ErrorMessage { get; set; }
public Guid Id { get; set; }
Expand Down
3 changes: 2 additions & 1 deletion Ds3/Models/TargetFailureType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ public enum TargetFailureType
WRITE_INITIATE_FAILED,
READ_FAILED,
READ_INITIATE_FAILED,
VERIFY_FAILED
VERIFY_FAILED,
VERIFY_COMPLETE
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
/*
* ******************************************************************************
* Copyright 2014-2017 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

using Ds3.Calls;
using Ds3.Models;
using Ds3.Runtime;
using System.Linq;
using System.Net;
using System.Xml.Linq;

namespace Ds3.ResponseParsers
{
internal class MarkTapeForCompactionSpectraS3ResponseParser : IResponseParser<MarkTapeForCompactionSpectraS3Request, MarkTapeForCompactionSpectraS3Response>
{
public MarkTapeForCompactionSpectraS3Response Parse(MarkTapeForCompactionSpectraS3Request request, IWebResponse response)
{
using (response)
{
ResponseParseUtilities.HandleStatusCode(response, (HttpStatusCode)200);
using (var stream = response.GetResponseStream())
{
return new MarkTapeForCompactionSpectraS3Response(
ModelParsers.ParseTape(
XmlExtensions.ReadDocument(stream).ElementOrThrow("Data"))
);
}
}
}
}
}
Loading

0 comments on commit fe57d9f

Please sign in to comment.