From ed1c63551b34ba76342dcb8c59488340f5f45898 Mon Sep 17 00:00:00 2001 From: dragonfly91 Date: Wed, 10 Jun 2015 17:32:38 +0530 Subject: [PATCH] Get-AzureBackupContainer bug fixes --- .../Generated/ContainerOperation.cs | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/src/ResourceManagement/AzureBackup/BackupServicesManagment/Generated/ContainerOperation.cs b/src/ResourceManagement/AzureBackup/BackupServicesManagment/Generated/ContainerOperation.cs index d1381fc378bc5..4612fc3871be9 100644 --- a/src/ResourceManagement/AzureBackup/BackupServicesManagment/Generated/ContainerOperation.cs +++ b/src/ResourceManagement/AzureBackup/BackupServicesManagment/Generated/ContainerOperation.cs @@ -189,18 +189,15 @@ public async Task ListAsync(string queryFilterString, Cus responseDoc = JToken.Parse(responseContent); } - JToken listContainerResponseValue = responseDoc["ListContainerResponse"]; - if (listContainerResponseValue != null && listContainerResponseValue.Type != JTokenType.Null) + if (responseDoc != null && responseDoc.Type != JTokenType.Null) { - ListContainerResponse listContainerResponseInstance = new ListContainerResponse(); - - JToken objectsArray = listContainerResponseValue["Objects"]; + JToken objectsArray = responseDoc["Objects"]; if (objectsArray != null && objectsArray.Type != JTokenType.Null) { foreach (JToken objectsValue in ((JArray)objectsArray)) { ContainerInfo containerInfoInstance = new ContainerInfo(); - listContainerResponseInstance.Objects.Add(containerInfoInstance); + result.Objects.Add(containerInfoInstance); JToken friendlyNameValue = objectsValue["FriendlyName"]; if (friendlyNameValue != null && friendlyNameValue.Type != JTokenType.Null) @@ -281,18 +278,18 @@ public async Task ListAsync(string queryFilterString, Cus } } - JToken resultCountValue = listContainerResponseValue["ResultCount"]; + JToken resultCountValue = responseDoc["ResultCount"]; if (resultCountValue != null && resultCountValue.Type != JTokenType.Null) { int resultCountInstance = ((int)resultCountValue); - listContainerResponseInstance.ResultCount = resultCountInstance; + result.ResultCount = resultCountInstance; } - JToken skiptokenValue = listContainerResponseValue["Skiptoken"]; + JToken skiptokenValue = responseDoc["Skiptoken"]; if (skiptokenValue != null && skiptokenValue.Type != JTokenType.Null) { string skiptokenInstance = ((string)skiptokenValue); - listContainerResponseInstance.Skiptoken = skiptokenInstance; + result.Skiptoken = skiptokenInstance; } }