Skip to content

Commit

Permalink
Merge pull request #341 from RachelTucker/update-5-2-api
Browse files Browse the repository at this point in the history
Updating to BP API 5.2 commit 1755379
  • Loading branch information
RachelTucker authored Aug 13, 2020
2 parents 7a39452 + 1a7deab commit 5932953
Show file tree
Hide file tree
Showing 40 changed files with 1,743 additions and 5 deletions.
103 changes: 103 additions & 0 deletions Ds3/Calls/CompleteBlobRequest.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
/*
* ******************************************************************************
* 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 CompleteBlobRequest : Ds3Request
{

public string BucketName { get; private set; }

public string ObjectName { get; private set; }

public string Blob { get; private set; }

public string Job { get; private set; }


private long? _size;
public long? Size
{
get { return _size; }
set { WithSize(value); }
}


public CompleteBlobRequest WithSize(long? size)
{
this._size = size;
if (size != null)
{
this.QueryParams.Add("size", size.ToString());
}
else
{
this.QueryParams.Remove("size");
}
return this;
}




public CompleteBlobRequest(string bucketName, string objectName, Guid blob, Guid job)
{
this.BucketName = bucketName;
this.ObjectName = objectName;
this.Blob = blob.ToString();
this.Job = job.ToString();

this.QueryParams.Add("blob", blob.ToString());

this.QueryParams.Add("job", job.ToString());

}


public CompleteBlobRequest(string bucketName, string objectName, string blob, string job)
{
this.BucketName = bucketName;
this.ObjectName = objectName;
this.Blob = blob;
this.Job = job;

this.QueryParams.Add("blob", blob);

this.QueryParams.Add("job", job);

}

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

internal override string Path
{
get
{
return "/" + BucketName + "/" + ObjectName;
}
}
}
}
37 changes: 37 additions & 0 deletions Ds3/Calls/DelegateCreateUserSpectraS3Request.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,13 @@ public class DelegateCreateUserSpectraS3Request : Ds3Request
public string Name { get; private set; }


private string _defaultDataPolicyId;
public string DefaultDataPolicyId
{
get { return _defaultDataPolicyId; }
set { WithDefaultDataPolicyId(value); }
}

private string _id;
public string Id
{
Expand All @@ -48,6 +55,36 @@ public string SecretKey
}


public DelegateCreateUserSpectraS3Request WithDefaultDataPolicyId(Guid? defaultDataPolicyId)
{
this._defaultDataPolicyId = defaultDataPolicyId.ToString();
if (defaultDataPolicyId != null)
{
this.QueryParams.Add("default_data_policy_id", defaultDataPolicyId.ToString());
}
else
{
this.QueryParams.Remove("default_data_policy_id");
}
return this;
}


public DelegateCreateUserSpectraS3Request WithDefaultDataPolicyId(string defaultDataPolicyId)
{
this._defaultDataPolicyId = defaultDataPolicyId;
if (defaultDataPolicyId != null)
{
this.QueryParams.Add("default_data_policy_id", defaultDataPolicyId);
}
else
{
this.QueryParams.Remove("default_data_policy_id");
}
return this;
}


public DelegateCreateUserSpectraS3Request WithId(Guid? id)
{
this._id = id.ToString();
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
/*
* ******************************************************************************
* 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 DeleteBucketChangesNotificationRegistrationSpectraS3Request : Ds3Request
{

public string BucketChangesNotificationRegistration { get; private set; }





public DeleteBucketChangesNotificationRegistrationSpectraS3Request(string bucketChangesNotificationRegistration)
{
this.BucketChangesNotificationRegistration = bucketChangesNotificationRegistration;

}

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

internal override string Path
{
get
{
return "/_rest_/bucket_changes_notification_registration/" + BucketChangesNotificationRegistration;
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
/*
* ******************************************************************************
* 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 GetBucketChangesNotificationRegistrationSpectraS3Request : Ds3Request
{

public string BucketChangesNotificationRegistration { get; private set; }





public GetBucketChangesNotificationRegistrationSpectraS3Request(string bucketChangesNotificationRegistration)
{
this.BucketChangesNotificationRegistration = bucketChangesNotificationRegistration;

}

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

internal override string Path
{
get
{
return "/_rest_/bucket_changes_notification_registration/" + BucketChangesNotificationRegistration;
}
}
}
}
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 GetBucketChangesNotificationRegistrationSpectraS3Response
{
public BucketChangesNotificationRegistration ResponsePayload { get; private set; }

public GetBucketChangesNotificationRegistrationSpectraS3Response(BucketChangesNotificationRegistration responsePayload)
{
this.ResponsePayload = responsePayload;
}
}
}
Loading

0 comments on commit 5932953

Please sign in to comment.