From 32b068369289aecc41d97ebf53d7441ce958e2a9 Mon Sep 17 00:00:00 2001 From: "openapi-bot[bot]" <37845953+openapi-bot[bot]@users.noreply.github.com> Date: Tue, 27 Aug 2019 01:09:21 +0000 Subject: [PATCH 01/12] Generated from cce264ba7c751076c58518d67e19b9e469832c0c (#136) Update ListLegacyPeerings.json --- .../Generated/ILegacyPeeringsOperations.cs | 4 ++ .../src/Generated/IOperations.cs | 4 ++ .../src/Generated/IPeerAsnsOperations.cs | 4 ++ .../Generated/IPeeringLocationsOperations.cs | 4 ++ .../src/Generated/IPeeringManagementClient.cs | 16 +++++--- .../IPeeringServiceLocationsOperations.cs | 4 ++ .../IPeeringServicePrefixesOperations.cs | 4 ++ .../IPeeringServiceProvidersOperations.cs | 4 ++ .../Generated/IPeeringServicesOperations.cs | 8 +++- .../src/Generated/IPeeringsOperations.cs | 8 +++- .../src/Generated/IPrefixesOperations.cs | 4 ++ .../src/Generated/LegacyPeeringsOperations.cs | 4 ++ .../LegacyPeeringsOperationsExtensions.cs | 4 ++ .../src/Generated/Models/BgpSession.cs | 4 ++ .../CheckServiceProviderAvailabilityInput.cs | 4 ++ .../src/Generated/Models/ConnectionState.cs | 4 ++ .../src/Generated/Models/ContactInfo.cs | 4 ++ .../src/Generated/Models/DirectConnection.cs | 4 ++ .../Generated/Models/DirectPeeringFacility.cs | 4 ++ .../src/Generated/Models/DirectPeeringType.cs | 4 ++ .../src/Generated/Models/ErrorResponse.cs | 4 ++ .../Models/ErrorResponseException.cs | 4 ++ .../Generated/Models/ExchangeConnection.cs | 4 ++ .../Models/ExchangePeeringFacility.cs | 4 ++ .../src/Generated/Models/Family.cs | 4 ++ .../src/Generated/Models/Kind.cs | 4 ++ .../src/Generated/Models/LearnedType.cs | 4 ++ .../src/Generated/Models/Name.cs | 4 ++ .../src/Generated/Models/Operation.cs | 4 ++ .../Generated/Models/OperationDisplayInfo.cs | 4 ++ .../src/Generated/Models/Page.cs | 4 ++ .../src/Generated/Models/PeerAsn.cs | 4 ++ .../Generated/Models/PeeringBandwidthOffer.cs | 4 ++ .../src/Generated/Models/PeeringLocation.cs | 4 ++ .../Models/PeeringLocationPropertiesDirect.cs | 4 ++ .../PeeringLocationPropertiesExchange.cs | 4 ++ .../src/Generated/Models/PeeringModel.cs | 4 ++ .../Models/PeeringPropertiesDirect.cs | 4 ++ .../Models/PeeringPropertiesExchange.cs | 4 ++ .../src/Generated/Models/PeeringService.cs | 4 ++ .../Models/PeeringServiceLocation.cs | 4 ++ .../Generated/Models/PeeringServicePrefix.cs | 4 ++ .../Models/PeeringServiceProvider.cs | 4 ++ .../src/Generated/Models/PeeringSku.cs | 4 ++ .../Generated/Models/PrefixValidationState.cs | 4 ++ .../src/Generated/Models/ProvisioningState.cs | 4 ++ .../src/Generated/Models/Resource.cs | 4 ++ .../src/Generated/Models/ResourceTags.cs | 4 ++ .../Models/SessionAddressProvider.cs | 4 ++ .../src/Generated/Models/SessionStateV4.cs | 4 ++ .../src/Generated/Models/SessionStateV6.cs | 4 ++ .../src/Generated/Models/Size.cs | 4 ++ .../src/Generated/Models/SubResource.cs | 4 ++ .../src/Generated/Models/Tier.cs | 4 ++ .../src/Generated/Models/ValidationState.cs | 4 ++ .../src/Generated/Operations.cs | 4 ++ .../src/Generated/OperationsExtensions.cs | 4 ++ .../src/Generated/PeerAsnsOperations.cs | 4 ++ .../Generated/PeerAsnsOperationsExtensions.cs | 4 ++ .../Generated/PeeringLocationsOperations.cs | 4 ++ .../PeeringLocationsOperationsExtensions.cs | 4 ++ .../src/Generated/PeeringManagementClient.cs | 26 ++++++++----- .../PeeringManagementClientExtensions.cs | 28 +++++++++----- .../PeeringServiceLocationsOperations.cs | 4 ++ ...ingServiceLocationsOperationsExtensions.cs | 4 ++ .../PeeringServicePrefixesOperations.cs | 4 ++ ...ringServicePrefixesOperationsExtensions.cs | 4 ++ .../PeeringServiceProvidersOperations.cs | 4 ++ ...ingServiceProvidersOperationsExtensions.cs | 4 ++ .../Generated/PeeringServicesOperations.cs | 23 +++++++----- .../PeeringServicesOperationsExtensions.cs | 14 +++++-- .../src/Generated/PeeringsOperations.cs | 23 +++++++----- .../Generated/PeeringsOperationsExtensions.cs | 14 +++++-- .../src/Generated/PrefixesOperations.cs | 4 ++ .../Generated/PrefixesOperationsExtensions.cs | 4 ++ .../SdkInfo_PeeringManagementClient.cs | 37 +++++++++++++++++++ 76 files changed, 407 insertions(+), 54 deletions(-) create mode 100644 sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/SdkInfo_PeeringManagementClient.cs diff --git a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/ILegacyPeeringsOperations.cs b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/ILegacyPeeringsOperations.cs index f95591b8d989..32ba98539261 100644 --- a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/ILegacyPeeringsOperations.cs +++ b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/ILegacyPeeringsOperations.cs @@ -1,4 +1,8 @@ // +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. diff --git a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/IOperations.cs b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/IOperations.cs index 24d846de18d7..3b50883f2ef7 100644 --- a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/IOperations.cs +++ b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/IOperations.cs @@ -1,4 +1,8 @@ // +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. diff --git a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/IPeerAsnsOperations.cs b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/IPeerAsnsOperations.cs index c2d8a945cae2..b1ac930e2c48 100644 --- a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/IPeerAsnsOperations.cs +++ b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/IPeerAsnsOperations.cs @@ -1,4 +1,8 @@ // +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. diff --git a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/IPeeringLocationsOperations.cs b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/IPeeringLocationsOperations.cs index e8f5895d4930..6ffabfd9df99 100644 --- a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/IPeeringLocationsOperations.cs +++ b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/IPeeringLocationsOperations.cs @@ -1,4 +1,8 @@ // +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. diff --git a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/IPeeringManagementClient.cs b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/IPeeringManagementClient.cs index 3c13cf4563bf..80274c97bc23 100644 --- a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/IPeeringManagementClient.cs +++ b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/IPeeringManagementClient.cs @@ -1,4 +1,8 @@ // +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. @@ -16,7 +20,7 @@ namespace Microsoft.Azure.Management.Peering using System.Threading.Tasks; /// - /// APIs to manage Peering resources through the Azure Resource Manager. + /// Peering Client /// public partial interface IPeeringManagementClient : System.IDisposable { @@ -123,9 +127,11 @@ public partial interface IPeeringManagementClient : System.IDisposable /// Checks if the peering service provider is present within 1000 miles /// of customer's location /// - /// - /// The CheckServiceProviderAvailabilityInput - /// indicating customer location and service provider. + /// + /// Gets or sets the PeeringServiceLocation + /// + /// + /// Gets or sets the PeeringServiceProvider /// /// /// The headers that will be added to request. @@ -133,7 +139,7 @@ public partial interface IPeeringManagementClient : System.IDisposable /// /// The cancellation token. /// - Task> CheckServiceProviderAvailabilityWithHttpMessagesAsync(CheckServiceProviderAvailabilityInput checkServiceProviderAvailabilityInput, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> CheckServiceProviderAvailabilityWithHttpMessagesAsync(string peeringServiceLocation = default(string), string peeringServiceProvider = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/IPeeringServiceLocationsOperations.cs b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/IPeeringServiceLocationsOperations.cs index 2077c3ff18ce..4542b3a6e069 100644 --- a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/IPeeringServiceLocationsOperations.cs +++ b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/IPeeringServiceLocationsOperations.cs @@ -1,4 +1,8 @@ // +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. diff --git a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/IPeeringServicePrefixesOperations.cs b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/IPeeringServicePrefixesOperations.cs index e0bb14322943..616ef6ce2c7e 100644 --- a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/IPeeringServicePrefixesOperations.cs +++ b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/IPeeringServicePrefixesOperations.cs @@ -1,4 +1,8 @@ // +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. diff --git a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/IPeeringServiceProvidersOperations.cs b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/IPeeringServiceProvidersOperations.cs index 9bc4e4b0cdbe..6f7e5fa560af 100644 --- a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/IPeeringServiceProvidersOperations.cs +++ b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/IPeeringServiceProvidersOperations.cs @@ -1,4 +1,8 @@ // +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. diff --git a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/IPeeringServicesOperations.cs b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/IPeeringServicesOperations.cs index e3bd51690a9a..9decb2909c55 100644 --- a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/IPeeringServicesOperations.cs +++ b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/IPeeringServicesOperations.cs @@ -1,4 +1,8 @@ // +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. @@ -108,7 +112,7 @@ public partial interface IPeeringServicesOperations /// The name of the peering service. /// /// - /// The resource tags. + /// Gets or sets the tags, a dictionary of descriptors arm object /// /// /// The headers that will be added to request. @@ -125,7 +129,7 @@ public partial interface IPeeringServicesOperations /// /// Thrown when a required parameter is null /// - Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string peeringServiceName, ResourceTags tags, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string peeringServiceName, IDictionary tags = default(IDictionary), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Lists all of the peering services under the given subscription and /// resource group. diff --git a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/IPeeringsOperations.cs b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/IPeeringsOperations.cs index 40fb8db251aa..6c0cbd197e7e 100644 --- a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/IPeeringsOperations.cs +++ b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/IPeeringsOperations.cs @@ -1,4 +1,8 @@ // +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. @@ -108,7 +112,7 @@ public partial interface IPeeringsOperations /// The name of the peering. /// /// - /// The resource tags. + /// Gets or sets the tags, a dictionary of descriptors arm object /// /// /// The headers that will be added to request. @@ -125,7 +129,7 @@ public partial interface IPeeringsOperations /// /// Thrown when a required parameter is null /// - Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string peeringName, ResourceTags tags, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string peeringName, IDictionary tags = default(IDictionary), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Lists all of the peerings under the given subscription and resource /// group. diff --git a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/IPrefixesOperations.cs b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/IPrefixesOperations.cs index 34927dc72ef9..63d0f3650045 100644 --- a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/IPrefixesOperations.cs +++ b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/IPrefixesOperations.cs @@ -1,4 +1,8 @@ // +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. diff --git a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/LegacyPeeringsOperations.cs b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/LegacyPeeringsOperations.cs index 3cf31c6319d7..99dd96469659 100644 --- a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/LegacyPeeringsOperations.cs +++ b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/LegacyPeeringsOperations.cs @@ -1,4 +1,8 @@ // +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. diff --git a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/LegacyPeeringsOperationsExtensions.cs b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/LegacyPeeringsOperationsExtensions.cs index 078c711c3099..77bb88c6daf6 100644 --- a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/LegacyPeeringsOperationsExtensions.cs +++ b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/LegacyPeeringsOperationsExtensions.cs @@ -1,4 +1,8 @@ // +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. diff --git a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/BgpSession.cs b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/BgpSession.cs index 040f6fa2d7b4..c661e56575b7 100644 --- a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/BgpSession.cs +++ b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/BgpSession.cs @@ -1,4 +1,8 @@ // +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. diff --git a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/CheckServiceProviderAvailabilityInput.cs b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/CheckServiceProviderAvailabilityInput.cs index 279d48f81376..24ef7f9c760e 100644 --- a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/CheckServiceProviderAvailabilityInput.cs +++ b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/CheckServiceProviderAvailabilityInput.cs @@ -1,4 +1,8 @@ // +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. diff --git a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/ConnectionState.cs b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/ConnectionState.cs index 6dc947f756bf..854cd63329ab 100644 --- a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/ConnectionState.cs +++ b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/ConnectionState.cs @@ -1,4 +1,8 @@ // +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. diff --git a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/ContactInfo.cs b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/ContactInfo.cs index d9cdbd9ae87a..73d7e8111531 100644 --- a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/ContactInfo.cs +++ b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/ContactInfo.cs @@ -1,4 +1,8 @@ // +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. diff --git a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/DirectConnection.cs b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/DirectConnection.cs index e5d4b5e2f2c2..3aa4fe6dd153 100644 --- a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/DirectConnection.cs +++ b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/DirectConnection.cs @@ -1,4 +1,8 @@ // +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. diff --git a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/DirectPeeringFacility.cs b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/DirectPeeringFacility.cs index efa35b18bf57..1bf764f9feeb 100644 --- a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/DirectPeeringFacility.cs +++ b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/DirectPeeringFacility.cs @@ -1,4 +1,8 @@ // +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. diff --git a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/DirectPeeringType.cs b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/DirectPeeringType.cs index 3ca527934b09..86a609020e8c 100644 --- a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/DirectPeeringType.cs +++ b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/DirectPeeringType.cs @@ -1,4 +1,8 @@ // +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. diff --git a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/ErrorResponse.cs b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/ErrorResponse.cs index d9eb52c8742b..8754219779a5 100644 --- a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/ErrorResponse.cs +++ b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/ErrorResponse.cs @@ -1,4 +1,8 @@ // +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. diff --git a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/ErrorResponseException.cs b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/ErrorResponseException.cs index cec1576f2c45..9eced8ee065e 100644 --- a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/ErrorResponseException.cs +++ b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/ErrorResponseException.cs @@ -1,4 +1,8 @@ // +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. diff --git a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/ExchangeConnection.cs b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/ExchangeConnection.cs index 060fefabf744..48079d5d03f2 100644 --- a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/ExchangeConnection.cs +++ b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/ExchangeConnection.cs @@ -1,4 +1,8 @@ // +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. diff --git a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/ExchangePeeringFacility.cs b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/ExchangePeeringFacility.cs index eca74a8f6fdc..557fc135e136 100644 --- a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/ExchangePeeringFacility.cs +++ b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/ExchangePeeringFacility.cs @@ -1,4 +1,8 @@ // +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. diff --git a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/Family.cs b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/Family.cs index 5ea908359fb6..c665d28486d0 100644 --- a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/Family.cs +++ b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/Family.cs @@ -1,4 +1,8 @@ // +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. diff --git a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/Kind.cs b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/Kind.cs index 0674d99e0578..2e841e4fef3f 100644 --- a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/Kind.cs +++ b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/Kind.cs @@ -1,4 +1,8 @@ // +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. diff --git a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/LearnedType.cs b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/LearnedType.cs index c72c959e4b16..fa055cb03d2a 100644 --- a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/LearnedType.cs +++ b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/LearnedType.cs @@ -1,4 +1,8 @@ // +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. diff --git a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/Name.cs b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/Name.cs index 50b94fdcbfbc..facd278af481 100644 --- a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/Name.cs +++ b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/Name.cs @@ -1,4 +1,8 @@ // +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. diff --git a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/Operation.cs b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/Operation.cs index a13943b92238..0c1e561b991e 100644 --- a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/Operation.cs +++ b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/Operation.cs @@ -1,4 +1,8 @@ // +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. diff --git a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/OperationDisplayInfo.cs b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/OperationDisplayInfo.cs index 3dc6249a7037..b803cb4c26fc 100644 --- a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/OperationDisplayInfo.cs +++ b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/OperationDisplayInfo.cs @@ -1,4 +1,8 @@ // +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. diff --git a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/Page.cs b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/Page.cs index 31a43eb5bbf6..b8592e5aab38 100644 --- a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/Page.cs +++ b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/Page.cs @@ -1,4 +1,8 @@ // +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. diff --git a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/PeerAsn.cs b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/PeerAsn.cs index db1031ae4ffe..33b7cb00e7b7 100644 --- a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/PeerAsn.cs +++ b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/PeerAsn.cs @@ -1,4 +1,8 @@ // +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. diff --git a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/PeeringBandwidthOffer.cs b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/PeeringBandwidthOffer.cs index bf305d4f172c..af9a12dbcb07 100644 --- a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/PeeringBandwidthOffer.cs +++ b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/PeeringBandwidthOffer.cs @@ -1,4 +1,8 @@ // +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. diff --git a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/PeeringLocation.cs b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/PeeringLocation.cs index c58f7cf3f9d1..78f94db9d452 100644 --- a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/PeeringLocation.cs +++ b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/PeeringLocation.cs @@ -1,4 +1,8 @@ // +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. diff --git a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/PeeringLocationPropertiesDirect.cs b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/PeeringLocationPropertiesDirect.cs index 75921877b606..1cf995ef7a57 100644 --- a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/PeeringLocationPropertiesDirect.cs +++ b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/PeeringLocationPropertiesDirect.cs @@ -1,4 +1,8 @@ // +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. diff --git a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/PeeringLocationPropertiesExchange.cs b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/PeeringLocationPropertiesExchange.cs index 0c7d8349c348..69550fa50557 100644 --- a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/PeeringLocationPropertiesExchange.cs +++ b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/PeeringLocationPropertiesExchange.cs @@ -1,4 +1,8 @@ // +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. diff --git a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/PeeringModel.cs b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/PeeringModel.cs index f1992d57fcde..fcac6e70fa33 100644 --- a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/PeeringModel.cs +++ b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/PeeringModel.cs @@ -1,4 +1,8 @@ // +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. diff --git a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/PeeringPropertiesDirect.cs b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/PeeringPropertiesDirect.cs index 220e44d47127..59a0ffd94d52 100644 --- a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/PeeringPropertiesDirect.cs +++ b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/PeeringPropertiesDirect.cs @@ -1,4 +1,8 @@ // +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. diff --git a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/PeeringPropertiesExchange.cs b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/PeeringPropertiesExchange.cs index 7fc0aca62366..39ac553528b1 100644 --- a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/PeeringPropertiesExchange.cs +++ b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/PeeringPropertiesExchange.cs @@ -1,4 +1,8 @@ // +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. diff --git a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/PeeringService.cs b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/PeeringService.cs index 7062fb3408d2..6c92dfdd4f26 100644 --- a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/PeeringService.cs +++ b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/PeeringService.cs @@ -1,4 +1,8 @@ // +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. diff --git a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/PeeringServiceLocation.cs b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/PeeringServiceLocation.cs index d1b1f1b65aea..36c2394debe4 100644 --- a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/PeeringServiceLocation.cs +++ b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/PeeringServiceLocation.cs @@ -1,4 +1,8 @@ // +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. diff --git a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/PeeringServicePrefix.cs b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/PeeringServicePrefix.cs index f0377d0fcb4a..6c778e77a813 100644 --- a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/PeeringServicePrefix.cs +++ b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/PeeringServicePrefix.cs @@ -1,4 +1,8 @@ // +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. diff --git a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/PeeringServiceProvider.cs b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/PeeringServiceProvider.cs index cb0719e21dfd..1cbca93ee403 100644 --- a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/PeeringServiceProvider.cs +++ b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/PeeringServiceProvider.cs @@ -1,4 +1,8 @@ // +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. diff --git a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/PeeringSku.cs b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/PeeringSku.cs index 5f2706b991d2..6392406fc954 100644 --- a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/PeeringSku.cs +++ b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/PeeringSku.cs @@ -1,4 +1,8 @@ // +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. diff --git a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/PrefixValidationState.cs b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/PrefixValidationState.cs index 53e0ea4f61b2..bd6eb6dbdc8b 100644 --- a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/PrefixValidationState.cs +++ b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/PrefixValidationState.cs @@ -1,4 +1,8 @@ // +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. diff --git a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/ProvisioningState.cs b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/ProvisioningState.cs index 159af9cfb1cd..93e28e656b91 100644 --- a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/ProvisioningState.cs +++ b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/ProvisioningState.cs @@ -1,4 +1,8 @@ // +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. diff --git a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/Resource.cs b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/Resource.cs index b46ba7a28c67..f8328bbf9f3b 100644 --- a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/Resource.cs +++ b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/Resource.cs @@ -1,4 +1,8 @@ // +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. diff --git a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/ResourceTags.cs b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/ResourceTags.cs index f3f55cdfb29c..e3064128884b 100644 --- a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/ResourceTags.cs +++ b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/ResourceTags.cs @@ -1,4 +1,8 @@ // +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. diff --git a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/SessionAddressProvider.cs b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/SessionAddressProvider.cs index 8efa4d2a0583..6b424295f875 100644 --- a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/SessionAddressProvider.cs +++ b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/SessionAddressProvider.cs @@ -1,4 +1,8 @@ // +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. diff --git a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/SessionStateV4.cs b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/SessionStateV4.cs index 4f32bf3f5a0b..b439bc773f09 100644 --- a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/SessionStateV4.cs +++ b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/SessionStateV4.cs @@ -1,4 +1,8 @@ // +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. diff --git a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/SessionStateV6.cs b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/SessionStateV6.cs index b1f34a067265..9d3620d28872 100644 --- a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/SessionStateV6.cs +++ b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/SessionStateV6.cs @@ -1,4 +1,8 @@ // +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. diff --git a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/Size.cs b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/Size.cs index a204164bccda..75afcc848e14 100644 --- a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/Size.cs +++ b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/Size.cs @@ -1,4 +1,8 @@ // +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. diff --git a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/SubResource.cs b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/SubResource.cs index 9f5f1f9845e6..534c008149d3 100644 --- a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/SubResource.cs +++ b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/SubResource.cs @@ -1,4 +1,8 @@ // +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. diff --git a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/Tier.cs b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/Tier.cs index 09d180b51ea1..82442b73bcf3 100644 --- a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/Tier.cs +++ b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/Tier.cs @@ -1,4 +1,8 @@ // +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. diff --git a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/ValidationState.cs b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/ValidationState.cs index fc3631a057f6..ba14a3a3e681 100644 --- a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/ValidationState.cs +++ b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Models/ValidationState.cs @@ -1,4 +1,8 @@ // +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. diff --git a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Operations.cs b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Operations.cs index 40010abb26dd..1e758fcbf8e9 100644 --- a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Operations.cs +++ b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/Operations.cs @@ -1,4 +1,8 @@ // +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. diff --git a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/OperationsExtensions.cs b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/OperationsExtensions.cs index 3bb6e9c51924..8be78042ca7c 100644 --- a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/OperationsExtensions.cs +++ b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/OperationsExtensions.cs @@ -1,4 +1,8 @@ // +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. diff --git a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/PeerAsnsOperations.cs b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/PeerAsnsOperations.cs index 18eb0dbf57d2..a534188bc988 100644 --- a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/PeerAsnsOperations.cs +++ b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/PeerAsnsOperations.cs @@ -1,4 +1,8 @@ // +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. diff --git a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/PeerAsnsOperationsExtensions.cs b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/PeerAsnsOperationsExtensions.cs index 2aa47f63508e..3944221030e9 100644 --- a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/PeerAsnsOperationsExtensions.cs +++ b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/PeerAsnsOperationsExtensions.cs @@ -1,4 +1,8 @@ // +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. diff --git a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/PeeringLocationsOperations.cs b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/PeeringLocationsOperations.cs index 23772b2ae156..98bc7adb7cb0 100644 --- a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/PeeringLocationsOperations.cs +++ b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/PeeringLocationsOperations.cs @@ -1,4 +1,8 @@ // +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. diff --git a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/PeeringLocationsOperationsExtensions.cs b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/PeeringLocationsOperationsExtensions.cs index f47f220df1bc..4807bc9742a8 100644 --- a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/PeeringLocationsOperationsExtensions.cs +++ b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/PeeringLocationsOperationsExtensions.cs @@ -1,4 +1,8 @@ // +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. diff --git a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/PeeringManagementClient.cs b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/PeeringManagementClient.cs index 960bfd99d966..339a6fd5c5ca 100644 --- a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/PeeringManagementClient.cs +++ b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/PeeringManagementClient.cs @@ -1,4 +1,8 @@ // +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. @@ -20,7 +24,7 @@ namespace Microsoft.Azure.Management.Peering using System.Threading.Tasks; /// - /// APIs to manage Peering resources through the Azure Resource Manager. + /// Peering Client /// public partial class PeeringManagementClient : ServiceClient, IPeeringManagementClient, IAzureClient { @@ -412,9 +416,11 @@ private void Initialize() /// Checks if the peering service provider is present within 1000 miles of /// customer's location /// - /// - /// The CheckServiceProviderAvailabilityInput - /// indicating customer location and service provider. + /// + /// Gets or sets the PeeringServiceLocation + /// + /// + /// Gets or sets the PeeringServiceProvider /// /// /// Headers that will be added to request. @@ -437,12 +443,8 @@ private void Initialize() /// /// A response object containing the response body and response headers. /// - public async Task> CheckServiceProviderAvailabilityWithHttpMessagesAsync(CheckServiceProviderAvailabilityInput checkServiceProviderAvailabilityInput, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> CheckServiceProviderAvailabilityWithHttpMessagesAsync(string peeringServiceLocation = default(string), string peeringServiceProvider = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { - if (checkServiceProviderAvailabilityInput == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "checkServiceProviderAvailabilityInput"); - } if (SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.SubscriptionId"); @@ -451,6 +453,12 @@ private void Initialize() { throw new ValidationException(ValidationRules.CannotBeNull, "this.ApiVersion"); } + CheckServiceProviderAvailabilityInput checkServiceProviderAvailabilityInput = new CheckServiceProviderAvailabilityInput(); + if (peeringServiceLocation != null || peeringServiceProvider != null) + { + checkServiceProviderAvailabilityInput.PeeringServiceLocation = peeringServiceLocation; + checkServiceProviderAvailabilityInput.PeeringServiceProvider = peeringServiceProvider; + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/PeeringManagementClientExtensions.cs b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/PeeringManagementClientExtensions.cs index 3cf93b236f66..370b366464d5 100644 --- a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/PeeringManagementClientExtensions.cs +++ b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/PeeringManagementClientExtensions.cs @@ -1,4 +1,8 @@ // +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. @@ -24,13 +28,15 @@ public static partial class PeeringManagementClientExtensions /// /// The operations group for this extension method. /// - /// - /// The CheckServiceProviderAvailabilityInput - /// indicating customer location and service provider. + /// + /// Gets or sets the PeeringServiceLocation /// - public static string CheckServiceProviderAvailability(this IPeeringManagementClient operations, CheckServiceProviderAvailabilityInput checkServiceProviderAvailabilityInput) + /// + /// Gets or sets the PeeringServiceProvider + /// + public static string CheckServiceProviderAvailability(this IPeeringManagementClient operations, string peeringServiceLocation = default(string), string peeringServiceProvider = default(string)) { - return operations.CheckServiceProviderAvailabilityAsync(checkServiceProviderAvailabilityInput).GetAwaiter().GetResult(); + return operations.CheckServiceProviderAvailabilityAsync(peeringServiceLocation, peeringServiceProvider).GetAwaiter().GetResult(); } /// @@ -40,16 +46,18 @@ public static string CheckServiceProviderAvailability(this IPeeringManagementCli /// /// The operations group for this extension method. /// - /// - /// The CheckServiceProviderAvailabilityInput - /// indicating customer location and service provider. + /// + /// Gets or sets the PeeringServiceLocation + /// + /// + /// Gets or sets the PeeringServiceProvider /// /// /// The cancellation token. /// - public static async Task CheckServiceProviderAvailabilityAsync(this IPeeringManagementClient operations, CheckServiceProviderAvailabilityInput checkServiceProviderAvailabilityInput, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task CheckServiceProviderAvailabilityAsync(this IPeeringManagementClient operations, string peeringServiceLocation = default(string), string peeringServiceProvider = default(string), CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.CheckServiceProviderAvailabilityWithHttpMessagesAsync(checkServiceProviderAvailabilityInput, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.CheckServiceProviderAvailabilityWithHttpMessagesAsync(peeringServiceLocation, peeringServiceProvider, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } diff --git a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/PeeringServiceLocationsOperations.cs b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/PeeringServiceLocationsOperations.cs index 54ec9fc8aa67..72a7c60090e6 100644 --- a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/PeeringServiceLocationsOperations.cs +++ b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/PeeringServiceLocationsOperations.cs @@ -1,4 +1,8 @@ // +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. diff --git a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/PeeringServiceLocationsOperationsExtensions.cs b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/PeeringServiceLocationsOperationsExtensions.cs index 0d5431799281..1c14bcad8ac4 100644 --- a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/PeeringServiceLocationsOperationsExtensions.cs +++ b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/PeeringServiceLocationsOperationsExtensions.cs @@ -1,4 +1,8 @@ // +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. diff --git a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/PeeringServicePrefixesOperations.cs b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/PeeringServicePrefixesOperations.cs index 84ca6862ec3c..0f23284e10e3 100644 --- a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/PeeringServicePrefixesOperations.cs +++ b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/PeeringServicePrefixesOperations.cs @@ -1,4 +1,8 @@ // +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. diff --git a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/PeeringServicePrefixesOperationsExtensions.cs b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/PeeringServicePrefixesOperationsExtensions.cs index 6d797b9a21d8..1c7b121140e3 100644 --- a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/PeeringServicePrefixesOperationsExtensions.cs +++ b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/PeeringServicePrefixesOperationsExtensions.cs @@ -1,4 +1,8 @@ // +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. diff --git a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/PeeringServiceProvidersOperations.cs b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/PeeringServiceProvidersOperations.cs index 94e4cba6f4aa..c87dd239921b 100644 --- a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/PeeringServiceProvidersOperations.cs +++ b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/PeeringServiceProvidersOperations.cs @@ -1,4 +1,8 @@ // +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. diff --git a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/PeeringServiceProvidersOperationsExtensions.cs b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/PeeringServiceProvidersOperationsExtensions.cs index 3aa3fc54cb62..899a2d16cc37 100644 --- a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/PeeringServiceProvidersOperationsExtensions.cs +++ b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/PeeringServiceProvidersOperationsExtensions.cs @@ -1,4 +1,8 @@ // +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. diff --git a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/PeeringServicesOperations.cs b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/PeeringServicesOperations.cs index 5b7cb092a84c..969074805a68 100644 --- a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/PeeringServicesOperations.cs +++ b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/PeeringServicesOperations.cs @@ -1,4 +1,8 @@ // +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. @@ -648,7 +652,7 @@ internal PeeringServicesOperations(PeeringManagementClient client) /// The name of the peering service. /// /// - /// The resource tags. + /// Gets or sets the tags, a dictionary of descriptors arm object /// /// /// Headers that will be added to request. @@ -671,7 +675,7 @@ internal PeeringServicesOperations(PeeringManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string peeringServiceName, ResourceTags tags, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string peeringServiceName, IDictionary tags = default(IDictionary), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -681,10 +685,6 @@ internal PeeringServicesOperations(PeeringManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "peeringServiceName"); } - if (tags == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "tags"); - } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -693,6 +693,11 @@ internal PeeringServicesOperations(PeeringManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + ResourceTags tags1 = new ResourceTags(); + if (tags != null) + { + tags1.Tags = tags; + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -702,7 +707,7 @@ internal PeeringServicesOperations(PeeringManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("peeringServiceName", peeringServiceName); - tracingParameters.Add("tags", tags); + tracingParameters.Add("tags1", tags1); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "Update", tracingParameters); } @@ -755,9 +760,9 @@ internal PeeringServicesOperations(PeeringManagementClient client) // Serialize Request string _requestContent = null; - if(tags != null) + if(tags1 != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(tags, Client.SerializationSettings); + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(tags1, Client.SerializationSettings); _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); } diff --git a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/PeeringServicesOperationsExtensions.cs b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/PeeringServicesOperationsExtensions.cs index 135751d7332e..1c2cdfc0be82 100644 --- a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/PeeringServicesOperationsExtensions.cs +++ b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/PeeringServicesOperationsExtensions.cs @@ -1,4 +1,8 @@ // +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. @@ -9,6 +13,8 @@ namespace Microsoft.Azure.Management.Peering using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; + using System.Collections; + using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; @@ -160,9 +166,9 @@ public static void Delete(this IPeeringServicesOperations operations, string res /// The name of the peering service. /// /// - /// The resource tags. + /// Gets or sets the tags, a dictionary of descriptors arm object /// - public static PeeringService Update(this IPeeringServicesOperations operations, string resourceGroupName, string peeringServiceName, ResourceTags tags) + public static PeeringService Update(this IPeeringServicesOperations operations, string resourceGroupName, string peeringServiceName, IDictionary tags = default(IDictionary)) { return operations.UpdateAsync(resourceGroupName, peeringServiceName, tags).GetAwaiter().GetResult(); } @@ -181,12 +187,12 @@ public static PeeringService Update(this IPeeringServicesOperations operations, /// The name of the peering service. /// /// - /// The resource tags. + /// Gets or sets the tags, a dictionary of descriptors arm object /// /// /// The cancellation token. /// - public static async Task UpdateAsync(this IPeeringServicesOperations operations, string resourceGroupName, string peeringServiceName, ResourceTags tags, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task UpdateAsync(this IPeeringServicesOperations operations, string resourceGroupName, string peeringServiceName, IDictionary tags = default(IDictionary), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, peeringServiceName, tags, null, cancellationToken).ConfigureAwait(false)) { diff --git a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/PeeringsOperations.cs b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/PeeringsOperations.cs index f500fb867401..05d4c7ccc3ef 100644 --- a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/PeeringsOperations.cs +++ b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/PeeringsOperations.cs @@ -1,4 +1,8 @@ // +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. @@ -648,7 +652,7 @@ internal PeeringsOperations(PeeringManagementClient client) /// The name of the peering. /// /// - /// The resource tags. + /// Gets or sets the tags, a dictionary of descriptors arm object /// /// /// Headers that will be added to request. @@ -671,7 +675,7 @@ internal PeeringsOperations(PeeringManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string peeringName, ResourceTags tags, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string peeringName, IDictionary tags = default(IDictionary), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -681,10 +685,6 @@ internal PeeringsOperations(PeeringManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "peeringName"); } - if (tags == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "tags"); - } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -693,6 +693,11 @@ internal PeeringsOperations(PeeringManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + ResourceTags tags1 = new ResourceTags(); + if (tags != null) + { + tags1.Tags = tags; + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -702,7 +707,7 @@ internal PeeringsOperations(PeeringManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("peeringName", peeringName); - tracingParameters.Add("tags", tags); + tracingParameters.Add("tags1", tags1); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "Update", tracingParameters); } @@ -755,9 +760,9 @@ internal PeeringsOperations(PeeringManagementClient client) // Serialize Request string _requestContent = null; - if(tags != null) + if(tags1 != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(tags, Client.SerializationSettings); + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(tags1, Client.SerializationSettings); _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); } diff --git a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/PeeringsOperationsExtensions.cs b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/PeeringsOperationsExtensions.cs index 67e42c4c8d65..3048ab59ccb8 100644 --- a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/PeeringsOperationsExtensions.cs +++ b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/PeeringsOperationsExtensions.cs @@ -1,4 +1,8 @@ // +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. @@ -9,6 +13,8 @@ namespace Microsoft.Azure.Management.Peering using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; + using System.Collections; + using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; @@ -160,9 +166,9 @@ public static void Delete(this IPeeringsOperations operations, string resourceGr /// The name of the peering. /// /// - /// The resource tags. + /// Gets or sets the tags, a dictionary of descriptors arm object /// - public static PeeringModel Update(this IPeeringsOperations operations, string resourceGroupName, string peeringName, ResourceTags tags) + public static PeeringModel Update(this IPeeringsOperations operations, string resourceGroupName, string peeringName, IDictionary tags = default(IDictionary)) { return operations.UpdateAsync(resourceGroupName, peeringName, tags).GetAwaiter().GetResult(); } @@ -181,12 +187,12 @@ public static PeeringModel Update(this IPeeringsOperations operations, string re /// The name of the peering. /// /// - /// The resource tags. + /// Gets or sets the tags, a dictionary of descriptors arm object /// /// /// The cancellation token. /// - public static async Task UpdateAsync(this IPeeringsOperations operations, string resourceGroupName, string peeringName, ResourceTags tags, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task UpdateAsync(this IPeeringsOperations operations, string resourceGroupName, string peeringName, IDictionary tags = default(IDictionary), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, peeringName, tags, null, cancellationToken).ConfigureAwait(false)) { diff --git a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/PrefixesOperations.cs b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/PrefixesOperations.cs index 57cb4ff48972..9b5473fe577d 100644 --- a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/PrefixesOperations.cs +++ b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/PrefixesOperations.cs @@ -1,4 +1,8 @@ // +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. diff --git a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/PrefixesOperationsExtensions.cs b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/PrefixesOperationsExtensions.cs index c31750f1b6ab..74671d9b33e0 100644 --- a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/PrefixesOperationsExtensions.cs +++ b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/PrefixesOperationsExtensions.cs @@ -1,4 +1,8 @@ // +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. diff --git a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/SdkInfo_PeeringManagementClient.cs b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/SdkInfo_PeeringManagementClient.cs new file mode 100644 index 000000000000..9343c90ffa9e --- /dev/null +++ b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/SdkInfo_PeeringManagementClient.cs @@ -0,0 +1,37 @@ + +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Peering +{ + using System; + using System.Collections.Generic; + using System.Linq; + + internal static partial class SdkInfo + { + public static IEnumerable> ApiInfo_PeeringManagementClient + { + get + { + return new Tuple[] + { + new Tuple("Peering", "CheckServiceProviderAvailability", "2019-08-01-preview"), + new Tuple("Peering", "LegacyPeerings", "2019-08-01-preview"), + new Tuple("Peering", "Operations", "2019-08-01-preview"), + new Tuple("Peering", "PeerAsns", "2019-08-01-preview"), + new Tuple("Peering", "PeeringLocations", "2019-08-01-preview"), + new Tuple("Peering", "PeeringServiceLocations", "2019-08-01-preview"), + new Tuple("Peering", "PeeringServicePrefixes", "2019-08-01-preview"), + new Tuple("Peering", "PeeringServiceProviders", "2019-08-01-preview"), + new Tuple("Peering", "PeeringServices", "2019-08-01-preview"), + new Tuple("Peering", "Peerings", "2019-08-01-preview"), + new Tuple("Peering", "Prefixes", "2019-08-01-preview"), + }.AsEnumerable(); + } + } + } +} From f15fc23aeea905f0c7ce679b4bbfb2258e17e1ce Mon Sep 17 00:00:00 2001 From: "openapi-bot[bot]" <37845953+openapi-bot[bot]@users.noreply.github.com> Date: Thu, 29 Aug 2019 08:33:13 +0000 Subject: [PATCH 02/12] Generated from 92006e420d65cb70e4b93bc5850af575da4efb78 (#162) Mark "provisioningState" as read-only --- ...sOperations.cs => IPublicIPAddressesOperations.cs} | 0 .../src/Generated/IServiceTagsOperations.cs | 5 ++++- ...ualWANsOperations.cs => IVirtualWansOperations.cs} | 0 ...s => ApplicationGatewayFrontendIPConfiguration.cs} | 0 ...ration.cs => ApplicationGatewayIPConfiguration.cs} | 0 ...dIpConfiguration.cs => FrontendIPConfiguration.cs} | 0 .../{IpAllocationMethod.cs => IPAllocationMethod.cs} | 0 ...guration.cs => NetworkInterfaceIPConfiguration.cs} | 0 .../Models/{PublicIpAddress.cs => PublicIPAddress.cs} | 0 ...ssDnsSettings.cs => PublicIPAddressDnsSettings.cs} | 0 ...ion.cs => VirtualNetworkGatewayIPConfiguration.cs} | 0 ...esOperations.cs => PublicIPAddressesOperations.cs} | 0 ...ns.cs => PublicIPAddressesOperationsExtensions.cs} | 0 .../src/Generated/SdkInfo_NetworkManagementClient.cs | 11 ----------- .../src/Generated/ServiceTagsOperations.cs | 5 ++++- .../src/Generated/ServiceTagsOperationsExtensions.cs | 10 ++++++++-- ...tualWANsOperations.cs => VirtualWansOperations.cs} | 0 ...tensions.cs => VirtualWansOperationsExtensions.cs} | 0 18 files changed, 16 insertions(+), 15 deletions(-) rename sdk/network/Microsoft.Azure.Management.Network/src/Generated/{IPublicIpAddressesOperations.cs => IPublicIPAddressesOperations.cs} (100%) rename sdk/network/Microsoft.Azure.Management.Network/src/Generated/{IVirtualWANsOperations.cs => IVirtualWansOperations.cs} (100%) rename sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/{ApplicationGatewayFrontendIpConfiguration.cs => ApplicationGatewayFrontendIPConfiguration.cs} (100%) rename sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/{ApplicationGatewayIpConfiguration.cs => ApplicationGatewayIPConfiguration.cs} (100%) rename sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/{FrontendIpConfiguration.cs => FrontendIPConfiguration.cs} (100%) rename sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/{IpAllocationMethod.cs => IPAllocationMethod.cs} (100%) rename sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/{NetworkInterfaceIpConfiguration.cs => NetworkInterfaceIPConfiguration.cs} (100%) rename sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/{PublicIpAddress.cs => PublicIPAddress.cs} (100%) rename sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/{PublicIpAddressDnsSettings.cs => PublicIPAddressDnsSettings.cs} (100%) rename sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/{VirtualNetworkGatewayIpConfiguration.cs => VirtualNetworkGatewayIPConfiguration.cs} (100%) rename sdk/network/Microsoft.Azure.Management.Network/src/Generated/{PublicIpAddressesOperations.cs => PublicIPAddressesOperations.cs} (100%) rename sdk/network/Microsoft.Azure.Management.Network/src/Generated/{PublicIpAddressesOperationsExtensions.cs => PublicIPAddressesOperationsExtensions.cs} (100%) rename sdk/network/Microsoft.Azure.Management.Network/src/Generated/{VirtualWANsOperations.cs => VirtualWansOperations.cs} (100%) rename sdk/network/Microsoft.Azure.Management.Network/src/Generated/{VirtualWANsOperationsExtensions.cs => VirtualWansOperationsExtensions.cs} (100%) diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/IPublicIpAddressesOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/IPublicIPAddressesOperations.cs similarity index 100% rename from sdk/network/Microsoft.Azure.Management.Network/src/Generated/IPublicIpAddressesOperations.cs rename to sdk/network/Microsoft.Azure.Management.Network/src/Generated/IPublicIPAddressesOperations.cs diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/IServiceTagsOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/IServiceTagsOperations.cs index 7aa52a33381d..d6e0a0b50a27 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/IServiceTagsOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/IServiceTagsOperations.cs @@ -27,7 +27,10 @@ public partial interface IServiceTagsOperations /// Gets a list of service tag information resources. /// /// - /// The location. + /// The location that will be used as a reference for version (not as a + /// filter based on location, you will get the list of service tags + /// with prefix details across all regions but limited to the cloud + /// that your subscription belongs to). /// /// /// The headers that will be added to request. diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/IVirtualWANsOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/IVirtualWansOperations.cs similarity index 100% rename from sdk/network/Microsoft.Azure.Management.Network/src/Generated/IVirtualWANsOperations.cs rename to sdk/network/Microsoft.Azure.Management.Network/src/Generated/IVirtualWansOperations.cs diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/ApplicationGatewayFrontendIpConfiguration.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/ApplicationGatewayFrontendIPConfiguration.cs similarity index 100% rename from sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/ApplicationGatewayFrontendIpConfiguration.cs rename to sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/ApplicationGatewayFrontendIPConfiguration.cs diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/ApplicationGatewayIpConfiguration.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/ApplicationGatewayIPConfiguration.cs similarity index 100% rename from sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/ApplicationGatewayIpConfiguration.cs rename to sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/ApplicationGatewayIPConfiguration.cs diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/FrontendIpConfiguration.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/FrontendIPConfiguration.cs similarity index 100% rename from sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/FrontendIpConfiguration.cs rename to sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/FrontendIPConfiguration.cs diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/IpAllocationMethod.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/IPAllocationMethod.cs similarity index 100% rename from sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/IpAllocationMethod.cs rename to sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/IPAllocationMethod.cs diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/NetworkInterfaceIpConfiguration.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/NetworkInterfaceIPConfiguration.cs similarity index 100% rename from sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/NetworkInterfaceIpConfiguration.cs rename to sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/NetworkInterfaceIPConfiguration.cs diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/PublicIpAddress.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/PublicIPAddress.cs similarity index 100% rename from sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/PublicIpAddress.cs rename to sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/PublicIPAddress.cs diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/PublicIpAddressDnsSettings.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/PublicIPAddressDnsSettings.cs similarity index 100% rename from sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/PublicIpAddressDnsSettings.cs rename to sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/PublicIPAddressDnsSettings.cs diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/VirtualNetworkGatewayIpConfiguration.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/VirtualNetworkGatewayIPConfiguration.cs similarity index 100% rename from sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/VirtualNetworkGatewayIpConfiguration.cs rename to sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/VirtualNetworkGatewayIPConfiguration.cs diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/PublicIpAddressesOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/PublicIPAddressesOperations.cs similarity index 100% rename from sdk/network/Microsoft.Azure.Management.Network/src/Generated/PublicIpAddressesOperations.cs rename to sdk/network/Microsoft.Azure.Management.Network/src/Generated/PublicIPAddressesOperations.cs diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/PublicIpAddressesOperationsExtensions.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/PublicIPAddressesOperationsExtensions.cs similarity index 100% rename from sdk/network/Microsoft.Azure.Management.Network/src/Generated/PublicIpAddressesOperationsExtensions.cs rename to sdk/network/Microsoft.Azure.Management.Network/src/Generated/PublicIPAddressesOperationsExtensions.cs diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/SdkInfo_NetworkManagementClient.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/SdkInfo_NetworkManagementClient.cs index 19fcffb4a449..fadd92b8afbd 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/SdkInfo_NetworkManagementClient.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/SdkInfo_NetworkManagementClient.cs @@ -108,16 +108,5 @@ public static IEnumerable> ApiInfo_NetworkManageme }.AsEnumerable(); } } - // BEGIN: Code Generation Metadata Section - public static readonly String AutoRestVersion = "latest"; - public static readonly String AutoRestBootStrapperVersion = "autorest@2.0.4283"; - public static readonly String AutoRestCmdExecuted = "cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/network/resource-manager/readme.md --csharp --version=latest --reflect-api-versions --csharp-sdks-folder=D:\\Projects\\azure-sdk-for-net\\sdk"; - public static readonly String GithubForkName = "Azure"; - public static readonly String GithubBranchName = "master"; - public static readonly String GithubCommidId = "9dacca31bc76fc9cc1f59ee62ed1ab1c8f0d61c6"; - public static readonly String CodeGenerationErrors = ""; - public static readonly String GithubRepoName = "azure-rest-api-specs"; - // END: Code Generation Metadata Section } } - diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ServiceTagsOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ServiceTagsOperations.cs index 6addc5e6580d..cb28c68ff4b4 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ServiceTagsOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ServiceTagsOperations.cs @@ -54,7 +54,10 @@ internal ServiceTagsOperations(NetworkManagementClient client) /// Gets a list of service tag information resources. /// /// - /// The location. + /// The location that will be used as a reference for version (not as a filter + /// based on location, you will get the list of service tags with prefix + /// details across all regions but limited to the cloud that your subscription + /// belongs to). /// /// /// Headers that will be added to request. diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ServiceTagsOperationsExtensions.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ServiceTagsOperationsExtensions.cs index d575231bde96..be01db34c7b1 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ServiceTagsOperationsExtensions.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ServiceTagsOperationsExtensions.cs @@ -28,7 +28,10 @@ public static partial class ServiceTagsOperationsExtensions /// The operations group for this extension method. /// /// - /// The location. + /// The location that will be used as a reference for version (not as a filter + /// based on location, you will get the list of service tags with prefix + /// details across all regions but limited to the cloud that your subscription + /// belongs to). /// public static ServiceTagsListResult List(this IServiceTagsOperations operations, string location) { @@ -42,7 +45,10 @@ public static ServiceTagsListResult List(this IServiceTagsOperations operations, /// The operations group for this extension method. /// /// - /// The location. + /// The location that will be used as a reference for version (not as a filter + /// based on location, you will get the list of service tags with prefix + /// details across all regions but limited to the cloud that your subscription + /// belongs to). /// /// /// The cancellation token. diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VirtualWANsOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VirtualWansOperations.cs similarity index 100% rename from sdk/network/Microsoft.Azure.Management.Network/src/Generated/VirtualWANsOperations.cs rename to sdk/network/Microsoft.Azure.Management.Network/src/Generated/VirtualWansOperations.cs diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VirtualWANsOperationsExtensions.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VirtualWansOperationsExtensions.cs similarity index 100% rename from sdk/network/Microsoft.Azure.Management.Network/src/Generated/VirtualWANsOperationsExtensions.cs rename to sdk/network/Microsoft.Azure.Management.Network/src/Generated/VirtualWansOperationsExtensions.cs From ac070090671fbe5be05a483ce84814c0be4f9671 Mon Sep 17 00:00:00 2001 From: "openapi-bot[bot]" <37845953+openapi-bot[bot]@users.noreply.github.com> Date: Fri, 30 Aug 2019 02:58:59 +0000 Subject: [PATCH 03/12] [AutoPR Microsoft.Azure.Management.HealthcareApis] Move to stable version (#134) * Generated from cce264ba7c751076c58518d67e19b9e469832c0c (#136) Update ListLegacyPeerings.json * Generated from 98f6703f2854ce61a22c8ba99a243a3ecb85ec8c Updated the way we retrieve version parameter --- .../HealthcareApisManagementClient.cs | 4 +- .../IHealthcareApisManagementClient.cs | 2 +- .../IMoveResourcesStatusOperations.cs | 48 ---- .../Models/MoveResourcesParameters.cs | 101 ------- .../src/Generated/Models/Resource.cs | 10 +- .../Models/ServiceAccessPolicyEntry.cs | 8 +- .../Generated/Models/ServicesDescription.cs | 5 +- .../MoveResourcesStatusOperations.cs | 255 ------------------ ...MoveResourcesStatusOperationsExtensions.cs | 61 ----- .../Generated/OperationResultsOperations.cs | 4 + .../src/Generated/Operations.cs | 10 + .../SdkInfo_HealthcareApisManagementClient.cs | 6 +- .../src/Generated/ServicesOperations.cs | 28 ++ 13 files changed, 58 insertions(+), 484 deletions(-) delete mode 100644 sdk/healthcareapis/Microsoft.Azure.Management.HealthcareApis/src/Generated/IMoveResourcesStatusOperations.cs delete mode 100644 sdk/healthcareapis/Microsoft.Azure.Management.HealthcareApis/src/Generated/Models/MoveResourcesParameters.cs delete mode 100644 sdk/healthcareapis/Microsoft.Azure.Management.HealthcareApis/src/Generated/MoveResourcesStatusOperations.cs delete mode 100644 sdk/healthcareapis/Microsoft.Azure.Management.HealthcareApis/src/Generated/MoveResourcesStatusOperationsExtensions.cs diff --git a/sdk/healthcareapis/Microsoft.Azure.Management.HealthcareApis/src/Generated/HealthcareApisManagementClient.cs b/sdk/healthcareapis/Microsoft.Azure.Management.HealthcareApis/src/Generated/HealthcareApisManagementClient.cs index b905761494d8..91fcce4aeb28 100644 --- a/sdk/healthcareapis/Microsoft.Azure.Management.HealthcareApis/src/Generated/HealthcareApisManagementClient.cs +++ b/sdk/healthcareapis/Microsoft.Azure.Management.HealthcareApis/src/Generated/HealthcareApisManagementClient.cs @@ -52,7 +52,7 @@ public partial class HealthcareApisManagementClient : ServiceClient - /// The version of the API. + /// Client Api Version. /// public string ApiVersion { get; private set; } @@ -334,7 +334,7 @@ private void Initialize() Operations = new Operations(this); OperationResults = new OperationResultsOperations(this); BaseUri = new System.Uri("https://management.azure.com"); - ApiVersion = "2018-08-20-preview"; + ApiVersion = "2019-09-16"; AcceptLanguage = "en-US"; LongRunningOperationRetryTimeout = 30; GenerateClientRequestId = true; diff --git a/sdk/healthcareapis/Microsoft.Azure.Management.HealthcareApis/src/Generated/IHealthcareApisManagementClient.cs b/sdk/healthcareapis/Microsoft.Azure.Management.HealthcareApis/src/Generated/IHealthcareApisManagementClient.cs index 19b39d21a6c6..0582aaf46518 100644 --- a/sdk/healthcareapis/Microsoft.Azure.Management.HealthcareApis/src/Generated/IHealthcareApisManagementClient.cs +++ b/sdk/healthcareapis/Microsoft.Azure.Management.HealthcareApis/src/Generated/IHealthcareApisManagementClient.cs @@ -46,7 +46,7 @@ public partial interface IHealthcareApisManagementClient : System.IDisposable string SubscriptionId { get; set; } /// - /// The version of the API. + /// Client Api Version. /// string ApiVersion { get; } diff --git a/sdk/healthcareapis/Microsoft.Azure.Management.HealthcareApis/src/Generated/IMoveResourcesStatusOperations.cs b/sdk/healthcareapis/Microsoft.Azure.Management.HealthcareApis/src/Generated/IMoveResourcesStatusOperations.cs deleted file mode 100644 index 51922ed73101..000000000000 --- a/sdk/healthcareapis/Microsoft.Azure.Management.HealthcareApis/src/Generated/IMoveResourcesStatusOperations.cs +++ /dev/null @@ -1,48 +0,0 @@ -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.HealthcareApis -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; - - /// - /// MoveResourcesStatusOperations operations. - /// - public partial interface IMoveResourcesStatusOperations - { - /// - /// Get the operation result for a long running move operation. - /// - /// - /// The location of the operation. - /// - /// - /// The ID of the operation result to get. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task> GetWithHttpMessagesAsync(string locationName, string operationResultId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - } -} diff --git a/sdk/healthcareapis/Microsoft.Azure.Management.HealthcareApis/src/Generated/Models/MoveResourcesParameters.cs b/sdk/healthcareapis/Microsoft.Azure.Management.HealthcareApis/src/Generated/Models/MoveResourcesParameters.cs deleted file mode 100644 index ba45d3bb6023..000000000000 --- a/sdk/healthcareapis/Microsoft.Azure.Management.HealthcareApis/src/Generated/Models/MoveResourcesParameters.cs +++ /dev/null @@ -1,101 +0,0 @@ -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.HealthcareApis.Models -{ - using Microsoft.Rest; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Input values. - /// - public partial class MoveResourcesParameters - { - /// - /// Initializes a new instance of the MoveResourcesParameters class. - /// - public MoveResourcesParameters() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the MoveResourcesParameters class. - /// - /// The target subscription to move - /// resources to. - /// The target resource group to - /// move resources to. - /// The list of resources to - /// move. - public MoveResourcesParameters(string targetSubscriptionId, string targetResourceGroupName, IList resourceIdsToMove) - { - TargetSubscriptionId = targetSubscriptionId; - TargetResourceGroupName = targetResourceGroupName; - ResourceIdsToMove = resourceIdsToMove; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the target subscription to move resources to. - /// - [JsonProperty(PropertyName = "targetSubscriptionId")] - public string TargetSubscriptionId { get; set; } - - /// - /// Gets or sets the target resource group to move resources to. - /// - [JsonProperty(PropertyName = "targetResourceGroupName")] - public string TargetResourceGroupName { get; set; } - - /// - /// Gets or sets the list of resources to move. - /// - [JsonProperty(PropertyName = "resourceIdsToMove")] - public IList ResourceIdsToMove { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (TargetSubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "TargetSubscriptionId"); - } - if (TargetResourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "TargetResourceGroupName"); - } - if (ResourceIdsToMove == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "ResourceIdsToMove"); - } - if (ResourceIdsToMove != null) - { - if (ResourceIdsToMove.Count > 250) - { - throw new ValidationException(ValidationRules.MaxItems, "ResourceIdsToMove", 250); - } - if (ResourceIdsToMove.Count < 1) - { - throw new ValidationException(ValidationRules.MinItems, "ResourceIdsToMove", 1); - } - } - } - } -} diff --git a/sdk/healthcareapis/Microsoft.Azure.Management.HealthcareApis/src/Generated/Models/Resource.cs b/sdk/healthcareapis/Microsoft.Azure.Management.HealthcareApis/src/Generated/Models/Resource.cs index 849a717cd55d..f01af7e84f4f 100644 --- a/sdk/healthcareapis/Microsoft.Azure.Management.HealthcareApis/src/Generated/Models/Resource.cs +++ b/sdk/healthcareapis/Microsoft.Azure.Management.HealthcareApis/src/Generated/Models/Resource.cs @@ -33,9 +33,8 @@ public Resource() /// /// Initializes a new instance of the Resource class. /// - /// The kind of the service. Valid values are: fhir, - /// fhir-Stu3 and fhir-R4. Possible values include: 'fhir', - /// 'fhir-Stu3', 'fhir-R4' + /// The kind of the service. Possible values + /// include: 'fhir', 'fhir-Stu3', 'fhir-R4' /// The resource location. /// The resource identifier. /// The resource name. @@ -79,9 +78,8 @@ public Resource() public string Type { get; private set; } /// - /// Gets or sets the kind of the service. Valid values are: fhir, - /// fhir-Stu3 and fhir-R4. Possible values include: 'fhir', - /// 'fhir-Stu3', 'fhir-R4' + /// Gets or sets the kind of the service. Possible values include: + /// 'fhir', 'fhir-Stu3', 'fhir-R4' /// [JsonProperty(PropertyName = "kind")] public Kind Kind { get; set; } diff --git a/sdk/healthcareapis/Microsoft.Azure.Management.HealthcareApis/src/Generated/Models/ServiceAccessPolicyEntry.cs b/sdk/healthcareapis/Microsoft.Azure.Management.HealthcareApis/src/Generated/Models/ServiceAccessPolicyEntry.cs index e9f4d4139b57..2628f7272561 100644 --- a/sdk/healthcareapis/Microsoft.Azure.Management.HealthcareApis/src/Generated/Models/ServiceAccessPolicyEntry.cs +++ b/sdk/healthcareapis/Microsoft.Azure.Management.HealthcareApis/src/Generated/Models/ServiceAccessPolicyEntry.cs @@ -30,8 +30,8 @@ public ServiceAccessPolicyEntry() /// /// Initializes a new instance of the ServiceAccessPolicyEntry class. /// - /// An object ID that is allowed access to the - /// FHIR service. + /// An Azure AD object ID (User or Apps) that is + /// allowed access to the FHIR service. public ServiceAccessPolicyEntry(string objectId) { ObjectId = objectId; @@ -44,8 +44,8 @@ public ServiceAccessPolicyEntry(string objectId) partial void CustomInit(); /// - /// Gets or sets an object ID that is allowed access to the FHIR - /// service. + /// Gets or sets an Azure AD object ID (User or Apps) that is allowed + /// access to the FHIR service. /// [JsonProperty(PropertyName = "objectId")] public string ObjectId { get; set; } diff --git a/sdk/healthcareapis/Microsoft.Azure.Management.HealthcareApis/src/Generated/Models/ServicesDescription.cs b/sdk/healthcareapis/Microsoft.Azure.Management.HealthcareApis/src/Generated/Models/ServicesDescription.cs index 7ff0a2c3ca34..02d27083ac45 100644 --- a/sdk/healthcareapis/Microsoft.Azure.Management.HealthcareApis/src/Generated/Models/ServicesDescription.cs +++ b/sdk/healthcareapis/Microsoft.Azure.Management.HealthcareApis/src/Generated/Models/ServicesDescription.cs @@ -31,9 +31,8 @@ public ServicesDescription() /// /// Initializes a new instance of the ServicesDescription class. /// - /// The kind of the service. Valid values are: fhir, - /// fhir-Stu3 and fhir-R4. Possible values include: 'fhir', - /// 'fhir-Stu3', 'fhir-R4' + /// The kind of the service. Possible values + /// include: 'fhir', 'fhir-Stu3', 'fhir-R4' /// The resource location. /// The resource identifier. /// The resource name. diff --git a/sdk/healthcareapis/Microsoft.Azure.Management.HealthcareApis/src/Generated/MoveResourcesStatusOperations.cs b/sdk/healthcareapis/Microsoft.Azure.Management.HealthcareApis/src/Generated/MoveResourcesStatusOperations.cs deleted file mode 100644 index b85ca0adcb1c..000000000000 --- a/sdk/healthcareapis/Microsoft.Azure.Management.HealthcareApis/src/Generated/MoveResourcesStatusOperations.cs +++ /dev/null @@ -1,255 +0,0 @@ -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.HealthcareApis -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - using System.Net; - using System.Net.Http; - using System.Threading; - using System.Threading.Tasks; - - /// - /// MoveResourcesStatusOperations operations. - /// - internal partial class MoveResourcesStatusOperations : IServiceOperations, IMoveResourcesStatusOperations - { - /// - /// Initializes a new instance of the MoveResourcesStatusOperations class. - /// - /// - /// Reference to the service client. - /// - /// - /// Thrown when a required parameter is null - /// - internal MoveResourcesStatusOperations(HealthcareApisManagementClient client) - { - if (client == null) - { - throw new System.ArgumentNullException("client"); - } - Client = client; - } - - /// - /// Gets a reference to the HealthcareApisManagementClient - /// - public HealthcareApisManagementClient Client { get; private set; } - - /// - /// Get the operation result for a long running move operation. - /// - /// - /// The location of the operation. - /// - /// - /// The ID of the operation result to get. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task> GetWithHttpMessagesAsync(string locationName, string operationResultId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - if (locationName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "locationName"); - } - if (operationResultId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "operationResultId"); - } - // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; - string _invocationId = null; - if (_shouldTrace) - { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("locationName", locationName); - tracingParameters.Add("operationResultId", operationResultId); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); - } - // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.HealthcareApis/locations/{locationName}/moveResourcesStatus/{operationResultId}").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - _url = _url.Replace("{locationName}", System.Uri.EscapeDataString(locationName)); - _url = _url.Replace("{operationResultId}", System.Uri.EscapeDataString(operationResultId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); - } - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); - _httpRequest.RequestUri = new System.Uri(_url); - // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (Client.AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); - } - - - if (customHeaders != null) - { - foreach(var _header in customHeaders) - { - if (_httpRequest.Headers.Contains(_header.Key)) - { - _httpRequest.Headers.Remove(_header.Key); - } - _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); - } - } - - // Serialize Request - string _requestContent = null; - // Set Credentials - if (Client.Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - if (_shouldTrace) - { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); - } - HttpStatusCode _statusCode = _httpResponse.StatusCode; - cancellationToken.ThrowIfCancellationRequested(); - string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 404) - { - var ex = new ErrorDetailsException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorDetails _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 404) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - } -} diff --git a/sdk/healthcareapis/Microsoft.Azure.Management.HealthcareApis/src/Generated/MoveResourcesStatusOperationsExtensions.cs b/sdk/healthcareapis/Microsoft.Azure.Management.HealthcareApis/src/Generated/MoveResourcesStatusOperationsExtensions.cs deleted file mode 100644 index 65e0edcd2498..000000000000 --- a/sdk/healthcareapis/Microsoft.Azure.Management.HealthcareApis/src/Generated/MoveResourcesStatusOperationsExtensions.cs +++ /dev/null @@ -1,61 +0,0 @@ -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.HealthcareApis -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using System.Threading; - using System.Threading.Tasks; - - /// - /// Extension methods for MoveResourcesStatusOperations. - /// - public static partial class MoveResourcesStatusOperationsExtensions - { - /// - /// Get the operation result for a long running move operation. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The location of the operation. - /// - /// - /// The ID of the operation result to get. - /// - public static object Get(this IMoveResourcesStatusOperations operations, string locationName, string operationResultId) - { - return operations.GetAsync(locationName, operationResultId).GetAwaiter().GetResult(); - } - - /// - /// Get the operation result for a long running move operation. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The location of the operation. - /// - /// - /// The ID of the operation result to get. - /// - /// - /// The cancellation token. - /// - public static async Task GetAsync(this IMoveResourcesStatusOperations operations, string locationName, string operationResultId, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetWithHttpMessagesAsync(locationName, operationResultId, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - } -} diff --git a/sdk/healthcareapis/Microsoft.Azure.Management.HealthcareApis/src/Generated/OperationResultsOperations.cs b/sdk/healthcareapis/Microsoft.Azure.Management.HealthcareApis/src/Generated/OperationResultsOperations.cs index c9cccf09efb7..c037a4dbe436 100644 --- a/sdk/healthcareapis/Microsoft.Azure.Management.HealthcareApis/src/Generated/OperationResultsOperations.cs +++ b/sdk/healthcareapis/Microsoft.Azure.Management.HealthcareApis/src/Generated/OperationResultsOperations.cs @@ -82,6 +82,10 @@ internal OperationResultsOperations(HealthcareApisManagementClient client) /// public async Task> GetWithHttpMessagesAsync(string locationName, string operationResultId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); diff --git a/sdk/healthcareapis/Microsoft.Azure.Management.HealthcareApis/src/Generated/Operations.cs b/sdk/healthcareapis/Microsoft.Azure.Management.HealthcareApis/src/Generated/Operations.cs index 326523891511..5f5cb16bf3f3 100644 --- a/sdk/healthcareapis/Microsoft.Azure.Management.HealthcareApis/src/Generated/Operations.cs +++ b/sdk/healthcareapis/Microsoft.Azure.Management.HealthcareApis/src/Generated/Operations.cs @@ -65,11 +65,21 @@ internal Operations(HealthcareApisManagementClient client) /// /// Thrown when unable to deserialize the response /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// public async Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/healthcareapis/Microsoft.Azure.Management.HealthcareApis/src/Generated/SdkInfo_HealthcareApisManagementClient.cs b/sdk/healthcareapis/Microsoft.Azure.Management.HealthcareApis/src/Generated/SdkInfo_HealthcareApisManagementClient.cs index 1b7156ad8962..a0f9f7e31853 100644 --- a/sdk/healthcareapis/Microsoft.Azure.Management.HealthcareApis/src/Generated/SdkInfo_HealthcareApisManagementClient.cs +++ b/sdk/healthcareapis/Microsoft.Azure.Management.HealthcareApis/src/Generated/SdkInfo_HealthcareApisManagementClient.cs @@ -19,9 +19,9 @@ public static IEnumerable> ApiInfo_HealthcareApisM { return new Tuple[] { - new Tuple("HealthcareApis", "OperationResults", "2018-08-20-preview"), - new Tuple("HealthcareApis", "Operations", "2018-08-20-preview"), - new Tuple("HealthcareApis", "Services", "2018-08-20-preview"), + new Tuple("HealthcareApis", "OperationResults", "2019-09-16"), + new Tuple("HealthcareApis", "Operations", "2019-09-16"), + new Tuple("HealthcareApis", "Services", "2019-09-16"), }.AsEnumerable(); } } diff --git a/sdk/healthcareapis/Microsoft.Azure.Management.HealthcareApis/src/Generated/ServicesOperations.cs b/sdk/healthcareapis/Microsoft.Azure.Management.HealthcareApis/src/Generated/ServicesOperations.cs index 0daea70e3748..5f9a054b8b3c 100644 --- a/sdk/healthcareapis/Microsoft.Azure.Management.HealthcareApis/src/Generated/ServicesOperations.cs +++ b/sdk/healthcareapis/Microsoft.Azure.Management.HealthcareApis/src/Generated/ServicesOperations.cs @@ -82,6 +82,10 @@ internal ServicesOperations(HealthcareApisManagementClient client) /// public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -361,6 +365,10 @@ internal ServicesOperations(HealthcareApisManagementClient client) /// public async Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -533,6 +541,10 @@ internal ServicesOperations(HealthcareApisManagementClient client) /// public async Task>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -727,6 +739,10 @@ internal ServicesOperations(HealthcareApisManagementClient client) /// public async Task> CheckNameAvailabilityWithHttpMessagesAsync(CheckNameAvailabilityParameters checkNameAvailabilityInputs, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -920,6 +936,10 @@ internal ServicesOperations(HealthcareApisManagementClient client) /// public async Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string resourceName, ServicesDescription serviceDescription, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -1169,6 +1189,10 @@ internal ServicesOperations(HealthcareApisManagementClient client) /// public async Task> BeginUpdateWithHttpMessagesAsync(string resourceGroupName, string resourceName, ServicesPatchDescription servicePatchDescription, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -1390,6 +1414,10 @@ internal ServicesOperations(HealthcareApisManagementClient client) /// public async Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); From de35babe373da22e2b6b6878ad546a818bcc53f6 Mon Sep 17 00:00:00 2001 From: "openapi-bot[bot]" <37845953+openapi-bot[bot]@users.noreply.github.com> Date: Fri, 30 Aug 2019 03:24:57 +0000 Subject: [PATCH 04/12] [AutoPR Microsoft.Azure.Management.DataFactory] Chainingtrigger (#163) * Generated from cce264ba7c751076c58518d67e19b9e469832c0c (#136) Update ListLegacyPeerings.json * Generated from 92006e420d65cb70e4b93bc5850af575da4efb78 (#162) Mark "provisioningState" as read-only * Generated from 5e1bb35d5c3314d8f4fead76c3d69a2522be026b Update review comments --- .../src/Generated/Models/ChainingTrigger.cs | 126 ++++++++++++++++++ .../src/Generated/Models/PipelineResource.cs | 10 +- .../src/Generated/Models/PipelineRun.cs | 11 +- ...kageLocation.cs => SSISPackageLocation.cs} | 0 .../src/Generated/Models/TriggerRun.cs | 20 ++- .../SdkInfo_DataFactoryManagementClient.cs | 11 -- 6 files changed, 164 insertions(+), 14 deletions(-) create mode 100644 sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ChainingTrigger.cs rename sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/{SsisPackageLocation.cs => SSISPackageLocation.cs} (100%) diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ChainingTrigger.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ChainingTrigger.cs new file mode 100644 index 000000000000..5f3386bbedc7 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ChainingTrigger.cs @@ -0,0 +1,126 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Trigger that allows the referenced pipeline to depend on other pipeline + /// runs based on runDimension Name/Value pairs. Upstream pipelines should + /// declare the same runDimension Name and their runs should have the + /// values for those runDimensions. The referenced pipeline run would be + /// triggered if the values for the runDimension match for all upstream + /// pipeline runs. + /// + [Rest.Serialization.JsonTransformation] + public partial class ChainingTrigger : Trigger + { + /// + /// Initializes a new instance of the ChainingTrigger class. + /// + public ChainingTrigger() + { + Pipeline = new TriggerPipelineReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the ChainingTrigger class. + /// + /// Pipeline for which runs are created when all + /// upstream pipelines complete successfully. + /// Upstream Pipelines. + /// Run Dimension property that needs to be + /// emitted by upstream pipelines. + /// Unmatched properties from the + /// message are deserialized this collection + /// Trigger description. + /// Indicates if trigger is running or not. + /// Updated when Start/Stop APIs are called on the Trigger. Possible + /// values include: 'Started', 'Stopped', 'Disabled' + /// List of tags that can be used for + /// describing the trigger. + public ChainingTrigger(TriggerPipelineReference pipeline, IList dependsOn, string runDimension, IDictionary additionalProperties = default(IDictionary), string description = default(string), string runtimeState = default(string), IList annotations = default(IList)) + : base(additionalProperties, description, runtimeState, annotations) + { + Pipeline = pipeline; + DependsOn = dependsOn; + RunDimension = runDimension; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets pipeline for which runs are created when all upstream + /// pipelines complete successfully. + /// + [JsonProperty(PropertyName = "pipeline")] + public TriggerPipelineReference Pipeline { get; set; } + + /// + /// Gets or sets upstream Pipelines. + /// + [JsonProperty(PropertyName = "typeProperties.dependsOn")] + public IList DependsOn { get; set; } + + /// + /// Gets or sets run Dimension property that needs to be emitted by + /// upstream pipelines. + /// + [JsonProperty(PropertyName = "typeProperties.runDimension")] + public string RunDimension { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Pipeline == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Pipeline"); + } + if (DependsOn == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "DependsOn"); + } + if (RunDimension == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "RunDimension"); + } + if (Pipeline != null) + { + Pipeline.Validate(); + } + if (DependsOn != null) + { + foreach (var element in DependsOn) + { + if (element != null) + { + element.Validate(); + } + } + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PipelineResource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PipelineResource.cs index 4c376ee88166..71b481d9e008 100644 --- a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PipelineResource.cs +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PipelineResource.cs @@ -48,9 +48,10 @@ public PipelineResource() /// pipeline. /// List of tags that can be used for /// describing the Pipeline. + /// Dimensions emitted by Pipeline. /// The folder that this Pipeline is in. If not /// specified, Pipeline will appear at the root level. - public PipelineResource(string id = default(string), string name = default(string), string type = default(string), string etag = default(string), IDictionary additionalProperties = default(IDictionary), string description = default(string), IList activities = default(IList), IDictionary parameters = default(IDictionary), IDictionary variables = default(IDictionary), int? concurrency = default(int?), IList annotations = default(IList), PipelineFolder folder = default(PipelineFolder)) + public PipelineResource(string id = default(string), string name = default(string), string type = default(string), string etag = default(string), IDictionary additionalProperties = default(IDictionary), string description = default(string), IList activities = default(IList), IDictionary parameters = default(IDictionary), IDictionary variables = default(IDictionary), int? concurrency = default(int?), IList annotations = default(IList), IDictionary runDimensions = default(IDictionary), PipelineFolder folder = default(PipelineFolder)) : base(id, name, type, etag) { AdditionalProperties = additionalProperties; @@ -60,6 +61,7 @@ public PipelineResource() Variables = variables; Concurrency = concurrency; Annotations = annotations; + RunDimensions = runDimensions; Folder = folder; CustomInit(); } @@ -113,6 +115,12 @@ public PipelineResource() [JsonProperty(PropertyName = "properties.annotations")] public IList Annotations { get; set; } + /// + /// Gets or sets dimensions emitted by Pipeline. + /// + [JsonProperty(PropertyName = "properties.runDimensions")] + public IDictionary RunDimensions { get; set; } + /// /// Gets or sets the folder that this Pipeline is in. If not specified, /// Pipeline will appear at the root level. diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PipelineRun.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PipelineRun.cs index 7210c76a29e6..f1d431a01efa 100644 --- a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PipelineRun.cs +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PipelineRun.cs @@ -41,6 +41,8 @@ public PipelineRun() /// The pipeline name. /// The full or partial list of parameter /// name, value pair used in the pipeline run. + /// Run dimensions emitted by Pipeline + /// run. /// Entity that started the pipeline /// run. /// The last updated timestamp for the @@ -52,7 +54,7 @@ public PipelineRun() /// The duration of a pipeline run. /// The status of a pipeline run. /// The message from a pipeline run. - public PipelineRun(IDictionary additionalProperties = default(IDictionary), string runId = default(string), string runGroupId = default(string), bool? isLatest = default(bool?), string pipelineName = default(string), IDictionary parameters = default(IDictionary), PipelineRunInvokedBy invokedBy = default(PipelineRunInvokedBy), System.DateTime? lastUpdated = default(System.DateTime?), System.DateTime? runStart = default(System.DateTime?), System.DateTime? runEnd = default(System.DateTime?), int? durationInMs = default(int?), string status = default(string), string message = default(string)) + public PipelineRun(IDictionary additionalProperties = default(IDictionary), string runId = default(string), string runGroupId = default(string), bool? isLatest = default(bool?), string pipelineName = default(string), IDictionary parameters = default(IDictionary), IDictionary runDimensions = default(IDictionary), PipelineRunInvokedBy invokedBy = default(PipelineRunInvokedBy), System.DateTime? lastUpdated = default(System.DateTime?), System.DateTime? runStart = default(System.DateTime?), System.DateTime? runEnd = default(System.DateTime?), int? durationInMs = default(int?), string status = default(string), string message = default(string)) { AdditionalProperties = additionalProperties; RunId = runId; @@ -60,6 +62,7 @@ public PipelineRun() IsLatest = isLatest; PipelineName = pipelineName; Parameters = parameters; + RunDimensions = runDimensions; InvokedBy = invokedBy; LastUpdated = lastUpdated; RunStart = runStart; @@ -115,6 +118,12 @@ public PipelineRun() [JsonProperty(PropertyName = "parameters")] public IDictionary Parameters { get; private set; } + /// + /// Gets run dimensions emitted by Pipeline run. + /// + [JsonProperty(PropertyName = "runDimensions")] + public IDictionary RunDimensions { get; private set; } + /// /// Gets entity that started the pipeline run. /// diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SsisPackageLocation.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SSISPackageLocation.cs similarity index 100% rename from sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SsisPackageLocation.cs rename to sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SSISPackageLocation.cs diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/TriggerRun.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/TriggerRun.cs index 8ec466fcd6e5..5e9e585d51f8 100644 --- a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/TriggerRun.cs +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/TriggerRun.cs @@ -44,7 +44,11 @@ public TriggerRun() /// trigger run. Name, value pair depends on type of trigger. /// List of pipeline name and run Id /// triggered by the trigger run. - public TriggerRun(IDictionary additionalProperties = default(IDictionary), string triggerRunId = default(string), string triggerName = default(string), string triggerType = default(string), System.DateTime? triggerRunTimestamp = default(System.DateTime?), string status = default(string), string message = default(string), IDictionary properties = default(IDictionary), IDictionary triggeredPipelines = default(IDictionary)) + /// Run dimension for which trigger was + /// fired. + /// Status of the upstream + /// pipelines. + public TriggerRun(IDictionary additionalProperties = default(IDictionary), string triggerRunId = default(string), string triggerName = default(string), string triggerType = default(string), System.DateTime? triggerRunTimestamp = default(System.DateTime?), string status = default(string), string message = default(string), IDictionary properties = default(IDictionary), IDictionary triggeredPipelines = default(IDictionary), IDictionary runDimension = default(IDictionary), IDictionary dependencyStatus = default(IDictionary)) { AdditionalProperties = additionalProperties; TriggerRunId = triggerRunId; @@ -55,6 +59,8 @@ public TriggerRun() Message = message; Properties = properties; TriggeredPipelines = triggeredPipelines; + RunDimension = runDimension; + DependencyStatus = dependencyStatus; CustomInit(); } @@ -120,5 +126,17 @@ public TriggerRun() [JsonProperty(PropertyName = "triggeredPipelines")] public IDictionary TriggeredPipelines { get; private set; } + /// + /// Gets run dimension for which trigger was fired. + /// + [JsonProperty(PropertyName = "runDimension")] + public IDictionary RunDimension { get; private set; } + + /// + /// Gets status of the upstream pipelines. + /// + [JsonProperty(PropertyName = "dependencyStatus")] + public IDictionary DependencyStatus { get; private set; } + } } diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/SdkInfo_DataFactoryManagementClient.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/SdkInfo_DataFactoryManagementClient.cs index 6c4f6b0598b1..afb3bebe6aa9 100644 --- a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/SdkInfo_DataFactoryManagementClient.cs +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/SdkInfo_DataFactoryManagementClient.cs @@ -36,16 +36,5 @@ public static IEnumerable> ApiInfo_DataFactoryMana }.AsEnumerable(); } } - // BEGIN: Code Generation Metadata Section - public static readonly String AutoRestVersion = "latest"; - public static readonly String AutoRestBootStrapperVersion = "autorest@2.0.4283"; - public static readonly String AutoRestCmdExecuted = "cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/datafactory/resource-manager/readme.md --csharp --version=latest --reflect-api-versions --tag=package-2018-06 --csharp-sdks-folder=C:\\azure-sdk-for-net\\sdk"; - public static readonly String GithubForkName = "Azure"; - public static readonly String GithubBranchName = "master"; - public static readonly String GithubCommidId = "fb8f078deac2367f3dbcfbd8a542c77083c28a5b"; - public static readonly String CodeGenerationErrors = ""; - public static readonly String GithubRepoName = "azure-rest-api-specs"; - // END: Code Generation Metadata Section } } - From b39d62e092bff510d49e7fdb9175c8bc8b72a415 Mon Sep 17 00:00:00 2001 From: "openapi-bot[bot]" <37845953+openapi-bot[bot]@users.noreply.github.com> Date: Fri, 30 Aug 2019 05:22:02 +0000 Subject: [PATCH 05/12] [AutoPR Microsoft.Azure.Management.EventHub] Eventhub: added NetworkRuleSets list API (#155) * Generated from cce264ba7c751076c58518d67e19b9e469832c0c (#136) Update ListLegacyPeerings.json * Generated from 92006e420d65cb70e4b93bc5850af575da4efb78 (#162) Mark "provisioningState" as read-only * Generated from 8bc2a7edfeebb1a6bb30abbbb03d08bf1f8a8dbc update --- .../src/Generated/INamespacesOperations.cs | 47 +++ .../src/Generated/NamespacesOperations.cs | 381 ++++++++++++++++++ .../NamespacesOperationsExtensions.cs | 74 ++++ 3 files changed, 502 insertions(+) diff --git a/sdk/eventhub/Microsoft.Azure.Management.EventHub/src/Generated/INamespacesOperations.cs b/sdk/eventhub/Microsoft.Azure.Management.EventHub/src/Generated/INamespacesOperations.cs index c5d90965e6b4..5da100b5b861 100644 --- a/sdk/eventhub/Microsoft.Azure.Management.EventHub/src/Generated/INamespacesOperations.cs +++ b/sdk/eventhub/Microsoft.Azure.Management.EventHub/src/Generated/INamespacesOperations.cs @@ -442,6 +442,31 @@ public partial interface INamespacesOperations /// Task> GetNetworkRuleSetWithHttpMessagesAsync(string resourceGroupName, string namespaceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// + /// Gets list of NetworkRuleSet for a Namespace. + /// + /// + /// Name of the resource group within the azure subscription. + /// + /// + /// The Namespace name + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListNetworkRuleSetsWithHttpMessagesAsync(string resourceGroupName, string namespaceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// /// Creates or updates a namespace. Once created, this namespace's /// resource manifest is immutable. This operation is idempotent. /// @@ -560,5 +585,27 @@ public partial interface INamespacesOperations /// Thrown when a required parameter is null /// Task>> ListAuthorizationRulesNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets list of NetworkRuleSet for a Namespace. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListNetworkRuleSetsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/sdk/eventhub/Microsoft.Azure.Management.EventHub/src/Generated/NamespacesOperations.cs b/sdk/eventhub/Microsoft.Azure.Management.EventHub/src/Generated/NamespacesOperations.cs index c62283f38142..b9d7e86c02d0 100644 --- a/sdk/eventhub/Microsoft.Azure.Management.EventHub/src/Generated/NamespacesOperations.cs +++ b/sdk/eventhub/Microsoft.Azure.Management.EventHub/src/Generated/NamespacesOperations.cs @@ -3161,6 +3161,219 @@ internal NamespacesOperations(EventHubManagementClient client) return _result; } + /// + /// Gets list of NetworkRuleSet for a Namespace. + /// + /// + /// Name of the resource group within the azure subscription. + /// + /// + /// The Namespace name + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task>> ListNetworkRuleSetsWithHttpMessagesAsync(string resourceGroupName, string namespaceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + } + if (namespaceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceName"); + } + if (namespaceName != null) + { + if (namespaceName.Length > 50) + { + throw new ValidationException(ValidationRules.MaxLength, "namespaceName", 50); + } + if (namespaceName.Length < 6) + { + throw new ValidationException(ValidationRules.MinLength, "namespaceName", 6); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("namespaceName", namespaceName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListNetworkRuleSets", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/networkRuleSets").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{namespaceName}", System.Uri.EscapeDataString(namespaceName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + /// /// Creates or updates a namespace. Once created, this namespace's resource /// manifest is immutable. This operation is idempotent. @@ -4109,5 +4322,173 @@ internal NamespacesOperations(EventHubManagementClient client) return _result; } + /// + /// Gets list of NetworkRuleSet for a Namespace. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task>> ListNetworkRuleSetsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (nextPageLink == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("nextPageLink", nextPageLink); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListNetworkRuleSetsNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + List _queryParameters = new List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + } } diff --git a/sdk/eventhub/Microsoft.Azure.Management.EventHub/src/Generated/NamespacesOperationsExtensions.cs b/sdk/eventhub/Microsoft.Azure.Management.EventHub/src/Generated/NamespacesOperationsExtensions.cs index 26e4b04409d5..409eed350c43 100644 --- a/sdk/eventhub/Microsoft.Azure.Management.EventHub/src/Generated/NamespacesOperationsExtensions.cs +++ b/sdk/eventhub/Microsoft.Azure.Management.EventHub/src/Generated/NamespacesOperationsExtensions.cs @@ -701,6 +701,46 @@ public static NetworkRuleSet GetNetworkRuleSet(this INamespacesOperations operat } } + /// + /// Gets list of NetworkRuleSet for a Namespace. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group within the azure subscription. + /// + /// + /// The Namespace name + /// + public static IPage ListNetworkRuleSets(this INamespacesOperations operations, string resourceGroupName, string namespaceName) + { + return operations.ListNetworkRuleSetsAsync(resourceGroupName, namespaceName).GetAwaiter().GetResult(); + } + + /// + /// Gets list of NetworkRuleSet for a Namespace. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the resource group within the azure subscription. + /// + /// + /// The Namespace name + /// + /// + /// The cancellation token. + /// + public static async Task> ListNetworkRuleSetsAsync(this INamespacesOperations operations, string resourceGroupName, string namespaceName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListNetworkRuleSetsWithHttpMessagesAsync(resourceGroupName, namespaceName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// /// Creates or updates a namespace. Once created, this namespace's resource /// manifest is immutable. This operation is idempotent. @@ -892,5 +932,39 @@ public static IPage ListAuthorizationRulesNext(this INamespac } } + /// + /// Gets list of NetworkRuleSet for a Namespace. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListNetworkRuleSetsNext(this INamespacesOperations operations, string nextPageLink) + { + return operations.ListNetworkRuleSetsNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Gets list of NetworkRuleSet for a Namespace. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListNetworkRuleSetsNextAsync(this INamespacesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListNetworkRuleSetsNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + } } From d92e3c5eeab92e887ed32348c9951cfff9052831 Mon Sep 17 00:00:00 2001 From: "openapi-bot[bot]" <37845953+openapi-bot[bot]@users.noreply.github.com> Date: Fri, 30 Aug 2019 09:04:47 +0000 Subject: [PATCH 06/12] [AutoPR Microsoft.Azure.Management.Compute] [Compute] Add missing $expand parameter to AvSet list by subscription API (#165) * Generated from cce264ba7c751076c58518d67e19b9e469832c0c (#136) Update ListLegacyPeerings.json * Generated from 92006e420d65cb70e4b93bc5850af575da4efb78 (#162) Mark "provisioningState" as read-only * Generated from ed6acf4e35d75fc3c1c9e617b7131e83b6f59384 Add missing $expand parameter to AvSet list by subscription API --- .../src/Generated/SdkInfo_ComputeManagementClient.cs | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/SdkInfo_ComputeManagementClient.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/SdkInfo_ComputeManagementClient.cs index e8ef6710bfa7..92e16cbf4f6d 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/SdkInfo_ComputeManagementClient.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/SdkInfo_ComputeManagementClient.cs @@ -49,16 +49,5 @@ public static IEnumerable> ApiInfo_ComputeManageme }.AsEnumerable(); } } - // BEGIN: Code Generation Metadata Section - public static readonly String AutoRestVersion = "latest"; - public static readonly String AutoRestBootStrapperVersion = "autorest@2.0.4283"; - public static readonly String AutoRestCmdExecuted = "cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/compute/resource-manager/readme.md --csharp --version=latest --reflect-api-versions --csharp-sdks-folder=D:\\hylee-sdk\\avset\\sdk"; - public static readonly String GithubForkName = "Azure"; - public static readonly String GithubBranchName = "master"; - public static readonly String GithubCommidId = "6359c5dac93947b24007afd9c569e23e92848ea5"; - public static readonly String CodeGenerationErrors = ""; - public static readonly String GithubRepoName = "azure-rest-api-specs"; - // END: Code Generation Metadata Section } } - From 1c5d546d5bbbc7d8993a624735b2d4bdb9409f6b Mon Sep 17 00:00:00 2001 From: "openapi-bot[bot]" <37845953+openapi-bot[bot]@users.noreply.github.com> Date: Fri, 30 Aug 2019 16:59:15 +0000 Subject: [PATCH 07/12] [AutoPR Microsoft.Azure.Management.CognitiveServices] Fix check domain path (#147) * Generated from cce264ba7c751076c58518d67e19b9e469832c0c (#136) Update ListLegacyPeerings.json * Generated from 111d1bc1666fe89cebb960135cf2f5336bbcb35a Removed rogue file --- .../CognitiveServicesManagementClient.cs | 207 ++++++++++++++++++ ...itiveServicesManagementClientExtensions.cs | 65 ++++++ .../ICognitiveServicesManagementClient.cs | 21 ++ .../CheckDomainAvailabilityParameter.cs | 79 +++++++ .../Models/CheckDomainAvailabilityResult.cs | 78 +++++++ .../Generated/Models/{IPRule.cs => IpRule.cs} | 0 ...kInfo_CognitiveServicesManagementClient.cs | 12 +- 7 files changed, 451 insertions(+), 11 deletions(-) create mode 100644 sdk/cognitiveservices/Microsoft.Azure.Management.CognitiveServices/src/Generated/CognitiveServicesManagementClientExtensions.cs create mode 100644 sdk/cognitiveservices/Microsoft.Azure.Management.CognitiveServices/src/Generated/Models/CheckDomainAvailabilityParameter.cs create mode 100644 sdk/cognitiveservices/Microsoft.Azure.Management.CognitiveServices/src/Generated/Models/CheckDomainAvailabilityResult.cs rename sdk/cognitiveservices/Microsoft.Azure.Management.CognitiveServices/src/Generated/Models/{IPRule.cs => IpRule.cs} (100%) diff --git a/sdk/cognitiveservices/Microsoft.Azure.Management.CognitiveServices/src/Generated/CognitiveServicesManagementClient.cs b/sdk/cognitiveservices/Microsoft.Azure.Management.CognitiveServices/src/Generated/CognitiveServicesManagementClient.cs index 7faff410cf95..ffe7811c27c8 100644 --- a/sdk/cognitiveservices/Microsoft.Azure.Management.CognitiveServices/src/Generated/CognitiveServicesManagementClient.cs +++ b/sdk/cognitiveservices/Microsoft.Azure.Management.CognitiveServices/src/Generated/CognitiveServicesManagementClient.cs @@ -20,6 +20,8 @@ namespace Microsoft.Azure.Management.CognitiveServices using System.Linq; using System.Net; using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; /// /// Cognitive Services Management Client @@ -375,5 +377,210 @@ private void Initialize() DeserializationSettings.Converters.Add(new TransformationJsonConverter()); DeserializationSettings.Converters.Add(new CloudErrorJsonConverter()); } + /// + /// Check whether a domain is available. + /// + /// + /// The subdomain name to use. + /// + /// + /// The Type of the resource. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> CheckDomainAvailabilityWithHttpMessagesAsync(string subdomainName, string type, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.SubscriptionId"); + } + if (ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.ApiVersion"); + } + if (subdomainName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "subdomainName"); + } + if (type == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "type"); + } + CheckDomainAvailabilityParameter parameters = new CheckDomainAvailabilityParameter(); + if (subdomainName != null || type != null) + { + parameters.SubdomainName = subdomainName; + parameters.Type = type; + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "CheckDomainAvailability", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.CognitiveServices/checkDomainAvailability").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(SubscriptionId)); + List _queryParameters = new List(); + if (ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (GenerateClientRequestId != null && GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(parameters != null) + { + _requestContent = SafeJsonConvert.SerializeObject(parameters, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + } } diff --git a/sdk/cognitiveservices/Microsoft.Azure.Management.CognitiveServices/src/Generated/CognitiveServicesManagementClientExtensions.cs b/sdk/cognitiveservices/Microsoft.Azure.Management.CognitiveServices/src/Generated/CognitiveServicesManagementClientExtensions.cs new file mode 100644 index 000000000000..a92a604ee2ee --- /dev/null +++ b/sdk/cognitiveservices/Microsoft.Azure.Management.CognitiveServices/src/Generated/CognitiveServicesManagementClientExtensions.cs @@ -0,0 +1,65 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.CognitiveServices +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for CognitiveServicesManagementClient. + /// + public static partial class CognitiveServicesManagementClientExtensions + { + /// + /// Check whether a domain is available. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The subdomain name to use. + /// + /// + /// The Type of the resource. + /// + public static CheckDomainAvailabilityResult CheckDomainAvailability(this ICognitiveServicesManagementClient operations, string subdomainName, string type) + { + return operations.CheckDomainAvailabilityAsync(subdomainName, type).GetAwaiter().GetResult(); + } + + /// + /// Check whether a domain is available. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The subdomain name to use. + /// + /// + /// The Type of the resource. + /// + /// + /// The cancellation token. + /// + public static async Task CheckDomainAvailabilityAsync(this ICognitiveServicesManagementClient operations, string subdomainName, string type, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CheckDomainAvailabilityWithHttpMessagesAsync(subdomainName, type, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/sdk/cognitiveservices/Microsoft.Azure.Management.CognitiveServices/src/Generated/ICognitiveServicesManagementClient.cs b/sdk/cognitiveservices/Microsoft.Azure.Management.CognitiveServices/src/Generated/ICognitiveServicesManagementClient.cs index 6e897bac33a1..9229ed9da261 100644 --- a/sdk/cognitiveservices/Microsoft.Azure.Management.CognitiveServices/src/Generated/ICognitiveServicesManagementClient.cs +++ b/sdk/cognitiveservices/Microsoft.Azure.Management.CognitiveServices/src/Generated/ICognitiveServicesManagementClient.cs @@ -14,6 +14,10 @@ namespace Microsoft.Azure.Management.CognitiveServices using Microsoft.Rest.Azure; using Models; using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; /// /// Cognitive Services Management Client @@ -90,5 +94,22 @@ public partial interface ICognitiveServicesManagementClient : System.IDisposable /// ICheckSkuAvailabilityOperations CheckSkuAvailability { get; } + /// + /// Check whether a domain is available. + /// + /// + /// The subdomain name to use. + /// + /// + /// The Type of the resource. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> CheckDomainAvailabilityWithHttpMessagesAsync(string subdomainName, string type, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } } diff --git a/sdk/cognitiveservices/Microsoft.Azure.Management.CognitiveServices/src/Generated/Models/CheckDomainAvailabilityParameter.cs b/sdk/cognitiveservices/Microsoft.Azure.Management.CognitiveServices/src/Generated/Models/CheckDomainAvailabilityParameter.cs new file mode 100644 index 000000000000..2fc0681513a9 --- /dev/null +++ b/sdk/cognitiveservices/Microsoft.Azure.Management.CognitiveServices/src/Generated/Models/CheckDomainAvailabilityParameter.cs @@ -0,0 +1,79 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.CognitiveServices.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Check Domain availability parameter. + /// + public partial class CheckDomainAvailabilityParameter + { + /// + /// Initializes a new instance of the CheckDomainAvailabilityParameter + /// class. + /// + public CheckDomainAvailabilityParameter() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the CheckDomainAvailabilityParameter + /// class. + /// + /// The subdomain name to use. + /// The Type of the resource. + public CheckDomainAvailabilityParameter(string subdomainName, string type) + { + SubdomainName = subdomainName; + Type = type; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the subdomain name to use. + /// + [JsonProperty(PropertyName = "subdomainName")] + public string SubdomainName { get; set; } + + /// + /// Gets or sets the Type of the resource. + /// + [JsonProperty(PropertyName = "type")] + public string Type { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (SubdomainName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "SubdomainName"); + } + if (Type == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Type"); + } + } + } +} diff --git a/sdk/cognitiveservices/Microsoft.Azure.Management.CognitiveServices/src/Generated/Models/CheckDomainAvailabilityResult.cs b/sdk/cognitiveservices/Microsoft.Azure.Management.CognitiveServices/src/Generated/Models/CheckDomainAvailabilityResult.cs new file mode 100644 index 000000000000..7582f4616c84 --- /dev/null +++ b/sdk/cognitiveservices/Microsoft.Azure.Management.CognitiveServices/src/Generated/Models/CheckDomainAvailabilityResult.cs @@ -0,0 +1,78 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.CognitiveServices.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Check Domain availability result. + /// + public partial class CheckDomainAvailabilityResult + { + /// + /// Initializes a new instance of the CheckDomainAvailabilityResult + /// class. + /// + public CheckDomainAvailabilityResult() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the CheckDomainAvailabilityResult + /// class. + /// + /// Indicates the given SKU is + /// available or not. + /// Reason why the SKU is not available. + /// The subdomain name to use. + /// The Type of the resource. + public CheckDomainAvailabilityResult(bool? isSubdomainAvailable = default(bool?), string reason = default(string), string subdomainName = default(string), string type = default(string)) + { + IsSubdomainAvailable = isSubdomainAvailable; + Reason = reason; + SubdomainName = subdomainName; + Type = type; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets indicates the given SKU is available or not. + /// + [JsonProperty(PropertyName = "isSubdomainAvailable")] + public bool? IsSubdomainAvailable { get; set; } + + /// + /// Gets or sets reason why the SKU is not available. + /// + [JsonProperty(PropertyName = "reason")] + public string Reason { get; set; } + + /// + /// Gets or sets the subdomain name to use. + /// + [JsonProperty(PropertyName = "subdomainName")] + public string SubdomainName { get; set; } + + /// + /// Gets or sets the Type of the resource. + /// + [JsonProperty(PropertyName = "type")] + public string Type { get; set; } + + } +} diff --git a/sdk/cognitiveservices/Microsoft.Azure.Management.CognitiveServices/src/Generated/Models/IPRule.cs b/sdk/cognitiveservices/Microsoft.Azure.Management.CognitiveServices/src/Generated/Models/IpRule.cs similarity index 100% rename from sdk/cognitiveservices/Microsoft.Azure.Management.CognitiveServices/src/Generated/Models/IPRule.cs rename to sdk/cognitiveservices/Microsoft.Azure.Management.CognitiveServices/src/Generated/Models/IpRule.cs diff --git a/sdk/cognitiveservices/Microsoft.Azure.Management.CognitiveServices/src/Generated/SdkInfo_CognitiveServicesManagementClient.cs b/sdk/cognitiveservices/Microsoft.Azure.Management.CognitiveServices/src/Generated/SdkInfo_CognitiveServicesManagementClient.cs index 230a99061186..48cf31a0e168 100644 --- a/sdk/cognitiveservices/Microsoft.Azure.Management.CognitiveServices/src/Generated/SdkInfo_CognitiveServicesManagementClient.cs +++ b/sdk/cognitiveservices/Microsoft.Azure.Management.CognitiveServices/src/Generated/SdkInfo_CognitiveServicesManagementClient.cs @@ -20,22 +20,12 @@ public static IEnumerable> ApiInfo_CognitiveServic return new Tuple[] { new Tuple("CognitiveServices", "Accounts", "2017-04-18"), + new Tuple("CognitiveServices", "CheckDomainAvailability", "2017-04-18"), new Tuple("CognitiveServices", "CheckSkuAvailability", "2017-04-18"), new Tuple("CognitiveServices", "Operations", "2017-04-18"), new Tuple("CognitiveServices", "ResourceSkus", "2017-04-18"), }.AsEnumerable(); } } - // BEGIN: Code Generation Metadata Section - public static readonly String AutoRestVersion = "latest"; - public static readonly String AutoRestBootStrapperVersion = "autorest@2.0.4283"; - public static readonly String AutoRestCmdExecuted = "cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/cognitiveservices/resource-manager/readme.md --csharp --version=latest --reflect-api-versions --csharp-sdks-folder=D:\\Github\\azure-sdk-for-net\\src\\SDKs"; - public static readonly String GithubForkName = "Azure"; - public static readonly String GithubBranchName = "master"; - public static readonly String GithubCommidId = "f58c2f349207bda6f5ca4c010dd7f56c38ddb70e"; - public static readonly String CodeGenerationErrors = ""; - public static readonly String GithubRepoName = "azure-rest-api-specs"; - // END: Code Generation Metadata Section } } - From bfe21214ffc06cf336fe16edadaeae10acaa47f0 Mon Sep 17 00:00:00 2001 From: "openapi-bot[bot]" <37845953+openapi-bot[bot]@users.noreply.github.com> Date: Mon, 2 Sep 2019 05:36:05 +0000 Subject: [PATCH 08/12] Generated from ba2bfe74bad69d5419a8966d712ebb7fbee44941 (#170) removed pageable --- .../src/Generated/IOperations.cs | 2 +- .../src/Generated/Models/OperationList.cs | 53 +++++++++++++++++++ .../src/Generated/Operations.cs | 6 +-- .../src/Generated/OperationsExtensions.cs | 6 +-- .../SdkInfo_AttestationManagementClient.cs | 11 ---- 5 files changed, 59 insertions(+), 19 deletions(-) create mode 100644 sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/Models/OperationList.cs diff --git a/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/IOperations.cs b/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/IOperations.cs index ab7abf8e6217..c504661a385e 100644 --- a/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/IOperations.cs +++ b/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/IOperations.cs @@ -41,6 +41,6 @@ public partial interface IOperations /// /// Thrown when a required parameter is null /// - Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/Models/OperationList.cs b/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/Models/OperationList.cs new file mode 100644 index 000000000000..3ffcb68ab59b --- /dev/null +++ b/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/Models/OperationList.cs @@ -0,0 +1,53 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Attestation.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// List of supported operations. + /// + public partial class OperationList + { + /// + /// Initializes a new instance of the OperationList class. + /// + public OperationList() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the OperationList class. + /// + /// List of supported operations. + public OperationList(IList value = default(IList)) + { + Value = value; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets list of supported operations. + /// + [JsonProperty(PropertyName = "value")] + public IList Value { get; set; } + + } +} diff --git a/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/Operations.cs b/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/Operations.cs index d8efd6c507a6..01412dc4fd9c 100644 --- a/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/Operations.cs +++ b/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/Operations.cs @@ -68,7 +68,7 @@ internal Operations(AttestationManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; @@ -181,7 +181,7 @@ internal Operations(AttestationManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -194,7 +194,7 @@ internal Operations(AttestationManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { diff --git a/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/OperationsExtensions.cs b/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/OperationsExtensions.cs index 7b482b509c0f..b0654baf1691 100644 --- a/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/OperationsExtensions.cs +++ b/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/OperationsExtensions.cs @@ -13,8 +13,6 @@ namespace Microsoft.Azure.Management.Attestation using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Collections; - using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; @@ -29,7 +27,7 @@ public static partial class OperationsExtensions /// /// The operations group for this extension method. /// - public static IEnumerable List(this IOperations operations) + public static OperationList List(this IOperations operations) { return operations.ListAsync().GetAwaiter().GetResult(); } @@ -43,7 +41,7 @@ public static IEnumerable List(this IOperations operations /// /// The cancellation token. /// - public static async Task> ListAsync(this IOperations operations, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task ListAsync(this IOperations operations, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) { diff --git a/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/SdkInfo_AttestationManagementClient.cs b/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/SdkInfo_AttestationManagementClient.cs index 8a7744bc37a7..d73cbdde8c92 100644 --- a/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/SdkInfo_AttestationManagementClient.cs +++ b/sdk/attestation/Microsoft.Azure.Management.Attestation/src/Generated/SdkInfo_AttestationManagementClient.cs @@ -24,16 +24,5 @@ public static IEnumerable> ApiInfo_AttestationMana }.AsEnumerable(); } } - // BEGIN: Code Generation Metadata Section - public static readonly String AutoRestVersion = "latest"; - public static readonly String AutoRestBootStrapperVersion = "autorest@2.0.4283"; - public static readonly String AutoRestCmdExecuted = "cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/attestation/resource-manager/readme.md --csharp --version=latest --reflect-api-versions --csharp-sdks-folder=C:\\azure-sdk-for-net\\sdk"; - public static readonly String GithubForkName = "Azure"; - public static readonly String GithubBranchName = "master"; - public static readonly String GithubCommidId = "76c353d92b8037fe1e02c36deeb06d78d284e5d7"; - public static readonly String CodeGenerationErrors = ""; - public static readonly String GithubRepoName = "azure-rest-api-specs"; - // END: Code Generation Metadata Section } } - From 51293576615f37b1a6bb332b99df09708f4fe814 Mon Sep 17 00:00:00 2001 From: "openapi-bot[bot]" <37845953+openapi-bot[bot]@users.noreply.github.com> Date: Tue, 3 Sep 2019 01:33:38 +0000 Subject: [PATCH 09/12] [AutoPR Microsoft.Azure.Management.DataFactory] [Data Factory]Add ORC Dataset/Copy Source/Copy Sink (#143) * Generated from cce264ba7c751076c58518d67e19b9e469832c0c (#136) Update ListLegacyPeerings.json * Generated from 864a2b3827b7237d7cb60d77069b693dcbaf7001 [DataFactory]Add support for ORC dataset --- .../src/Generated/Models/OrcDataset.cs | 93 +++++++++++++++++++ .../src/Generated/Models/OrcSink.cs | 69 ++++++++++++++ .../src/Generated/Models/OrcSource.cs | 77 +++++++++++++++ 3 files changed, 239 insertions(+) create mode 100644 sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/OrcDataset.cs create mode 100644 sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/OrcSink.cs create mode 100644 sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/OrcSource.cs diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/OrcDataset.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/OrcDataset.cs new file mode 100644 index 000000000000..ab3d94b1cc48 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/OrcDataset.cs @@ -0,0 +1,93 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// ORC dataset. + /// + [Newtonsoft.Json.JsonObject("Orc")] + [Rest.Serialization.JsonTransformation] + public partial class OrcDataset : Dataset + { + /// + /// Initializes a new instance of the OrcDataset class. + /// + public OrcDataset() + { + LinkedServiceName = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the OrcDataset class. + /// + /// Linked service reference. + /// The location of the ORC data + /// storage. + /// Unmatched properties from the + /// message are deserialized this collection + /// Dataset description. + /// Columns that define the structure of the + /// dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetDataElement. + /// Columns that define the physical type schema + /// of the dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetSchemaDataElement. + /// Parameters for dataset. + /// List of tags that can be used for + /// describing the Dataset. + /// The folder that this Dataset is in. If not + /// specified, Dataset will appear at the root level. + public OrcDataset(LinkedServiceReference linkedServiceName, DatasetLocation location, IDictionary additionalProperties = default(IDictionary), string description = default(string), object structure = default(object), object schema = default(object), IDictionary parameters = default(IDictionary), IList annotations = default(IList), DatasetFolder folder = default(DatasetFolder)) + : base(linkedServiceName, additionalProperties, description, structure, schema, parameters, annotations, folder) + { + Location = location; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the location of the ORC data storage. + /// + [JsonProperty(PropertyName = "typeProperties.location")] + public DatasetLocation Location { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (Location == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Location"); + } + if (Location != null) + { + Location.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/OrcSink.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/OrcSink.cs new file mode 100644 index 000000000000..0eb07d896d9e --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/OrcSink.cs @@ -0,0 +1,69 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity ORC sink. + /// + public partial class OrcSink : CopySink + { + /// + /// Initializes a new instance of the OrcSink class. + /// + public OrcSink() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the OrcSink class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Write batch size. Type: integer (or + /// Expression with resultType integer), minimum: 0. + /// Write batch timeout. Type: string + /// (or Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Sink retry count. Type: integer (or + /// Expression with resultType integer). + /// Sink retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the sink data store. Type: integer (or + /// Expression with resultType integer). + /// ORC store settings. + public OrcSink(IDictionary additionalProperties = default(IDictionary), object writeBatchSize = default(object), object writeBatchTimeout = default(object), object sinkRetryCount = default(object), object sinkRetryWait = default(object), object maxConcurrentConnections = default(object), StoreWriteSettings storeSettings = default(StoreWriteSettings)) + : base(additionalProperties, writeBatchSize, writeBatchTimeout, sinkRetryCount, sinkRetryWait, maxConcurrentConnections) + { + StoreSettings = storeSettings; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets ORC store settings. + /// + [JsonProperty(PropertyName = "storeSettings")] + public StoreWriteSettings StoreSettings { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/OrcSource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/OrcSource.cs new file mode 100644 index 000000000000..6a3f09c364bd --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/OrcSource.cs @@ -0,0 +1,77 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity ORC source. + /// + public partial class OrcSource : CopySource + { + /// + /// Initializes a new instance of the OrcSource class. + /// + public OrcSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the OrcSource class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Source retry count. Type: integer + /// (or Expression with resultType integer). + /// Source retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// ORC store settings. + public OrcSource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), StoreReadSettings storeSettings = default(StoreReadSettings)) + : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections) + { + StoreSettings = storeSettings; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets ORC store settings. + /// + [JsonProperty(PropertyName = "storeSettings")] + public StoreReadSettings StoreSettings { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (StoreSettings != null) + { + StoreSettings.Validate(); + } + } + } +} From 0aff06c1a1084f2961bf0d1ef75e596d0406f250 Mon Sep 17 00:00:00 2001 From: "openapi-bot[bot]" <37845953+openapi-bot[bot]@users.noreply.github.com> Date: Tue, 3 Sep 2019 02:10:37 +0000 Subject: [PATCH 10/12] [AutoPR Microsoft.Azure.Management.DataFactory] [Datafactory] Add a new property in Office365 connector (#166) * Generated from cce264ba7c751076c58518d67e19b9e469832c0c (#136) Update ListLegacyPeerings.json * Generated from 92006e420d65cb70e4b93bc5850af575da4efb78 (#162) Mark "provisioningState" as read-only * [AutoPR Microsoft.Azure.Management.HealthcareApis] Move to stable version (#134) * Generated from cce264ba7c751076c58518d67e19b9e469832c0c (#136) Update ListLegacyPeerings.json * Generated from 98f6703f2854ce61a22c8ba99a243a3ecb85ec8c Updated the way we retrieve version parameter * [AutoPR Microsoft.Azure.Management.DataFactory] Chainingtrigger (#163) * Generated from cce264ba7c751076c58518d67e19b9e469832c0c (#136) Update ListLegacyPeerings.json * Generated from 92006e420d65cb70e4b93bc5850af575da4efb78 (#162) Mark "provisioningState" as read-only * Generated from 5e1bb35d5c3314d8f4fead76c3d69a2522be026b Update review comments * [AutoPR Microsoft.Azure.Management.EventHub] Eventhub: added NetworkRuleSets list API (#155) * Generated from cce264ba7c751076c58518d67e19b9e469832c0c (#136) Update ListLegacyPeerings.json * Generated from 92006e420d65cb70e4b93bc5850af575da4efb78 (#162) Mark "provisioningState" as read-only * Generated from 8bc2a7edfeebb1a6bb30abbbb03d08bf1f8a8dbc update * Generated from eb6cdadb1aa229489cd5d7108cf02ba799416f40 Resovle comments --- .../Generated/DataFactoryManagementClient.cs | 2 -- .../src/Generated/Models/AvroSink.cs | 17 +++++++++++++ .../Models/AzureBlobFSWriteSettings.cs | 23 +++++++++--------- .../Models/AzureBlobStorageWriteSettings.cs | 23 +++++++++--------- .../Models/AzureDataLakeStoreWriteSettings.cs | 15 ++++++++++-- .../src/Generated/Models/BinarySink.cs | 13 ++++++++++ .../src/Generated/Models/DelimitedTextSink.cs | 4 ++++ .../Models/FileServerWriteSettings.cs | 15 ++++++++++-- .../src/Generated/Models/JsonSink.cs | 17 +++++++++++++ .../src/Generated/Models/Office365Source.cs | 18 ++++++++++++-- .../src/Generated/Models/ParquetSink.cs | 13 ++++++++++ .../Generated/Models/StoreWriteSettings.cs | 24 ++++++++++++++++++- 12 files changed, 151 insertions(+), 33 deletions(-) diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/DataFactoryManagementClient.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/DataFactoryManagementClient.cs index e33e68d2d6aa..9766686b44ba 100644 --- a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/DataFactoryManagementClient.cs +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/DataFactoryManagementClient.cs @@ -457,8 +457,6 @@ private void Initialize() DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("type")); SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("type")); DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("type")); - SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("type")); - DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("type")); SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("type")); DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("type")); SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("authorizationType")); diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AvroSink.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AvroSink.cs index 971fe631c2e1..674850039188 100644 --- a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AvroSink.cs +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AvroSink.cs @@ -73,5 +73,22 @@ public AvroSink() [JsonProperty(PropertyName = "formatSettings")] public AvroWriteSettings FormatSettings { get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (StoreSettings != null) + { + StoreSettings.Validate(); + } + if (FormatSettings != null) + { + FormatSettings.Validate(); + } + } } } diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureBlobFSWriteSettings.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureBlobFSWriteSettings.cs index a4190a133de4..b80df367637a 100644 --- a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureBlobFSWriteSettings.cs +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureBlobFSWriteSettings.cs @@ -10,7 +10,6 @@ namespace Microsoft.Azure.Management.DataFactory.Models { - using Newtonsoft.Json; using System.Collections; using System.Collections.Generic; using System.Linq; @@ -31,6 +30,7 @@ public AzureBlobFSWriteSettings() /// /// Initializes a new instance of the AzureBlobFSWriteSettings class. /// + /// The write setting type. /// Unmatched properties from the /// message are deserialized this collection /// The maximum concurrent @@ -38,13 +38,9 @@ public AzureBlobFSWriteSettings() /// Expression with resultType integer). /// The type of copy behavior for copy /// sink. - /// Indicates the block size(MB) when - /// writing data to blob. Type: integer (or Expression with resultType - /// integer). - public AzureBlobFSWriteSettings(IDictionary additionalProperties = default(IDictionary), object maxConcurrentConnections = default(object), object copyBehavior = default(object), object blockSizeInMB = default(object)) - : base(additionalProperties, maxConcurrentConnections, copyBehavior) + public AzureBlobFSWriteSettings(string type, IDictionary additionalProperties = default(IDictionary), object maxConcurrentConnections = default(object), object copyBehavior = default(object)) + : base(type, additionalProperties, maxConcurrentConnections, copyBehavior) { - BlockSizeInMB = blockSizeInMB; CustomInit(); } @@ -54,11 +50,14 @@ public AzureBlobFSWriteSettings() partial void CustomInit(); /// - /// Gets or sets indicates the block size(MB) when writing data to - /// blob. Type: integer (or Expression with resultType integer). + /// Validate the object. /// - [JsonProperty(PropertyName = "blockSizeInMB")] - public object BlockSizeInMB { get; set; } - + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } } } diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureBlobStorageWriteSettings.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureBlobStorageWriteSettings.cs index 5abe50e082e2..b40c03973a83 100644 --- a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureBlobStorageWriteSettings.cs +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureBlobStorageWriteSettings.cs @@ -10,7 +10,6 @@ namespace Microsoft.Azure.Management.DataFactory.Models { - using Newtonsoft.Json; using System.Collections; using System.Collections.Generic; using System.Linq; @@ -33,6 +32,7 @@ public AzureBlobStorageWriteSettings() /// Initializes a new instance of the AzureBlobStorageWriteSettings /// class. /// + /// The write setting type. /// Unmatched properties from the /// message are deserialized this collection /// The maximum concurrent @@ -40,13 +40,9 @@ public AzureBlobStorageWriteSettings() /// Expression with resultType integer). /// The type of copy behavior for copy /// sink. - /// Indicates the block size(MB) when - /// writing data to blob. Type: integer (or Expression with resultType - /// integer). - public AzureBlobStorageWriteSettings(IDictionary additionalProperties = default(IDictionary), object maxConcurrentConnections = default(object), object copyBehavior = default(object), object blockSizeInMB = default(object)) - : base(additionalProperties, maxConcurrentConnections, copyBehavior) + public AzureBlobStorageWriteSettings(string type, IDictionary additionalProperties = default(IDictionary), object maxConcurrentConnections = default(object), object copyBehavior = default(object)) + : base(type, additionalProperties, maxConcurrentConnections, copyBehavior) { - BlockSizeInMB = blockSizeInMB; CustomInit(); } @@ -56,11 +52,14 @@ public AzureBlobStorageWriteSettings() partial void CustomInit(); /// - /// Gets or sets indicates the block size(MB) when writing data to - /// blob. Type: integer (or Expression with resultType integer). + /// Validate the object. /// - [JsonProperty(PropertyName = "blockSizeInMB")] - public object BlockSizeInMB { get; set; } - + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } } } diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureDataLakeStoreWriteSettings.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureDataLakeStoreWriteSettings.cs index 6a3e6a6958a7..5d10b8f5583d 100644 --- a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureDataLakeStoreWriteSettings.cs +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureDataLakeStoreWriteSettings.cs @@ -32,6 +32,7 @@ public AzureDataLakeStoreWriteSettings() /// Initializes a new instance of the AzureDataLakeStoreWriteSettings /// class. /// + /// The write setting type. /// Unmatched properties from the /// message are deserialized this collection /// The maximum concurrent @@ -39,8 +40,8 @@ public AzureDataLakeStoreWriteSettings() /// Expression with resultType integer). /// The type of copy behavior for copy /// sink. - public AzureDataLakeStoreWriteSettings(IDictionary additionalProperties = default(IDictionary), object maxConcurrentConnections = default(object), object copyBehavior = default(object)) - : base(additionalProperties, maxConcurrentConnections, copyBehavior) + public AzureDataLakeStoreWriteSettings(string type, IDictionary additionalProperties = default(IDictionary), object maxConcurrentConnections = default(object), object copyBehavior = default(object)) + : base(type, additionalProperties, maxConcurrentConnections, copyBehavior) { CustomInit(); } @@ -50,5 +51,15 @@ public AzureDataLakeStoreWriteSettings() /// partial void CustomInit(); + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } } } diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/BinarySink.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/BinarySink.cs index 5fec652f6705..ecfd2b070915 100644 --- a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/BinarySink.cs +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/BinarySink.cs @@ -65,5 +65,18 @@ public BinarySink() [JsonProperty(PropertyName = "storeSettings")] public StoreWriteSettings StoreSettings { get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (StoreSettings != null) + { + StoreSettings.Validate(); + } + } } } diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DelimitedTextSink.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DelimitedTextSink.cs index d6c268d8b94f..48aa6c4a5e6d 100644 --- a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DelimitedTextSink.cs +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DelimitedTextSink.cs @@ -81,6 +81,10 @@ public DelimitedTextSink() /// public virtual void Validate() { + if (StoreSettings != null) + { + StoreSettings.Validate(); + } if (FormatSettings != null) { FormatSettings.Validate(); diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/FileServerWriteSettings.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/FileServerWriteSettings.cs index b89b89c40ba2..c7f5984e798d 100644 --- a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/FileServerWriteSettings.cs +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/FileServerWriteSettings.cs @@ -30,6 +30,7 @@ public FileServerWriteSettings() /// /// Initializes a new instance of the FileServerWriteSettings class. /// + /// The write setting type. /// Unmatched properties from the /// message are deserialized this collection /// The maximum concurrent @@ -37,8 +38,8 @@ public FileServerWriteSettings() /// Expression with resultType integer). /// The type of copy behavior for copy /// sink. - public FileServerWriteSettings(IDictionary additionalProperties = default(IDictionary), object maxConcurrentConnections = default(object), object copyBehavior = default(object)) - : base(additionalProperties, maxConcurrentConnections, copyBehavior) + public FileServerWriteSettings(string type, IDictionary additionalProperties = default(IDictionary), object maxConcurrentConnections = default(object), object copyBehavior = default(object)) + : base(type, additionalProperties, maxConcurrentConnections, copyBehavior) { CustomInit(); } @@ -48,5 +49,15 @@ public FileServerWriteSettings() /// partial void CustomInit(); + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } } } diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/JsonSink.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/JsonSink.cs index 703c9718ea8c..9017df04eaad 100644 --- a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/JsonSink.cs +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/JsonSink.cs @@ -73,5 +73,22 @@ public JsonSink() [JsonProperty(PropertyName = "formatSettings")] public JsonWriteSettings FormatSettings { get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (StoreSettings != null) + { + StoreSettings.Validate(); + } + if (FormatSettings != null) + { + FormatSettings.Validate(); + } + } } } diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/Office365Source.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/Office365Source.cs index 1116608ddbf4..a76dbc6d1004 100644 --- a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/Office365Source.cs +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/Office365Source.cs @@ -16,7 +16,7 @@ namespace Microsoft.Azure.Management.DataFactory.Models using System.Linq; /// - /// A copy activity source for an Office365 service. + /// A copy activity source for an Office 365 service. /// public partial class Office365Source : CopySource { @@ -55,7 +55,11 @@ public Office365Source() /// End time of the requested range for this /// dataset. Type: string (or Expression with resultType /// string). - public Office365Source(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object allowedGroups = default(object), object userScopeFilterUri = default(object), object dateFilterColumn = default(object), object startTime = default(object), object endTime = default(object)) + /// The columns to be read out from the + /// Office 365 table. Type: array of objects (or Expression with + /// resultType array of objects). Example: [ { "name": "Id" }, { + /// "name": "CreatedDateTime" } ] + public Office365Source(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object allowedGroups = default(object), object userScopeFilterUri = default(object), object dateFilterColumn = default(object), object startTime = default(object), object endTime = default(object), object outputColumns = default(object)) : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections) { AllowedGroups = allowedGroups; @@ -63,6 +67,7 @@ public Office365Source() DateFilterColumn = dateFilterColumn; StartTime = startTime; EndTime = endTime; + OutputColumns = outputColumns; CustomInit(); } @@ -108,5 +113,14 @@ public Office365Source() [JsonProperty(PropertyName = "endTime")] public object EndTime { get; set; } + /// + /// Gets or sets the columns to be read out from the Office 365 table. + /// Type: array of objects (or Expression with resultType array of + /// objects). Example: [ { "name": "Id" }, { "name": "CreatedDateTime" + /// } ] + /// + [JsonProperty(PropertyName = "outputColumns")] + public object OutputColumns { get; set; } + } } diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ParquetSink.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ParquetSink.cs index 67b95379fe09..73efe2afcdf0 100644 --- a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ParquetSink.cs +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ParquetSink.cs @@ -65,5 +65,18 @@ public ParquetSink() [JsonProperty(PropertyName = "storeSettings")] public StoreWriteSettings StoreSettings { get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (StoreSettings != null) + { + StoreSettings.Validate(); + } + } } } diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/StoreWriteSettings.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/StoreWriteSettings.cs index 0346d5e0d099..a2865e56f776 100644 --- a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/StoreWriteSettings.cs +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/StoreWriteSettings.cs @@ -10,6 +10,7 @@ namespace Microsoft.Azure.Management.DataFactory.Models { + using Microsoft.Rest; using Newtonsoft.Json; using System.Collections; using System.Collections.Generic; @@ -31,6 +32,7 @@ public StoreWriteSettings() /// /// Initializes a new instance of the StoreWriteSettings class. /// + /// The write setting type. /// Unmatched properties from the /// message are deserialized this collection /// The maximum concurrent @@ -38,9 +40,10 @@ public StoreWriteSettings() /// Expression with resultType integer). /// The type of copy behavior for copy /// sink. - public StoreWriteSettings(IDictionary additionalProperties = default(IDictionary), object maxConcurrentConnections = default(object), object copyBehavior = default(object)) + public StoreWriteSettings(string type, IDictionary additionalProperties = default(IDictionary), object maxConcurrentConnections = default(object), object copyBehavior = default(object)) { AdditionalProperties = additionalProperties; + Type = type; MaxConcurrentConnections = maxConcurrentConnections; CopyBehavior = copyBehavior; CustomInit(); @@ -58,6 +61,12 @@ public StoreWriteSettings() [JsonExtensionData] public IDictionary AdditionalProperties { get; set; } + /// + /// Gets or sets the write setting type. + /// + [JsonProperty(PropertyName = "type")] + public string Type { get; set; } + /// /// Gets or sets the maximum concurrent connection count for the source /// data store. Type: integer (or Expression with resultType integer). @@ -71,5 +80,18 @@ public StoreWriteSettings() [JsonProperty(PropertyName = "copyBehavior")] public object CopyBehavior { get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Type == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Type"); + } + } } } From 8d246941105eed3ece7350c03bcd2f31b50e096a Mon Sep 17 00:00:00 2001 From: "openapi-bot[bot]" <37845953+openapi-bot[bot]@users.noreply.github.com> Date: Wed, 4 Sep 2019 04:55:06 +0000 Subject: [PATCH 11/12] [AutoPR Microsoft.Azure.Management.ContainerService] Container Services: add java package 2019 08 01 (#172) * Generated from cce264ba7c751076c58518d67e19b9e469832c0c (#136) Update ListLegacyPeerings.json * Generated from 92006e420d65cb70e4b93bc5850af575da4efb78 (#162) Mark "provisioningState" as read-only * [AutoPR Microsoft.Azure.Management.HealthcareApis] Move to stable version (#134) * Generated from cce264ba7c751076c58518d67e19b9e469832c0c (#136) Update ListLegacyPeerings.json * Generated from 98f6703f2854ce61a22c8ba99a243a3ecb85ec8c Updated the way we retrieve version parameter * [AutoPR Microsoft.Azure.Management.DataFactory] Chainingtrigger (#163) * Generated from cce264ba7c751076c58518d67e19b9e469832c0c (#136) Update ListLegacyPeerings.json * Generated from 92006e420d65cb70e4b93bc5850af575da4efb78 (#162) Mark "provisioningState" as read-only * Generated from 5e1bb35d5c3314d8f4fead76c3d69a2522be026b Update review comments * [AutoPR Microsoft.Azure.Management.EventHub] Eventhub: added NetworkRuleSets list API (#155) * Generated from cce264ba7c751076c58518d67e19b9e469832c0c (#136) Update ListLegacyPeerings.json * Generated from 92006e420d65cb70e4b93bc5850af575da4efb78 (#162) Mark "provisioningState" as read-only * Generated from 8bc2a7edfeebb1a6bb30abbbb03d08bf1f8a8dbc update * [AutoPR Microsoft.Azure.Management.Compute] [Compute] Add missing $expand parameter to AvSet list by subscription API (#165) * Generated from cce264ba7c751076c58518d67e19b9e469832c0c (#136) Update ListLegacyPeerings.json * Generated from 92006e420d65cb70e4b93bc5850af575da4efb78 (#162) Mark "provisioningState" as read-only * Generated from ed6acf4e35d75fc3c1c9e617b7131e83b6f59384 Add missing $expand parameter to AvSet list by subscription API * [AutoPR Microsoft.Azure.Management.CognitiveServices] Fix check domain path (#147) * Generated from cce264ba7c751076c58518d67e19b9e469832c0c (#136) Update ListLegacyPeerings.json * Generated from 111d1bc1666fe89cebb960135cf2f5336bbcb35a Removed rogue file * Generated from ba2bfe74bad69d5419a8966d712ebb7fbee44941 (#170) removed pageable * [AutoPR Microsoft.Azure.Management.DataFactory] [Data Factory]Add ORC Dataset/Copy Source/Copy Sink (#143) * Generated from cce264ba7c751076c58518d67e19b9e469832c0c (#136) Update ListLegacyPeerings.json * Generated from 864a2b3827b7237d7cb60d77069b693dcbaf7001 [DataFactory]Add support for ORC dataset * [AutoPR Microsoft.Azure.Management.DataFactory] [Datafactory] Add a new property in Office365 connector (#166) * Generated from cce264ba7c751076c58518d67e19b9e469832c0c (#136) Update ListLegacyPeerings.json * Generated from 92006e420d65cb70e4b93bc5850af575da4efb78 (#162) Mark "provisioningState" as read-only * [AutoPR Microsoft.Azure.Management.HealthcareApis] Move to stable version (#134) * Generated from cce264ba7c751076c58518d67e19b9e469832c0c (#136) Update ListLegacyPeerings.json * Generated from 98f6703f2854ce61a22c8ba99a243a3ecb85ec8c Updated the way we retrieve version parameter * [AutoPR Microsoft.Azure.Management.DataFactory] Chainingtrigger (#163) * Generated from cce264ba7c751076c58518d67e19b9e469832c0c (#136) Update ListLegacyPeerings.json * Generated from 92006e420d65cb70e4b93bc5850af575da4efb78 (#162) Mark "provisioningState" as read-only * Generated from 5e1bb35d5c3314d8f4fead76c3d69a2522be026b Update review comments * [AutoPR Microsoft.Azure.Management.EventHub] Eventhub: added NetworkRuleSets list API (#155) * Generated from cce264ba7c751076c58518d67e19b9e469832c0c (#136) Update ListLegacyPeerings.json * Generated from 92006e420d65cb70e4b93bc5850af575da4efb78 (#162) Mark "provisioningState" as read-only * Generated from 8bc2a7edfeebb1a6bb30abbbb03d08bf1f8a8dbc update * Generated from eb6cdadb1aa229489cd5d7108cf02ba799416f40 Resovle comments * Generated from 65a64690d9907f680b0070b16416ed61391f7d90 fix: not to remove 2019-06 tag in multiapi --- .../src/Generated/AgentPoolsOperations.cs | 465 +++++++++++++++++- .../AgentPoolsOperationsExtensions.cs | 106 ++++ .../Generated/ContainerServicesOperations.cs | 2 +- .../src/Generated/IAgentPoolsOperations.cs | 63 +++ .../Generated/ManagedClustersOperations.cs | 24 +- .../src/Generated/Models/AgentPool.cs | 45 +- .../Models/AgentPoolAvailableVersions.cs | 83 ++++ ...VersionsPropertiesAgentPoolVersionsItem.cs | 70 +++ .../Models/AgentPoolUpgradeProfile.cs | 120 +++++ ...oolUpgradeProfilePropertiesUpgradesItem.cs | 60 +++ .../Models/ContainerServiceNetworkProfile.cs | 15 +- .../src/Generated/Models/ManagedCluster.cs | 15 +- .../ManagedClusterAPIServerAccessProfile.cs | 66 +++ .../Models/ManagedClusterAgentPoolProfile.cs | 14 +- ...anagedClusterAgentPoolProfileProperties.cs | 45 +- .../ManagedClusterLoadBalancerProfile.cs | 100 ++++ ...erLoadBalancerProfileManagedOutboundIPs.cs | 75 +++ ...erLoadBalancerProfileOutboundIPPrefixes.cs | 56 +++ ...edClusterLoadBalancerProfileOutboundIPs.cs | 55 +++ .../src/Generated/Models/ResourceReference.cs | 51 ++ .../Models/ScaleSetEvictionPolicy.cs | 22 + .../src/Generated/Models/ScaleSetPriority.cs | 22 + .../src/Generated/Operations.cs | 2 +- .../SdkInfo_ContainerServiceClient.cs | 8 +- 24 files changed, 1549 insertions(+), 35 deletions(-) create mode 100644 sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/AgentPoolAvailableVersions.cs create mode 100644 sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.cs create mode 100644 sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/AgentPoolUpgradeProfile.cs create mode 100644 sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/AgentPoolUpgradeProfilePropertiesUpgradesItem.cs create mode 100644 sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterAPIServerAccessProfile.cs create mode 100644 sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterLoadBalancerProfile.cs create mode 100644 sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterLoadBalancerProfileManagedOutboundIPs.cs create mode 100644 sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterLoadBalancerProfileOutboundIPPrefixes.cs create mode 100644 sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterLoadBalancerProfileOutboundIPs.cs create mode 100644 sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ResourceReference.cs create mode 100644 sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ScaleSetEvictionPolicy.cs create mode 100644 sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ScaleSetPriority.cs diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/AgentPoolsOperations.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/AgentPoolsOperations.cs index 50bf7e4b6b92..1d911abb78e4 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/AgentPoolsOperations.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/AgentPoolsOperations.cs @@ -120,7 +120,7 @@ internal AgentPoolsOperations(ContainerServiceClient client) throw new ValidationException(ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); } } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-08-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -346,7 +346,7 @@ internal AgentPoolsOperations(ContainerServiceClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "agentPoolName"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-08-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -557,6 +557,463 @@ internal AgentPoolsOperations(ContainerServiceClient client) return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } + /// + /// Gets upgrade profile for an agent pool. + /// + /// + /// Gets the details of the upgrade profile for an agent pool with a specified + /// resource group and managed cluster name. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The name of the agent pool. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetUpgradeProfileWithHttpMessagesAsync(string resourceGroupName, string resourceName, string agentPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + } + if (resourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceName"); + } + if (resourceName != null) + { + if (resourceName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceName", 63); + } + if (resourceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceName, "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); + } + } + if (agentPoolName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "agentPoolName"); + } + string apiVersion = "2019-08-01"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("resourceName", resourceName); + tracingParameters.Add("agentPoolName", agentPoolName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "GetUpgradeProfile", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeProfiles/default").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName)); + _url = _url.Replace("{agentPoolName}", System.Uri.EscapeDataString(agentPoolName)); + List _queryParameters = new List(); + if (apiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Gets a list of supported versions for the specified agent pool. + /// + /// + /// Gets a list of supported versions for the specified agent pool. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The name of the agent pool. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetAvailableAgentPoolVersionsWithHttpMessagesAsync(string resourceGroupName, string resourceName, string agentPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + } + if (resourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceName"); + } + if (resourceName != null) + { + if (resourceName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceName", 63); + } + if (resourceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceName, "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); + } + } + if (agentPoolName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "agentPoolName"); + } + string apiVersion = "2019-08-01"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("resourceName", resourceName); + tracingParameters.Add("agentPoolName", agentPoolName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "GetAvailableAgentPoolVersions", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/availableAgentPoolVersions").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName)); + _url = _url.Replace("{agentPoolName}", System.Uri.EscapeDataString(agentPoolName)); + List _queryParameters = new List(); + if (apiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + /// /// Creates or updates an agent pool. /// @@ -644,7 +1101,7 @@ internal AgentPoolsOperations(ContainerServiceClient client) { parameters.Validate(); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-08-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -894,7 +1351,7 @@ internal AgentPoolsOperations(ContainerServiceClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "agentPoolName"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-08-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/AgentPoolsOperationsExtensions.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/AgentPoolsOperationsExtensions.cs index 333bc9802a1a..e9bab4e54b14 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/AgentPoolsOperationsExtensions.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/AgentPoolsOperationsExtensions.cs @@ -228,6 +228,112 @@ public static void Delete(this IAgentPoolsOperations operations, string resource (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, resourceName, agentPoolName, null, cancellationToken).ConfigureAwait(false)).Dispose(); } + /// + /// Gets upgrade profile for an agent pool. + /// + /// + /// Gets the details of the upgrade profile for an agent pool with a specified + /// resource group and managed cluster name. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The name of the agent pool. + /// + public static AgentPoolUpgradeProfile GetUpgradeProfile(this IAgentPoolsOperations operations, string resourceGroupName, string resourceName, string agentPoolName) + { + return operations.GetUpgradeProfileAsync(resourceGroupName, resourceName, agentPoolName).GetAwaiter().GetResult(); + } + + /// + /// Gets upgrade profile for an agent pool. + /// + /// + /// Gets the details of the upgrade profile for an agent pool with a specified + /// resource group and managed cluster name. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The name of the agent pool. + /// + /// + /// The cancellation token. + /// + public static async Task GetUpgradeProfileAsync(this IAgentPoolsOperations operations, string resourceGroupName, string resourceName, string agentPoolName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetUpgradeProfileWithHttpMessagesAsync(resourceGroupName, resourceName, agentPoolName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets a list of supported versions for the specified agent pool. + /// + /// + /// Gets a list of supported versions for the specified agent pool. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The name of the agent pool. + /// + public static AgentPoolAvailableVersions GetAvailableAgentPoolVersions(this IAgentPoolsOperations operations, string resourceGroupName, string resourceName, string agentPoolName) + { + return operations.GetAvailableAgentPoolVersionsAsync(resourceGroupName, resourceName, agentPoolName).GetAwaiter().GetResult(); + } + + /// + /// Gets a list of supported versions for the specified agent pool. + /// + /// + /// Gets a list of supported versions for the specified agent pool. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The name of the agent pool. + /// + /// + /// The cancellation token. + /// + public static async Task GetAvailableAgentPoolVersionsAsync(this IAgentPoolsOperations operations, string resourceGroupName, string resourceName, string agentPoolName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetAvailableAgentPoolVersionsWithHttpMessagesAsync(resourceGroupName, resourceName, agentPoolName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// /// Creates or updates an agent pool. /// diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/ContainerServicesOperations.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/ContainerServicesOperations.cs index b8ec9621329d..564aab684620 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/ContainerServicesOperations.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/ContainerServicesOperations.cs @@ -735,7 +735,7 @@ internal ContainerServicesOperations(ContainerServiceClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "location"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-08-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IAgentPoolsOperations.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IAgentPoolsOperations.cs index fe31c66be91b..e496ec668ace 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IAgentPoolsOperations.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IAgentPoolsOperations.cs @@ -148,6 +148,69 @@ public partial interface IAgentPoolsOperations /// Task DeleteWithHttpMessagesAsync(string resourceGroupName, string resourceName, string agentPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// + /// Gets upgrade profile for an agent pool. + /// + /// + /// Gets the details of the upgrade profile for an agent pool with a + /// specified resource group and managed cluster name. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The name of the agent pool. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> GetUpgradeProfileWithHttpMessagesAsync(string resourceGroupName, string resourceName, string agentPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets a list of supported versions for the specified agent pool. + /// + /// + /// Gets a list of supported versions for the specified agent pool. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The name of the agent pool. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> GetAvailableAgentPoolVersionsWithHttpMessagesAsync(string resourceGroupName, string resourceName, string agentPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// /// Creates or updates an agent pool. /// /// diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/ManagedClustersOperations.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/ManagedClustersOperations.cs index b42496c1c241..f4c6fb41f833 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/ManagedClustersOperations.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/ManagedClustersOperations.cs @@ -84,7 +84,7 @@ internal ManagedClustersOperations(ContainerServiceClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-08-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -278,7 +278,7 @@ internal ManagedClustersOperations(ContainerServiceClient client) throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); } } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-08-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -496,7 +496,7 @@ internal ManagedClustersOperations(ContainerServiceClient client) throw new ValidationException(ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); } } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-08-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -723,7 +723,7 @@ internal ManagedClustersOperations(ContainerServiceClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "roleName"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-08-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -945,7 +945,7 @@ internal ManagedClustersOperations(ContainerServiceClient client) throw new ValidationException(ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); } } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-08-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1165,7 +1165,7 @@ internal ManagedClustersOperations(ContainerServiceClient client) throw new ValidationException(ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); } } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-08-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1385,7 +1385,7 @@ internal ManagedClustersOperations(ContainerServiceClient client) throw new ValidationException(ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); } } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-08-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1756,7 +1756,7 @@ internal ManagedClustersOperations(ContainerServiceClient client) { parameters.Validate(); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-08-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -2003,7 +2003,7 @@ internal ManagedClustersOperations(ContainerServiceClient client) throw new ValidationException(ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); } } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-08-01"; TagsObject parameters = new TagsObject(); if (tags != null) { @@ -2231,7 +2231,7 @@ internal ManagedClustersOperations(ContainerServiceClient client) throw new ValidationException(ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); } } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-08-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -2441,7 +2441,7 @@ internal ManagedClustersOperations(ContainerServiceClient client) { parameters.Validate(); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-08-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -2658,7 +2658,7 @@ internal ManagedClustersOperations(ContainerServiceClient client) { parameters.Validate(); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-08-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/AgentPool.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/AgentPool.cs index 62d800ddd453..17ca5dc61071 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/AgentPool.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/AgentPool.cs @@ -123,7 +123,17 @@ public AgentPool() /// provisioning state, which only appears in the response. /// (PREVIEW) Availability zones for /// nodes. Must use VirtualMachineScaleSets AgentPoolType. - public AgentPool(int count, string vmSize, string id = default(string), string name = default(string), string type = default(string), int? osDiskSizeGB = default(int?), string vnetSubnetID = default(string), int? maxPods = default(int?), string osType = default(string), int? maxCount = default(int?), int? minCount = default(int?), bool? enableAutoScaling = default(bool?), string agentPoolType = default(string), string orchestratorVersion = default(string), string provisioningState = default(string), IList availabilityZones = default(IList)) + /// Enable public IP for nodes + /// ScaleSetPriority to be used to + /// specify virtual machine scale set priority. Default to regular. + /// Possible values include: 'Low', 'Regular' + /// ScaleSetEvictionPolicy to be + /// used to specify eviction policy for low priority virtual machine + /// scale set. Default to Delete. Possible values include: 'Delete', + /// 'Deallocate' + /// Taints added to new nodes during node pool + /// create and scale. For example, key=value:NoSchedule. + public AgentPool(int count, string vmSize, string id = default(string), string name = default(string), string type = default(string), int? osDiskSizeGB = default(int?), string vnetSubnetID = default(string), int? maxPods = default(int?), string osType = default(string), int? maxCount = default(int?), int? minCount = default(int?), bool? enableAutoScaling = default(bool?), string agentPoolType = default(string), string orchestratorVersion = default(string), string provisioningState = default(string), IList availabilityZones = default(IList), bool? enableNodePublicIP = default(bool?), string scaleSetPriority = default(string), string scaleSetEvictionPolicy = default(string), IList nodeTaints = default(IList)) : base(id, name, type) { Count = count; @@ -139,6 +149,10 @@ public AgentPool() OrchestratorVersion = orchestratorVersion; ProvisioningState = provisioningState; AvailabilityZones = availabilityZones; + EnableNodePublicIP = enableNodePublicIP; + ScaleSetPriority = scaleSetPriority; + ScaleSetEvictionPolicy = scaleSetEvictionPolicy; + NodeTaints = nodeTaints; CustomInit(); } @@ -291,6 +305,35 @@ public AgentPool() [JsonProperty(PropertyName = "properties.availabilityZones")] public IList AvailabilityZones { get; set; } + /// + /// Gets or sets enable public IP for nodes + /// + [JsonProperty(PropertyName = "properties.enableNodePublicIP")] + public bool? EnableNodePublicIP { get; set; } + + /// + /// Gets or sets scaleSetPriority to be used to specify virtual machine + /// scale set priority. Default to regular. Possible values include: + /// 'Low', 'Regular' + /// + [JsonProperty(PropertyName = "properties.scaleSetPriority")] + public string ScaleSetPriority { get; set; } + + /// + /// Gets or sets scaleSetEvictionPolicy to be used to specify eviction + /// policy for low priority virtual machine scale set. Default to + /// Delete. Possible values include: 'Delete', 'Deallocate' + /// + [JsonProperty(PropertyName = "properties.scaleSetEvictionPolicy")] + public string ScaleSetEvictionPolicy { get; set; } + + /// + /// Gets or sets taints added to new nodes during node pool create and + /// scale. For example, key=value:NoSchedule. + /// + [JsonProperty(PropertyName = "properties.nodeTaints")] + public IList NodeTaints { get; set; } + /// /// Validate the object. /// diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/AgentPoolAvailableVersions.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/AgentPoolAvailableVersions.cs new file mode 100644 index 000000000000..aef063574593 --- /dev/null +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/AgentPoolAvailableVersions.cs @@ -0,0 +1,83 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.ContainerService.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The list of available versions for an agent pool. + /// + [Rest.Serialization.JsonTransformation] + public partial class AgentPoolAvailableVersions + { + /// + /// Initializes a new instance of the AgentPoolAvailableVersions class. + /// + public AgentPoolAvailableVersions() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AgentPoolAvailableVersions class. + /// + /// Id of the agent pool available versions. + /// Name of the agent pool available + /// versions. + /// Type of the agent pool available + /// versions. + /// List of versions available for + /// agent pool. + public AgentPoolAvailableVersions(string id = default(string), string name = default(string), string type = default(string), IList agentPoolVersions = default(IList)) + { + Id = id; + Name = name; + Type = type; + AgentPoolVersions = agentPoolVersions; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets id of the agent pool available versions. + /// + [JsonProperty(PropertyName = "id")] + public string Id { get; private set; } + + /// + /// Gets name of the agent pool available versions. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; private set; } + + /// + /// Gets type of the agent pool available versions. + /// + [JsonProperty(PropertyName = "type")] + public string Type { get; private set; } + + /// + /// Gets or sets list of versions available for agent pool. + /// + [JsonProperty(PropertyName = "properties.agentPoolVersions")] + public IList AgentPoolVersions { get; set; } + + } +} diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.cs new file mode 100644 index 000000000000..8642c1dbda4c --- /dev/null +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.cs @@ -0,0 +1,70 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.ContainerService.Models +{ + using Newtonsoft.Json; + using System.Linq; + + public partial class AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem + { + /// + /// Initializes a new instance of the + /// AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem class. + /// + public AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem class. + /// + /// Whether this version is the default + /// agent pool version. + /// Kubernetes version (major, minor, + /// patch). + /// Whether Kubernetes version is currently in + /// preview. + public AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem(bool? defaultProperty = default(bool?), string kubernetesVersion = default(string), bool? isPreview = default(bool?)) + { + DefaultProperty = defaultProperty; + KubernetesVersion = kubernetesVersion; + IsPreview = isPreview; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets whether this version is the default agent pool + /// version. + /// + [JsonProperty(PropertyName = "default")] + public bool? DefaultProperty { get; set; } + + /// + /// Gets or sets kubernetes version (major, minor, patch). + /// + [JsonProperty(PropertyName = "kubernetesVersion")] + public string KubernetesVersion { get; set; } + + /// + /// Gets or sets whether Kubernetes version is currently in preview. + /// + [JsonProperty(PropertyName = "isPreview")] + public bool? IsPreview { get; set; } + + } +} diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/AgentPoolUpgradeProfile.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/AgentPoolUpgradeProfile.cs new file mode 100644 index 000000000000..7e876988de79 --- /dev/null +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/AgentPoolUpgradeProfile.cs @@ -0,0 +1,120 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.ContainerService.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The list of available upgrades for an agent pool. + /// + [Rest.Serialization.JsonTransformation] + public partial class AgentPoolUpgradeProfile + { + /// + /// Initializes a new instance of the AgentPoolUpgradeProfile class. + /// + public AgentPoolUpgradeProfile() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AgentPoolUpgradeProfile class. + /// + /// Kubernetes version (major, minor, + /// patch). + /// OsType to be used to specify os type. Choose + /// from Linux and Windows. Default to Linux. Possible values include: + /// 'Linux', 'Windows' + /// Id of the agent pool upgrade profile. + /// Name of the agent pool upgrade profile. + /// Type of the agent pool upgrade profile. + /// List of orchestrator types and versions + /// available for upgrade. + public AgentPoolUpgradeProfile(string kubernetesVersion, string osType, string id = default(string), string name = default(string), string type = default(string), IList upgrades = default(IList)) + { + Id = id; + Name = name; + Type = type; + KubernetesVersion = kubernetesVersion; + OsType = osType; + Upgrades = upgrades; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets id of the agent pool upgrade profile. + /// + [JsonProperty(PropertyName = "id")] + public string Id { get; private set; } + + /// + /// Gets name of the agent pool upgrade profile. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; private set; } + + /// + /// Gets type of the agent pool upgrade profile. + /// + [JsonProperty(PropertyName = "type")] + public string Type { get; private set; } + + /// + /// Gets or sets kubernetes version (major, minor, patch). + /// + [JsonProperty(PropertyName = "properties.kubernetesVersion")] + public string KubernetesVersion { get; set; } + + /// + /// Gets or sets osType to be used to specify os type. Choose from + /// Linux and Windows. Default to Linux. Possible values include: + /// 'Linux', 'Windows' + /// + [JsonProperty(PropertyName = "properties.osType")] + public string OsType { get; set; } + + /// + /// Gets or sets list of orchestrator types and versions available for + /// upgrade. + /// + [JsonProperty(PropertyName = "properties.upgrades")] + public IList Upgrades { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (KubernetesVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "KubernetesVersion"); + } + if (OsType == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "OsType"); + } + } + } +} diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/AgentPoolUpgradeProfilePropertiesUpgradesItem.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/AgentPoolUpgradeProfilePropertiesUpgradesItem.cs new file mode 100644 index 000000000000..e449e974e445 --- /dev/null +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/AgentPoolUpgradeProfilePropertiesUpgradesItem.cs @@ -0,0 +1,60 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.ContainerService.Models +{ + using Newtonsoft.Json; + using System.Linq; + + public partial class AgentPoolUpgradeProfilePropertiesUpgradesItem + { + /// + /// Initializes a new instance of the + /// AgentPoolUpgradeProfilePropertiesUpgradesItem class. + /// + public AgentPoolUpgradeProfilePropertiesUpgradesItem() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// AgentPoolUpgradeProfilePropertiesUpgradesItem class. + /// + /// Kubernetes version (major, minor, + /// patch). + /// Whether Kubernetes version is currently in + /// preview. + public AgentPoolUpgradeProfilePropertiesUpgradesItem(string kubernetesVersion = default(string), bool? isPreview = default(bool?)) + { + KubernetesVersion = kubernetesVersion; + IsPreview = isPreview; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets kubernetes version (major, minor, patch). + /// + [JsonProperty(PropertyName = "kubernetesVersion")] + public string KubernetesVersion { get; set; } + + /// + /// Gets or sets whether Kubernetes version is currently in preview. + /// + [JsonProperty(PropertyName = "isPreview")] + public bool? IsPreview { get; set; } + + } +} diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ContainerServiceNetworkProfile.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ContainerServiceNetworkProfile.cs index 311110d17c1a..0d1e3604982b 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ContainerServiceNetworkProfile.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ContainerServiceNetworkProfile.cs @@ -51,7 +51,9 @@ public ContainerServiceNetworkProfile() /// ranges or the Kubernetes service address range. /// The load balancer sku for the managed /// cluster. Possible values include: 'standard', 'basic' - public ContainerServiceNetworkProfile(string networkPlugin = default(string), string networkPolicy = default(string), string podCidr = default(string), string serviceCidr = default(string), string dnsServiceIP = default(string), string dockerBridgeCidr = default(string), string loadBalancerSku = default(string)) + /// Profile of the cluster load + /// balancer. + public ContainerServiceNetworkProfile(string networkPlugin = default(string), string networkPolicy = default(string), string podCidr = default(string), string serviceCidr = default(string), string dnsServiceIP = default(string), string dockerBridgeCidr = default(string), string loadBalancerSku = default(string), ManagedClusterLoadBalancerProfile loadBalancerProfile = default(ManagedClusterLoadBalancerProfile)) { NetworkPlugin = networkPlugin; NetworkPolicy = networkPolicy; @@ -60,6 +62,7 @@ public ContainerServiceNetworkProfile() DnsServiceIP = dnsServiceIP; DockerBridgeCidr = dockerBridgeCidr; LoadBalancerSku = loadBalancerSku; + LoadBalancerProfile = loadBalancerProfile; CustomInit(); } @@ -119,6 +122,12 @@ public ContainerServiceNetworkProfile() [JsonProperty(PropertyName = "loadBalancerSku")] public string LoadBalancerSku { get; set; } + /// + /// Gets or sets profile of the cluster load balancer. + /// + [JsonProperty(PropertyName = "loadBalancerProfile")] + public ManagedClusterLoadBalancerProfile LoadBalancerProfile { get; set; } + /// /// Validate the object. /// @@ -155,6 +164,10 @@ public virtual void Validate() throw new ValidationException(ValidationRules.Pattern, "DockerBridgeCidr", "^([0-9]{1,3}\\.){3}[0-9]{1,3}(\\/([0-9]|[1-2][0-9]|3[0-2]))?$"); } } + if (LoadBalancerProfile != null) + { + LoadBalancerProfile.Validate(); + } } } } diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedCluster.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedCluster.cs index 7a4181186b42..7fa8fc43785a 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedCluster.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedCluster.cs @@ -69,11 +69,11 @@ public ManagedCluster() /// configuration. /// Profile of Azure Active Directory /// configuration. - /// (PREVIEW) Authorized IP - /// Ranges to kubernetes API server. + /// Access profile for managed + /// cluster API server. /// The identity of the managed cluster, if /// configured. - public ManagedCluster(string location, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), string provisioningState = default(string), int? maxAgentPools = default(int?), string kubernetesVersion = default(string), string dnsPrefix = default(string), string fqdn = default(string), IList agentPoolProfiles = default(IList), ContainerServiceLinuxProfile linuxProfile = default(ContainerServiceLinuxProfile), ManagedClusterWindowsProfile windowsProfile = default(ManagedClusterWindowsProfile), ManagedClusterServicePrincipalProfile servicePrincipalProfile = default(ManagedClusterServicePrincipalProfile), IDictionary addonProfiles = default(IDictionary), string nodeResourceGroup = default(string), bool? enableRBAC = default(bool?), bool? enablePodSecurityPolicy = default(bool?), ContainerServiceNetworkProfile networkProfile = default(ContainerServiceNetworkProfile), ManagedClusterAADProfile aadProfile = default(ManagedClusterAADProfile), IList apiServerAuthorizedIPRanges = default(IList), ManagedClusterIdentity identity = default(ManagedClusterIdentity)) + public ManagedCluster(string location, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), string provisioningState = default(string), int? maxAgentPools = default(int?), string kubernetesVersion = default(string), string dnsPrefix = default(string), string fqdn = default(string), IList agentPoolProfiles = default(IList), ContainerServiceLinuxProfile linuxProfile = default(ContainerServiceLinuxProfile), ManagedClusterWindowsProfile windowsProfile = default(ManagedClusterWindowsProfile), ManagedClusterServicePrincipalProfile servicePrincipalProfile = default(ManagedClusterServicePrincipalProfile), IDictionary addonProfiles = default(IDictionary), string nodeResourceGroup = default(string), bool? enableRBAC = default(bool?), bool? enablePodSecurityPolicy = default(bool?), ContainerServiceNetworkProfile networkProfile = default(ContainerServiceNetworkProfile), ManagedClusterAADProfile aadProfile = default(ManagedClusterAADProfile), ManagedClusterAPIServerAccessProfile apiServerAccessProfile = default(ManagedClusterAPIServerAccessProfile), ManagedClusterIdentity identity = default(ManagedClusterIdentity)) : base(location, id, name, type, tags) { ProvisioningState = provisioningState; @@ -91,7 +91,7 @@ public ManagedCluster() EnablePodSecurityPolicy = enablePodSecurityPolicy; NetworkProfile = networkProfile; AadProfile = aadProfile; - ApiServerAuthorizedIPRanges = apiServerAuthorizedIPRanges; + ApiServerAccessProfile = apiServerAccessProfile; Identity = identity; CustomInit(); } @@ -201,11 +201,10 @@ public ManagedCluster() public ManagedClusterAADProfile AadProfile { get; set; } /// - /// Gets or sets (PREVIEW) Authorized IP Ranges to kubernetes API - /// server. + /// Gets or sets access profile for managed cluster API server. /// - [JsonProperty(PropertyName = "properties.apiServerAuthorizedIPRanges")] - public IList ApiServerAuthorizedIPRanges { get; set; } + [JsonProperty(PropertyName = "properties.apiServerAccessProfile")] + public ManagedClusterAPIServerAccessProfile ApiServerAccessProfile { get; set; } /// /// Gets or sets the identity of the managed cluster, if configured. diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterAPIServerAccessProfile.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterAPIServerAccessProfile.cs new file mode 100644 index 000000000000..a950f33365d1 --- /dev/null +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterAPIServerAccessProfile.cs @@ -0,0 +1,66 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.ContainerService.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Access profile for managed cluster API server. + /// + public partial class ManagedClusterAPIServerAccessProfile + { + /// + /// Initializes a new instance of the + /// ManagedClusterAPIServerAccessProfile class. + /// + public ManagedClusterAPIServerAccessProfile() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// ManagedClusterAPIServerAccessProfile class. + /// + /// Authorized IP Ranges to kubernetes + /// API server. + /// Whether to create the cluster as + /// a private cluster or not. + public ManagedClusterAPIServerAccessProfile(IList authorizedIPRanges = default(IList), bool? enablePrivateCluster = default(bool?)) + { + AuthorizedIPRanges = authorizedIPRanges; + EnablePrivateCluster = enablePrivateCluster; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets authorized IP Ranges to kubernetes API server. + /// + [JsonProperty(PropertyName = "authorizedIPRanges")] + public IList AuthorizedIPRanges { get; set; } + + /// + /// Gets or sets whether to create the cluster as a private cluster or + /// not. + /// + [JsonProperty(PropertyName = "enablePrivateCluster")] + public bool? EnablePrivateCluster { get; set; } + + } +} diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterAgentPoolProfile.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterAgentPoolProfile.cs index 357545428fe3..107edfb3be3d 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterAgentPoolProfile.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterAgentPoolProfile.cs @@ -120,8 +120,18 @@ public ManagedClusterAgentPoolProfile() /// provisioning state, which only appears in the response. /// (PREVIEW) Availability zones for /// nodes. Must use VirtualMachineScaleSets AgentPoolType. - public ManagedClusterAgentPoolProfile(int count, string vmSize, string name, int? osDiskSizeGB = default(int?), string vnetSubnetID = default(string), int? maxPods = default(int?), string osType = default(string), int? maxCount = default(int?), int? minCount = default(int?), bool? enableAutoScaling = default(bool?), string type = default(string), string orchestratorVersion = default(string), string provisioningState = default(string), IList availabilityZones = default(IList)) - : base(count, vmSize, osDiskSizeGB, vnetSubnetID, maxPods, osType, maxCount, minCount, enableAutoScaling, type, orchestratorVersion, provisioningState, availabilityZones) + /// Enable public IP for nodes + /// ScaleSetPriority to be used to + /// specify virtual machine scale set priority. Default to regular. + /// Possible values include: 'Low', 'Regular' + /// ScaleSetEvictionPolicy to be + /// used to specify eviction policy for low priority virtual machine + /// scale set. Default to Delete. Possible values include: 'Delete', + /// 'Deallocate' + /// Taints added to new nodes during node pool + /// create and scale. For example, key=value:NoSchedule. + public ManagedClusterAgentPoolProfile(int count, string vmSize, string name, int? osDiskSizeGB = default(int?), string vnetSubnetID = default(string), int? maxPods = default(int?), string osType = default(string), int? maxCount = default(int?), int? minCount = default(int?), bool? enableAutoScaling = default(bool?), string type = default(string), string orchestratorVersion = default(string), string provisioningState = default(string), IList availabilityZones = default(IList), bool? enableNodePublicIP = default(bool?), string scaleSetPriority = default(string), string scaleSetEvictionPolicy = default(string), IList nodeTaints = default(IList)) + : base(count, vmSize, osDiskSizeGB, vnetSubnetID, maxPods, osType, maxCount, minCount, enableAutoScaling, type, orchestratorVersion, provisioningState, availabilityZones, enableNodePublicIP, scaleSetPriority, scaleSetEvictionPolicy, nodeTaints) { Name = name; CustomInit(); diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterAgentPoolProfileProperties.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterAgentPoolProfileProperties.cs index 6e86f0cc9df6..a99b90999b08 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterAgentPoolProfileProperties.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterAgentPoolProfileProperties.cs @@ -118,7 +118,17 @@ public ManagedClusterAgentPoolProfileProperties() /// provisioning state, which only appears in the response. /// (PREVIEW) Availability zones for /// nodes. Must use VirtualMachineScaleSets AgentPoolType. - public ManagedClusterAgentPoolProfileProperties(int count, string vmSize, int? osDiskSizeGB = default(int?), string vnetSubnetID = default(string), int? maxPods = default(int?), string osType = default(string), int? maxCount = default(int?), int? minCount = default(int?), bool? enableAutoScaling = default(bool?), string type = default(string), string orchestratorVersion = default(string), string provisioningState = default(string), IList availabilityZones = default(IList)) + /// Enable public IP for nodes + /// ScaleSetPriority to be used to + /// specify virtual machine scale set priority. Default to regular. + /// Possible values include: 'Low', 'Regular' + /// ScaleSetEvictionPolicy to be + /// used to specify eviction policy for low priority virtual machine + /// scale set. Default to Delete. Possible values include: 'Delete', + /// 'Deallocate' + /// Taints added to new nodes during node pool + /// create and scale. For example, key=value:NoSchedule. + public ManagedClusterAgentPoolProfileProperties(int count, string vmSize, int? osDiskSizeGB = default(int?), string vnetSubnetID = default(string), int? maxPods = default(int?), string osType = default(string), int? maxCount = default(int?), int? minCount = default(int?), bool? enableAutoScaling = default(bool?), string type = default(string), string orchestratorVersion = default(string), string provisioningState = default(string), IList availabilityZones = default(IList), bool? enableNodePublicIP = default(bool?), string scaleSetPriority = default(string), string scaleSetEvictionPolicy = default(string), IList nodeTaints = default(IList)) { Count = count; VmSize = vmSize; @@ -133,6 +143,10 @@ public ManagedClusterAgentPoolProfileProperties() OrchestratorVersion = orchestratorVersion; ProvisioningState = provisioningState; AvailabilityZones = availabilityZones; + EnableNodePublicIP = enableNodePublicIP; + ScaleSetPriority = scaleSetPriority; + ScaleSetEvictionPolicy = scaleSetEvictionPolicy; + NodeTaints = nodeTaints; CustomInit(); } @@ -285,6 +299,35 @@ public ManagedClusterAgentPoolProfileProperties() [JsonProperty(PropertyName = "availabilityZones")] public IList AvailabilityZones { get; set; } + /// + /// Gets or sets enable public IP for nodes + /// + [JsonProperty(PropertyName = "enableNodePublicIP")] + public bool? EnableNodePublicIP { get; set; } + + /// + /// Gets or sets scaleSetPriority to be used to specify virtual machine + /// scale set priority. Default to regular. Possible values include: + /// 'Low', 'Regular' + /// + [JsonProperty(PropertyName = "scaleSetPriority")] + public string ScaleSetPriority { get; set; } + + /// + /// Gets or sets scaleSetEvictionPolicy to be used to specify eviction + /// policy for low priority virtual machine scale set. Default to + /// Delete. Possible values include: 'Delete', 'Deallocate' + /// + [JsonProperty(PropertyName = "scaleSetEvictionPolicy")] + public string ScaleSetEvictionPolicy { get; set; } + + /// + /// Gets or sets taints added to new nodes during node pool create and + /// scale. For example, key=value:NoSchedule. + /// + [JsonProperty(PropertyName = "nodeTaints")] + public IList NodeTaints { get; set; } + /// /// Validate the object. /// diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterLoadBalancerProfile.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterLoadBalancerProfile.cs new file mode 100644 index 000000000000..2c9728a8cd0d --- /dev/null +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterLoadBalancerProfile.cs @@ -0,0 +1,100 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.ContainerService.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Profile of the managed cluster load balancer + /// + public partial class ManagedClusterLoadBalancerProfile + { + /// + /// Initializes a new instance of the ManagedClusterLoadBalancerProfile + /// class. + /// + public ManagedClusterLoadBalancerProfile() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ManagedClusterLoadBalancerProfile + /// class. + /// + /// Desired managed outbound IPs for + /// the cluster load balancer. + /// Desired outbound IP Prefix + /// resources for the cluster load balancer. + /// Desired outbound IP resources for the + /// cluster load balancer. + /// The effective outbound IP + /// resources of the cluster load balancer. + public ManagedClusterLoadBalancerProfile(ManagedClusterLoadBalancerProfileManagedOutboundIPs managedOutboundIPs = default(ManagedClusterLoadBalancerProfileManagedOutboundIPs), ManagedClusterLoadBalancerProfileOutboundIPPrefixes outboundIPPrefixes = default(ManagedClusterLoadBalancerProfileOutboundIPPrefixes), ManagedClusterLoadBalancerProfileOutboundIPs outboundIPs = default(ManagedClusterLoadBalancerProfileOutboundIPs), IList effectiveOutboundIPs = default(IList)) + { + ManagedOutboundIPs = managedOutboundIPs; + OutboundIPPrefixes = outboundIPPrefixes; + OutboundIPs = outboundIPs; + EffectiveOutboundIPs = effectiveOutboundIPs; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets desired managed outbound IPs for the cluster load + /// balancer. + /// + [JsonProperty(PropertyName = "managedOutboundIPs")] + public ManagedClusterLoadBalancerProfileManagedOutboundIPs ManagedOutboundIPs { get; set; } + + /// + /// Gets or sets desired outbound IP Prefix resources for the cluster + /// load balancer. + /// + [JsonProperty(PropertyName = "outboundIPPrefixes")] + public ManagedClusterLoadBalancerProfileOutboundIPPrefixes OutboundIPPrefixes { get; set; } + + /// + /// Gets or sets desired outbound IP resources for the cluster load + /// balancer. + /// + [JsonProperty(PropertyName = "outboundIPs")] + public ManagedClusterLoadBalancerProfileOutboundIPs OutboundIPs { get; set; } + + /// + /// Gets or sets the effective outbound IP resources of the cluster + /// load balancer. + /// + [JsonProperty(PropertyName = "effectiveOutboundIPs")] + public IList EffectiveOutboundIPs { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (ManagedOutboundIPs != null) + { + ManagedOutboundIPs.Validate(); + } + } + } +} diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterLoadBalancerProfileManagedOutboundIPs.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterLoadBalancerProfileManagedOutboundIPs.cs new file mode 100644 index 000000000000..d72f7f793e37 --- /dev/null +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterLoadBalancerProfileManagedOutboundIPs.cs @@ -0,0 +1,75 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.ContainerService.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Desired managed outbound IPs for the cluster load balancer. + /// + public partial class ManagedClusterLoadBalancerProfileManagedOutboundIPs + { + /// + /// Initializes a new instance of the + /// ManagedClusterLoadBalancerProfileManagedOutboundIPs class. + /// + public ManagedClusterLoadBalancerProfileManagedOutboundIPs() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// ManagedClusterLoadBalancerProfileManagedOutboundIPs class. + /// + /// Desired number of outbound IP created/managed + /// by Azure for the cluster load balancer. Allowed values must be in + /// the range of 1 to 100 (inclusive). The default value is 1. + public ManagedClusterLoadBalancerProfileManagedOutboundIPs(int? count = default(int?)) + { + Count = count; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets desired number of outbound IP created/managed by Azure + /// for the cluster load balancer. Allowed values must be in the range + /// of 1 to 100 (inclusive). The default value is 1. + /// + [JsonProperty(PropertyName = "count")] + public int? Count { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Count > 100) + { + throw new ValidationException(ValidationRules.InclusiveMaximum, "Count", 100); + } + if (Count < 1) + { + throw new ValidationException(ValidationRules.InclusiveMinimum, "Count", 1); + } + } + } +} diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterLoadBalancerProfileOutboundIPPrefixes.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterLoadBalancerProfileOutboundIPPrefixes.cs new file mode 100644 index 000000000000..e4220de6974b --- /dev/null +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterLoadBalancerProfileOutboundIPPrefixes.cs @@ -0,0 +1,56 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.ContainerService.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Desired outbound IP Prefix resources for the cluster load balancer. + /// + public partial class ManagedClusterLoadBalancerProfileOutboundIPPrefixes + { + /// + /// Initializes a new instance of the + /// ManagedClusterLoadBalancerProfileOutboundIPPrefixes class. + /// + public ManagedClusterLoadBalancerProfileOutboundIPPrefixes() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// ManagedClusterLoadBalancerProfileOutboundIPPrefixes class. + /// + /// A list of public IP prefix + /// resources. + public ManagedClusterLoadBalancerProfileOutboundIPPrefixes(IList publicIPPrefixes = default(IList)) + { + PublicIPPrefixes = publicIPPrefixes; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets a list of public IP prefix resources. + /// + [JsonProperty(PropertyName = "publicIPPrefixes")] + public IList PublicIPPrefixes { get; set; } + + } +} diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterLoadBalancerProfileOutboundIPs.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterLoadBalancerProfileOutboundIPs.cs new file mode 100644 index 000000000000..8c6863afa7cb --- /dev/null +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterLoadBalancerProfileOutboundIPs.cs @@ -0,0 +1,55 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.ContainerService.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Desired outbound IP resources for the cluster load balancer. + /// + public partial class ManagedClusterLoadBalancerProfileOutboundIPs + { + /// + /// Initializes a new instance of the + /// ManagedClusterLoadBalancerProfileOutboundIPs class. + /// + public ManagedClusterLoadBalancerProfileOutboundIPs() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// ManagedClusterLoadBalancerProfileOutboundIPs class. + /// + /// A list of public IP resources. + public ManagedClusterLoadBalancerProfileOutboundIPs(IList publicIPs = default(IList)) + { + PublicIPs = publicIPs; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets a list of public IP resources. + /// + [JsonProperty(PropertyName = "publicIPs")] + public IList PublicIPs { get; set; } + + } +} diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ResourceReference.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ResourceReference.cs new file mode 100644 index 000000000000..d272c94add12 --- /dev/null +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ResourceReference.cs @@ -0,0 +1,51 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.ContainerService.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// A reference to an Azure resource. + /// + public partial class ResourceReference + { + /// + /// Initializes a new instance of the ResourceReference class. + /// + public ResourceReference() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ResourceReference class. + /// + /// The fully qualified Azure resource id. + public ResourceReference(string id = default(string)) + { + Id = id; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the fully qualified Azure resource id. + /// + [JsonProperty(PropertyName = "id")] + public string Id { get; set; } + + } +} diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ScaleSetEvictionPolicy.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ScaleSetEvictionPolicy.cs new file mode 100644 index 000000000000..25bd3db49c44 --- /dev/null +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ScaleSetEvictionPolicy.cs @@ -0,0 +1,22 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.ContainerService.Models +{ + + /// + /// Defines values for ScaleSetEvictionPolicy. + /// + public static class ScaleSetEvictionPolicy + { + public const string Delete = "Delete"; + public const string Deallocate = "Deallocate"; + } +} diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ScaleSetPriority.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ScaleSetPriority.cs new file mode 100644 index 000000000000..5edcae14e830 --- /dev/null +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ScaleSetPriority.cs @@ -0,0 +1,22 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.ContainerService.Models +{ + + /// + /// Defines values for ScaleSetPriority. + /// + public static class ScaleSetPriority + { + public const string Low = "Low"; + public const string Regular = "Regular"; + } +} diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Operations.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Operations.cs index ec90823197fa..33c25ec737fe 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Operations.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Operations.cs @@ -70,7 +70,7 @@ internal Operations(ContainerServiceClient client) /// public async Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { - string apiVersion = "2019-04-01"; + string apiVersion = "2019-08-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/SdkInfo_ContainerServiceClient.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/SdkInfo_ContainerServiceClient.cs index e35757d72020..2330060e78a7 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/SdkInfo_ContainerServiceClient.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/SdkInfo_ContainerServiceClient.cs @@ -19,12 +19,12 @@ public static IEnumerable> ApiInfo_ContainerServic { return new Tuple[] { - new Tuple("ContainerService", "AgentPools", "2019-04-01"), + new Tuple("ContainerService", "AgentPools", "2019-08-01"), new Tuple("ContainerService", "ContainerServices", "2017-07-01"), - new Tuple("ContainerService", "ContainerServices", "2019-04-01"), - new Tuple("ContainerService", "ManagedClusters", "2019-04-01"), + new Tuple("ContainerService", "ContainerServices", "2019-08-01"), + new Tuple("ContainerService", "ManagedClusters", "2019-08-01"), new Tuple("ContainerService", "OpenShiftManagedClusters", "2019-04-30"), - new Tuple("ContainerService", "Operations", "2019-04-01"), + new Tuple("ContainerService", "Operations", "2019-08-01"), }.AsEnumerable(); } } From d86a54e1fafc5bec8a5e89e6f83ced4ffecb75ed Mon Sep 17 00:00:00 2001 From: SDK Automation Date: Wed, 4 Sep 2019 18:05:18 +0000 Subject: [PATCH 12/12] Generated from 3658b509eba17c55f99d9e22c28e55cb88e33ac0 Rename errorResponse to align with other RPs --- .../src/Generated/FileServicesOperations.cs | 797 ++++++++ .../FileServicesOperationsExtensions.cs | 179 ++ .../src/Generated/FileSharesOperations.cs | 1597 +++++++++++++++++ .../FileSharesOperationsExtensions.cs | 394 ++++ .../src/Generated/IFileServicesOperations.cs | 119 ++ .../src/Generated/IFileSharesOperations.cs | 244 +++ ...{ISKUsOperations.cs => ISkusOperations.cs} | 0 .../src/Generated/IStorageManagementClient.cs | 10 + .../src/Generated/Models/FileServiceItems.cs | 50 + .../Generated/Models/FileServiceProperties.cs | 68 + .../src/Generated/Models/FileShare.cs | 104 ++ .../src/Generated/Models/FileShareItem.cs | 103 ++ .../Generated/Models/{IpRule.cs => IPRule.cs} | 0 .../{signedResource.cs => SignedResource.cs} | 0 .../SdkInfo_StorageManagementClient.cs | 13 +- .../{SKUsOperations.cs => SkusOperations.cs} | 0 ...ensions.cs => SkusOperationsExtensions.cs} | 0 .../src/Generated/StorageManagementClient.cs | 12 + 18 files changed, 3679 insertions(+), 11 deletions(-) create mode 100644 sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/FileServicesOperations.cs create mode 100644 sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/FileServicesOperationsExtensions.cs create mode 100644 sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/FileSharesOperations.cs create mode 100644 sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/FileSharesOperationsExtensions.cs create mode 100644 sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/IFileServicesOperations.cs create mode 100644 sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/IFileSharesOperations.cs rename sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/{ISKUsOperations.cs => ISkusOperations.cs} (100%) create mode 100644 sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/FileServiceItems.cs create mode 100644 sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/FileServiceProperties.cs create mode 100644 sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/FileShare.cs create mode 100644 sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/FileShareItem.cs rename sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/{IpRule.cs => IPRule.cs} (100%) rename sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/{signedResource.cs => SignedResource.cs} (100%) rename sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/{SKUsOperations.cs => SkusOperations.cs} (100%) rename sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/{SKUsOperationsExtensions.cs => SkusOperationsExtensions.cs} (100%) diff --git a/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/FileServicesOperations.cs b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/FileServicesOperations.cs new file mode 100644 index 000000000000..604e36859ce9 --- /dev/null +++ b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/FileServicesOperations.cs @@ -0,0 +1,797 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Storage +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + using System.Net; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + + /// + /// FileServicesOperations operations. + /// + internal partial class FileServicesOperations : IServiceOperations, IFileServicesOperations + { + /// + /// Initializes a new instance of the FileServicesOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal FileServicesOperations(StorageManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the StorageManagementClient + /// + public StorageManagementClient Client { get; private set; } + + /// + /// List all file services in storage accounts + /// + /// + /// The name of the resource group within the user's subscription. The name is + /// case insensitive. + /// + /// + /// The name of the storage account within the specified resource group. + /// Storage account names must be between 3 and 24 characters in length and use + /// numbers and lower-case letters only. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ListWithHttpMessagesAsync(string resourceGroupName, string accountName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (accountName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "accountName"); + } + if (accountName != null) + { + if (accountName.Length > 24) + { + throw new ValidationException(ValidationRules.MaxLength, "accountName", 24); + } + if (accountName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "accountName", 3); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ApiVersion != null) + { + if (Client.ApiVersion.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); + } + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (Client.SubscriptionId != null) + { + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("accountName", accountName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/fileServices").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Sets the properties of file services in storage accounts, including CORS + /// (Cross-Origin Resource Sharing) rules. + /// + /// + /// The name of the resource group within the user's subscription. The name is + /// case insensitive. + /// + /// + /// The name of the storage account within the specified resource group. + /// Storage account names must be between 3 and 24 characters in length and use + /// numbers and lower-case letters only. + /// + /// + /// Specifies CORS rules for the File service. You can include up to five + /// CorsRule elements in the request. If no CorsRule elements are included in + /// the request body, all CORS rules will be deleted, and CORS will be disabled + /// for the File service. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> SetServicePropertiesWithHttpMessagesAsync(string resourceGroupName, string accountName, CorsRules cors = default(CorsRules), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (accountName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "accountName"); + } + if (accountName != null) + { + if (accountName.Length > 24) + { + throw new ValidationException(ValidationRules.MaxLength, "accountName", 24); + } + if (accountName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "accountName", 3); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ApiVersion != null) + { + if (Client.ApiVersion.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); + } + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (Client.SubscriptionId != null) + { + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } + string fileServicesName = "default"; + FileServiceProperties parameters = new FileServiceProperties(); + if (cors != null) + { + parameters.Cors = cors; + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("accountName", accountName); + tracingParameters.Add("fileServicesName", fileServicesName); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "SetServiceProperties", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/fileServices/{FileServicesName}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{FileServicesName}", System.Uri.EscapeDataString(fileServicesName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(parameters != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Gets the properties of file services in storage accounts, including CORS + /// (Cross-Origin Resource Sharing) rules. + /// + /// + /// The name of the resource group within the user's subscription. The name is + /// case insensitive. + /// + /// + /// The name of the storage account within the specified resource group. + /// Storage account names must be between 3 and 24 characters in length and use + /// numbers and lower-case letters only. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetServicePropertiesWithHttpMessagesAsync(string resourceGroupName, string accountName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (accountName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "accountName"); + } + if (accountName != null) + { + if (accountName.Length > 24) + { + throw new ValidationException(ValidationRules.MaxLength, "accountName", 24); + } + if (accountName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "accountName", 3); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ApiVersion != null) + { + if (Client.ApiVersion.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); + } + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (Client.SubscriptionId != null) + { + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } + string fileServicesName = "default"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("accountName", accountName); + tracingParameters.Add("fileServicesName", fileServicesName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "GetServiceProperties", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/fileServices/{FileServicesName}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{FileServicesName}", System.Uri.EscapeDataString(fileServicesName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + } +} diff --git a/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/FileServicesOperationsExtensions.cs b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/FileServicesOperationsExtensions.cs new file mode 100644 index 000000000000..ed383c8eccbf --- /dev/null +++ b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/FileServicesOperationsExtensions.cs @@ -0,0 +1,179 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Storage +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for FileServicesOperations. + /// + public static partial class FileServicesOperationsExtensions + { + /// + /// List all file services in storage accounts + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group within the user's subscription. The name is + /// case insensitive. + /// + /// + /// The name of the storage account within the specified resource group. + /// Storage account names must be between 3 and 24 characters in length and use + /// numbers and lower-case letters only. + /// + public static FileServiceItems List(this IFileServicesOperations operations, string resourceGroupName, string accountName) + { + return operations.ListAsync(resourceGroupName, accountName).GetAwaiter().GetResult(); + } + + /// + /// List all file services in storage accounts + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group within the user's subscription. The name is + /// case insensitive. + /// + /// + /// The name of the storage account within the specified resource group. + /// Storage account names must be between 3 and 24 characters in length and use + /// numbers and lower-case letters only. + /// + /// + /// The cancellation token. + /// + public static async Task ListAsync(this IFileServicesOperations operations, string resourceGroupName, string accountName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, accountName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Sets the properties of file services in storage accounts, including CORS + /// (Cross-Origin Resource Sharing) rules. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group within the user's subscription. The name is + /// case insensitive. + /// + /// + /// The name of the storage account within the specified resource group. + /// Storage account names must be between 3 and 24 characters in length and use + /// numbers and lower-case letters only. + /// + /// + /// Specifies CORS rules for the File service. You can include up to five + /// CorsRule elements in the request. If no CorsRule elements are included in + /// the request body, all CORS rules will be deleted, and CORS will be disabled + /// for the File service. + /// + public static FileServiceProperties SetServiceProperties(this IFileServicesOperations operations, string resourceGroupName, string accountName, CorsRules cors = default(CorsRules)) + { + return operations.SetServicePropertiesAsync(resourceGroupName, accountName, cors).GetAwaiter().GetResult(); + } + + /// + /// Sets the properties of file services in storage accounts, including CORS + /// (Cross-Origin Resource Sharing) rules. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group within the user's subscription. The name is + /// case insensitive. + /// + /// + /// The name of the storage account within the specified resource group. + /// Storage account names must be between 3 and 24 characters in length and use + /// numbers and lower-case letters only. + /// + /// + /// Specifies CORS rules for the File service. You can include up to five + /// CorsRule elements in the request. If no CorsRule elements are included in + /// the request body, all CORS rules will be deleted, and CORS will be disabled + /// for the File service. + /// + /// + /// The cancellation token. + /// + public static async Task SetServicePropertiesAsync(this IFileServicesOperations operations, string resourceGroupName, string accountName, CorsRules cors = default(CorsRules), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.SetServicePropertiesWithHttpMessagesAsync(resourceGroupName, accountName, cors, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets the properties of file services in storage accounts, including CORS + /// (Cross-Origin Resource Sharing) rules. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group within the user's subscription. The name is + /// case insensitive. + /// + /// + /// The name of the storage account within the specified resource group. + /// Storage account names must be between 3 and 24 characters in length and use + /// numbers and lower-case letters only. + /// + public static FileServiceProperties GetServiceProperties(this IFileServicesOperations operations, string resourceGroupName, string accountName) + { + return operations.GetServicePropertiesAsync(resourceGroupName, accountName).GetAwaiter().GetResult(); + } + + /// + /// Gets the properties of file services in storage accounts, including CORS + /// (Cross-Origin Resource Sharing) rules. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group within the user's subscription. The name is + /// case insensitive. + /// + /// + /// The name of the storage account within the specified resource group. + /// Storage account names must be between 3 and 24 characters in length and use + /// numbers and lower-case letters only. + /// + /// + /// The cancellation token. + /// + public static async Task GetServicePropertiesAsync(this IFileServicesOperations operations, string resourceGroupName, string accountName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetServicePropertiesWithHttpMessagesAsync(resourceGroupName, accountName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/FileSharesOperations.cs b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/FileSharesOperations.cs new file mode 100644 index 000000000000..b84e593bbdbc --- /dev/null +++ b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/FileSharesOperations.cs @@ -0,0 +1,1597 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Storage +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + using System.Net; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + + /// + /// FileSharesOperations operations. + /// + internal partial class FileSharesOperations : IServiceOperations, IFileSharesOperations + { + /// + /// Initializes a new instance of the FileSharesOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal FileSharesOperations(StorageManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the StorageManagementClient + /// + public StorageManagementClient Client { get; private set; } + + /// + /// Lists all shares. + /// + /// + /// The name of the resource group within the user's subscription. The name is + /// case insensitive. + /// + /// + /// The name of the storage account within the specified resource group. + /// Storage account names must be between 3 and 24 characters in length and use + /// numbers and lower-case letters only. + /// + /// + /// Optional. Continuation token for the list operation. + /// + /// + /// Optional. Specified maximum number of shares that can be included in the + /// list. + /// + /// + /// Optional. When specified, only share names starting with the filter will be + /// listed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task>> ListWithHttpMessagesAsync(string resourceGroupName, string accountName, string skipToken = default(string), string maxpagesize = default(string), string filter = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (accountName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "accountName"); + } + if (accountName != null) + { + if (accountName.Length > 24) + { + throw new ValidationException(ValidationRules.MaxLength, "accountName", 24); + } + if (accountName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "accountName", 3); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ApiVersion != null) + { + if (Client.ApiVersion.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); + } + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (Client.SubscriptionId != null) + { + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("accountName", accountName); + tracingParameters.Add("skipToken", skipToken); + tracingParameters.Add("maxpagesize", maxpagesize); + tracingParameters.Add("filter", filter); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/fileServices/default/shares").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (skipToken != null) + { + _queryParameters.Add(string.Format("$skipToken={0}", System.Uri.EscapeDataString(skipToken))); + } + if (maxpagesize != null) + { + _queryParameters.Add(string.Format("$maxpagesize={0}", System.Uri.EscapeDataString(maxpagesize))); + } + if (filter != null) + { + _queryParameters.Add(string.Format("$filter={0}", System.Uri.EscapeDataString(filter))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Creates a new share under the specified account as described by request + /// body. The share resource includes metadata and properties for that share. + /// It does not include a list of the files contained by the share. + /// + /// + /// The name of the resource group within the user's subscription. The name is + /// case insensitive. + /// + /// + /// The name of the storage account within the specified resource group. + /// Storage account names must be between 3 and 24 characters in length and use + /// numbers and lower-case letters only. + /// + /// + /// The name of the file share within the specified storage account. File share + /// names must be between 3 and 63 characters in length and use numbers, + /// lower-case letters and dash (-) only. Every dash (-) character must be + /// immediately preceded and followed by a letter or number. + /// + /// + /// A name-value pair to associate with the share as metadata. + /// + /// + /// The maximum size of the share, in gigabytes. Must be greater than 0, and + /// less than or equal to 5TB (5120). + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> CreateWithHttpMessagesAsync(string resourceGroupName, string accountName, string shareName, IDictionary metadata = default(IDictionary), int? shareQuota = default(int?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (accountName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "accountName"); + } + if (accountName != null) + { + if (accountName.Length > 24) + { + throw new ValidationException(ValidationRules.MaxLength, "accountName", 24); + } + if (accountName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "accountName", 3); + } + } + if (shareName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "shareName"); + } + if (shareName != null) + { + if (shareName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "shareName", 63); + } + if (shareName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "shareName", 3); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ApiVersion != null) + { + if (Client.ApiVersion.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); + } + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (Client.SubscriptionId != null) + { + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } + if (shareQuota > 5120) + { + throw new ValidationException(ValidationRules.InclusiveMaximum, "shareQuota", 5120); + } + if (shareQuota < 1) + { + throw new ValidationException(ValidationRules.InclusiveMinimum, "shareQuota", 1); + } + FileShare fileShare = new FileShare(); + if (metadata != null || shareQuota != null) + { + fileShare.Metadata = metadata; + fileShare.ShareQuota = shareQuota; + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("accountName", accountName); + tracingParameters.Add("shareName", shareName); + tracingParameters.Add("fileShare", fileShare); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Create", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/fileServices/default/shares/{shareName}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName)); + _url = _url.Replace("{shareName}", System.Uri.EscapeDataString(shareName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(fileShare != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(fileShare, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 201) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + // Deserialize Response + if ((int)_statusCode == 201) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Updates share properties as specified in request body. Properties not + /// mentioned in the request will not be changed. Update fails if the specified + /// share does not already exist. + /// + /// + /// The name of the resource group within the user's subscription. The name is + /// case insensitive. + /// + /// + /// The name of the storage account within the specified resource group. + /// Storage account names must be between 3 and 24 characters in length and use + /// numbers and lower-case letters only. + /// + /// + /// The name of the file share within the specified storage account. File share + /// names must be between 3 and 63 characters in length and use numbers, + /// lower-case letters and dash (-) only. Every dash (-) character must be + /// immediately preceded and followed by a letter or number. + /// + /// + /// A name-value pair to associate with the share as metadata. + /// + /// + /// The maximum size of the share, in gigabytes. Must be greater than 0, and + /// less than or equal to 5TB (5120). + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string accountName, string shareName, IDictionary metadata = default(IDictionary), int? shareQuota = default(int?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (accountName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "accountName"); + } + if (accountName != null) + { + if (accountName.Length > 24) + { + throw new ValidationException(ValidationRules.MaxLength, "accountName", 24); + } + if (accountName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "accountName", 3); + } + } + if (shareName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "shareName"); + } + if (shareName != null) + { + if (shareName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "shareName", 63); + } + if (shareName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "shareName", 3); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ApiVersion != null) + { + if (Client.ApiVersion.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); + } + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (Client.SubscriptionId != null) + { + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } + if (shareQuota > 5120) + { + throw new ValidationException(ValidationRules.InclusiveMaximum, "shareQuota", 5120); + } + if (shareQuota < 1) + { + throw new ValidationException(ValidationRules.InclusiveMinimum, "shareQuota", 1); + } + FileShare fileShare = new FileShare(); + if (metadata != null || shareQuota != null) + { + fileShare.Metadata = metadata; + fileShare.ShareQuota = shareQuota; + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("accountName", accountName); + tracingParameters.Add("shareName", shareName); + tracingParameters.Add("fileShare", fileShare); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Update", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/fileServices/default/shares/{shareName}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName)); + _url = _url.Replace("{shareName}", System.Uri.EscapeDataString(shareName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(fileShare != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(fileShare, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Gets properties of a specified share. + /// + /// + /// The name of the resource group within the user's subscription. The name is + /// case insensitive. + /// + /// + /// The name of the storage account within the specified resource group. + /// Storage account names must be between 3 and 24 characters in length and use + /// numbers and lower-case letters only. + /// + /// + /// The name of the file share within the specified storage account. File share + /// names must be between 3 and 63 characters in length and use numbers, + /// lower-case letters and dash (-) only. Every dash (-) character must be + /// immediately preceded and followed by a letter or number. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string accountName, string shareName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (accountName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "accountName"); + } + if (accountName != null) + { + if (accountName.Length > 24) + { + throw new ValidationException(ValidationRules.MaxLength, "accountName", 24); + } + if (accountName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "accountName", 3); + } + } + if (shareName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "shareName"); + } + if (shareName != null) + { + if (shareName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "shareName", 63); + } + if (shareName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "shareName", 3); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ApiVersion != null) + { + if (Client.ApiVersion.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); + } + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (Client.SubscriptionId != null) + { + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("accountName", accountName); + tracingParameters.Add("shareName", shareName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/fileServices/default/shares/{shareName}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName)); + _url = _url.Replace("{shareName}", System.Uri.EscapeDataString(shareName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Deletes specified share under its account. + /// + /// + /// The name of the resource group within the user's subscription. The name is + /// case insensitive. + /// + /// + /// The name of the storage account within the specified resource group. + /// Storage account names must be between 3 and 24 characters in length and use + /// numbers and lower-case letters only. + /// + /// + /// The name of the file share within the specified storage account. File share + /// names must be between 3 and 63 characters in length and use numbers, + /// lower-case letters and dash (-) only. Every dash (-) character must be + /// immediately preceded and followed by a letter or number. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string accountName, string shareName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (accountName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "accountName"); + } + if (accountName != null) + { + if (accountName.Length > 24) + { + throw new ValidationException(ValidationRules.MaxLength, "accountName", 24); + } + if (accountName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "accountName", 3); + } + } + if (shareName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "shareName"); + } + if (shareName != null) + { + if (shareName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "shareName", 63); + } + if (shareName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "shareName", 3); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ApiVersion != null) + { + if (Client.ApiVersion.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); + } + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (Client.SubscriptionId != null) + { + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("accountName", accountName); + tracingParameters.Add("shareName", shareName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Delete", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/fileServices/default/shares/{shareName}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName)); + _url = _url.Replace("{shareName}", System.Uri.EscapeDataString(shareName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 204) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Lists all shares. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (nextPageLink == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("nextPageLink", nextPageLink); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + List _queryParameters = new List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + } +} diff --git a/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/FileSharesOperationsExtensions.cs b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/FileSharesOperationsExtensions.cs new file mode 100644 index 000000000000..a0b40883752a --- /dev/null +++ b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/FileSharesOperationsExtensions.cs @@ -0,0 +1,394 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Storage +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for FileSharesOperations. + /// + public static partial class FileSharesOperationsExtensions + { + /// + /// Lists all shares. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group within the user's subscription. The name is + /// case insensitive. + /// + /// + /// The name of the storage account within the specified resource group. + /// Storage account names must be between 3 and 24 characters in length and use + /// numbers and lower-case letters only. + /// + /// + /// Optional. Continuation token for the list operation. + /// + /// + /// Optional. Specified maximum number of shares that can be included in the + /// list. + /// + /// + /// Optional. When specified, only share names starting with the filter will be + /// listed. + /// + public static IPage List(this IFileSharesOperations operations, string resourceGroupName, string accountName, string skipToken = default(string), string maxpagesize = default(string), string filter = default(string)) + { + return operations.ListAsync(resourceGroupName, accountName, skipToken, maxpagesize, filter).GetAwaiter().GetResult(); + } + + /// + /// Lists all shares. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group within the user's subscription. The name is + /// case insensitive. + /// + /// + /// The name of the storage account within the specified resource group. + /// Storage account names must be between 3 and 24 characters in length and use + /// numbers and lower-case letters only. + /// + /// + /// Optional. Continuation token for the list operation. + /// + /// + /// Optional. Specified maximum number of shares that can be included in the + /// list. + /// + /// + /// Optional. When specified, only share names starting with the filter will be + /// listed. + /// + /// + /// The cancellation token. + /// + public static async Task> ListAsync(this IFileSharesOperations operations, string resourceGroupName, string accountName, string skipToken = default(string), string maxpagesize = default(string), string filter = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, accountName, skipToken, maxpagesize, filter, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Creates a new share under the specified account as described by request + /// body. The share resource includes metadata and properties for that share. + /// It does not include a list of the files contained by the share. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group within the user's subscription. The name is + /// case insensitive. + /// + /// + /// The name of the storage account within the specified resource group. + /// Storage account names must be between 3 and 24 characters in length and use + /// numbers and lower-case letters only. + /// + /// + /// The name of the file share within the specified storage account. File share + /// names must be between 3 and 63 characters in length and use numbers, + /// lower-case letters and dash (-) only. Every dash (-) character must be + /// immediately preceded and followed by a letter or number. + /// + /// + /// A name-value pair to associate with the share as metadata. + /// + /// + /// The maximum size of the share, in gigabytes. Must be greater than 0, and + /// less than or equal to 5TB (5120). + /// + public static FileShare Create(this IFileSharesOperations operations, string resourceGroupName, string accountName, string shareName, IDictionary metadata = default(IDictionary), int? shareQuota = default(int?)) + { + return operations.CreateAsync(resourceGroupName, accountName, shareName, metadata, shareQuota).GetAwaiter().GetResult(); + } + + /// + /// Creates a new share under the specified account as described by request + /// body. The share resource includes metadata and properties for that share. + /// It does not include a list of the files contained by the share. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group within the user's subscription. The name is + /// case insensitive. + /// + /// + /// The name of the storage account within the specified resource group. + /// Storage account names must be between 3 and 24 characters in length and use + /// numbers and lower-case letters only. + /// + /// + /// The name of the file share within the specified storage account. File share + /// names must be between 3 and 63 characters in length and use numbers, + /// lower-case letters and dash (-) only. Every dash (-) character must be + /// immediately preceded and followed by a letter or number. + /// + /// + /// A name-value pair to associate with the share as metadata. + /// + /// + /// The maximum size of the share, in gigabytes. Must be greater than 0, and + /// less than or equal to 5TB (5120). + /// + /// + /// The cancellation token. + /// + public static async Task CreateAsync(this IFileSharesOperations operations, string resourceGroupName, string accountName, string shareName, IDictionary metadata = default(IDictionary), int? shareQuota = default(int?), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateWithHttpMessagesAsync(resourceGroupName, accountName, shareName, metadata, shareQuota, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Updates share properties as specified in request body. Properties not + /// mentioned in the request will not be changed. Update fails if the specified + /// share does not already exist. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group within the user's subscription. The name is + /// case insensitive. + /// + /// + /// The name of the storage account within the specified resource group. + /// Storage account names must be between 3 and 24 characters in length and use + /// numbers and lower-case letters only. + /// + /// + /// The name of the file share within the specified storage account. File share + /// names must be between 3 and 63 characters in length and use numbers, + /// lower-case letters and dash (-) only. Every dash (-) character must be + /// immediately preceded and followed by a letter or number. + /// + /// + /// A name-value pair to associate with the share as metadata. + /// + /// + /// The maximum size of the share, in gigabytes. Must be greater than 0, and + /// less than or equal to 5TB (5120). + /// + public static FileShare Update(this IFileSharesOperations operations, string resourceGroupName, string accountName, string shareName, IDictionary metadata = default(IDictionary), int? shareQuota = default(int?)) + { + return operations.UpdateAsync(resourceGroupName, accountName, shareName, metadata, shareQuota).GetAwaiter().GetResult(); + } + + /// + /// Updates share properties as specified in request body. Properties not + /// mentioned in the request will not be changed. Update fails if the specified + /// share does not already exist. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group within the user's subscription. The name is + /// case insensitive. + /// + /// + /// The name of the storage account within the specified resource group. + /// Storage account names must be between 3 and 24 characters in length and use + /// numbers and lower-case letters only. + /// + /// + /// The name of the file share within the specified storage account. File share + /// names must be between 3 and 63 characters in length and use numbers, + /// lower-case letters and dash (-) only. Every dash (-) character must be + /// immediately preceded and followed by a letter or number. + /// + /// + /// A name-value pair to associate with the share as metadata. + /// + /// + /// The maximum size of the share, in gigabytes. Must be greater than 0, and + /// less than or equal to 5TB (5120). + /// + /// + /// The cancellation token. + /// + public static async Task UpdateAsync(this IFileSharesOperations operations, string resourceGroupName, string accountName, string shareName, IDictionary metadata = default(IDictionary), int? shareQuota = default(int?), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, accountName, shareName, metadata, shareQuota, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets properties of a specified share. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group within the user's subscription. The name is + /// case insensitive. + /// + /// + /// The name of the storage account within the specified resource group. + /// Storage account names must be between 3 and 24 characters in length and use + /// numbers and lower-case letters only. + /// + /// + /// The name of the file share within the specified storage account. File share + /// names must be between 3 and 63 characters in length and use numbers, + /// lower-case letters and dash (-) only. Every dash (-) character must be + /// immediately preceded and followed by a letter or number. + /// + public static FileShare Get(this IFileSharesOperations operations, string resourceGroupName, string accountName, string shareName) + { + return operations.GetAsync(resourceGroupName, accountName, shareName).GetAwaiter().GetResult(); + } + + /// + /// Gets properties of a specified share. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group within the user's subscription. The name is + /// case insensitive. + /// + /// + /// The name of the storage account within the specified resource group. + /// Storage account names must be between 3 and 24 characters in length and use + /// numbers and lower-case letters only. + /// + /// + /// The name of the file share within the specified storage account. File share + /// names must be between 3 and 63 characters in length and use numbers, + /// lower-case letters and dash (-) only. Every dash (-) character must be + /// immediately preceded and followed by a letter or number. + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this IFileSharesOperations operations, string resourceGroupName, string accountName, string shareName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, accountName, shareName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Deletes specified share under its account. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group within the user's subscription. The name is + /// case insensitive. + /// + /// + /// The name of the storage account within the specified resource group. + /// Storage account names must be between 3 and 24 characters in length and use + /// numbers and lower-case letters only. + /// + /// + /// The name of the file share within the specified storage account. File share + /// names must be between 3 and 63 characters in length and use numbers, + /// lower-case letters and dash (-) only. Every dash (-) character must be + /// immediately preceded and followed by a letter or number. + /// + public static void Delete(this IFileSharesOperations operations, string resourceGroupName, string accountName, string shareName) + { + operations.DeleteAsync(resourceGroupName, accountName, shareName).GetAwaiter().GetResult(); + } + + /// + /// Deletes specified share under its account. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group within the user's subscription. The name is + /// case insensitive. + /// + /// + /// The name of the storage account within the specified resource group. + /// Storage account names must be between 3 and 24 characters in length and use + /// numbers and lower-case letters only. + /// + /// + /// The name of the file share within the specified storage account. File share + /// names must be between 3 and 63 characters in length and use numbers, + /// lower-case letters and dash (-) only. Every dash (-) character must be + /// immediately preceded and followed by a letter or number. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteAsync(this IFileSharesOperations operations, string resourceGroupName, string accountName, string shareName, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, accountName, shareName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Lists all shares. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListNext(this IFileSharesOperations operations, string nextPageLink) + { + return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Lists all shares. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListNextAsync(this IFileSharesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/IFileServicesOperations.cs b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/IFileServicesOperations.cs new file mode 100644 index 000000000000..ceecae372131 --- /dev/null +++ b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/IFileServicesOperations.cs @@ -0,0 +1,119 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Storage +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// FileServicesOperations operations. + /// + public partial interface IFileServicesOperations + { + /// + /// List all file services in storage accounts + /// + /// + /// The name of the resource group within the user's subscription. The + /// name is case insensitive. + /// + /// + /// The name of the storage account within the specified resource + /// group. Storage account names must be between 3 and 24 characters in + /// length and use numbers and lower-case letters only. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> ListWithHttpMessagesAsync(string resourceGroupName, string accountName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Sets the properties of file services in storage accounts, including + /// CORS (Cross-Origin Resource Sharing) rules. + /// + /// + /// The name of the resource group within the user's subscription. The + /// name is case insensitive. + /// + /// + /// The name of the storage account within the specified resource + /// group. Storage account names must be between 3 and 24 characters in + /// length and use numbers and lower-case letters only. + /// + /// + /// Specifies CORS rules for the File service. You can include up to + /// five CorsRule elements in the request. If no CorsRule elements are + /// included in the request body, all CORS rules will be deleted, and + /// CORS will be disabled for the File service. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> SetServicePropertiesWithHttpMessagesAsync(string resourceGroupName, string accountName, CorsRules cors = default(CorsRules), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets the properties of file services in storage accounts, including + /// CORS (Cross-Origin Resource Sharing) rules. + /// + /// + /// The name of the resource group within the user's subscription. The + /// name is case insensitive. + /// + /// + /// The name of the storage account within the specified resource + /// group. Storage account names must be between 3 and 24 characters in + /// length and use numbers and lower-case letters only. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> GetServicePropertiesWithHttpMessagesAsync(string resourceGroupName, string accountName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/IFileSharesOperations.cs b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/IFileSharesOperations.cs new file mode 100644 index 000000000000..7f99048ef596 --- /dev/null +++ b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/IFileSharesOperations.cs @@ -0,0 +1,244 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Storage +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// FileSharesOperations operations. + /// + public partial interface IFileSharesOperations + { + /// + /// Lists all shares. + /// + /// + /// The name of the resource group within the user's subscription. The + /// name is case insensitive. + /// + /// + /// The name of the storage account within the specified resource + /// group. Storage account names must be between 3 and 24 characters in + /// length and use numbers and lower-case letters only. + /// + /// + /// Optional. Continuation token for the list operation. + /// + /// + /// Optional. Specified maximum number of shares that can be included + /// in the list. + /// + /// + /// Optional. When specified, only share names starting with the filter + /// will be listed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListWithHttpMessagesAsync(string resourceGroupName, string accountName, string skipToken = default(string), string maxpagesize = default(string), string filter = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Creates a new share under the specified account as described by + /// request body. The share resource includes metadata and properties + /// for that share. It does not include a list of the files contained + /// by the share. + /// + /// + /// The name of the resource group within the user's subscription. The + /// name is case insensitive. + /// + /// + /// The name of the storage account within the specified resource + /// group. Storage account names must be between 3 and 24 characters in + /// length and use numbers and lower-case letters only. + /// + /// + /// The name of the file share within the specified storage account. + /// File share names must be between 3 and 63 characters in length and + /// use numbers, lower-case letters and dash (-) only. Every dash (-) + /// character must be immediately preceded and followed by a letter or + /// number. + /// + /// + /// A name-value pair to associate with the share as metadata. + /// + /// + /// The maximum size of the share, in gigabytes. Must be greater than + /// 0, and less than or equal to 5TB (5120). + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> CreateWithHttpMessagesAsync(string resourceGroupName, string accountName, string shareName, IDictionary metadata = default(IDictionary), int? shareQuota = default(int?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Updates share properties as specified in request body. Properties + /// not mentioned in the request will not be changed. Update fails if + /// the specified share does not already exist. + /// + /// + /// The name of the resource group within the user's subscription. The + /// name is case insensitive. + /// + /// + /// The name of the storage account within the specified resource + /// group. Storage account names must be between 3 and 24 characters in + /// length and use numbers and lower-case letters only. + /// + /// + /// The name of the file share within the specified storage account. + /// File share names must be between 3 and 63 characters in length and + /// use numbers, lower-case letters and dash (-) only. Every dash (-) + /// character must be immediately preceded and followed by a letter or + /// number. + /// + /// + /// A name-value pair to associate with the share as metadata. + /// + /// + /// The maximum size of the share, in gigabytes. Must be greater than + /// 0, and less than or equal to 5TB (5120). + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string accountName, string shareName, IDictionary metadata = default(IDictionary), int? shareQuota = default(int?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets properties of a specified share. + /// + /// + /// The name of the resource group within the user's subscription. The + /// name is case insensitive. + /// + /// + /// The name of the storage account within the specified resource + /// group. Storage account names must be between 3 and 24 characters in + /// length and use numbers and lower-case letters only. + /// + /// + /// The name of the file share within the specified storage account. + /// File share names must be between 3 and 63 characters in length and + /// use numbers, lower-case letters and dash (-) only. Every dash (-) + /// character must be immediately preceded and followed by a letter or + /// number. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> GetWithHttpMessagesAsync(string resourceGroupName, string accountName, string shareName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Deletes specified share under its account. + /// + /// + /// The name of the resource group within the user's subscription. The + /// name is case insensitive. + /// + /// + /// The name of the storage account within the specified resource + /// group. Storage account names must be between 3 and 24 characters in + /// length and use numbers and lower-case letters only. + /// + /// + /// The name of the file share within the specified storage account. + /// File share names must be between 3 and 63 characters in length and + /// use numbers, lower-case letters and dash (-) only. Every dash (-) + /// character must be immediately preceded and followed by a letter or + /// number. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + Task DeleteWithHttpMessagesAsync(string resourceGroupName, string accountName, string shareName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Lists all shares. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/ISKUsOperations.cs b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/ISkusOperations.cs similarity index 100% rename from sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/ISKUsOperations.cs rename to sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/ISkusOperations.cs diff --git a/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/IStorageManagementClient.cs b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/IStorageManagementClient.cs index f64d6b478444..54ad36c11da2 100644 --- a/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/IStorageManagementClient.cs +++ b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/IStorageManagementClient.cs @@ -104,5 +104,15 @@ public partial interface IStorageManagementClient : System.IDisposable /// IBlobContainersOperations BlobContainers { get; } + /// + /// Gets the IFileServicesOperations. + /// + IFileServicesOperations FileServices { get; } + + /// + /// Gets the IFileSharesOperations. + /// + IFileSharesOperations FileShares { get; } + } } diff --git a/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/FileServiceItems.cs b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/FileServiceItems.cs new file mode 100644 index 000000000000..b53826168db1 --- /dev/null +++ b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/FileServiceItems.cs @@ -0,0 +1,50 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Storage.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + public partial class FileServiceItems + { + /// + /// Initializes a new instance of the FileServiceItems class. + /// + public FileServiceItems() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the FileServiceItems class. + /// + /// List of file services returned. + public FileServiceItems(IList value = default(IList)) + { + Value = value; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets list of file services returned. + /// + [JsonProperty(PropertyName = "value")] + public IList Value { get; private set; } + + } +} diff --git a/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/FileServiceProperties.cs b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/FileServiceProperties.cs new file mode 100644 index 000000000000..99f762c6efcf --- /dev/null +++ b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/FileServiceProperties.cs @@ -0,0 +1,68 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Storage.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Linq; + + /// + /// The properties of File services in storage account. + /// + [Rest.Serialization.JsonTransformation] + public partial class FileServiceProperties : Resource + { + /// + /// Initializes a new instance of the FileServiceProperties class. + /// + public FileServiceProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the FileServiceProperties class. + /// + /// Fully qualified resource Id for the resource. Ex - + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// The name of the resource + /// The type of the resource. Ex- + /// Microsoft.Compute/virtualMachines or + /// Microsoft.Storage/storageAccounts. + /// Specifies CORS rules for the File service. You + /// can include up to five CorsRule elements in the request. If no + /// CorsRule elements are included in the request body, all CORS rules + /// will be deleted, and CORS will be disabled for the File + /// service. + public FileServiceProperties(string id = default(string), string name = default(string), string type = default(string), CorsRules cors = default(CorsRules)) + : base(id, name, type) + { + Cors = cors; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets specifies CORS rules for the File service. You can + /// include up to five CorsRule elements in the request. If no CorsRule + /// elements are included in the request body, all CORS rules will be + /// deleted, and CORS will be disabled for the File service. + /// + [JsonProperty(PropertyName = "properties.cors")] + public CorsRules Cors { get; set; } + + } +} diff --git a/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/FileShare.cs b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/FileShare.cs new file mode 100644 index 000000000000..dc868af4e1fc --- /dev/null +++ b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/FileShare.cs @@ -0,0 +1,104 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Storage.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Properties of the file share, including Id, resource name, resource + /// type, Etag. + /// + [Rest.Serialization.JsonTransformation] + public partial class FileShare : AzureEntityResource + { + /// + /// Initializes a new instance of the FileShare class. + /// + public FileShare() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the FileShare class. + /// + /// Fully qualified resource Id for the resource. Ex - + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// The name of the resource + /// The type of the resource. Ex- + /// Microsoft.Compute/virtualMachines or + /// Microsoft.Storage/storageAccounts. + /// Resource Etag. + /// Returns the date and time the share + /// was last modified. + /// A name-value pair to associate with the + /// share as metadata. + /// The maximum size of the share, in + /// gigabytes. Must be greater than 0, and less than or equal to 5TB + /// (5120). + public FileShare(string id = default(string), string name = default(string), string type = default(string), string etag = default(string), System.DateTime? lastModifiedTime = default(System.DateTime?), IDictionary metadata = default(IDictionary), int? shareQuota = default(int?)) + : base(id, name, type, etag) + { + LastModifiedTime = lastModifiedTime; + Metadata = metadata; + ShareQuota = shareQuota; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets returns the date and time the share was last modified. + /// + [JsonProperty(PropertyName = "properties.lastModifiedTime")] + public System.DateTime? LastModifiedTime { get; private set; } + + /// + /// Gets or sets a name-value pair to associate with the share as + /// metadata. + /// + [JsonProperty(PropertyName = "properties.metadata")] + public IDictionary Metadata { get; set; } + + /// + /// Gets or sets the maximum size of the share, in gigabytes. Must be + /// greater than 0, and less than or equal to 5TB (5120). + /// + [JsonProperty(PropertyName = "properties.shareQuota")] + public int? ShareQuota { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (ShareQuota > 5120) + { + throw new ValidationException(ValidationRules.InclusiveMaximum, "ShareQuota", 5120); + } + if (ShareQuota < 1) + { + throw new ValidationException(ValidationRules.InclusiveMinimum, "ShareQuota", 1); + } + } + } +} diff --git a/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/FileShareItem.cs b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/FileShareItem.cs new file mode 100644 index 000000000000..4e7bc69bde8e --- /dev/null +++ b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/FileShareItem.cs @@ -0,0 +1,103 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Storage.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The file share properties be listed out. + /// + [Rest.Serialization.JsonTransformation] + public partial class FileShareItem : AzureEntityResource + { + /// + /// Initializes a new instance of the FileShareItem class. + /// + public FileShareItem() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the FileShareItem class. + /// + /// Fully qualified resource Id for the resource. Ex - + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// The name of the resource + /// The type of the resource. Ex- + /// Microsoft.Compute/virtualMachines or + /// Microsoft.Storage/storageAccounts. + /// Resource Etag. + /// Returns the date and time the share + /// was last modified. + /// A name-value pair to associate with the + /// share as metadata. + /// The maximum size of the share, in + /// gigabytes. Must be greater than 0, and less than or equal to 5TB + /// (5120). + public FileShareItem(string id = default(string), string name = default(string), string type = default(string), string etag = default(string), System.DateTime? lastModifiedTime = default(System.DateTime?), IDictionary metadata = default(IDictionary), int? shareQuota = default(int?)) + : base(id, name, type, etag) + { + LastModifiedTime = lastModifiedTime; + Metadata = metadata; + ShareQuota = shareQuota; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets returns the date and time the share was last modified. + /// + [JsonProperty(PropertyName = "properties.lastModifiedTime")] + public System.DateTime? LastModifiedTime { get; private set; } + + /// + /// Gets or sets a name-value pair to associate with the share as + /// metadata. + /// + [JsonProperty(PropertyName = "properties.metadata")] + public IDictionary Metadata { get; set; } + + /// + /// Gets or sets the maximum size of the share, in gigabytes. Must be + /// greater than 0, and less than or equal to 5TB (5120). + /// + [JsonProperty(PropertyName = "properties.shareQuota")] + public int? ShareQuota { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (ShareQuota > 5120) + { + throw new ValidationException(ValidationRules.InclusiveMaximum, "ShareQuota", 5120); + } + if (ShareQuota < 1) + { + throw new ValidationException(ValidationRules.InclusiveMinimum, "ShareQuota", 1); + } + } + } +} diff --git a/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/IpRule.cs b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/IPRule.cs similarity index 100% rename from sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/IpRule.cs rename to sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/IPRule.cs diff --git a/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/signedResource.cs b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/SignedResource.cs similarity index 100% rename from sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/signedResource.cs rename to sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/SignedResource.cs diff --git a/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/SdkInfo_StorageManagementClient.cs b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/SdkInfo_StorageManagementClient.cs index 2e6668fd3764..ade321fb01d3 100644 --- a/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/SdkInfo_StorageManagementClient.cs +++ b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/SdkInfo_StorageManagementClient.cs @@ -21,6 +21,8 @@ public static IEnumerable> ApiInfo_StorageManageme { new Tuple("Storage", "BlobContainers", "2019-04-01"), new Tuple("Storage", "BlobServices", "2019-04-01"), + new Tuple("Storage", "FileServices", "2019-04-01"), + new Tuple("Storage", "FileShares", "2019-04-01"), new Tuple("Storage", "ManagementPolicies", "2019-04-01"), new Tuple("Storage", "Operations", "2019-04-01"), new Tuple("Storage", "Skus", "2019-04-01"), @@ -29,16 +31,5 @@ public static IEnumerable> ApiInfo_StorageManageme }.AsEnumerable(); } } - // BEGIN: Code Generation Metadata Section - public static readonly String AutoRestVersion = "latest"; - public static readonly String AutoRestBootStrapperVersion = "autorest@2.0.4283"; - public static readonly String AutoRestCmdExecuted = "cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/storage/resource-manager/readme.md --csharp --version=latest --reflect-api-versions --csharp.output-folder=C:\\code\\srpsdk\\sdk\\storage\\Microsoft.Azure.Management.Storage\\src\\Generated"; - public static readonly String GithubForkName = "Azure"; - public static readonly String GithubBranchName = "master"; - public static readonly String GithubCommidId = "d753d28f32643d8062e1f7863d8f8e188dac9556"; - public static readonly String CodeGenerationErrors = ""; - public static readonly String GithubRepoName = "azure-rest-api-specs"; - // END: Code Generation Metadata Section } } - diff --git a/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/SKUsOperations.cs b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/SkusOperations.cs similarity index 100% rename from sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/SKUsOperations.cs rename to sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/SkusOperations.cs diff --git a/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/SKUsOperationsExtensions.cs b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/SkusOperationsExtensions.cs similarity index 100% rename from sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/SKUsOperationsExtensions.cs rename to sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/SkusOperationsExtensions.cs diff --git a/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/StorageManagementClient.cs b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/StorageManagementClient.cs index 52c34d78383d..c89f3a08d112 100644 --- a/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/StorageManagementClient.cs +++ b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/StorageManagementClient.cs @@ -109,6 +109,16 @@ public partial class StorageManagementClient : ServiceClient public virtual IBlobContainersOperations BlobContainers { get; private set; } + /// + /// Gets the IFileServicesOperations. + /// + public virtual IFileServicesOperations FileServices { get; private set; } + + /// + /// Gets the IFileSharesOperations. + /// + public virtual IFileSharesOperations FileShares { get; private set; } + /// /// Initializes a new instance of the StorageManagementClient class. /// @@ -357,6 +367,8 @@ private void Initialize() ManagementPolicies = new ManagementPoliciesOperations(this); BlobServices = new BlobServicesOperations(this); BlobContainers = new BlobContainersOperations(this); + FileServices = new FileServicesOperations(this); + FileShares = new FileSharesOperations(this); BaseUri = new System.Uri("https://management.azure.com"); ApiVersion = "2019-04-01"; AcceptLanguage = "en-US";