Skip to content

Commit

Permalink
Merge pull request #8 from MabOneSdk/anudeeb
Browse files Browse the repository at this point in the history
Fixes for build break
  • Loading branch information
Samuel Anudeep committed Jun 10, 2015
2 parents 64f8f8f + 536e4ad commit 4d75282
Show file tree
Hide file tree
Showing 10 changed files with 1,087 additions and 42 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
<Compile Include="Generated\JobOperationsExtensions.cs" />
<Compile Include="Generated\JobQueryParameter.cs" />
<Compile Include="Generated\JobResponse.cs" />
<Compile Include="Generated\Models\AddProtectionPolicyRequest.cs" />
<Compile Include="Generated\Models\BackupSchedule.cs" />
<Compile Include="Generated\Models\ContainerInfo.cs" />
<Compile Include="Generated\Models\CustomRequestHeaders.cs" />
Expand Down Expand Up @@ -67,6 +68,7 @@
<Compile Include="Generated\Models\RetentionDurationType.cs" />
<Compile Include="Generated\Models\RetentionPolicy.cs" />
<Compile Include="Generated\Models\UnregisterContainerRequest.cs" />
<Compile Include="Generated\Models\UpdateProtectionPolicyRequest.cs" />
<Compile Include="Generated\Models\VaultCredUploadCertRequest.cs" />
<Compile Include="Generated\Models\VaultCredUploadCertResponse.cs" />
<Compile Include="Generated\ProtectableObjectOperations.cs" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ public async Task<OperationResponse> TriggerBackUpAsync(CustomRequestHeaders cus
TracingAdapter.ReceiveResponse(invocationId, httpResponse);
}
HttpStatusCode statusCode = httpResponse.StatusCode;
if (statusCode != HttpStatusCode.OK)
if (statusCode != HttpStatusCode.Accepted)
{
cancellationToken.ThrowIfCancellationRequested();
CloudException ex = CloudException.Create(httpRequest, null, httpResponse, await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false));
Expand All @@ -193,7 +193,7 @@ public async Task<OperationResponse> TriggerBackUpAsync(CustomRequestHeaders cus
// Create Result
OperationResponse result = null;
// Deserialize Response
if (statusCode == HttpStatusCode.OK)
if (statusCode == HttpStatusCode.Accepted)
{
cancellationToken.ThrowIfCancellationRequested();
string responseContent = await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
Expand All @@ -204,17 +204,8 @@ public async Task<OperationResponse> TriggerBackUpAsync(CustomRequestHeaders cus
responseDoc = JToken.Parse(responseContent);
}

JToken operationResponseValue = responseDoc["OperationResponse"];
if (operationResponseValue != null && operationResponseValue.Type != JTokenType.Null)
if (responseDoc != null && responseDoc.Type != JTokenType.Null)
{
OperationResponse operationResponseInstance = new OperationResponse();

JToken operationIdValue = operationResponseValue["OperationId"];
if (operationIdValue != null && operationIdValue.Type != JTokenType.Null)
{
Guid operationIdInstance = Guid.Parse(((string)operationIdValue));
operationResponseInstance.OperationId = operationIdInstance;
}
}

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -444,17 +444,8 @@ public async Task<OperationResponse> RefreshAsync(CustomRequestHeaders customReq
responseDoc = JToken.Parse(responseContent);
}

JToken operationResponseValue = responseDoc["OperationResponse"];
if (operationResponseValue != null && operationResponseValue.Type != JTokenType.Null)
if (responseDoc != null && responseDoc.Type != JTokenType.Null)
{
OperationResponse operationResponseInstance = new OperationResponse();

JToken operationIdValue = operationResponseValue["OperationId"];
if (operationIdValue != null && operationIdValue.Type != JTokenType.Null)
{
Guid operationIdInstance = Guid.Parse(((string)operationIdValue));
operationResponseInstance.OperationId = operationIdInstance;
}
}

}
Expand Down Expand Up @@ -647,17 +638,8 @@ public async Task<OperationResponse> RegisterAsync(RegisterContainerRequest para
responseDoc = JToken.Parse(responseContent);
}

JToken operationResponseValue = responseDoc["OperationResponse"];
if (operationResponseValue != null && operationResponseValue.Type != JTokenType.Null)
if (responseDoc != null && responseDoc.Type != JTokenType.Null)
{
OperationResponse operationResponseInstance = new OperationResponse();

JToken operationIdValue = operationResponseValue["OperationId"];
if (operationIdValue != null && operationIdValue.Type != JTokenType.Null)
{
Guid operationIdInstance = Guid.Parse(((string)operationIdValue));
operationResponseInstance.OperationId = operationIdInstance;
}
}

}
Expand Down Expand Up @@ -842,17 +824,8 @@ public async Task<OperationResponse> UnregisterAsync(UnregisterContainerRequest
responseDoc = JToken.Parse(responseContent);
}

JToken operationResponseValue = responseDoc["OperationResponse"];
if (operationResponseValue != null && operationResponseValue.Type != JTokenType.Null)
if (responseDoc != null && responseDoc.Type != JTokenType.Null)
{
OperationResponse operationResponseInstance = new OperationResponse();

JToken operationIdValue = operationResponseValue["OperationId"];
if (operationIdValue != null && operationIdValue.Type != JTokenType.Null)
{
Guid operationIdInstance = Guid.Parse(((string)operationIdValue));
operationResponseInstance.OperationId = operationIdInstance;
}
}

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Azure.Management.BackupServices;
using Microsoft.Azure.Management.BackupServices.Models;

namespace Microsoft.Azure.Management.BackupServices
Expand All @@ -33,6 +34,40 @@ namespace Microsoft.Azure.Management.BackupServices
/// </summary>
public partial interface IProtectionPolicyOperations
{
/// <summary>
/// Create new Protection Policy.
/// </summary>
/// <param name='addProtectionPolicyRequest'>
/// The protection policy creation request.
/// </param>
/// <param name='customRequestHeaders'>
/// Request header parameters.
/// </param>
/// <param name='cancellationToken'>
/// Cancellation token.
/// </param>
/// <returns>
/// The definition of a Operation Response.
/// </returns>
Task<OperationResponse> AddAsync(AddProtectionPolicyRequest addProtectionPolicyRequest, CustomRequestHeaders customRequestHeaders, CancellationToken cancellationToken);

/// <summary>
/// Create new Protection Policy.
/// </summary>
/// <param name='protectionPolicyId'>
/// The protection policy ID to be deleted.
/// </param>
/// <param name='customRequestHeaders'>
/// Request header parameters.
/// </param>
/// <param name='cancellationToken'>
/// Cancellation token.
/// </param>
/// <returns>
/// The definition of a Operation Response.
/// </returns>
Task<OperationResponse> DeleteAsync(string protectionPolicyId, CustomRequestHeaders customRequestHeaders, CancellationToken cancellationToken);

/// <summary>
/// Get the list of all Protection Policy.
/// </summary>
Expand Down Expand Up @@ -63,5 +98,25 @@ public partial interface IProtectionPolicyOperations
/// The response model for the list ProtectionPolicies operation.
/// </returns>
Task<ProtectionPolicyListResponse> ListAsync(CustomRequestHeaders customRequestHeaders, CancellationToken cancellationToken);

/// <summary>
/// Update Protection Policy.
/// </summary>
/// <param name='protectionPolicyId'>
/// The protection policy ID to be updated.
/// </param>
/// <param name='updateProtectionPolicyRequest'>
/// The protection policy creation request.
/// </param>
/// <param name='customRequestHeaders'>
/// Request header parameters.
/// </param>
/// <param name='cancellationToken'>
/// Cancellation token.
/// </param>
/// <returns>
/// The definition of a Operation Response.
/// </returns>
Task<OperationResponse> UpdateAsync(string protectionPolicyId, UpdateProtectionPolicyRequest updateProtectionPolicyRequest, CustomRequestHeaders customRequestHeaders, CancellationToken cancellationToken);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
//
// Copyright (c) Microsoft and contributors. 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.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License 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.
//

// Warning: This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if the
// code is regenerated.

using System;
using System.Linq;
using Microsoft.Azure.Management.BackupServices.Models;

namespace Microsoft.Azure.Management.BackupServices.Models
{
/// <summary>
/// The definition of a Management List Response.
/// </summary>
public partial class AddProtectionPolicyRequest : ManagementBaseObject
{
private string _policyName;

/// <summary>
/// Optional. Protection policy name.
/// </summary>
public string PolicyName
{
get { return this._policyName; }
set { this._policyName = value; }
}

private BackupSchedule _schedule;

/// <summary>
/// Optional. Schedule of ProtectionPolicy.
/// </summary>
public BackupSchedule Schedule
{
get { return this._schedule; }
set { this._schedule = value; }
}

private string _workloadType;

/// <summary>
/// Optional. WorkloadType of protection policy.
/// </summary>
public string WorkloadType
{
get { return this._workloadType; }
set { this._workloadType = value; }
}

/// <summary>
/// Initializes a new instance of the AddProtectionPolicyRequest class.
/// </summary>
public AddProtectionPolicyRequest()
{
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
//
// Copyright (c) Microsoft and contributors. 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.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License 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.
//

// Warning: This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if the
// code is regenerated.

using System;
using System.Linq;

namespace Microsoft.Azure.Management.BackupServices.Models
{
/// <summary>
/// The definition of a DataSourceQueryParameter object.
/// </summary>
public partial class DataSourceQueryParameter
{
private string _containerName;

/// <summary>
/// Optional. ContainerName of item.
/// </summary>
public string ContainerName
{
get { return this._containerName; }
set { this._containerName = value; }
}

private string _protectionStatus;

/// <summary>
/// Optional. Protection Status of item.
/// </summary>
public string ProtectionStatus
{
get { return this._protectionStatus; }
set { this._protectionStatus = value; }
}

/// <summary>
/// Initializes a new instance of the DataSourceQueryParameter class.
/// </summary>
public DataSourceQueryParameter()
{
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
//
// Copyright (c) Microsoft and contributors. 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.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License 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.
//

// Warning: This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if the
// code is regenerated.

using System;
using System.Linq;

namespace Microsoft.Azure.Management.BackupServices.Models
{
/// <summary>
/// The definition of a POQueryParameter object.
/// </summary>
public partial class POQueryParameter
{
private string _status;

/// <summary>
/// Optional. Status Status of item.
/// </summary>
public string Status
{
get { return this._status; }
set { this._status = value; }
}

/// <summary>
/// Initializes a new instance of the POQueryParameter class.
/// </summary>
public POQueryParameter()
{
}
}
}
Loading

0 comments on commit 4d75282

Please sign in to comment.