From 35f04f8fa892d4af36f8b39338f0027065aca122 Mon Sep 17 00:00:00 2001 From: SDK Automation Date: Wed, 8 Apr 2020 04:01:58 +0000 Subject: [PATCH] Generated from fe252c55c182a7b188a1039742388496b85cc046 Add Unknown Enum --- .../IVirtualMachineScaleSetsOperations.cs | 14 ++++---- .../Models/OrchestrationServiceNames.cs | 1 + .../Models/OrchestrationServiceStateInput.cs | 30 +++++++++-------- .../Models/OrchestrationServiceSummary.cs | 3 +- .../SdkInfo_ComputeManagementClient.cs | 11 ------- .../VirtualMachineScaleSetsOperations.cs | 31 +++++++++--------- ...ualMachineScaleSetsOperationsExtensions.cs | 32 +++++++++---------- 7 files changed, 56 insertions(+), 66 deletions(-) diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/IVirtualMachineScaleSetsOperations.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/IVirtualMachineScaleSetsOperations.cs index 35c89225813fe..9ca46d37e2fc2 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/IVirtualMachineScaleSetsOperations.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/IVirtualMachineScaleSetsOperations.cs @@ -601,9 +601,8 @@ public partial interface IVirtualMachineScaleSetsOperations /// /// The name of the virtual machine scale set to create or update. /// - /// - /// The action to be performed. Possible values include: 'Resume', - /// 'Suspend' + /// + /// The input object for SetOrchestrationServiceState API. /// /// /// The headers that will be added to request. @@ -617,7 +616,7 @@ public partial interface IVirtualMachineScaleSetsOperations /// /// Thrown when a required parameter is null /// - Task SetOrchestrationServiceStateWithHttpMessagesAsync(string resourceGroupName, string vmScaleSetName, string action, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task SetOrchestrationServiceStateWithHttpMessagesAsync(string resourceGroupName, string vmScaleSetName, OrchestrationServiceStateInput parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Create or update a VM scale set. /// @@ -991,9 +990,8 @@ public partial interface IVirtualMachineScaleSetsOperations /// /// The name of the virtual machine scale set to create or update. /// - /// - /// The action to be performed. Possible values include: 'Resume', - /// 'Suspend' + /// + /// The input object for SetOrchestrationServiceState API. /// /// /// The headers that will be added to request. @@ -1007,7 +1005,7 @@ public partial interface IVirtualMachineScaleSetsOperations /// /// Thrown when a required parameter is null /// - Task BeginSetOrchestrationServiceStateWithHttpMessagesAsync(string resourceGroupName, string vmScaleSetName, string action, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task BeginSetOrchestrationServiceStateWithHttpMessagesAsync(string resourceGroupName, string vmScaleSetName, OrchestrationServiceStateInput parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Gets a list of all VM scale sets under a resource group. /// diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/OrchestrationServiceNames.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/OrchestrationServiceNames.cs index e576678a89655..30a42bbd138a2 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/OrchestrationServiceNames.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/OrchestrationServiceNames.cs @@ -17,5 +17,6 @@ namespace Microsoft.Azure.Management.Compute.Models public static class OrchestrationServiceNames { public const string AutomaticRepairs = "AutomaticRepairs"; + } } diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/OrchestrationServiceStateInput.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/OrchestrationServiceStateInput.cs index 56348e21b78d6..2eb5ebd10d94e 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/OrchestrationServiceStateInput.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/OrchestrationServiceStateInput.cs @@ -32,26 +32,30 @@ public OrchestrationServiceStateInput() /// Initializes a new instance of the OrchestrationServiceStateInput /// class. /// + /// The name of the service. Possible values + /// include: 'AutomaticRepairs', + /// 'DummyOrchestrationServiceName' /// The action to be performed. Possible values /// include: 'Resume', 'Suspend' - public OrchestrationServiceStateInput(string action) + public OrchestrationServiceStateInput(string serviceName, string action) { + ServiceName = serviceName; Action = action; CustomInit(); } - /// - /// Static constructor for OrchestrationServiceStateInput class. - /// - static OrchestrationServiceStateInput() - { - ServiceName = "AutomaticRepairs"; - } /// /// An initialization method that performs custom operations like setting defaults /// partial void CustomInit(); + /// + /// Gets or sets the name of the service. Possible values include: + /// 'AutomaticRepairs' + /// + [JsonProperty(PropertyName = "serviceName")] + public string ServiceName { get; set; } + /// /// Gets or sets the action to be performed. Possible values include: /// 'Resume', 'Suspend' @@ -59,12 +63,6 @@ static OrchestrationServiceStateInput() [JsonProperty(PropertyName = "action")] public string Action { get; set; } - /// - /// The name of the service. - /// - [JsonProperty(PropertyName = "serviceName")] - public static string ServiceName { get; private set; } - /// /// Validate the object. /// @@ -73,6 +71,10 @@ static OrchestrationServiceStateInput() /// public virtual void Validate() { + if (ServiceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ServiceName"); + } if (Action == null) { throw new ValidationException(ValidationRules.CannotBeNull, "Action"); diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/OrchestrationServiceSummary.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/OrchestrationServiceSummary.cs index 47ace61c353fc..2f398484a9000 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/OrchestrationServiceSummary.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/OrchestrationServiceSummary.cs @@ -32,7 +32,8 @@ public OrchestrationServiceSummary() /// class. /// /// The name of the service. Possible values - /// include: 'AutomaticRepairs' + /// include: 'AutomaticRepairs', + /// 'DummyOrchestrationServiceName' /// The current state of the service. /// Possible values include: 'NotRunning', 'Running', /// 'Suspended' diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/SdkInfo_ComputeManagementClient.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/SdkInfo_ComputeManagementClient.cs index 498b543765736..789eb3d1cd8b2 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/SdkInfo_ComputeManagementClient.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/SdkInfo_ComputeManagementClient.cs @@ -52,16 +52,5 @@ public static IEnumerable> ApiInfo_ComputeManageme }.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/compute/resource-manager/readme.md --csharp --version=v2 --reflect-api-versions --csharp-sdks-folder=E:\\git_projects\\azure-sdk-for-net\\sdk"; - public static readonly String GithubForkName = "Azure"; - public static readonly String GithubBranchName = "master"; - public static readonly String GithubCommidId = "7acdc579c727f9fd94ab2d06911f62ea33ae9473"; - public static readonly String CodeGenerationErrors = ""; - public static readonly String GithubRepoName = "azure-rest-api-specs"; - // END: Code Generation Metadata Section } } - diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachineScaleSetsOperations.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachineScaleSetsOperations.cs index f897ec7fe8319..782843fdf5006 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachineScaleSetsOperations.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachineScaleSetsOperations.cs @@ -1939,8 +1939,8 @@ internal VirtualMachineScaleSetsOperations(ComputeManagementClient client) /// /// The name of the virtual machine scale set to create or update. /// - /// - /// The action to be performed. Possible values include: 'Resume', 'Suspend' + /// + /// The input object for SetOrchestrationServiceState API. /// /// /// The headers that will be added to request. @@ -1948,10 +1948,10 @@ internal VirtualMachineScaleSetsOperations(ComputeManagementClient client) /// /// The cancellation token. /// - public async Task SetOrchestrationServiceStateWithHttpMessagesAsync(string resourceGroupName, string vmScaleSetName, string action, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task SetOrchestrationServiceStateWithHttpMessagesAsync(string resourceGroupName, string vmScaleSetName, OrchestrationServiceStateInput parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { // Send request - AzureOperationResponse _response = await BeginSetOrchestrationServiceStateWithHttpMessagesAsync(resourceGroupName, vmScaleSetName, action, customHeaders, cancellationToken).ConfigureAwait(false); + AzureOperationResponse _response = await BeginSetOrchestrationServiceStateWithHttpMessagesAsync(resourceGroupName, vmScaleSetName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } @@ -4501,8 +4501,8 @@ internal VirtualMachineScaleSetsOperations(ComputeManagementClient client) /// /// The name of the virtual machine scale set to create or update. /// - /// - /// The action to be performed. Possible values include: 'Resume', 'Suspend' + /// + /// The input object for SetOrchestrationServiceState API. /// /// /// Headers that will be added to request. @@ -4522,7 +4522,7 @@ internal VirtualMachineScaleSetsOperations(ComputeManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task BeginSetOrchestrationServiceStateWithHttpMessagesAsync(string resourceGroupName, string vmScaleSetName, string action, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task BeginSetOrchestrationServiceStateWithHttpMessagesAsync(string resourceGroupName, string vmScaleSetName, OrchestrationServiceStateInput parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -4532,20 +4532,19 @@ internal VirtualMachineScaleSetsOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "vmScaleSetName"); } - if (Client.SubscriptionId == null) + if (parameters == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); } - if (action == null) + if (parameters != null) { - throw new ValidationException(ValidationRules.CannotBeNull, "action"); + parameters.Validate(); } - string apiVersion = "2019-12-01"; - OrchestrationServiceStateInput parameters = new OrchestrationServiceStateInput(); - if (action != null) + if (Client.SubscriptionId == null) { - parameters.Action = action; + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + string apiVersion = "2019-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -4555,8 +4554,8 @@ internal VirtualMachineScaleSetsOperations(ComputeManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("vmScaleSetName", vmScaleSetName); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("parameters", parameters); + tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "BeginSetOrchestrationServiceState", tracingParameters); } diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachineScaleSetsOperationsExtensions.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachineScaleSetsOperationsExtensions.cs index 923848108e89b..d4f6d015812f7 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachineScaleSetsOperationsExtensions.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachineScaleSetsOperationsExtensions.cs @@ -985,12 +985,12 @@ public static RecoveryWalkResponse ForceRecoveryServiceFabricPlatformUpdateDomai /// /// The name of the virtual machine scale set to create or update. /// - /// - /// The action to be performed. Possible values include: 'Resume', 'Suspend' + /// + /// The input object for SetOrchestrationServiceState API. /// - public static void SetOrchestrationServiceState(this IVirtualMachineScaleSetsOperations operations, string resourceGroupName, string vmScaleSetName, string action) + public static void SetOrchestrationServiceState(this IVirtualMachineScaleSetsOperations operations, string resourceGroupName, string vmScaleSetName, OrchestrationServiceStateInput parameters) { - operations.SetOrchestrationServiceStateAsync(resourceGroupName, vmScaleSetName, action).GetAwaiter().GetResult(); + operations.SetOrchestrationServiceStateAsync(resourceGroupName, vmScaleSetName, parameters).GetAwaiter().GetResult(); } /// @@ -1005,15 +1005,15 @@ public static void SetOrchestrationServiceState(this IVirtualMachineScaleSetsOpe /// /// The name of the virtual machine scale set to create or update. /// - /// - /// The action to be performed. Possible values include: 'Resume', 'Suspend' + /// + /// The input object for SetOrchestrationServiceState API. /// /// /// The cancellation token. /// - public static async Task SetOrchestrationServiceStateAsync(this IVirtualMachineScaleSetsOperations operations, string resourceGroupName, string vmScaleSetName, string action, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task SetOrchestrationServiceStateAsync(this IVirtualMachineScaleSetsOperations operations, string resourceGroupName, string vmScaleSetName, OrchestrationServiceStateInput parameters, CancellationToken cancellationToken = default(CancellationToken)) { - (await operations.SetOrchestrationServiceStateWithHttpMessagesAsync(resourceGroupName, vmScaleSetName, action, null, cancellationToken).ConfigureAwait(false)).Dispose(); + (await operations.SetOrchestrationServiceStateWithHttpMessagesAsync(resourceGroupName, vmScaleSetName, parameters, null, cancellationToken).ConfigureAwait(false)).Dispose(); } /// @@ -1649,12 +1649,12 @@ public static void BeginUpdateInstances(this IVirtualMachineScaleSetsOperations /// /// The name of the virtual machine scale set to create or update. /// - /// - /// The action to be performed. Possible values include: 'Resume', 'Suspend' + /// + /// The input object for SetOrchestrationServiceState API. /// - public static void BeginSetOrchestrationServiceState(this IVirtualMachineScaleSetsOperations operations, string resourceGroupName, string vmScaleSetName, string action) + public static void BeginSetOrchestrationServiceState(this IVirtualMachineScaleSetsOperations operations, string resourceGroupName, string vmScaleSetName, OrchestrationServiceStateInput parameters) { - operations.BeginSetOrchestrationServiceStateAsync(resourceGroupName, vmScaleSetName, action).GetAwaiter().GetResult(); + operations.BeginSetOrchestrationServiceStateAsync(resourceGroupName, vmScaleSetName, parameters).GetAwaiter().GetResult(); } /// @@ -1669,15 +1669,15 @@ public static void BeginSetOrchestrationServiceState(this IVirtualMachineScaleSe /// /// The name of the virtual machine scale set to create or update. /// - /// - /// The action to be performed. Possible values include: 'Resume', 'Suspend' + /// + /// The input object for SetOrchestrationServiceState API. /// /// /// The cancellation token. /// - public static async Task BeginSetOrchestrationServiceStateAsync(this IVirtualMachineScaleSetsOperations operations, string resourceGroupName, string vmScaleSetName, string action, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task BeginSetOrchestrationServiceStateAsync(this IVirtualMachineScaleSetsOperations operations, string resourceGroupName, string vmScaleSetName, OrchestrationServiceStateInput parameters, CancellationToken cancellationToken = default(CancellationToken)) { - (await operations.BeginSetOrchestrationServiceStateWithHttpMessagesAsync(resourceGroupName, vmScaleSetName, action, null, cancellationToken).ConfigureAwait(false)).Dispose(); + (await operations.BeginSetOrchestrationServiceStateWithHttpMessagesAsync(resourceGroupName, vmScaleSetName, parameters, null, cancellationToken).ConfigureAwait(false)).Dispose(); } ///