diff --git a/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/ApplicationTypeVersionsOperations.cs b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/ApplicationTypeVersionsOperations.cs index dce3c57aee42..61e0ea83c58d 100644 --- a/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/ApplicationTypeVersionsOperations.cs +++ b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/ApplicationTypeVersionsOperations.cs @@ -113,6 +113,10 @@ internal ApplicationTypeVersionsOperations(ServiceFabricManagedClustersManagemen { throw new ValidationException(ValidationRules.CannotBeNull, "version"); } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -362,6 +366,10 @@ internal ApplicationTypeVersionsOperations(ServiceFabricManagedClustersManagemen { throw new ValidationException(ValidationRules.CannotBeNull, "version"); } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } ApplicationTypeVersionUpdateParameters parameters = new ApplicationTypeVersionUpdateParameters(); if (tags != null) { @@ -609,6 +617,10 @@ internal ApplicationTypeVersionsOperations(ServiceFabricManagedClustersManagemen { throw new ValidationException(ValidationRules.CannotBeNull, "applicationTypeName"); } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -820,6 +832,10 @@ internal ApplicationTypeVersionsOperations(ServiceFabricManagedClustersManagemen { throw new ValidationException(ValidationRules.CannotBeNull, "version"); } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } if (parameters == null) { throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); @@ -1059,6 +1075,10 @@ internal ApplicationTypeVersionsOperations(ServiceFabricManagedClustersManagemen { throw new ValidationException(ValidationRules.CannotBeNull, "version"); } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/ApplicationTypesOperations.cs b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/ApplicationTypesOperations.cs index d68ef9c675f3..f82b7a388bb5 100644 --- a/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/ApplicationTypesOperations.cs +++ b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/ApplicationTypesOperations.cs @@ -105,6 +105,10 @@ internal ApplicationTypesOperations(ServiceFabricManagedClustersManagementClient { throw new ValidationException(ValidationRules.CannotBeNull, "applicationTypeName"); } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -308,6 +312,10 @@ internal ApplicationTypesOperations(ServiceFabricManagedClustersManagementClient { throw new ValidationException(ValidationRules.CannotBeNull, "applicationTypeName"); } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } if (parameters == null) { throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); @@ -523,6 +531,10 @@ internal ApplicationTypesOperations(ServiceFabricManagedClustersManagementClient { throw new ValidationException(ValidationRules.CannotBeNull, "applicationTypeName"); } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } ApplicationTypeUpdateParameters parameters = new ApplicationTypeUpdateParameters(); if (tags != null) { @@ -758,6 +770,10 @@ internal ApplicationTypesOperations(ServiceFabricManagedClustersManagementClient { throw new ValidationException(ValidationRules.CannotBeNull, "clusterName"); } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -953,6 +969,10 @@ internal ApplicationTypesOperations(ServiceFabricManagedClustersManagementClient { throw new ValidationException(ValidationRules.CannotBeNull, "applicationTypeName"); } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/ApplicationsOperations.cs b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/ApplicationsOperations.cs index 8dda0573c228..7d679c81447d 100644 --- a/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/ApplicationsOperations.cs +++ b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/ApplicationsOperations.cs @@ -105,6 +105,10 @@ internal ApplicationsOperations(ServiceFabricManagedClustersManagementClient cli { throw new ValidationException(ValidationRules.CannotBeNull, "applicationName"); } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -339,6 +343,10 @@ internal ApplicationsOperations(ServiceFabricManagedClustersManagementClient cli { throw new ValidationException(ValidationRules.CannotBeNull, "applicationName"); } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } ApplicationUpdateParameters parameters = new ApplicationUpdateParameters(); if (tags != null) { @@ -574,6 +582,10 @@ internal ApplicationsOperations(ServiceFabricManagedClustersManagementClient cli { throw new ValidationException(ValidationRules.CannotBeNull, "clusterName"); } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -775,6 +787,10 @@ internal ApplicationsOperations(ServiceFabricManagedClustersManagementClient cli { throw new ValidationException(ValidationRules.CannotBeNull, "applicationName"); } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } if (parameters == null) { throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); @@ -1005,6 +1021,10 @@ internal ApplicationsOperations(ServiceFabricManagedClustersManagementClient cli { throw new ValidationException(ValidationRules.CannotBeNull, "applicationName"); } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/IManagedUnsupportedVMSizesOperations.cs b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/IManagedUnsupportedVMSizesOperations.cs new file mode 100644 index 000000000000..a5529078337f --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/IManagedUnsupportedVMSizesOperations.cs @@ -0,0 +1,111 @@ +// +// 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.ServiceFabricManagedClusters +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// ManagedUnsupportedVMSizesOperations operations. + /// + public partial interface IManagedUnsupportedVMSizesOperations + { + /// + /// Get the lists of unsupported vm sizes for Service Fabric Managed + /// Clusters. + /// + /// + /// Get the lists of unsupported vm sizes for Service Fabric Managed + /// Clusters. + /// + /// + /// The location for the cluster code versions. This is different from + /// cluster location. + /// + /// + /// 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 location, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Get unsupported vm size for Service Fabric Managed Clusters. + /// + /// + /// Get unsupported vm size for Service Fabric Managed Clusters. + /// + /// + /// The location for the cluster code versions. This is different from + /// cluster location. + /// + /// + /// VM Size 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> GetWithHttpMessagesAsync(string location, string vmSize, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Get the lists of unsupported vm sizes for Service Fabric Managed + /// Clusters. + /// + /// + /// Get the lists of unsupported vm sizes for Service Fabric Managed + /// Clusters. + /// + /// + /// 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/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/INodeTypeSkusOperations.cs b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/INodeTypeSkusOperations.cs new file mode 100644 index 000000000000..e376ccce1eb4 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/INodeTypeSkusOperations.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.ServiceFabricManagedClusters +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// NodeTypeSkusOperations operations. + /// + public partial interface INodeTypeSkusOperations + { + /// + /// Gets a Service Fabric node type SKUs. + /// + /// + /// Get a Service Fabric node type supported SKUs. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the cluster resource. + /// + /// + /// The name of the node type. + /// + /// + /// 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 clusterName, string nodeTypeName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets a Service Fabric node type SKUs. + /// + /// + /// Get a Service Fabric node type supported SKUs. + /// + /// + /// 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/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/INodeTypesOperations.cs b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/INodeTypesOperations.cs index 08c0e874fcb9..826306bfdfea 100644 --- a/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/INodeTypesOperations.cs +++ b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/INodeTypesOperations.cs @@ -232,8 +232,8 @@ public partial interface INodeTypesOperations /// /// The name of the node type. /// - /// - /// Node type update parameters + /// + /// The parameters to update the node type configuration. /// /// /// The headers that will be added to request. @@ -250,7 +250,7 @@ public partial interface INodeTypesOperations /// /// Thrown when a required parameter is null /// - Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string clusterName, string nodeTypeName, IDictionary tags = default(IDictionary), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string clusterName, string nodeTypeName, NodeTypeUpdateParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Deletes a Service Fabric node type. /// diff --git a/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/IOperationResultsOperations.cs b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/IOperationResultsOperations.cs new file mode 100644 index 000000000000..59d968c4267c --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/IOperationResultsOperations.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.ServiceFabricManagedClusters +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// OperationResultsOperations operations. + /// + public partial interface IOperationResultsOperations + { + /// + /// Get long running operation result. + /// + /// + /// Get long running operation result. + /// + /// + /// The location for the cluster code versions. This is different from + /// cluster location. + /// + /// + /// operation identifier. + /// + /// + /// 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 GetWithHttpMessagesAsync(string location, string operationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/IOperationStatusOperations.cs b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/IOperationStatusOperations.cs new file mode 100644 index 000000000000..418aec9e4b9e --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/IOperationStatusOperations.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.ServiceFabricManagedClusters +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// OperationStatusOperations operations. + /// + public partial interface IOperationStatusOperations + { + /// + /// Get long running operation status. + /// + /// + /// Get long running operation status. + /// + /// + /// The location for the cluster code versions. This is different from + /// cluster location. + /// + /// + /// operation identifier. + /// + /// + /// 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 location, string operationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/IServiceFabricManagedClustersManagementClient.cs b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/IServiceFabricManagedClustersManagementClient.cs index a6f5ee33f297..9ae5b87bc4af 100644 --- a/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/IServiceFabricManagedClustersManagementClient.cs +++ b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/IServiceFabricManagedClustersManagementClient.cs @@ -42,7 +42,7 @@ public partial interface IServiceFabricManagedClustersManagementClient : System. /// /// The version of the Service Fabric resource provider API. This is a - /// required parameter and it's value must be "2021-05-01" for this + /// required parameter and it's value must be "2022-01-01" for this /// specification. /// string ApiVersion { get; } @@ -101,6 +101,21 @@ public partial interface IServiceFabricManagedClustersManagementClient : System. /// IManagedClusterVersionOperations ManagedClusterVersion { get; } + /// + /// Gets the IManagedUnsupportedVMSizesOperations. + /// + IManagedUnsupportedVMSizesOperations ManagedUnsupportedVMSizes { get; } + + /// + /// Gets the IOperationStatusOperations. + /// + IOperationStatusOperations OperationStatus { get; } + + /// + /// Gets the IOperationResultsOperations. + /// + IOperationResultsOperations OperationResults { get; } + /// /// Gets the IOperations. /// @@ -111,5 +126,10 @@ public partial interface IServiceFabricManagedClustersManagementClient : System. /// INodeTypesOperations NodeTypes { get; } + /// + /// Gets the INodeTypeSkusOperations. + /// + INodeTypeSkusOperations NodeTypeSkus { get; } + } } diff --git a/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/ManagedClusterVersionOperations.cs b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/ManagedClusterVersionOperations.cs index 3dcdc9c1dc52..725ea9d8d866 100644 --- a/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/ManagedClusterVersionOperations.cs +++ b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/ManagedClusterVersionOperations.cs @@ -92,6 +92,10 @@ internal ManagedClusterVersionOperations(ServiceFabricManagedClustersManagementC { throw new ValidationException(ValidationRules.CannotBeNull, "location"); } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -285,6 +289,10 @@ internal ManagedClusterVersionOperations(ServiceFabricManagedClustersManagementC { throw new ValidationException(ValidationRules.CannotBeNull, "location"); } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -478,6 +486,10 @@ internal ManagedClusterVersionOperations(ServiceFabricManagedClustersManagementC { throw new ValidationException(ValidationRules.CannotBeNull, "location"); } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -662,6 +674,10 @@ internal ManagedClusterVersionOperations(ServiceFabricManagedClustersManagementC { throw new ValidationException(ValidationRules.CannotBeNull, "location"); } + 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/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/ManagedClustersOperations.cs b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/ManagedClustersOperations.cs index 9ce07ec0d0d7..881a6df06228 100644 --- a/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/ManagedClustersOperations.cs +++ b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/ManagedClustersOperations.cs @@ -88,6 +88,10 @@ internal ManagedClustersOperations(ServiceFabricManagedClustersManagementClient { throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -264,6 +268,10 @@ internal ManagedClustersOperations(ServiceFabricManagedClustersManagementClient /// public async Task>> ListBySubscriptionWithHttpMessagesAsync(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"); @@ -451,6 +459,10 @@ internal ManagedClustersOperations(ServiceFabricManagedClustersManagementClient { throw new ValidationException(ValidationRules.CannotBeNull, "clusterName"); } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -674,6 +686,10 @@ internal ManagedClustersOperations(ServiceFabricManagedClustersManagementClient { throw new ValidationException(ValidationRules.CannotBeNull, "clusterName"); } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -905,6 +921,10 @@ internal ManagedClustersOperations(ServiceFabricManagedClustersManagementClient { throw new ValidationException(ValidationRules.CannotBeNull, "clusterName"); } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); @@ -1125,6 +1145,10 @@ internal ManagedClustersOperations(ServiceFabricManagedClustersManagementClient { throw new ValidationException(ValidationRules.CannotBeNull, "clusterName"); } + 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/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/ManagedUnsupportedVMSizesOperations.cs b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/ManagedUnsupportedVMSizesOperations.cs new file mode 100644 index 000000000000..3bf03cffc40e --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/ManagedUnsupportedVMSizesOperations.cs @@ -0,0 +1,606 @@ +// +// 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.ServiceFabricManagedClusters +{ + 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; + + /// + /// ManagedUnsupportedVMSizesOperations operations. + /// + internal partial class ManagedUnsupportedVMSizesOperations : IServiceOperations, IManagedUnsupportedVMSizesOperations + { + /// + /// Initializes a new instance of the ManagedUnsupportedVMSizesOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal ManagedUnsupportedVMSizesOperations(ServiceFabricManagedClustersManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the ServiceFabricManagedClustersManagementClient + /// + public ServiceFabricManagedClustersManagementClient Client { get; private set; } + + /// + /// Get the lists of unsupported vm sizes for Service Fabric Managed Clusters. + /// + /// + /// Get the lists of unsupported vm sizes for Service Fabric Managed Clusters. + /// + /// + /// The location for the cluster code versions. This is different from cluster + /// location. + /// + /// + /// 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 location, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (location == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "location"); + } + 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("location", location); + 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}/providers/Microsoft.ServiceFabric/locations/{location}/managedUnsupportedVMSizes").ToString(); + _url = _url.Replace("{location}", System.Uri.EscapeDataString(location)); + _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 ErrorModelException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorModel _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; + } + + /// + /// Get unsupported vm size for Service Fabric Managed Clusters. + /// + /// + /// Get unsupported vm size for Service Fabric Managed Clusters. + /// + /// + /// The location for the cluster code versions. This is different from cluster + /// location. + /// + /// + /// VM Size 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> GetWithHttpMessagesAsync(string location, string vmSize, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (location == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "location"); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (vmSize == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "vmSize"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("location", location); + tracingParameters.Add("vmSize", vmSize); + 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.ServiceFabric/locations/{location}/managedUnsupportedVMSizes/{vmSize}").ToString(); + _url = _url.Replace("{location}", System.Uri.EscapeDataString(location)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{vmSize}", System.Uri.EscapeDataString(vmSize)); + 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 ErrorModelException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorModel _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; + } + + /// + /// Get the lists of unsupported vm sizes for Service Fabric Managed Clusters. + /// + /// + /// Get the lists of unsupported vm sizes for Service Fabric Managed Clusters. + /// + /// + /// 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 ErrorModelException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorModel _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/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/ManagedUnsupportedVMSizesOperationsExtensions.cs b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/ManagedUnsupportedVMSizesOperationsExtensions.cs new file mode 100644 index 000000000000..c085935284cb --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/ManagedUnsupportedVMSizesOperationsExtensions.cs @@ -0,0 +1,155 @@ +// +// 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.ServiceFabricManagedClusters +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for ManagedUnsupportedVMSizesOperations. + /// + public static partial class ManagedUnsupportedVMSizesOperationsExtensions + { + /// + /// Get the lists of unsupported vm sizes for Service Fabric Managed Clusters. + /// + /// + /// Get the lists of unsupported vm sizes for Service Fabric Managed Clusters. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The location for the cluster code versions. This is different from cluster + /// location. + /// + public static IPage List(this IManagedUnsupportedVMSizesOperations operations, string location) + { + return operations.ListAsync(location).GetAwaiter().GetResult(); + } + + /// + /// Get the lists of unsupported vm sizes for Service Fabric Managed Clusters. + /// + /// + /// Get the lists of unsupported vm sizes for Service Fabric Managed Clusters. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The location for the cluster code versions. This is different from cluster + /// location. + /// + /// + /// The cancellation token. + /// + public static async Task> ListAsync(this IManagedUnsupportedVMSizesOperations operations, string location, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(location, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Get unsupported vm size for Service Fabric Managed Clusters. + /// + /// + /// Get unsupported vm size for Service Fabric Managed Clusters. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The location for the cluster code versions. This is different from cluster + /// location. + /// + /// + /// VM Size name. + /// + public static ManagedVMSize Get(this IManagedUnsupportedVMSizesOperations operations, string location, string vmSize) + { + return operations.GetAsync(location, vmSize).GetAwaiter().GetResult(); + } + + /// + /// Get unsupported vm size for Service Fabric Managed Clusters. + /// + /// + /// Get unsupported vm size for Service Fabric Managed Clusters. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The location for the cluster code versions. This is different from cluster + /// location. + /// + /// + /// VM Size name. + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this IManagedUnsupportedVMSizesOperations operations, string location, string vmSize, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(location, vmSize, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Get the lists of unsupported vm sizes for Service Fabric Managed Clusters. + /// + /// + /// Get the lists of unsupported vm sizes for Service Fabric Managed Clusters. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListNext(this IManagedUnsupportedVMSizesOperations operations, string nextPageLink) + { + return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Get the lists of unsupported vm sizes for Service Fabric Managed Clusters. + /// + /// + /// Get the lists of unsupported vm sizes for Service Fabric Managed Clusters. + /// + /// + /// 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 IManagedUnsupportedVMSizesOperations 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/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/FrontendConfiguration.cs b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/FrontendConfiguration.cs new file mode 100644 index 000000000000..815c23fda648 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/FrontendConfiguration.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.ServiceFabricManagedClusters.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Describes the frontend configurations for the node type. + /// + public partial class FrontendConfiguration + { + /// + /// Initializes a new instance of the FrontendConfiguration class. + /// + public FrontendConfiguration() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the FrontendConfiguration class. + /// + /// The IP address type of this frontend + /// configuration. If omitted the default value is IPv4. Possible + /// values include: 'IPv4', 'IPv6' + /// The resource Id of + /// the Load Balancer backend address pool that the VM instances of the + /// node type are associated with. The format of the resource Id is + /// '/subscriptions/<subscriptionId>/resourceGroups/<resourceGroupName>/providers/Microsoft.Network/loadBalancers/<loadBalancerName>/backendAddressPools/<backendAddressPoolName>'. + /// The resource Id of the + /// Load Balancer inbound NAT pool that the VM instances of the node + /// type are associated with. The format of the resource Id is + /// '/subscriptions/<subscriptionId>/resourceGroups/<resourceGroupName>/providers/Microsoft.Network/loadBalancers/<loadBalancerName>/inboundNatPools/<inboundNatPoolName>'. + public FrontendConfiguration(string ipAddressType = default(string), string loadBalancerBackendAddressPoolId = default(string), string loadBalancerInboundNatPoolId = default(string)) + { + IpAddressType = ipAddressType; + LoadBalancerBackendAddressPoolId = loadBalancerBackendAddressPoolId; + LoadBalancerInboundNatPoolId = loadBalancerInboundNatPoolId; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the IP address type of this frontend configuration. If + /// omitted the default value is IPv4. Possible values include: 'IPv4', + /// 'IPv6' + /// + [JsonProperty(PropertyName = "ipAddressType")] + public string IpAddressType { get; set; } + + /// + /// Gets or sets the resource Id of the Load Balancer backend address + /// pool that the VM instances of the node type are associated with. + /// The format of the resource Id is + /// '/subscriptions/&lt;subscriptionId&gt;/resourceGroups/&lt;resourceGroupName&gt;/providers/Microsoft.Network/loadBalancers/&lt;loadBalancerName&gt;/backendAddressPools/&lt;backendAddressPoolName&gt;'. + /// + [JsonProperty(PropertyName = "loadBalancerBackendAddressPoolId")] + public string LoadBalancerBackendAddressPoolId { get; set; } + + /// + /// Gets or sets the resource Id of the Load Balancer inbound NAT pool + /// that the VM instances of the node type are associated with. The + /// format of the resource Id is + /// '/subscriptions/&lt;subscriptionId&gt;/resourceGroups/&lt;resourceGroupName&gt;/providers/Microsoft.Network/loadBalancers/&lt;loadBalancerName&gt;/inboundNatPools/&lt;inboundNatPoolName&gt;'. + /// + [JsonProperty(PropertyName = "loadBalancerInboundNatPoolId")] + public string LoadBalancerInboundNatPoolId { get; set; } + + } +} diff --git a/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/IPAddressType.cs b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/IPAddressType.cs new file mode 100644 index 000000000000..b9fd703ed15c --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/IPAddressType.cs @@ -0,0 +1,28 @@ +// +// 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.ServiceFabricManagedClusters.Models +{ + + /// + /// Defines values for IPAddressType. + /// + public static class IPAddressType + { + /// + /// IPv4 address type. + /// + public const string IPv4 = "IPv4"; + /// + /// IPv6 address type. + /// + public const string IPv6 = "IPv6"; + } +} diff --git a/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/IPTag.cs b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/IPTag.cs new file mode 100644 index 000000000000..8dd7c0a320a3 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/IPTag.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.ServiceFabricManagedClusters.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// IPTag associated with the object. + /// + public partial class IPTag + { + /// + /// Initializes a new instance of the IPTag class. + /// + public IPTag() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the IPTag class. + /// + /// The IP tag type. + /// The value of the IP tag. + public IPTag(string ipTagType, string tag) + { + IpTagType = ipTagType; + Tag = tag; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the IP tag type. + /// + [JsonProperty(PropertyName = "ipTagType")] + public string IpTagType { get; set; } + + /// + /// Gets or sets the value of the IP tag. + /// + [JsonProperty(PropertyName = "tag")] + public string Tag { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (IpTagType == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "IpTagType"); + } + if (Tag == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Tag"); + } + } + } +} diff --git a/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/LoadBalancingRule.cs b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/LoadBalancingRule.cs index 0dc1b689457b..b2e57d20659d 100644 --- a/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/LoadBalancingRule.cs +++ b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/LoadBalancingRule.cs @@ -45,7 +45,9 @@ public LoadBalancingRule() /// rule. Acceptable values are between 1 and 65535. /// The probe request path. Only /// supported for HTTP/HTTPS probes. - public LoadBalancingRule(int frontendPort, int backendPort, string protocol, string probeProtocol, int? probePort = default(int?), string probeRequestPath = default(string)) + /// The load distribution policy for + /// this rule. + public LoadBalancingRule(int frontendPort, int backendPort, string protocol, string probeProtocol, int? probePort = default(int?), string probeRequestPath = default(string), string loadDistribution = default(string)) { FrontendPort = frontendPort; BackendPort = backendPort; @@ -53,6 +55,7 @@ public LoadBalancingRule() ProbePort = probePort; ProbeProtocol = probeProtocol; ProbeRequestPath = probeRequestPath; + LoadDistribution = loadDistribution; CustomInit(); } @@ -105,6 +108,12 @@ public LoadBalancingRule() [JsonProperty(PropertyName = "probeRequestPath")] public string ProbeRequestPath { get; set; } + /// + /// Gets or sets the load distribution policy for this rule. + /// + [JsonProperty(PropertyName = "loadDistribution")] + public string LoadDistribution { get; set; } + /// /// Validate the object. /// diff --git a/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/LongRunningOperationResult.cs b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/LongRunningOperationResult.cs new file mode 100644 index 000000000000..c72d37929785 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/LongRunningOperationResult.cs @@ -0,0 +1,92 @@ +// +// 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.ServiceFabricManagedClusters.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Long running operation result. + /// + public partial class LongRunningOperationResult + { + /// + /// Initializes a new instance of the LongRunningOperationResult class. + /// + public LongRunningOperationResult() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the LongRunningOperationResult class. + /// + /// The name of the operation. + /// The start time of the operation. + /// The end time of the operation. + /// The completion percentage of the + /// operation. + /// The status of the operation. + /// The operation error. + public LongRunningOperationResult(string name = default(string), System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), double? percentComplete = default(double?), string status = default(string), ErrorModelError error = default(ErrorModelError)) + { + Name = name; + StartTime = startTime; + EndTime = endTime; + PercentComplete = percentComplete; + Status = status; + Error = error; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the name of the operation. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or sets the start time of the operation. + /// + [JsonProperty(PropertyName = "startTime")] + public System.DateTime? StartTime { get; set; } + + /// + /// Gets or sets the end time of the operation. + /// + [JsonProperty(PropertyName = "endTime")] + public System.DateTime? EndTime { get; set; } + + /// + /// Gets or sets the completion percentage of the operation. + /// + [JsonProperty(PropertyName = "percentComplete")] + public double? PercentComplete { get; set; } + + /// + /// Gets or sets the status of the operation. + /// + [JsonProperty(PropertyName = "status")] + public string Status { get; set; } + + /// + /// Gets or sets the operation error. + /// + [JsonProperty(PropertyName = "error")] + public ErrorModelError Error { get; set; } + + } +} diff --git a/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/ManagedCluster.cs b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/ManagedCluster.cs index d15d12f185b1..6211c8b2a16b 100644 --- a/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/ManagedCluster.cs +++ b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/ManagedCluster.cs @@ -62,11 +62,11 @@ public ManagedCluster() /// Load balancing rules that are /// applied to the public load balancer of the cluster. /// Setting this to true enables RDP - /// access to the VM. The default NSG rule opens RDP port to internet + /// access to the VM. The default NSG rule opens RDP port to Internet /// which can be overridden with custom Network Security Rules. The /// default value for this setting is false. /// Custom Network Security Rules - /// that are applied to the virtual network of the cluster. + /// that are applied to the Virtual Network of the cluster. /// Client certificates that are allowed to /// manage the cluster. /// The AAD authentication settings @@ -100,8 +100,28 @@ public ManagedCluster() /// resiliency. /// The policy used /// to clean up unused versions. + /// Setting this to true creates IPv6 address + /// space for the default VNet used by the cluster. This setting cannot + /// be changed once the cluster is created. The default value for this + /// setting is false. + /// If specified, the node types for the cluster + /// are created in this subnet instead of the default VNet. The + /// **networkSecurityRules** specified for the cluster are also applied + /// to this subnet. This setting cannot be changed once the cluster is + /// created. + /// The list of IP tags associated with the + /// default public IP address of the cluster. + /// IPv6 address for the cluster if IPv6 is + /// enabled. + /// Setting this to true will link + /// the IPv4 address as the ServicePublicIP of the IPv6 address. It can + /// only be set to True if IPv6 is enabled on the cluster. + /// Auxiliary subnets for the + /// cluster. + /// Service endpoints for subnets in the + /// cluster. /// The sku of the managed cluster - public ManagedCluster(string location, string dnsName, string adminUserName, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), string etag = default(string), SystemData systemData = default(SystemData), string fqdn = default(string), string ipv4Address = default(string), string clusterId = default(string), string clusterState = default(string), IList clusterCertificateThumbprints = default(IList), int? clientConnectionPort = default(int?), int? httpGatewayConnectionPort = default(int?), string adminPassword = default(string), IList loadBalancingRules = default(IList), bool? allowRdpAccess = default(bool?), IList networkSecurityRules = default(IList), IList clients = default(IList), AzureActiveDirectory azureActiveDirectory = default(AzureActiveDirectory), IList fabricSettings = default(IList), string provisioningState = default(string), string clusterCodeVersion = default(string), string clusterUpgradeMode = default(string), string clusterUpgradeCadence = default(string), IList addonFeatures = default(IList), bool? enableAutoOSUpgrade = default(bool?), bool? zonalResiliency = default(bool?), ApplicationTypeVersionsCleanupPolicy applicationTypeVersionsCleanupPolicy = default(ApplicationTypeVersionsCleanupPolicy), Sku sku = default(Sku)) + public ManagedCluster(string location, string dnsName, string adminUserName, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), string etag = default(string), SystemData systemData = default(SystemData), string fqdn = default(string), string ipv4Address = default(string), string clusterId = default(string), string clusterState = default(string), IList clusterCertificateThumbprints = default(IList), int? clientConnectionPort = default(int?), int? httpGatewayConnectionPort = default(int?), string adminPassword = default(string), IList loadBalancingRules = default(IList), bool? allowRdpAccess = default(bool?), IList networkSecurityRules = default(IList), IList clients = default(IList), AzureActiveDirectory azureActiveDirectory = default(AzureActiveDirectory), IList fabricSettings = default(IList), string provisioningState = default(string), string clusterCodeVersion = default(string), string clusterUpgradeMode = default(string), string clusterUpgradeCadence = default(string), IList addonFeatures = default(IList), bool? enableAutoOSUpgrade = default(bool?), bool? zonalResiliency = default(bool?), ApplicationTypeVersionsCleanupPolicy applicationTypeVersionsCleanupPolicy = default(ApplicationTypeVersionsCleanupPolicy), bool? enableIpv6 = default(bool?), string subnetId = default(string), IList ipTags = default(IList), string ipv6Address = default(string), bool? enableServicePublicIP = default(bool?), IList auxiliarySubnets = default(IList), IList serviceEndpoints = default(IList), Sku sku = default(Sku)) : base(location, id, name, type, tags, etag, systemData) { DnsName = dnsName; @@ -128,6 +148,13 @@ public ManagedCluster() EnableAutoOSUpgrade = enableAutoOSUpgrade; ZonalResiliency = zonalResiliency; ApplicationTypeVersionsCleanupPolicy = applicationTypeVersionsCleanupPolicy; + EnableIpv6 = enableIpv6; + SubnetId = subnetId; + IpTags = ipTags; + Ipv6Address = ipv6Address; + EnableServicePublicIP = enableServicePublicIP; + AuxiliarySubnets = auxiliarySubnets; + ServiceEndpoints = serviceEndpoints; Sku = sku; CustomInit(); } @@ -211,7 +238,7 @@ public ManagedCluster() /// /// Gets or sets setting this to true enables RDP access to the VM. The - /// default NSG rule opens RDP port to internet which can be overridden + /// default NSG rule opens RDP port to Internet which can be overridden /// with custom Network Security Rules. The default value for this /// setting is false. /// @@ -220,7 +247,7 @@ public ManagedCluster() /// /// Gets or sets custom Network Security Rules that are applied to the - /// virtual network of the cluster. + /// Virtual Network of the cluster. /// [JsonProperty(PropertyName = "properties.networkSecurityRules")] public IList NetworkSecurityRules { get; set; } @@ -305,6 +332,58 @@ public ManagedCluster() [JsonProperty(PropertyName = "properties.applicationTypeVersionsCleanupPolicy")] public ApplicationTypeVersionsCleanupPolicy ApplicationTypeVersionsCleanupPolicy { get; set; } + /// + /// Gets or sets setting this to true creates IPv6 address space for + /// the default VNet used by the cluster. This setting cannot be + /// changed once the cluster is created. The default value for this + /// setting is false. + /// + [JsonProperty(PropertyName = "properties.enableIpv6")] + public bool? EnableIpv6 { get; set; } + + /// + /// Gets or sets if specified, the node types for the cluster are + /// created in this subnet instead of the default VNet. The + /// **networkSecurityRules** specified for the cluster are also applied + /// to this subnet. This setting cannot be changed once the cluster is + /// created. + /// + [JsonProperty(PropertyName = "properties.subnetId")] + public string SubnetId { get; set; } + + /// + /// Gets or sets the list of IP tags associated with the default public + /// IP address of the cluster. + /// + [JsonProperty(PropertyName = "properties.ipTags")] + public IList IpTags { get; set; } + + /// + /// Gets iPv6 address for the cluster if IPv6 is enabled. + /// + [JsonProperty(PropertyName = "properties.ipv6Address")] + public string Ipv6Address { get; private set; } + + /// + /// Gets or sets setting this to true will link the IPv4 address as the + /// ServicePublicIP of the IPv6 address. It can only be set to True if + /// IPv6 is enabled on the cluster. + /// + [JsonProperty(PropertyName = "properties.enableServicePublicIP")] + public bool? EnableServicePublicIP { get; set; } + + /// + /// Gets or sets auxiliary subnets for the cluster. + /// + [JsonProperty(PropertyName = "properties.auxiliarySubnets")] + public IList AuxiliarySubnets { get; set; } + + /// + /// Gets or sets service endpoints for subnets in the cluster. + /// + [JsonProperty(PropertyName = "properties.serviceEndpoints")] + public IList ServiceEndpoints { get; set; } + /// /// Gets or sets the sku of the managed cluster /// @@ -372,6 +451,36 @@ public override void Validate() { ApplicationTypeVersionsCleanupPolicy.Validate(); } + if (IpTags != null) + { + foreach (var element4 in IpTags) + { + if (element4 != null) + { + element4.Validate(); + } + } + } + if (AuxiliarySubnets != null) + { + foreach (var element5 in AuxiliarySubnets) + { + if (element5 != null) + { + element5.Validate(); + } + } + } + if (ServiceEndpoints != null) + { + foreach (var element6 in ServiceEndpoints) + { + if (element6 != null) + { + element6.Validate(); + } + } + } if (Sku != null) { Sku.Validate(); diff --git a/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/ManagedVMSize.cs b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/ManagedVMSize.cs new file mode 100644 index 000000000000..9d3bff3c18b5 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/ManagedVMSize.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.ServiceFabricManagedClusters.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Describes a VM Sizes. + /// + public partial class ManagedVMSize + { + /// + /// Initializes a new instance of the ManagedVMSize class. + /// + public ManagedVMSize() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ManagedVMSize class. + /// + /// VM Size properties. + /// VM Size id. + /// VM Size name. + /// VM Size type. + public ManagedVMSize(VMSize properties = default(VMSize), string id = default(string), string name = default(string), string type = default(string)) + { + Properties = properties; + Id = id; + Name = name; + Type = type; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets VM Size properties. + /// + [JsonProperty(PropertyName = "properties")] + public VMSize Properties { get; private set; } + + /// + /// Gets VM Size id. + /// + [JsonProperty(PropertyName = "id")] + public string Id { get; private set; } + + /// + /// Gets VM Size name. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; private set; } + + /// + /// Gets VM Size type. + /// + [JsonProperty(PropertyName = "type")] + public string Type { get; private set; } + + } +} diff --git a/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/NetworkSecurityRule.cs b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/NetworkSecurityRule.cs index eb44d0967e9e..afc780d8d8ac 100644 --- a/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/NetworkSecurityRule.cs +++ b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/NetworkSecurityRule.cs @@ -54,7 +54,22 @@ public NetworkSecurityRule() /// The source port ranges. /// The destination port /// ranges. - public NetworkSecurityRule(string name, string protocol, string access, int priority, string direction, string description = default(string), IList sourceAddressPrefixes = default(IList), IList destinationAddressPrefixes = default(IList), IList sourcePortRanges = default(IList), IList destinationPortRanges = default(IList)) + /// The CIDR or source IP range. + /// Asterisk '*' can also be used to match all source IPs. Default tags + /// such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can + /// also be used. If this is an ingress rule, specifies where network + /// traffic originates from. + /// The destination address + /// prefix. CIDR or destination IP range. Asterisk '*' can also be used + /// to match all source IPs. Default tags such as 'VirtualNetwork', + /// 'AzureLoadBalancer' and 'Internet' can also be used. + /// The source port or range. Integer or + /// range between 0 and 65535. Asterisk '*' can also be used to match + /// all ports. + /// he destination port or range. + /// Integer or range between 0 and 65535. Asterisk '*' can also be used + /// to match all ports. + public NetworkSecurityRule(string name, string protocol, string access, int priority, string direction, string description = default(string), IList sourceAddressPrefixes = default(IList), IList destinationAddressPrefixes = default(IList), IList sourcePortRanges = default(IList), IList destinationPortRanges = default(IList), string sourceAddressPrefix = default(string), string destinationAddressPrefix = default(string), string sourcePortRange = default(string), string destinationPortRange = default(string)) { Name = name; Description = description; @@ -63,6 +78,10 @@ public NetworkSecurityRule() DestinationAddressPrefixes = destinationAddressPrefixes; SourcePortRanges = sourcePortRanges; DestinationPortRanges = destinationPortRanges; + SourceAddressPrefix = sourceAddressPrefix; + DestinationAddressPrefix = destinationAddressPrefix; + SourcePortRange = sourcePortRange; + DestinationPortRange = destinationPortRange; Access = access; Priority = priority; Direction = direction; @@ -118,6 +137,39 @@ public NetworkSecurityRule() [JsonProperty(PropertyName = "destinationPortRanges")] public IList DestinationPortRanges { get; set; } + /// + /// Gets or sets the CIDR or source IP range. Asterisk '*' can also be + /// used to match all source IPs. Default tags such as + /// 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be + /// used. If this is an ingress rule, specifies where network traffic + /// originates from. + /// + [JsonProperty(PropertyName = "sourceAddressPrefix")] + public string SourceAddressPrefix { get; set; } + + /// + /// Gets or sets the destination address prefix. CIDR or destination IP + /// range. Asterisk '*' can also be used to match all source IPs. + /// Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and + /// 'Internet' can also be used. + /// + [JsonProperty(PropertyName = "destinationAddressPrefix")] + public string DestinationAddressPrefix { get; set; } + + /// + /// Gets or sets the source port or range. Integer or range between 0 + /// and 65535. Asterisk '*' can also be used to match all ports. + /// + [JsonProperty(PropertyName = "sourcePortRange")] + public string SourcePortRange { get; set; } + + /// + /// Gets or sets he destination port or range. Integer or range between + /// 0 and 65535. Asterisk '*' can also be used to match all ports. + /// + [JsonProperty(PropertyName = "destinationPortRange")] + public string DestinationPortRange { get; set; } + /// /// Gets or sets the network traffic is allowed or denied. Possible /// values include: 'allow', 'deny' diff --git a/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/NodeType.cs b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/NodeType.cs index 5f40f4e6829f..e84f5a2970c5 100644 --- a/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/NodeType.cs +++ b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/NodeType.cs @@ -35,19 +35,26 @@ public NodeType() /// /// Initializes a new instance of the NodeType class. /// - /// The node type on which system services will - /// run. Only one node type should be marked as primary. Primary node - /// type cannot be deleted or changed for existing clusters. - /// The number of nodes in the node - /// type. - /// Disk size for each vm in the node type - /// in GBs. + /// Indicates the Service Fabric system + /// services for the cluster will run on this node type. This setting + /// cannot be changed once the node type is created. + /// The number of nodes in the node type. + /// <br /><br />**Values:** <br />-1 - Use when auto + /// scale rules are configured or sku.capacity is defined <br /> + /// 0 - Not supported <br /> >0 - Use for manual + /// scale. /// Azure resource identifier. /// Azure resource name. /// Azure resource type. /// Azure resource tags. - /// Possible values include: 'Standard_LRS', - /// 'StandardSSD_LRS', 'Premium_LRS' + /// Disk size for the managed disk + /// attached to the vms on the node type in GBs. + /// Managed data disk type. Specifies the + /// storage account type for the managed disk. Possible values include: + /// 'Standard_LRS', 'StandardSSD_LRS', 'Premium_LRS' + /// Managed data disk letter. It can not + /// use the reserved letter C or D and it can not change after + /// created. /// The placement tags applied to /// nodes in the node type, which can be used to indicate where certain /// services (workload) should run. @@ -76,22 +83,60 @@ public NodeType() /// 'latest'. /// virtual machine secretes. /// virtual machine extensions. + /// Identities to assign to the virtual + /// machine scale set under the node type. /// Indicates if the node type can only host /// Stateless workloads. /// Indicates if scale set /// associated with the node type can be composed of multiple placement /// groups. - /// The provisioning state of the - /// managed cluster resource. Possible values include: 'None', - /// 'Creating', 'Created', 'Updating', 'Succeeded', 'Failed', - /// 'Canceled', 'Deleting', 'Deleted', 'Other' - public NodeType(bool isPrimary, int vmInstanceCount, int dataDiskSizeGB, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), SystemData systemData = default(SystemData), string dataDiskType = default(string), IDictionary placementProperties = default(IDictionary), IDictionary capacities = default(IDictionary), EndpointRangeDescription applicationPorts = default(EndpointRangeDescription), EndpointRangeDescription ephemeralPorts = default(EndpointRangeDescription), string vmSize = default(string), string vmImagePublisher = default(string), string vmImageOffer = default(string), string vmImageSku = default(string), string vmImageVersion = default(string), IList vmSecrets = default(IList), IList vmExtensions = default(IList), VmManagedIdentity vmManagedIdentity = default(VmManagedIdentity), bool? isStateless = default(bool?), bool? multiplePlacementGroups = default(bool?), string provisioningState = default(string)) + /// Indicates the node type uses + /// its own frontend configurations instead of the default one for the + /// cluster. This setting can only be specified for non-primary node + /// types and can not be added or removed after the node type is + /// created. + /// The Network Security Rules for + /// this node type. This setting can only be specified for node types + /// that are configured with frontend configurations. + /// Additional managed data + /// disks. + /// Enable or disable the Host + /// Encryption for the virtual machines on the node type. This will + /// enable the encryption for all the disks including Resource/Temp + /// disk at host itself. Default: The Encryption at host will be + /// disabled unless this property is set to true for the + /// resource. + /// The provisioning state of the node + /// type resource. Possible values include: 'None', 'Creating', + /// 'Created', 'Updating', 'Succeeded', 'Failed', 'Canceled', + /// 'Deleting', 'Deleted', 'Other' + /// Specifies whether the + /// network interface is accelerated networking-enabled. + /// Specifies whether the + /// use public load balancer. If not specified and the node type + /// doesn't have its own frontend configuration, it will be attached to + /// the default load balancer. If the node type uses its own Load + /// balancer and useDefaultPublicLoadBalancer is true, then the + /// frontend has to be an Internal Load Balancer. If the node type uses + /// its own Load balancer and useDefaultPublicLoadBalancer is false or + /// not set, then the custom load balancer must include a public load + /// balancer to provide outbound connectivity. + /// Specifies whether to use the + /// temporary disk for the service fabric data root, in which case no + /// managed data disk will be attached and the temporary disk will be + /// used. It is only allowed for stateless node types. + /// Specifies whether the node + /// type should be overprovisioned. It is only allowed for stateless + /// node types. + /// The node type sku. + public NodeType(bool isPrimary, int vmInstanceCount, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), SystemData systemData = default(SystemData), int? dataDiskSizeGB = default(int?), string dataDiskType = default(string), string dataDiskLetter = default(string), IDictionary placementProperties = default(IDictionary), IDictionary capacities = default(IDictionary), EndpointRangeDescription applicationPorts = default(EndpointRangeDescription), EndpointRangeDescription ephemeralPorts = default(EndpointRangeDescription), string vmSize = default(string), string vmImagePublisher = default(string), string vmImageOffer = default(string), string vmImageSku = default(string), string vmImageVersion = default(string), IList vmSecrets = default(IList), IList vmExtensions = default(IList), VmManagedIdentity vmManagedIdentity = default(VmManagedIdentity), bool? isStateless = default(bool?), bool? multiplePlacementGroups = default(bool?), IList frontendConfigurations = default(IList), IList networkSecurityRules = default(IList), IList additionalDataDisks = default(IList), bool? enableEncryptionAtHost = default(bool?), string provisioningState = default(string), bool? enableAcceleratedNetworking = default(bool?), bool? useDefaultPublicLoadBalancer = default(bool?), bool? useTempDataDisk = default(bool?), bool? enableOverProvisioning = default(bool?), NodeTypeSku sku = default(NodeTypeSku)) : base(id, name, type, tags, systemData) { IsPrimary = isPrimary; VmInstanceCount = vmInstanceCount; DataDiskSizeGB = dataDiskSizeGB; DataDiskType = dataDiskType; + DataDiskLetter = dataDiskLetter; PlacementProperties = placementProperties; Capacities = capacities; ApplicationPorts = applicationPorts; @@ -106,7 +151,16 @@ public NodeType() VmManagedIdentity = vmManagedIdentity; IsStateless = isStateless; MultiplePlacementGroups = multiplePlacementGroups; + FrontendConfigurations = frontendConfigurations; + NetworkSecurityRules = networkSecurityRules; + AdditionalDataDisks = additionalDataDisks; + EnableEncryptionAtHost = enableEncryptionAtHost; ProvisioningState = provisioningState; + EnableAcceleratedNetworking = enableAcceleratedNetworking; + UseDefaultPublicLoadBalancer = useDefaultPublicLoadBalancer; + UseTempDataDisk = useTempDataDisk; + EnableOverProvisioning = enableOverProvisioning; + Sku = sku; CustomInit(); } @@ -116,32 +170,45 @@ public NodeType() partial void CustomInit(); /// - /// Gets or sets the node type on which system services will run. Only - /// one node type should be marked as primary. Primary node type cannot - /// be deleted or changed for existing clusters. + /// Gets or sets indicates the Service Fabric system services for the + /// cluster will run on this node type. This setting cannot be changed + /// once the node type is created. /// [JsonProperty(PropertyName = "properties.isPrimary")] public bool IsPrimary { get; set; } /// - /// Gets or sets the number of nodes in the node type. + /// Gets or sets the number of nodes in the node type. &lt;br + /// /&gt;&lt;br /&gt;**Values:** &lt;br /&gt;-1 - + /// Use when auto scale rules are configured or sku.capacity is defined + /// &lt;br /&gt; 0 - Not supported &lt;br /&gt; + /// &gt;0 - Use for manual scale. /// [JsonProperty(PropertyName = "properties.vmInstanceCount")] public int VmInstanceCount { get; set; } /// - /// Gets or sets disk size for each vm in the node type in GBs. + /// Gets or sets disk size for the managed disk attached to the vms on + /// the node type in GBs. /// [JsonProperty(PropertyName = "properties.dataDiskSizeGB")] - public int DataDiskSizeGB { get; set; } + public int? DataDiskSizeGB { get; set; } /// - /// Gets or sets possible values include: 'Standard_LRS', + /// Gets or sets managed data disk type. Specifies the storage account + /// type for the managed disk. Possible values include: 'Standard_LRS', /// 'StandardSSD_LRS', 'Premium_LRS' /// [JsonProperty(PropertyName = "properties.dataDiskType")] public string DataDiskType { get; set; } + /// + /// Gets or sets managed data disk letter. It can not use the reserved + /// letter C or D and it can not change after created. + /// + [JsonProperty(PropertyName = "properties.dataDiskLetter")] + public string DataDiskLetter { get; set; } + /// /// Gets or sets the placement tags applied to nodes in the node type, /// which can be used to indicate where certain services (workload) @@ -229,6 +296,8 @@ public NodeType() public IList VmExtensions { get; set; } /// + /// Gets or sets identities to assign to the virtual machine scale set + /// under the node type. /// [JsonProperty(PropertyName = "properties.vmManagedIdentity")] public VmManagedIdentity VmManagedIdentity { get; set; } @@ -248,13 +317,89 @@ public NodeType() public bool? MultiplePlacementGroups { get; set; } /// - /// Gets the provisioning state of the managed cluster resource. - /// Possible values include: 'None', 'Creating', 'Created', 'Updating', + /// Gets or sets indicates the node type uses its own frontend + /// configurations instead of the default one for the cluster. This + /// setting can only be specified for non-primary node types and can + /// not be added or removed after the node type is created. + /// + [JsonProperty(PropertyName = "properties.frontendConfigurations")] + public IList FrontendConfigurations { get; set; } + + /// + /// Gets or sets the Network Security Rules for this node type. This + /// setting can only be specified for node types that are configured + /// with frontend configurations. + /// + [JsonProperty(PropertyName = "properties.networkSecurityRules")] + public IList NetworkSecurityRules { get; set; } + + /// + /// Gets or sets additional managed data disks. + /// + [JsonProperty(PropertyName = "properties.additionalDataDisks")] + public IList AdditionalDataDisks { get; set; } + + /// + /// Gets or sets enable or disable the Host Encryption for the virtual + /// machines on the node type. This will enable the encryption for all + /// the disks including Resource/Temp disk at host itself. Default: The + /// Encryption at host will be disabled unless this property is set to + /// true for the resource. + /// + [JsonProperty(PropertyName = "properties.enableEncryptionAtHost")] + public bool? EnableEncryptionAtHost { get; set; } + + /// + /// Gets the provisioning state of the node type resource. Possible + /// values include: 'None', 'Creating', 'Created', 'Updating', /// 'Succeeded', 'Failed', 'Canceled', 'Deleting', 'Deleted', 'Other' /// [JsonProperty(PropertyName = "properties.provisioningState")] public string ProvisioningState { get; private set; } + /// + /// Gets or sets specifies whether the network interface is accelerated + /// networking-enabled. + /// + [JsonProperty(PropertyName = "properties.enableAcceleratedNetworking")] + public bool? EnableAcceleratedNetworking { get; set; } + + /// + /// Gets or sets specifies whether the use public load balancer. If not + /// specified and the node type doesn't have its own frontend + /// configuration, it will be attached to the default load balancer. If + /// the node type uses its own Load balancer and + /// useDefaultPublicLoadBalancer is true, then the frontend has to be + /// an Internal Load Balancer. If the node type uses its own Load + /// balancer and useDefaultPublicLoadBalancer is false or not set, then + /// the custom load balancer must include a public load balancer to + /// provide outbound connectivity. + /// + [JsonProperty(PropertyName = "properties.useDefaultPublicLoadBalancer")] + public bool? UseDefaultPublicLoadBalancer { get; set; } + + /// + /// Gets or sets specifies whether to use the temporary disk for the + /// service fabric data root, in which case no managed data disk will + /// be attached and the temporary disk will be used. It is only allowed + /// for stateless node types. + /// + [JsonProperty(PropertyName = "properties.useTempDataDisk")] + public bool? UseTempDataDisk { get; set; } + + /// + /// Gets or sets specifies whether the node type should be + /// overprovisioned. It is only allowed for stateless node types. + /// + [JsonProperty(PropertyName = "properties.enableOverProvisioning")] + public bool? EnableOverProvisioning { get; set; } + + /// + /// Gets or sets the node type sku. + /// + [JsonProperty(PropertyName = "sku")] + public NodeTypeSku Sku { get; set; } + /// /// Validate the object. /// @@ -267,9 +412,16 @@ public virtual void Validate() { throw new ValidationException(ValidationRules.InclusiveMaximum, "VmInstanceCount", 2147483647); } - if (VmInstanceCount < 1) + if (VmInstanceCount < -1) { - throw new ValidationException(ValidationRules.InclusiveMinimum, "VmInstanceCount", 1); + throw new ValidationException(ValidationRules.InclusiveMinimum, "VmInstanceCount", -1); + } + if (DataDiskLetter != null) + { + if (!System.Text.RegularExpressions.Regex.IsMatch(DataDiskLetter, "^[a-zA-Z]{1}$")) + { + throw new ValidationException(ValidationRules.Pattern, "DataDiskLetter", "^[a-zA-Z]{1}$"); + } } if (ApplicationPorts != null) { @@ -299,6 +451,30 @@ public virtual void Validate() } } } + if (NetworkSecurityRules != null) + { + foreach (var element2 in NetworkSecurityRules) + { + if (element2 != null) + { + element2.Validate(); + } + } + } + if (AdditionalDataDisks != null) + { + foreach (var element3 in AdditionalDataDisks) + { + if (element3 != null) + { + element3.Validate(); + } + } + } + if (Sku != null) + { + Sku.Validate(); + } } } } diff --git a/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeAvailableSku.cs b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeAvailableSku.cs new file mode 100644 index 000000000000..7aaf3cc2e17d --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeAvailableSku.cs @@ -0,0 +1,72 @@ +// +// 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.ServiceFabricManagedClusters.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Defines the type of sku available for a node type + /// + public partial class NodeTypeAvailableSku + { + /// + /// Initializes a new instance of the NodeTypeAvailableSku class. + /// + public NodeTypeAvailableSku() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the NodeTypeAvailableSku class. + /// + /// The type of resource the sku applies to. + /// <br /><br />Value: + /// Microsoft.ServiceFabric/managedClusters/nodeTypes. + /// The supported SKU for a for node type. + /// Provides information about how the node + /// count can be scaled. + public NodeTypeAvailableSku(string resourceType = default(string), NodeTypeSupportedSku sku = default(NodeTypeSupportedSku), NodeTypeSkuCapacity capacity = default(NodeTypeSkuCapacity)) + { + ResourceType = resourceType; + Sku = sku; + Capacity = capacity; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets the type of resource the sku applies to. &lt;br + /// /&gt;&lt;br /&gt;Value: + /// Microsoft.ServiceFabric/managedClusters/nodeTypes. + /// + [JsonProperty(PropertyName = "resourceType")] + public string ResourceType { get; private set; } + + /// + /// Gets the supported SKU for a for node type. + /// + [JsonProperty(PropertyName = "sku")] + public NodeTypeSupportedSku Sku { get; private set; } + + /// + /// Gets provides information about how the node count can be scaled. + /// + [JsonProperty(PropertyName = "capacity")] + public NodeTypeSkuCapacity Capacity { get; private set; } + + } +} diff --git a/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeSku.cs b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeSku.cs new file mode 100644 index 000000000000..4e78921cf27a --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeSku.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.ServiceFabricManagedClusters.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Describes a node type sku. + /// + public partial class NodeTypeSku + { + /// + /// Initializes a new instance of the NodeTypeSku class. + /// + public NodeTypeSku() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the NodeTypeSku class. + /// + /// The number of nodes in the node type.<br + /// /><br />If present in request it will override + /// properties.vmInstanceCount. + /// The sku name. <br /><br />Name is + /// internally generated and is used in auto-scale scenarios.<br + /// /> Property does not allow to be changed to other values than + /// generated.<br /> To avoid deployment errors please omit the + /// property. + /// Specifies the tier of the node type. <br + /// /><br /> Possible Values:<br /> **Standard** + public NodeTypeSku(int capacity, string name = default(string), string tier = default(string)) + { + Name = name; + Tier = tier; + Capacity = capacity; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the sku name. &lt;br /&gt;&lt;br + /// /&gt;Name is internally generated and is used in auto-scale + /// scenarios.&lt;br /&gt; Property does not allow to be + /// changed to other values than generated.&lt;br /&gt; To + /// avoid deployment errors please omit the property. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or sets specifies the tier of the node type. &lt;br + /// /&gt;&lt;br /&gt; Possible Values:&lt;br /&gt; + /// **Standard** + /// + [JsonProperty(PropertyName = "tier")] + public string Tier { get; set; } + + /// + /// Gets or sets the number of nodes in the node type.&lt;br + /// /&gt;&lt;br /&gt;If present in request it will override + /// properties.vmInstanceCount. + /// + [JsonProperty(PropertyName = "capacity")] + public int Capacity { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Capacity > 2147483647) + { + throw new ValidationException(ValidationRules.InclusiveMaximum, "Capacity", 2147483647); + } + if (Capacity < 1) + { + throw new ValidationException(ValidationRules.InclusiveMinimum, "Capacity", 1); + } + } + } +} diff --git a/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeSkuCapacity.cs b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeSkuCapacity.cs new file mode 100644 index 000000000000..fe6de922288b --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeSkuCapacity.cs @@ -0,0 +1,80 @@ +// +// 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.ServiceFabricManagedClusters.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Provides information about how node type can be scaled. + /// + public partial class NodeTypeSkuCapacity + { + /// + /// Initializes a new instance of the NodeTypeSkuCapacity class. + /// + public NodeTypeSkuCapacity() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the NodeTypeSkuCapacity class. + /// + /// Lowest permitted node count in a node + /// type. + /// Highest permitted node count in a node + /// type. + /// Default node count in a node + /// type. + /// Node type capacity scale type. Possible + /// values include: 'None', 'Manual', 'Automatic' + public NodeTypeSkuCapacity(int? minimum = default(int?), int? maximum = default(int?), int? defaultProperty = default(int?), string scaleType = default(string)) + { + Minimum = minimum; + Maximum = maximum; + DefaultProperty = defaultProperty; + ScaleType = scaleType; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets lowest permitted node count in a node type. + /// + [JsonProperty(PropertyName = "minimum")] + public int? Minimum { get; private set; } + + /// + /// Gets highest permitted node count in a node type. + /// + [JsonProperty(PropertyName = "maximum")] + public int? Maximum { get; private set; } + + /// + /// Gets default node count in a node type. + /// + [JsonProperty(PropertyName = "default")] + public int? DefaultProperty { get; private set; } + + /// + /// Gets node type capacity scale type. Possible values include: + /// 'None', 'Manual', 'Automatic' + /// + [JsonProperty(PropertyName = "scaleType")] + public string ScaleType { get; private set; } + + } +} diff --git a/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeSkuScaleType.cs b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeSkuScaleType.cs new file mode 100644 index 000000000000..91a6ed8c05f4 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeSkuScaleType.cs @@ -0,0 +1,32 @@ +// +// 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.ServiceFabricManagedClusters.Models +{ + + /// + /// Defines values for NodeTypeSkuScaleType. + /// + public static class NodeTypeSkuScaleType + { + /// + /// Node count is not adjustable in any way (e.g. it is fixed). + /// + public const string None = "None"; + /// + /// The user must manually scale out/in. + /// + public const string Manual = "Manual"; + /// + /// Automatic scale is allowed. + /// + public const string Automatic = "Automatic"; + } +} diff --git a/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeSupportedSku.cs b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeSupportedSku.cs new file mode 100644 index 000000000000..c7d98f093a0b --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeSupportedSku.cs @@ -0,0 +1,62 @@ +// +// 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.ServiceFabricManagedClusters.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Describes a node type supported sku. + /// + public partial class NodeTypeSupportedSku + { + /// + /// Initializes a new instance of the NodeTypeSupportedSku class. + /// + public NodeTypeSupportedSku() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the NodeTypeSupportedSku class. + /// + /// The sku name. + /// Specifies the tier of the node type. <br + /// /><br /> Possible Values:<br /> **Standard** + public NodeTypeSupportedSku(string name = default(string), string tier = default(string)) + { + Name = name; + Tier = tier; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets the sku name. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; private set; } + + /// + /// Gets specifies the tier of the node type. &lt;br + /// /&gt;&lt;br /&gt; Possible Values:&lt;br /&gt; + /// **Standard** + /// + [JsonProperty(PropertyName = "tier")] + public string Tier { get; private set; } + + } +} diff --git a/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeUpdateParameters.cs b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeUpdateParameters.cs index 4576057eb15b..038ee01e2b7d 100644 --- a/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeUpdateParameters.cs +++ b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeUpdateParameters.cs @@ -32,9 +32,11 @@ public NodeTypeUpdateParameters() /// Initializes a new instance of the NodeTypeUpdateParameters class. /// /// Node type update parameters - public NodeTypeUpdateParameters(IDictionary tags = default(IDictionary)) + /// The node type sku. + public NodeTypeUpdateParameters(IDictionary tags = default(IDictionary), NodeTypeSku sku = default(NodeTypeSku)) { Tags = tags; + Sku = sku; CustomInit(); } @@ -49,5 +51,24 @@ public NodeTypeUpdateParameters() [JsonProperty(PropertyName = "tags")] public IDictionary Tags { get; set; } + /// + /// Gets or sets the node type sku. + /// + [JsonProperty(PropertyName = "sku")] + public NodeTypeSku Sku { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Sku != null) + { + Sku.Validate(); + } + } } } diff --git a/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/PrivateEndpointNetworkPolicies.cs b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/PrivateEndpointNetworkPolicies.cs new file mode 100644 index 000000000000..866461016d0e --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/PrivateEndpointNetworkPolicies.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.ServiceFabricManagedClusters.Models +{ + + /// + /// Defines values for PrivateEndpointNetworkPolicies. + /// + public static class PrivateEndpointNetworkPolicies + { + public const string Enabled = "enabled"; + public const string Disabled = "disabled"; + } +} diff --git a/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/PrivateLinkServiceNetworkPolicies.cs b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/PrivateLinkServiceNetworkPolicies.cs new file mode 100644 index 000000000000..6cc91927a141 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/PrivateLinkServiceNetworkPolicies.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.ServiceFabricManagedClusters.Models +{ + + /// + /// Defines values for PrivateLinkServiceNetworkPolicies. + /// + public static class PrivateLinkServiceNetworkPolicies + { + public const string Enabled = "enabled"; + public const string Disabled = "disabled"; + } +} diff --git a/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/ServiceEndpoint.cs b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/ServiceEndpoint.cs new file mode 100644 index 000000000000..a4c99e9068ba --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/ServiceEndpoint.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.ServiceFabricManagedClusters.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The service endpoint properties. + /// + public partial class ServiceEndpoint + { + /// + /// Initializes a new instance of the ServiceEndpoint class. + /// + public ServiceEndpoint() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ServiceEndpoint class. + /// + /// The type of the endpoint service. + /// A list of locations. + public ServiceEndpoint(string service, IList locations = default(IList)) + { + Service = service; + Locations = locations; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the type of the endpoint service. + /// + [JsonProperty(PropertyName = "service")] + public string Service { get; set; } + + /// + /// Gets or sets a list of locations. + /// + [JsonProperty(PropertyName = "locations")] + public IList Locations { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Service == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Service"); + } + } + } +} diff --git a/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/ServiceScalingTriggerKind.cs b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/ServiceScalingTriggerKind.cs index 800a5309ca80..5151f673aaad 100644 --- a/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/ServiceScalingTriggerKind.cs +++ b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/ServiceScalingTriggerKind.cs @@ -20,11 +20,11 @@ public static class ServiceScalingTriggerKind /// Represents a scaling trigger related to an average load of a /// metric/resource of a partition. The value is 0. /// - public const string AveragePartitionLoad = "AveragePartitionLoad"; + public const string AveragePartitionLoadTrigger = "AveragePartitionLoadTrigger"; /// /// Represents a scaling policy related to an average load of a /// metric/resource of a service. The value is 1. /// - public const string AverageServiceLoad = "AverageServiceLoad"; + public const string AverageServiceLoadTrigger = "AverageServiceLoadTrigger"; } } diff --git a/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/Subnet.cs b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/Subnet.cs new file mode 100644 index 000000000000..00bf5cc74075 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/Subnet.cs @@ -0,0 +1,109 @@ +// +// 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.ServiceFabricManagedClusters.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Describes a Subnet. + /// + public partial class Subnet + { + /// + /// Initializes a new instance of the Subnet class. + /// + public Subnet() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the Subnet class. + /// + /// Subnet name. + /// Indicates wether to enable Ipv6 or not. If + /// not provided, it will take the same configuration as the + /// cluster. + /// Enable or Disable + /// apply network policies on private end point in the subnet. Possible + /// values include: 'enabled', 'disabled' + /// Enable or Disable + /// apply network policies on private link service in the subnet. + /// Possible values include: 'enabled', 'disabled' + /// Full resource id for the + /// network security group. + public Subnet(string name, bool? enableIpv6 = default(bool?), string privateEndpointNetworkPolicies = default(string), string privateLinkServiceNetworkPolicies = default(string), string networkSecurityGroupId = default(string)) + { + Name = name; + EnableIpv6 = enableIpv6; + PrivateEndpointNetworkPolicies = privateEndpointNetworkPolicies; + PrivateLinkServiceNetworkPolicies = privateLinkServiceNetworkPolicies; + NetworkSecurityGroupId = networkSecurityGroupId; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets subnet name. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or sets indicates wether to enable Ipv6 or not. If not + /// provided, it will take the same configuration as the cluster. + /// + [JsonProperty(PropertyName = "enableIpv6")] + public bool? EnableIpv6 { get; set; } + + /// + /// Gets or sets enable or Disable apply network policies on private + /// end point in the subnet. Possible values include: 'enabled', + /// 'disabled' + /// + [JsonProperty(PropertyName = "privateEndpointNetworkPolicies")] + public string PrivateEndpointNetworkPolicies { get; set; } + + /// + /// Gets or sets enable or Disable apply network policies on private + /// link service in the subnet. Possible values include: 'enabled', + /// 'disabled' + /// + [JsonProperty(PropertyName = "privateLinkServiceNetworkPolicies")] + public string PrivateLinkServiceNetworkPolicies { get; set; } + + /// + /// Gets or sets full resource id for the network security group. + /// + [JsonProperty(PropertyName = "networkSecurityGroupId")] + public string NetworkSecurityGroupId { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Name"); + } + } + } +} diff --git a/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/VMSSExtension.cs b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/VMSSExtension.cs index 14463d41c1ad..343d1cff0e58 100644 --- a/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/VMSSExtension.cs +++ b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/VMSSExtension.cs @@ -60,7 +60,10 @@ public VMSSExtension() /// names after which this extension needs to be provisioned. /// The provisioning state, which only /// appears in the response. - public VMSSExtension(string name, string publisher, string type, string typeHandlerVersion, bool? autoUpgradeMinorVersion = default(bool?), object settings = default(object), object protectedSettings = default(object), string forceUpdateTag = default(string), IList provisionAfterExtensions = default(IList), string provisioningState = default(string)) + /// Indicates whether the + /// extension should be automatically upgraded by the platform if there + /// is a newer version of the extension available. + public VMSSExtension(string name, string publisher, string type, string typeHandlerVersion, bool? autoUpgradeMinorVersion = default(bool?), object settings = default(object), object protectedSettings = default(object), string forceUpdateTag = default(string), IList provisionAfterExtensions = default(IList), string provisioningState = default(string), bool? enableAutomaticUpgrade = default(bool?)) { Name = name; Publisher = publisher; @@ -72,6 +75,7 @@ public VMSSExtension() ForceUpdateTag = forceUpdateTag; ProvisionAfterExtensions = provisionAfterExtensions; ProvisioningState = provisioningState; + EnableAutomaticUpgrade = enableAutomaticUpgrade; CustomInit(); } @@ -148,6 +152,14 @@ public VMSSExtension() [JsonProperty(PropertyName = "properties.provisioningState")] public string ProvisioningState { get; private set; } + /// + /// Gets or sets indicates whether the extension should be + /// automatically upgraded by the platform if there is a newer version + /// of the extension available. + /// + [JsonProperty(PropertyName = "properties.enableAutomaticUpgrade")] + public bool? EnableAutomaticUpgrade { get; set; } + /// /// Validate the object. /// diff --git a/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/VMSize.cs b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/VMSize.cs new file mode 100644 index 000000000000..6453df6b0444 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/VMSize.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.ServiceFabricManagedClusters.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// VM Sizes properties. + /// + public partial class VMSize + { + /// + /// Initializes a new instance of the VMSize class. + /// + public VMSize() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the VMSize class. + /// + /// VM Size name. + public VMSize(string size = default(string)) + { + Size = size; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets VM Size name. + /// + [JsonProperty(PropertyName = "size")] + public string Size { get; private set; } + + } +} diff --git a/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/VmssDataDisk.cs b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/VmssDataDisk.cs new file mode 100644 index 000000000000..7061a4addb83 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/Models/VmssDataDisk.cs @@ -0,0 +1,118 @@ +// +// 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.ServiceFabricManagedClusters.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Managed data disk description. + /// + public partial class VmssDataDisk + { + /// + /// Initializes a new instance of the VmssDataDisk class. + /// + public VmssDataDisk() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the VmssDataDisk class. + /// + /// Specifies the logical unit number of the data + /// disk. This value is used to identify data disks within the VM and + /// therefore must be unique for each data disk attached to a VM. Lun 0 + /// is reserved for the service fabric data disk. + /// Disk size for each vm in the node type in + /// GBs. + /// Managed data disk type. Specifies the + /// storage account type for the managed disk. Possible values include: + /// 'Standard_LRS', 'StandardSSD_LRS', 'Premium_LRS' + /// Managed data disk letter. It can not use + /// the reserved letter C or D and it can not change after + /// created. + public VmssDataDisk(int lun, int diskSizeGB, string diskType, string diskLetter) + { + Lun = lun; + DiskSizeGB = diskSizeGB; + DiskType = diskType; + DiskLetter = diskLetter; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets specifies the logical unit number of the data disk. + /// This value is used to identify data disks within the VM and + /// therefore must be unique for each data disk attached to a VM. Lun 0 + /// is reserved for the service fabric data disk. + /// + [JsonProperty(PropertyName = "lun")] + public int Lun { get; set; } + + /// + /// Gets or sets disk size for each vm in the node type in GBs. + /// + [JsonProperty(PropertyName = "diskSizeGB")] + public int DiskSizeGB { get; set; } + + /// + /// Gets or sets managed data disk type. Specifies the storage account + /// type for the managed disk. Possible values include: 'Standard_LRS', + /// 'StandardSSD_LRS', 'Premium_LRS' + /// + [JsonProperty(PropertyName = "diskType")] + public string DiskType { get; set; } + + /// + /// Gets or sets managed data disk letter. It can not use the reserved + /// letter C or D and it can not change after created. + /// + [JsonProperty(PropertyName = "diskLetter")] + public string DiskLetter { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (DiskType == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "DiskType"); + } + if (DiskLetter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "DiskLetter"); + } + if (Lun < 1) + { + throw new ValidationException(ValidationRules.InclusiveMinimum, "Lun", 1); + } + if (DiskLetter != null) + { + if (!System.Text.RegularExpressions.Regex.IsMatch(DiskLetter, "^[a-zA-Z]{1}$")) + { + throw new ValidationException(ValidationRules.Pattern, "DiskLetter", "^[a-zA-Z]{1}$"); + } + } + } + } +} diff --git a/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/NodeTypeSkusOperations.cs b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/NodeTypeSkusOperations.cs new file mode 100644 index 000000000000..958970a5147f --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/NodeTypeSkusOperations.cs @@ -0,0 +1,428 @@ +// +// 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.ServiceFabricManagedClusters +{ + 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; + + /// + /// NodeTypeSkusOperations operations. + /// + internal partial class NodeTypeSkusOperations : IServiceOperations, INodeTypeSkusOperations + { + /// + /// Initializes a new instance of the NodeTypeSkusOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal NodeTypeSkusOperations(ServiceFabricManagedClustersManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the ServiceFabricManagedClustersManagementClient + /// + public ServiceFabricManagedClustersManagementClient Client { get; private set; } + + /// + /// Gets a Service Fabric node type SKUs. + /// + /// + /// Get a Service Fabric node type supported SKUs. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the cluster resource. + /// + /// + /// The name of the node type. + /// + /// + /// 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 clusterName, string nodeTypeName, 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 (clusterName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "clusterName"); + } + if (nodeTypeName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "nodeTypeName"); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("clusterName", clusterName); + tracingParameters.Add("nodeTypeName", nodeTypeName); + 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.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/skus").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{clusterName}", System.Uri.EscapeDataString(clusterName)); + _url = _url.Replace("{nodeTypeName}", System.Uri.EscapeDataString(nodeTypeName)); + 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 ErrorModelException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorModel _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; + } + + /// + /// Gets a Service Fabric node type SKUs. + /// + /// + /// Get a Service Fabric node type supported SKUs. + /// + /// + /// 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 ErrorModelException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorModel _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/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/NodeTypeSkusOperationsExtensions.cs b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/NodeTypeSkusOperationsExtensions.cs new file mode 100644 index 000000000000..17e9db73e554 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/NodeTypeSkusOperationsExtensions.cs @@ -0,0 +1,117 @@ +// +// 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.ServiceFabricManagedClusters +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for NodeTypeSkusOperations. + /// + public static partial class NodeTypeSkusOperationsExtensions + { + /// + /// Gets a Service Fabric node type SKUs. + /// + /// + /// Get a Service Fabric node type supported SKUs. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the cluster resource. + /// + /// + /// The name of the node type. + /// + public static IPage List(this INodeTypeSkusOperations operations, string resourceGroupName, string clusterName, string nodeTypeName) + { + return operations.ListAsync(resourceGroupName, clusterName, nodeTypeName).GetAwaiter().GetResult(); + } + + /// + /// Gets a Service Fabric node type SKUs. + /// + /// + /// Get a Service Fabric node type supported SKUs. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the cluster resource. + /// + /// + /// The name of the node type. + /// + /// + /// The cancellation token. + /// + public static async Task> ListAsync(this INodeTypeSkusOperations operations, string resourceGroupName, string clusterName, string nodeTypeName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, clusterName, nodeTypeName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets a Service Fabric node type SKUs. + /// + /// + /// Get a Service Fabric node type supported SKUs. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListNext(this INodeTypeSkusOperations operations, string nextPageLink) + { + return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Gets a Service Fabric node type SKUs. + /// + /// + /// Get a Service Fabric node type supported SKUs. + /// + /// + /// 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 INodeTypeSkusOperations 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/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/NodeTypesOperations.cs b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/NodeTypesOperations.cs index 77a7b53ad3f9..cae2d4de981b 100644 --- a/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/NodeTypesOperations.cs +++ b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/NodeTypesOperations.cs @@ -97,6 +97,10 @@ internal NodeTypesOperations(ServiceFabricManagedClustersManagementClient client { throw new ValidationException(ValidationRules.CannotBeNull, "clusterName"); } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -390,6 +394,10 @@ internal NodeTypesOperations(ServiceFabricManagedClustersManagementClient client { throw new ValidationException(ValidationRules.CannotBeNull, "nodeTypeName"); } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -582,8 +590,8 @@ internal NodeTypesOperations(ServiceFabricManagedClustersManagementClient client /// /// The name of the node type. /// - /// - /// Node type update parameters + /// + /// The parameters to update the node type configuration. /// /// /// Headers that will be added to request. @@ -606,7 +614,7 @@ internal NodeTypesOperations(ServiceFabricManagedClustersManagementClient client /// /// A response object containing the response body and response headers. /// - public async Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string clusterName, string nodeTypeName, IDictionary tags = default(IDictionary), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string clusterName, string nodeTypeName, NodeTypeUpdateParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.SubscriptionId == null) { @@ -624,10 +632,13 @@ internal NodeTypesOperations(ServiceFabricManagedClustersManagementClient client { throw new ValidationException(ValidationRules.CannotBeNull, "nodeTypeName"); } - NodeTypeUpdateParameters parameters = new NodeTypeUpdateParameters(); - if (tags != null) + if (Client.ApiVersion == null) { - parameters.Tags = tags; + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (parameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; @@ -864,6 +875,10 @@ internal NodeTypesOperations(ServiceFabricManagedClustersManagementClient client { throw new ValidationException(ValidationRules.CannotBeNull, "nodeTypeName"); } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } if (parameters == null) { throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); @@ -1061,6 +1076,10 @@ internal NodeTypesOperations(ServiceFabricManagedClustersManagementClient client { throw new ValidationException(ValidationRules.CannotBeNull, "nodeTypeName"); } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } if (parameters == null) { throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); @@ -1258,6 +1277,10 @@ internal NodeTypesOperations(ServiceFabricManagedClustersManagementClient client { throw new ValidationException(ValidationRules.CannotBeNull, "nodeTypeName"); } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } if (parameters == null) { throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); @@ -1457,6 +1480,10 @@ internal NodeTypesOperations(ServiceFabricManagedClustersManagementClient client { throw new ValidationException(ValidationRules.CannotBeNull, "nodeTypeName"); } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } if (parameters == null) { throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); @@ -1686,6 +1713,10 @@ internal NodeTypesOperations(ServiceFabricManagedClustersManagementClient client { throw new ValidationException(ValidationRules.CannotBeNull, "nodeTypeName"); } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/NodeTypesOperationsExtensions.cs b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/NodeTypesOperationsExtensions.cs index 41f1d0b8e1ce..5ccdb317863f 100644 --- a/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/NodeTypesOperationsExtensions.cs +++ b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/NodeTypesOperationsExtensions.cs @@ -13,8 +13,6 @@ namespace Microsoft.Azure.Management.ServiceFabricManagedClusters using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Collections; - using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; @@ -369,12 +367,12 @@ public static NodeType CreateOrUpdate(this INodeTypesOperations operations, stri /// /// The name of the node type. /// - /// - /// Node type update parameters + /// + /// The parameters to update the node type configuration. /// - public static NodeType Update(this INodeTypesOperations operations, string resourceGroupName, string clusterName, string nodeTypeName, IDictionary tags = default(IDictionary)) + public static NodeType Update(this INodeTypesOperations operations, string resourceGroupName, string clusterName, string nodeTypeName, NodeTypeUpdateParameters parameters) { - return operations.UpdateAsync(resourceGroupName, clusterName, nodeTypeName, tags).GetAwaiter().GetResult(); + return operations.UpdateAsync(resourceGroupName, clusterName, nodeTypeName, parameters).GetAwaiter().GetResult(); } /// @@ -396,15 +394,15 @@ public static NodeType CreateOrUpdate(this INodeTypesOperations operations, stri /// /// The name of the node type. /// - /// - /// Node type update parameters + /// + /// The parameters to update the node type configuration. /// /// /// The cancellation token. /// - public static async Task UpdateAsync(this INodeTypesOperations operations, string resourceGroupName, string clusterName, string nodeTypeName, IDictionary tags = default(IDictionary), CancellationToken cancellationToken = default(CancellationToken)) + public static async Task UpdateAsync(this INodeTypesOperations operations, string resourceGroupName, string clusterName, string nodeTypeName, NodeTypeUpdateParameters parameters, CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, clusterName, nodeTypeName, tags, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, clusterName, nodeTypeName, parameters, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } diff --git a/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/OperationResultsOperations.cs b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/OperationResultsOperations.cs new file mode 100644 index 000000000000..c9c6f28b340e --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/OperationResultsOperations.cs @@ -0,0 +1,228 @@ +// +// 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.ServiceFabricManagedClusters +{ + 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; + + /// + /// OperationResultsOperations operations. + /// + internal partial class OperationResultsOperations : IServiceOperations, IOperationResultsOperations + { + /// + /// Initializes a new instance of the OperationResultsOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal OperationResultsOperations(ServiceFabricManagedClustersManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the ServiceFabricManagedClustersManagementClient + /// + public ServiceFabricManagedClustersManagementClient Client { get; private set; } + + /// + /// Get long running operation result. + /// + /// + /// Get long running operation result. + /// + /// + /// The location for the cluster code versions. This is different from cluster + /// location. + /// + /// + /// operation identifier. + /// + /// + /// 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 GetWithHttpMessagesAsync(string location, string operationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (location == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "location"); + } + if (operationId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "operationId"); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("location", location); + tracingParameters.Add("operationId", operationId); + 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.ServiceFabric/locations/{location}/managedClusterOperationResults/{operationId}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{location}", System.Uri.EscapeDataString(location)); + _url = _url.Replace("{operationId}", System.Uri.EscapeDataString(operationId)); + 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 != 202 && (int)_statusCode != 204) + { + var ex = new ErrorModelException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorModel _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(); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + } +} diff --git a/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/OperationResultsOperationsExtensions.cs b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/OperationResultsOperationsExtensions.cs new file mode 100644 index 000000000000..8cb47eb18428 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/OperationResultsOperationsExtensions.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.ServiceFabricManagedClusters +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for OperationResultsOperations. + /// + public static partial class OperationResultsOperationsExtensions + { + /// + /// Get long running operation result. + /// + /// + /// Get long running operation result. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The location for the cluster code versions. This is different from cluster + /// location. + /// + /// + /// operation identifier. + /// + public static void Get(this IOperationResultsOperations operations, string location, string operationId) + { + operations.GetAsync(location, operationId).GetAwaiter().GetResult(); + } + + /// + /// Get long running operation result. + /// + /// + /// Get long running operation result. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The location for the cluster code versions. This is different from cluster + /// location. + /// + /// + /// operation identifier. + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this IOperationResultsOperations operations, string location, string operationId, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.GetWithHttpMessagesAsync(location, operationId, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + } +} diff --git a/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/OperationStatusOperations.cs b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/OperationStatusOperations.cs new file mode 100644 index 000000000000..a608cfeaf415 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/OperationStatusOperations.cs @@ -0,0 +1,249 @@ +// +// 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.ServiceFabricManagedClusters +{ + 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; + + /// + /// OperationStatusOperations operations. + /// + internal partial class OperationStatusOperations : IServiceOperations, IOperationStatusOperations + { + /// + /// Initializes a new instance of the OperationStatusOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal OperationStatusOperations(ServiceFabricManagedClustersManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the ServiceFabricManagedClustersManagementClient + /// + public ServiceFabricManagedClustersManagementClient Client { get; private set; } + + /// + /// Get long running operation status. + /// + /// + /// Get long running operation status. + /// + /// + /// The location for the cluster code versions. This is different from cluster + /// location. + /// + /// + /// operation identifier. + /// + /// + /// 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 location, string operationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (location == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "location"); + } + if (operationId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "operationId"); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("location", location); + tracingParameters.Add("operationId", operationId); + 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.ServiceFabric/locations/{location}/managedClusterOperations/{operationId}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{location}", System.Uri.EscapeDataString(location)); + _url = _url.Replace("{operationId}", System.Uri.EscapeDataString(operationId)); + 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 ErrorModelException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorModel _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/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/OperationStatusOperationsExtensions.cs b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/OperationStatusOperationsExtensions.cs new file mode 100644 index 000000000000..13c9fafb1310 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/OperationStatusOperationsExtensions.cs @@ -0,0 +1,73 @@ +// +// 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.ServiceFabricManagedClusters +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for OperationStatusOperations. + /// + public static partial class OperationStatusOperationsExtensions + { + /// + /// Get long running operation status. + /// + /// + /// Get long running operation status. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The location for the cluster code versions. This is different from cluster + /// location. + /// + /// + /// operation identifier. + /// + public static LongRunningOperationResult Get(this IOperationStatusOperations operations, string location, string operationId) + { + return operations.GetAsync(location, operationId).GetAwaiter().GetResult(); + } + + /// + /// Get long running operation status. + /// + /// + /// Get long running operation status. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The location for the cluster code versions. This is different from cluster + /// location. + /// + /// + /// operation identifier. + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this IOperationStatusOperations operations, string location, string operationId, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(location, operationId, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/SdkInfo_ServiceFabricManagedClustersManagementClient.cs b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/SdkInfo_ServiceFabricManagedClustersManagementClient.cs index 876448f101a2..209dbe4b203f 100644 --- a/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/SdkInfo_ServiceFabricManagedClustersManagementClient.cs +++ b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/SdkInfo_ServiceFabricManagedClustersManagementClient.cs @@ -19,27 +19,20 @@ public static IEnumerable> ApiInfo_ServiceFabricMa { return new Tuple[] { - new Tuple("ServiceFabric", "ApplicationTypeVersions", "2021-05-01"), - new Tuple("ServiceFabric", "ApplicationTypes", "2021-05-01"), - new Tuple("ServiceFabric", "Applications", "2021-05-01"), - new Tuple("ServiceFabric", "ManagedClusterVersion", "2021-05-01"), - new Tuple("ServiceFabric", "ManagedClusters", "2021-05-01"), - new Tuple("ServiceFabric", "NodeTypes", "2021-05-01"), - new Tuple("ServiceFabric", "Operations", "2021-05-01"), - new Tuple("ServiceFabric", "Services", "2021-05-01"), + new Tuple("ServiceFabric", "ApplicationTypeVersions", "2022-01-01"), + new Tuple("ServiceFabric", "ApplicationTypes", "2022-01-01"), + new Tuple("ServiceFabric", "Applications", "2022-01-01"), + new Tuple("ServiceFabric", "ManagedClusterVersion", "2022-01-01"), + new Tuple("ServiceFabric", "ManagedClusters", "2022-01-01"), + new Tuple("ServiceFabric", "NodeTypeSkus", "2022-01-01"), + new Tuple("ServiceFabric", "NodeTypes", "2022-01-01"), + new Tuple("ServiceFabric", "OperationResults", "2022-01-01"), + new Tuple("ServiceFabric", "OperationStatus", "2022-01-01"), + new Tuple("ServiceFabric", "Operations", "2022-01-01"), + new Tuple("ServiceFabric", "Services", "2022-01-01"), + new Tuple("ServiceFabric", "managedUnsupportedVMSizes", "2022-01-01"), }.AsEnumerable(); } } - // BEGIN: Code Generation Metadata Section - public static readonly String AutoRestVersion = "v2"; - public static readonly String AutoRestBootStrapperVersion = "autorest@2.0.4413"; - public static readonly String AutoRestCmdExecuted = "cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/servicefabricmanagedclusters/resource-manager/readme.md --csharp --version=v2 --reflect-api-versions --csharp-sdks-folder=E:\\code\\azure-sdk-for-net\\sdk"; - public static readonly String GithubForkName = "Azure"; - public static readonly String GithubBranchName = "master"; - public static readonly String GithubCommidId = "5047dfdf585969892ac035ffdfbc57623f0bf1c5"; - public static readonly String CodeGenerationErrors = ""; - public static readonly String GithubRepoName = "azure-rest-api-specs"; - // END: Code Generation Metadata Section } } - diff --git a/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedClustersManagementClient.cs b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedClustersManagementClient.cs index 00047866e9a2..d4f33dc53315 100644 --- a/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedClustersManagementClient.cs +++ b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedClustersManagementClient.cs @@ -48,7 +48,7 @@ public partial class ServiceFabricManagedClustersManagementClient : ServiceClien /// /// The version of the Service Fabric resource provider API. This is a required - /// parameter and it's value must be "2021-05-01" for this specification. + /// parameter and it's value must be "2022-01-01" for this specification. /// public string ApiVersion { get; private set; } @@ -105,6 +105,21 @@ public partial class ServiceFabricManagedClustersManagementClient : ServiceClien /// public virtual IManagedClusterVersionOperations ManagedClusterVersion { get; private set; } + /// + /// Gets the IManagedUnsupportedVMSizesOperations. + /// + public virtual IManagedUnsupportedVMSizesOperations ManagedUnsupportedVMSizes { get; private set; } + + /// + /// Gets the IOperationStatusOperations. + /// + public virtual IOperationStatusOperations OperationStatus { get; private set; } + + /// + /// Gets the IOperationResultsOperations. + /// + public virtual IOperationResultsOperations OperationResults { get; private set; } + /// /// Gets the IOperations. /// @@ -115,6 +130,11 @@ public partial class ServiceFabricManagedClustersManagementClient : ServiceClien /// public virtual INodeTypesOperations NodeTypes { get; private set; } + /// + /// Gets the INodeTypeSkusOperations. + /// + public virtual INodeTypeSkusOperations NodeTypeSkus { get; private set; } + /// /// Initializes a new instance of the ServiceFabricManagedClustersManagementClient class. /// @@ -362,10 +382,14 @@ private void Initialize() Services = new ServicesOperations(this); ManagedClusters = new ManagedClustersOperations(this); ManagedClusterVersion = new ManagedClusterVersionOperations(this); + ManagedUnsupportedVMSizes = new ManagedUnsupportedVMSizesOperations(this); + OperationStatus = new OperationStatusOperations(this); + OperationResults = new OperationResultsOperations(this); Operations = new Operations(this); NodeTypes = new NodeTypesOperations(this); + NodeTypeSkus = new NodeTypeSkusOperations(this); BaseUri = new System.Uri("https://management.azure.com"); - ApiVersion = "2021-05-01"; + ApiVersion = "2022-01-01"; AcceptLanguage = "en-US"; LongRunningOperationRetryTimeout = 30; GenerateClientRequestId = true; diff --git a/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/ServicesOperations.cs b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/ServicesOperations.cs index 665fd5d05775..d2ed27daeb6f 100644 --- a/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/ServicesOperations.cs +++ b/sdk/servicefabricmanagedclusters/Microsoft.Azure.Management.ServiceFabricManagedClusters/src/Generated/ServicesOperations.cs @@ -113,6 +113,10 @@ internal ServicesOperations(ServiceFabricManagedClustersManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -361,6 +365,10 @@ internal ServicesOperations(ServiceFabricManagedClustersManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } ServiceUpdateParameters parameters = new ServiceUpdateParameters(); if (tags != null) { @@ -608,6 +616,10 @@ internal ServicesOperations(ServiceFabricManagedClustersManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "applicationName"); } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -819,6 +831,10 @@ internal ServicesOperations(ServiceFabricManagedClustersManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } if (parameters == null) { throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); @@ -1058,6 +1074,10 @@ internal ServicesOperations(ServiceFabricManagedClustersManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null;