From c095e2ce3c2b05cddac7174ae59df0ff248f73a0 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Thu, 18 Feb 2021 03:58:03 +0000 Subject: [PATCH] CodeGen from PR 12928 in Azure/azure-rest-api-specs Merge a1a83dca6a2b3425e050b60447d8748641086401 into fdb32f2623c550dd4ff18a45bebbe7bd8050ae33 --- .../src/Generated/ActivityOperations.cs | 8 +- .../AgentRegistrationInformationOperations.cs | 4 +- .../Generated/AutomationAccountOperations.cs | 20 +- .../src/Generated/AutomationClient.cs | 190 +++++----- .../src/Generated/CertificateOperations.cs | 14 +- .../src/Generated/ConnectionOperations.cs | 39 +- .../ConnectionOperationsExtensions.cs | 11 +- .../src/Generated/ConnectionTypeOperations.cs | 32 +- .../src/Generated/CredentialOperations.cs | 14 +- .../Generated/DscCompilationJobOperations.cs | 18 +- .../DscCompilationJobOperationsExtensions.cs | 12 +- .../DscCompilationJobStreamOperations.cs | 2 +- .../Generated/DscConfigurationOperations.cs | 38 +- .../DscConfigurationOperationsExtensions.cs | 12 +- .../DscNodeConfigurationOperations.cs | 12 +- .../src/Generated/DscNodeOperations.cs | 37 +- .../Generated/DscNodeOperationsExtensions.cs | 11 +- .../src/Generated/FieldsOperations.cs | 4 +- .../HybridRunbookWorkerGroupOperations.cs | 12 +- .../src/Generated/IAutomationClient.cs | 155 ++++---- .../src/Generated/IConnectionOperations.cs | 5 +- .../Generated/IDscCompilationJobOperations.cs | 6 +- .../Generated/IDscConfigurationOperations.cs | 3 +- .../src/Generated/IDscNodeOperations.cs | 5 +- .../src/Generated/IJobOperations.cs | 7 +- ... IPrivateEndpointConnectionsOperations.cs} | 104 ++++-- .../IPrivateLinkResourcesOperations.cs | 53 +++ .../src/Generated/IRunbookDraftOperations.cs | 21 +- .../src/Generated/IRunbookOperations.cs | 3 +- .../src/Generated/JobOperations.cs | 74 ++-- .../src/Generated/JobOperationsExtensions.cs | 23 +- .../src/Generated/JobScheduleOperations.cs | 12 +- .../src/Generated/JobStreamOperations.cs | 8 +- .../src/Generated/KeysOperations.cs | 2 +- .../Generated/LinkedWorkspaceOperations.cs | 2 +- .../src/Generated/Models/AutomationAccount.cs | 38 +- ...tomationAccountCreateOrUpdateParameters.cs | 32 +- .../AutomationAccountUpdateParameters.cs | 32 +- .../Generated/Models/AzureQueryProperties.cs | 71 ---- .../CollectionItemUpdateConfiguration.cs | 71 ---- .../Models/EncryptionKeySourceType.cs | 60 +++ .../Generated/Models/EncryptionProperties.cs | 69 ++++ .../Models/EncryptionPropertiesIdentity.cs | 57 +++ .../src/Generated/Models/Identity.cs | 88 +++++ .../IdentityUserAssignedIdentitiesValue.cs | 60 +++ .../Generated/Models/KeyVaultProperties.cs | 69 ++++ .../src/Generated/Models/LinuxProperties.cs | 86 ----- .../Generated/Models/LinuxUpdateClasses.cs | 24 -- .../Models/NonAzureQueryProperties.cs | 62 ---- .../Generated/Models/OperatingSystemType.cs | 60 --- .../src/Generated/Models/Page.cs | 2 +- .../src/Generated/Models/Page1.cs | 2 +- .../Models/PrivateEndpointConnection.cs | 69 ++++ .../Models/PrivateEndpointProperty.cs | 51 +++ .../Generated/Models/PrivateLinkResource.cs | 70 ++++ ...ivateLinkServiceConnectionStateProperty.cs | 73 ++++ .../Generated/Models/ResourceIdentityType.cs | 72 ++++ .../src/Generated/Models/Schedule.cs | 4 +- .../Generated/Models/ScheduleProperties.cs | 169 --------- .../Models/SoftwareUpdateConfiguration.cs | 180 --------- ...ftwareUpdateConfigurationCollectionItem.cs | 136 ------- .../SoftwareUpdateConfigurationListResult.cs | 57 --- .../Models/SoftwareUpdateConfigurationRun.cs | 4 +- ...reUpdateConfigurationRunTaskProperties.cs} | 10 +- ...=> SoftwareUpdateConfigurationRunTasks.cs} | 14 +- .../SoftwareUpdateConfigurationTasks.cs | 61 ---- .../src/Generated/Models/TagOperators.cs | 60 --- .../Generated/Models/TagSettingsProperties.cs | 64 ---- .../src/Generated/Models/TargetProperties.cs | 65 ---- .../src/Generated/Models/TaskProperties.cs | 62 ---- .../Generated/Models/UpdateConfiguration.cs | 123 ------- .../src/Generated/Models/Watcher.cs | 26 +- .../src/Generated/Models/WindowsProperties.cs | 91 ----- .../Generated/Models/WindowsUpdateClasses.cs | 29 -- .../src/Generated/ModuleOperations.cs | 14 +- .../NodeCountInformationOperations.cs | 2 +- .../src/Generated/NodeReportsOperations.cs | 10 +- .../Generated/ObjectDataTypesOperations.cs | 8 +- .../src/Generated/Operations.cs | 4 +- ...> PrivateEndpointConnectionsOperations.cs} | 343 ++++++++---------- ...EndpointConnectionsOperationsExtensions.cs | 299 +++++++++++++++ .../PrivateLinkResourcesOperations.cs | 264 ++++++++++++++ ...rivateLinkResourcesOperationsExtensions.cs | 69 ++++ .../src/Generated/Python2PackageOperations.cs | 14 +- .../src/Generated/RunbookDraftOperations.cs | 76 ++-- .../RunbookDraftOperationsExtensions.cs | 52 +-- .../src/Generated/RunbookOperations.cs | 40 +- .../Generated/RunbookOperationsExtensions.cs | 12 +- .../src/Generated/ScheduleOperations.cs | 14 +- .../src/Generated/SdkInfo_AutomationClient.cs | 92 +++-- ...pdateConfigurationMachineRunsOperations.cs | 4 +- ...ftwareUpdateConfigurationRunsOperations.cs | 4 +- ...pdateConfigurationsOperationsExtensions.cs | 244 ------------- .../src/Generated/SourceControlOperations.cs | 14 +- .../SourceControlSyncJobOperations.cs | 10 +- .../SourceControlSyncJobStreamsOperations.cs | 8 +- .../src/Generated/StatisticsOperations.cs | 4 +- .../src/Generated/TestJobOperations.cs | 10 +- .../src/Generated/TestJobStreamsOperations.cs | 8 +- .../src/Generated/UsagesOperations.cs | 4 +- .../src/Generated/VariableOperations.cs | 14 +- .../src/Generated/WatcherOperations.cs | 18 +- .../src/Generated/WebhookOperations.cs | 4 +- 103 files changed, 2396 insertions(+), 2609 deletions(-) rename sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/{ISoftwareUpdateConfigurationsOperations.cs => IPrivateEndpointConnectionsOperations.cs} (50%) create mode 100644 sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/IPrivateLinkResourcesOperations.cs delete mode 100644 sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/AzureQueryProperties.cs delete mode 100644 sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/CollectionItemUpdateConfiguration.cs create mode 100644 sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/EncryptionKeySourceType.cs create mode 100644 sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/EncryptionProperties.cs create mode 100644 sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/EncryptionPropertiesIdentity.cs create mode 100644 sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/Identity.cs create mode 100644 sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/IdentityUserAssignedIdentitiesValue.cs create mode 100644 sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/KeyVaultProperties.cs delete mode 100644 sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/LinuxProperties.cs delete mode 100644 sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/LinuxUpdateClasses.cs delete mode 100644 sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/NonAzureQueryProperties.cs delete mode 100644 sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/OperatingSystemType.cs create mode 100644 sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/PrivateEndpointConnection.cs create mode 100644 sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/PrivateEndpointProperty.cs create mode 100644 sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/PrivateLinkResource.cs create mode 100644 sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/PrivateLinkServiceConnectionStateProperty.cs create mode 100644 sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/ResourceIdentityType.cs delete mode 100644 sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/ScheduleProperties.cs delete mode 100644 sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/SoftwareUpdateConfiguration.cs delete mode 100644 sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/SoftwareUpdateConfigurationCollectionItem.cs delete mode 100644 sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/SoftwareUpdateConfigurationListResult.cs rename sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/{SoftareUpdateConfigurationRunTaskProperties.cs => SoftwareUpdateConfigurationRunTaskProperties.cs} (81%) rename sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/{SoftareUpdateConfigurationRunTasks.cs => SoftwareUpdateConfigurationRunTasks.cs} (70%) delete mode 100644 sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/SoftwareUpdateConfigurationTasks.cs delete mode 100644 sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/TagOperators.cs delete mode 100644 sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/TagSettingsProperties.cs delete mode 100644 sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/TargetProperties.cs delete mode 100644 sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/TaskProperties.cs delete mode 100644 sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/UpdateConfiguration.cs delete mode 100644 sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/WindowsProperties.cs delete mode 100644 sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/WindowsUpdateClasses.cs rename sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/{SoftwareUpdateConfigurationsOperations.cs => PrivateEndpointConnectionsOperations.cs} (80%) create mode 100644 sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/PrivateEndpointConnectionsOperationsExtensions.cs create mode 100644 sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/PrivateLinkResourcesOperations.cs create mode 100644 sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/PrivateLinkResourcesOperationsExtensions.cs delete mode 100644 sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/SoftwareUpdateConfigurationsOperationsExtensions.cs diff --git a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/ActivityOperations.cs b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/ActivityOperations.cs index 722c130d760b..58577a72e882 100644 --- a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/ActivityOperations.cs +++ b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/ActivityOperations.cs @@ -125,7 +125,7 @@ internal ActivityOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2015-10-31"; + string apiVersion = "2020-01-13-preview"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -341,7 +341,7 @@ internal ActivityOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2015-10-31"; + string apiVersion = "2020-01-13-preview"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -469,7 +469,7 @@ internal ActivityOperations(AutomationClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -638,7 +638,7 @@ internal ActivityOperations(AutomationClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { diff --git a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/AgentRegistrationInformationOperations.cs b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/AgentRegistrationInformationOperations.cs index 861a377a5bc5..96fb34ad0709 100644 --- a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/AgentRegistrationInformationOperations.cs +++ b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/AgentRegistrationInformationOperations.cs @@ -110,7 +110,7 @@ internal AgentRegistrationInformationOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "automationAccountName"); } - string apiVersion = "2018-01-15"; + string apiVersion = "2020-01-13-preview"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -326,7 +326,7 @@ internal AgentRegistrationInformationOperations(AutomationClient client) { parameters.Validate(); } - string apiVersion = "2018-01-15"; + string apiVersion = "2020-01-13-preview"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/AutomationAccountOperations.cs b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/AutomationAccountOperations.cs index 5bb4a88e371a..81ccf6eb8e1e 100644 --- a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/AutomationAccountOperations.cs +++ b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/AutomationAccountOperations.cs @@ -117,7 +117,7 @@ internal AutomationAccountOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2015-10-31"; + string apiVersion = "2020-01-13-preview"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -340,7 +340,7 @@ internal AutomationAccountOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2015-10-31"; + string apiVersion = "2020-01-13-preview"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -567,7 +567,7 @@ internal AutomationAccountOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2015-10-31"; + string apiVersion = "2020-01-13-preview"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -754,7 +754,7 @@ internal AutomationAccountOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2015-10-31"; + string apiVersion = "2020-01-13-preview"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -952,7 +952,7 @@ internal AutomationAccountOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2015-10-31"; + string apiVersion = "2020-01-13-preview"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1076,7 +1076,7 @@ internal AutomationAccountOperations(AutomationClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -1128,7 +1128,7 @@ internal AutomationAccountOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2015-10-31"; + string apiVersion = "2020-01-13-preview"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1250,7 +1250,7 @@ internal AutomationAccountOperations(AutomationClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -1419,7 +1419,7 @@ internal AutomationAccountOperations(AutomationClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -1590,7 +1590,7 @@ internal AutomationAccountOperations(AutomationClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { diff --git a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/AutomationClient.cs b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/AutomationClient.cs index 4e991067b4ce..7b9e9d44e1dc 100644 --- a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/AutomationClient.cs +++ b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/AutomationClient.cs @@ -72,14 +72,74 @@ public partial class AutomationClient : ServiceClient, IAutoma public bool? GenerateClientRequestId { get; set; } /// - /// Gets the IAutomationAccountOperations. + /// Gets the IPrivateEndpointConnectionsOperations. /// - public virtual IAutomationAccountOperations AutomationAccount { get; private set; } + public virtual IPrivateEndpointConnectionsOperations PrivateEndpointConnections { get; private set; } /// - /// Gets the IOperations. + /// Gets the IPrivateLinkResourcesOperations. /// - public virtual IOperations Operations { get; private set; } + public virtual IPrivateLinkResourcesOperations PrivateLinkResources { get; private set; } + + /// + /// Gets the IPython2PackageOperations. + /// + public virtual IPython2PackageOperations Python2Package { get; private set; } + + /// + /// Gets the IAgentRegistrationInformationOperations. + /// + public virtual IAgentRegistrationInformationOperations AgentRegistrationInformation { get; private set; } + + /// + /// Gets the IDscNodeOperations. + /// + public virtual IDscNodeOperations DscNode { get; private set; } + + /// + /// Gets the INodeReportsOperations. + /// + public virtual INodeReportsOperations NodeReports { get; private set; } + + /// + /// Gets the IDscNodeConfigurationOperations. + /// + public virtual IDscNodeConfigurationOperations DscNodeConfiguration { get; private set; } + + /// + /// Gets the IDscCompilationJobOperations. + /// + public virtual IDscCompilationJobOperations DscCompilationJob { get; private set; } + + /// + /// Gets the IDscCompilationJobStreamOperations. + /// + public virtual IDscCompilationJobStreamOperations DscCompilationJobStream { get; private set; } + + /// + /// Gets the INodeCountInformationOperations. + /// + public virtual INodeCountInformationOperations NodeCountInformation { get; private set; } + + /// + /// Gets the ISourceControlOperations. + /// + public virtual ISourceControlOperations SourceControl { get; private set; } + + /// + /// Gets the ISourceControlSyncJobOperations. + /// + public virtual ISourceControlSyncJobOperations SourceControlSyncJob { get; private set; } + + /// + /// Gets the ISourceControlSyncJobStreamsOperations. + /// + public virtual ISourceControlSyncJobStreamsOperations SourceControlSyncJobStreams { get; private set; } + + /// + /// Gets the IAutomationAccountOperations. + /// + public virtual IAutomationAccountOperations AutomationAccount { get; private set; } /// /// Gets the IStatisticsOperations. @@ -116,11 +176,6 @@ public partial class AutomationClient : ServiceClient, IAutoma /// public virtual ICredentialOperations Credential { get; private set; } - /// - /// Gets the IDscConfigurationOperations. - /// - public virtual IDscConfigurationOperations DscConfiguration { get; private set; } - /// /// Gets the IHybridRunbookWorkerGroupOperations. /// @@ -166,45 +221,15 @@ public partial class AutomationClient : ServiceClient, IAutoma /// public virtual IVariableOperations Variable { get; private set; } - /// - /// Gets the IWebhookOperations. - /// - public virtual IWebhookOperations Webhook { get; private set; } - /// /// Gets the IWatcherOperations. /// public virtual IWatcherOperations Watcher { get; private set; } /// - /// Gets the ISoftwareUpdateConfigurationsOperations. - /// - public virtual ISoftwareUpdateConfigurationsOperations SoftwareUpdateConfigurations { get; private set; } - - /// - /// Gets the ISoftwareUpdateConfigurationRunsOperations. - /// - public virtual ISoftwareUpdateConfigurationRunsOperations SoftwareUpdateConfigurationRuns { get; private set; } - - /// - /// Gets the ISoftwareUpdateConfigurationMachineRunsOperations. - /// - public virtual ISoftwareUpdateConfigurationMachineRunsOperations SoftwareUpdateConfigurationMachineRuns { get; private set; } - - /// - /// Gets the ISourceControlOperations. - /// - public virtual ISourceControlOperations SourceControl { get; private set; } - - /// - /// Gets the ISourceControlSyncJobOperations. - /// - public virtual ISourceControlSyncJobOperations SourceControlSyncJob { get; private set; } - - /// - /// Gets the ISourceControlSyncJobStreamsOperations. + /// Gets the IDscConfigurationOperations. /// - public virtual ISourceControlSyncJobStreamsOperations SourceControlSyncJobStreams { get; private set; } + public virtual IDscConfigurationOperations DscConfiguration { get; private set; } /// /// Gets the IJobOperations. @@ -217,39 +242,9 @@ public partial class AutomationClient : ServiceClient, IAutoma public virtual IJobStreamOperations JobStream { get; private set; } /// - /// Gets the IAgentRegistrationInformationOperations. - /// - public virtual IAgentRegistrationInformationOperations AgentRegistrationInformation { get; private set; } - - /// - /// Gets the IDscNodeOperations. - /// - public virtual IDscNodeOperations DscNode { get; private set; } - - /// - /// Gets the INodeReportsOperations. - /// - public virtual INodeReportsOperations NodeReports { get; private set; } - - /// - /// Gets the IDscCompilationJobOperations. - /// - public virtual IDscCompilationJobOperations DscCompilationJob { get; private set; } - - /// - /// Gets the IDscCompilationJobStreamOperations. - /// - public virtual IDscCompilationJobStreamOperations DscCompilationJobStream { get; private set; } - - /// - /// Gets the IDscNodeConfigurationOperations. - /// - public virtual IDscNodeConfigurationOperations DscNodeConfiguration { get; private set; } - - /// - /// Gets the INodeCountInformationOperations. + /// Gets the IOperations. /// - public virtual INodeCountInformationOperations NodeCountInformation { get; private set; } + public virtual IOperations Operations { get; private set; } /// /// Gets the IRunbookDraftOperations. @@ -272,9 +267,19 @@ public partial class AutomationClient : ServiceClient, IAutoma public virtual ITestJobOperations TestJob { get; private set; } /// - /// Gets the IPython2PackageOperations. + /// Gets the ISoftwareUpdateConfigurationRunsOperations. /// - public virtual IPython2PackageOperations Python2Package { get; private set; } + public virtual ISoftwareUpdateConfigurationRunsOperations SoftwareUpdateConfigurationRuns { get; private set; } + + /// + /// Gets the ISoftwareUpdateConfigurationMachineRunsOperations. + /// + public virtual ISoftwareUpdateConfigurationMachineRunsOperations SoftwareUpdateConfigurationMachineRuns { get; private set; } + + /// + /// Gets the IWebhookOperations. + /// + public virtual IWebhookOperations Webhook { get; private set; } /// /// Initializes a new instance of the AutomationClient class. @@ -517,8 +522,20 @@ public AutomationClient(System.Uri baseUri, ServiceClientCredentials credentials /// private void Initialize() { + PrivateEndpointConnections = new PrivateEndpointConnectionsOperations(this); + PrivateLinkResources = new PrivateLinkResourcesOperations(this); + Python2Package = new Python2PackageOperations(this); + AgentRegistrationInformation = new AgentRegistrationInformationOperations(this); + DscNode = new DscNodeOperations(this); + NodeReports = new NodeReportsOperations(this); + DscNodeConfiguration = new DscNodeConfigurationOperations(this); + DscCompilationJob = new DscCompilationJobOperations(this); + DscCompilationJobStream = new DscCompilationJobStreamOperations(this); + NodeCountInformation = new NodeCountInformationOperations(this); + SourceControl = new SourceControlOperations(this); + SourceControlSyncJob = new SourceControlSyncJobOperations(this); + SourceControlSyncJobStreams = new SourceControlSyncJobStreamsOperations(this); AutomationAccount = new AutomationAccountOperations(this); - Operations = new Operations(this); Statistics = new StatisticsOperations(this); Usages = new UsagesOperations(this); Keys = new KeysOperations(this); @@ -526,7 +543,6 @@ private void Initialize() Connection = new ConnectionOperations(this); ConnectionType = new ConnectionTypeOperations(this); Credential = new CredentialOperations(this); - DscConfiguration = new DscConfigurationOperations(this); HybridRunbookWorkerGroup = new HybridRunbookWorkerGroupOperations(this); JobSchedule = new JobScheduleOperations(this); LinkedWorkspace = new LinkedWorkspaceOperations(this); @@ -536,28 +552,18 @@ private void Initialize() Fields = new FieldsOperations(this); Schedule = new ScheduleOperations(this); Variable = new VariableOperations(this); - Webhook = new WebhookOperations(this); Watcher = new WatcherOperations(this); - SoftwareUpdateConfigurations = new SoftwareUpdateConfigurationsOperations(this); - SoftwareUpdateConfigurationRuns = new SoftwareUpdateConfigurationRunsOperations(this); - SoftwareUpdateConfigurationMachineRuns = new SoftwareUpdateConfigurationMachineRunsOperations(this); - SourceControl = new SourceControlOperations(this); - SourceControlSyncJob = new SourceControlSyncJobOperations(this); - SourceControlSyncJobStreams = new SourceControlSyncJobStreamsOperations(this); + DscConfiguration = new DscConfigurationOperations(this); Job = new JobOperations(this); JobStream = new JobStreamOperations(this); - AgentRegistrationInformation = new AgentRegistrationInformationOperations(this); - DscNode = new DscNodeOperations(this); - NodeReports = new NodeReportsOperations(this); - DscCompilationJob = new DscCompilationJobOperations(this); - DscCompilationJobStream = new DscCompilationJobStreamOperations(this); - DscNodeConfiguration = new DscNodeConfigurationOperations(this); - NodeCountInformation = new NodeCountInformationOperations(this); + Operations = new Operations(this); RunbookDraft = new RunbookDraftOperations(this); Runbook = new RunbookOperations(this); TestJobStreams = new TestJobStreamsOperations(this); TestJob = new TestJobOperations(this); - Python2Package = new Python2PackageOperations(this); + SoftwareUpdateConfigurationRuns = new SoftwareUpdateConfigurationRunsOperations(this); + SoftwareUpdateConfigurationMachineRuns = new SoftwareUpdateConfigurationMachineRunsOperations(this); + Webhook = new WebhookOperations(this); BaseUri = new System.Uri("https://management.azure.com"); AcceptLanguage = "en-US"; LongRunningOperationRetryTimeout = 30; diff --git a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/CertificateOperations.cs b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/CertificateOperations.cs index fa5001a1e675..845e0851675e 100644 --- a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/CertificateOperations.cs +++ b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/CertificateOperations.cs @@ -114,7 +114,7 @@ internal CertificateOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2015-10-31"; + string apiVersion = "2020-01-13-preview"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -310,7 +310,7 @@ internal CertificateOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2015-10-31"; + string apiVersion = "2020-01-13-preview"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -535,7 +535,7 @@ internal CertificateOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2015-10-31"; + string apiVersion = "2020-01-13-preview"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -781,7 +781,7 @@ internal CertificateOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2015-10-31"; + string apiVersion = "2020-01-13-preview"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -995,7 +995,7 @@ internal CertificateOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2015-10-31"; + string apiVersion = "2020-01-13-preview"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1121,7 +1121,7 @@ internal CertificateOperations(AutomationClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -1290,7 +1290,7 @@ internal CertificateOperations(AutomationClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { diff --git a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/ConnectionOperations.cs b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/ConnectionOperations.cs index 88ef6b0bd2f4..e3e72df274c4 100644 --- a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/ConnectionOperations.cs +++ b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/ConnectionOperations.cs @@ -72,9 +72,6 @@ internal ConnectionOperations(AutomationClient client) /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when unable to deserialize the response - /// /// /// Thrown when a required parameter is null /// @@ -84,7 +81,7 @@ internal ConnectionOperations(AutomationClient client) /// /// A response object containing the response body and response headers. /// - public async Task> DeleteWithHttpMessagesAsync(string resourceGroupName, string automationAccountName, string connectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string automationAccountName, string connectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -117,7 +114,7 @@ internal ConnectionOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2015-10-31"; + string apiVersion = "2020-01-13-preview"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -232,31 +229,13 @@ internal ConnectionOperations(AutomationClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) { _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); @@ -331,7 +310,7 @@ internal ConnectionOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2015-10-31"; + string apiVersion = "2020-01-13-preview"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -556,7 +535,7 @@ internal ConnectionOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2015-10-31"; + string apiVersion = "2020-01-13-preview"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -802,7 +781,7 @@ internal ConnectionOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2015-10-31"; + string apiVersion = "2020-01-13-preview"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1016,7 +995,7 @@ internal ConnectionOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2015-10-31"; + string apiVersion = "2020-01-13-preview"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1142,7 +1121,7 @@ internal ConnectionOperations(AutomationClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -1311,7 +1290,7 @@ internal ConnectionOperations(AutomationClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { diff --git a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/ConnectionOperationsExtensions.cs b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/ConnectionOperationsExtensions.cs index 45ce0226d5f7..c479cd1ad67a 100644 --- a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/ConnectionOperationsExtensions.cs +++ b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/ConnectionOperationsExtensions.cs @@ -37,9 +37,9 @@ public static partial class ConnectionOperationsExtensions /// /// The name of connection. /// - public static Connection Delete(this IConnectionOperations operations, string resourceGroupName, string automationAccountName, string connectionName) + public static void Delete(this IConnectionOperations operations, string resourceGroupName, string automationAccountName, string connectionName) { - return operations.DeleteAsync(resourceGroupName, automationAccountName, connectionName).GetAwaiter().GetResult(); + operations.DeleteAsync(resourceGroupName, automationAccountName, connectionName).GetAwaiter().GetResult(); } /// @@ -61,12 +61,9 @@ public static Connection Delete(this IConnectionOperations operations, string re /// /// The cancellation token. /// - public static async Task DeleteAsync(this IConnectionOperations operations, string resourceGroupName, string automationAccountName, string connectionName, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task DeleteAsync(this IConnectionOperations operations, string resourceGroupName, string automationAccountName, string connectionName, CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.DeleteWithHttpMessagesAsync(resourceGroupName, automationAccountName, connectionName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, automationAccountName, connectionName, null, cancellationToken).ConfigureAwait(false)).Dispose(); } /// diff --git a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/ConnectionTypeOperations.cs b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/ConnectionTypeOperations.cs index f73b2c76c742..3d6b8600fd05 100644 --- a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/ConnectionTypeOperations.cs +++ b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/ConnectionTypeOperations.cs @@ -114,7 +114,7 @@ internal ConnectionTypeOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2015-10-31"; + string apiVersion = "2020-01-13-preview"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -310,7 +310,7 @@ internal ConnectionTypeOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2015-10-31"; + string apiVersion = "2020-01-13-preview"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -535,7 +535,7 @@ internal ConnectionTypeOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2015-10-31"; + string apiVersion = "2020-01-13-preview"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -627,7 +627,7 @@ internal ConnectionTypeOperations(AutomationClient client) System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 201 && (int)_statusCode != 409) + if ((int)_statusCode != 201) { var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -682,24 +682,6 @@ internal ConnectionTypeOperations(AutomationClient client) throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); } } - // Deserialize Response - if ((int)_statusCode == 409) - { - _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); @@ -767,7 +749,7 @@ internal ConnectionTypeOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2015-10-31"; + string apiVersion = "2020-01-13-preview"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -893,7 +875,7 @@ internal ConnectionTypeOperations(AutomationClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -1062,7 +1044,7 @@ internal ConnectionTypeOperations(AutomationClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { diff --git a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/CredentialOperations.cs b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/CredentialOperations.cs index 7fe0fb4b74db..acaae1e3d5f5 100644 --- a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/CredentialOperations.cs +++ b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/CredentialOperations.cs @@ -114,7 +114,7 @@ internal CredentialOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2015-10-31"; + string apiVersion = "2020-01-13-preview"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -310,7 +310,7 @@ internal CredentialOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2015-10-31"; + string apiVersion = "2020-01-13-preview"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -535,7 +535,7 @@ internal CredentialOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2015-10-31"; + string apiVersion = "2020-01-13-preview"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -781,7 +781,7 @@ internal CredentialOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2015-10-31"; + string apiVersion = "2020-01-13-preview"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -995,7 +995,7 @@ internal CredentialOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2015-10-31"; + string apiVersion = "2020-01-13-preview"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1126,7 +1126,7 @@ internal CredentialOperations(AutomationClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -1300,7 +1300,7 @@ internal CredentialOperations(AutomationClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { diff --git a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/DscCompilationJobOperations.cs b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/DscCompilationJobOperations.cs index d532e462f668..0dd4a110381c 100644 --- a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/DscCompilationJobOperations.cs +++ b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/DscCompilationJobOperations.cs @@ -62,7 +62,7 @@ internal DscCompilationJobOperations(AutomationClient client) /// The name of the automation account. /// /// - /// The the DSC configuration Id. + /// The DSC configuration Id. /// /// /// The parameters supplied to the create compilation job operation. @@ -91,7 +91,7 @@ internal DscCompilationJobOperations(AutomationClient client) /// The name of the automation account. /// /// - /// The the DSC configuration Id. + /// The DSC configuration Id. /// /// /// Headers that will be added to request. @@ -147,7 +147,7 @@ internal DscCompilationJobOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2018-01-15"; + string apiVersion = "2020-01-13-preview"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -357,7 +357,7 @@ internal DscCompilationJobOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2018-01-15"; + string apiVersion = "2020-01-13-preview"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -492,7 +492,7 @@ internal DscCompilationJobOperations(AutomationClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -581,7 +581,7 @@ internal DscCompilationJobOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2018-01-15"; + string apiVersion = "2020-01-13-preview"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -741,7 +741,7 @@ internal DscCompilationJobOperations(AutomationClient client) /// The name of the automation account. /// /// - /// The the DSC configuration Id. + /// The DSC configuration Id. /// /// /// The parameters supplied to the create compilation job operation. @@ -808,7 +808,7 @@ internal DscCompilationJobOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2018-01-15"; + string apiVersion = "2020-01-13-preview"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1112,7 +1112,7 @@ internal DscCompilationJobOperations(AutomationClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { diff --git a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/DscCompilationJobOperationsExtensions.cs b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/DscCompilationJobOperationsExtensions.cs index 5bd975435e8d..2b45bf1bbdfe 100644 --- a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/DscCompilationJobOperationsExtensions.cs +++ b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/DscCompilationJobOperationsExtensions.cs @@ -36,7 +36,7 @@ public static partial class DscCompilationJobOperationsExtensions /// The name of the automation account. /// /// - /// The the DSC configuration Id. + /// The DSC configuration Id. /// /// /// The parameters supplied to the create compilation job operation. @@ -60,7 +60,7 @@ public static DscCompilationJob Create(this IDscCompilationJobOperations operati /// The name of the automation account. /// /// - /// The the DSC configuration Id. + /// The DSC configuration Id. /// /// /// The parameters supplied to the create compilation job operation. @@ -90,7 +90,7 @@ public static DscCompilationJob Create(this IDscCompilationJobOperations operati /// The name of the automation account. /// /// - /// The the DSC configuration Id. + /// The DSC configuration Id. /// public static DscCompilationJob Get(this IDscCompilationJobOperations operations, string resourceGroupName, string automationAccountName, string compilationJobName) { @@ -111,7 +111,7 @@ public static DscCompilationJob Get(this IDscCompilationJobOperations operations /// The name of the automation account. /// /// - /// The the DSC configuration Id. + /// The DSC configuration Id. /// /// /// The cancellation token. @@ -240,7 +240,7 @@ public static JobStream GetStream(this IDscCompilationJobOperations operations, /// The name of the automation account. /// /// - /// The the DSC configuration Id. + /// The DSC configuration Id. /// /// /// The parameters supplied to the create compilation job operation. @@ -264,7 +264,7 @@ public static DscCompilationJob BeginCreate(this IDscCompilationJobOperations op /// The name of the automation account. /// /// - /// The the DSC configuration Id. + /// The DSC configuration Id. /// /// /// The parameters supplied to the create compilation job operation. diff --git a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/DscCompilationJobStreamOperations.cs b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/DscCompilationJobStreamOperations.cs index 44b724260913..1c3818f7692f 100644 --- a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/DscCompilationJobStreamOperations.cs +++ b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/DscCompilationJobStreamOperations.cs @@ -113,7 +113,7 @@ internal DscCompilationJobStreamOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2018-01-15"; + string apiVersion = "2020-01-13-preview"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/DscConfigurationOperations.cs b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/DscConfigurationOperations.cs index 456096ced7ba..9e0063a087e2 100644 --- a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/DscConfigurationOperations.cs +++ b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/DscConfigurationOperations.cs @@ -17,7 +17,6 @@ namespace Microsoft.Azure.Management.Automation using Newtonsoft.Json; using System.Collections; using System.Collections.Generic; - using System.IO; using System.Linq; using System.Net; using System.Net.Http; @@ -116,7 +115,7 @@ internal DscConfigurationOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2015-10-31"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -312,7 +311,7 @@ internal DscConfigurationOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2015-10-31"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -537,7 +536,7 @@ internal DscConfigurationOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2015-10-31"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -779,7 +778,7 @@ internal DscConfigurationOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2015-10-31"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -967,7 +966,7 @@ internal DscConfigurationOperations(AutomationClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetContentWithHttpMessagesAsync(string resourceGroupName, string automationAccountName, string configurationName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetContentWithHttpMessagesAsync(string resourceGroupName, string automationAccountName, string configurationName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -1000,7 +999,7 @@ internal DscConfigurationOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2015-10-31"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1077,7 +1076,7 @@ internal DscConfigurationOperations(AutomationClient client) ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); @@ -1120,7 +1119,7 @@ internal DscConfigurationOperations(AutomationClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -1130,7 +1129,20 @@ internal DscConfigurationOperations(AutomationClient client) // Deserialize Response if ((int)_statusCode == 200) { - _result.Body = await _httpResponse.Content.ReadAsStreamAsync().ConfigureAwait(false); + _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) { @@ -1205,7 +1217,7 @@ internal DscConfigurationOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2015-10-31"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1345,7 +1357,7 @@ internal DscConfigurationOperations(AutomationClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -1514,7 +1526,7 @@ internal DscConfigurationOperations(AutomationClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { diff --git a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/DscConfigurationOperationsExtensions.cs b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/DscConfigurationOperationsExtensions.cs index c6528a87cc73..92d5ebf2da0e 100644 --- a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/DscConfigurationOperationsExtensions.cs +++ b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/DscConfigurationOperationsExtensions.cs @@ -14,7 +14,6 @@ namespace Microsoft.Azure.Management.Automation using Microsoft.Rest.Azure; using Microsoft.Rest.Azure.OData; using Models; - using System.IO; using System.Threading; using System.Threading.Tasks; @@ -240,7 +239,7 @@ public static DscConfiguration CreateOrUpdate(this IDscConfigurationOperations o /// /// The configuration name. /// - public static Stream GetContent(this IDscConfigurationOperations operations, string resourceGroupName, string automationAccountName, string configurationName) + public static string GetContent(this IDscConfigurationOperations operations, string resourceGroupName, string automationAccountName, string configurationName) { return operations.GetContentAsync(resourceGroupName, automationAccountName, configurationName).GetAwaiter().GetResult(); } @@ -264,11 +263,12 @@ public static Stream GetContent(this IDscConfigurationOperations operations, str /// /// The cancellation token. /// - public static async Task GetContentAsync(this IDscConfigurationOperations operations, string resourceGroupName, string automationAccountName, string configurationName, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task GetContentAsync(this IDscConfigurationOperations operations, string resourceGroupName, string automationAccountName, string configurationName, CancellationToken cancellationToken = default(CancellationToken)) { - var _result = await operations.GetContentWithHttpMessagesAsync(resourceGroupName, automationAccountName, configurationName, null, cancellationToken).ConfigureAwait(false); - _result.Request.Dispose(); - return _result.Body; + using (var _result = await operations.GetContentWithHttpMessagesAsync(resourceGroupName, automationAccountName, configurationName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } } /// diff --git a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/DscNodeConfigurationOperations.cs b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/DscNodeConfigurationOperations.cs index c20674068841..666103b83864 100644 --- a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/DscNodeConfigurationOperations.cs +++ b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/DscNodeConfigurationOperations.cs @@ -115,7 +115,7 @@ internal DscNodeConfigurationOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "nodeConfigurationName"); } - string apiVersion = "2018-01-15"; + string apiVersion = "2020-01-13-preview"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -311,7 +311,7 @@ internal DscNodeConfigurationOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "nodeConfigurationName"); } - string apiVersion = "2018-01-15"; + string apiVersion = "2020-01-13-preview"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -553,7 +553,7 @@ internal DscNodeConfigurationOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2018-01-15"; + string apiVersion = "2020-01-13-preview"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -693,7 +693,7 @@ internal DscNodeConfigurationOperations(AutomationClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -790,7 +790,7 @@ internal DscNodeConfigurationOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2018-01-15"; + string apiVersion = "2020-01-13-preview"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1094,7 +1094,7 @@ internal DscNodeConfigurationOperations(AutomationClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { diff --git a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/DscNodeOperations.cs b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/DscNodeOperations.cs index 46efe3c73391..7829278d814c 100644 --- a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/DscNodeOperations.cs +++ b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/DscNodeOperations.cs @@ -73,9 +73,6 @@ internal DscNodeOperations(AutomationClient client) /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when unable to deserialize the response - /// /// /// Thrown when a required parameter is null /// @@ -85,7 +82,7 @@ internal DscNodeOperations(AutomationClient client) /// /// A response object containing the response body and response headers. /// - public async Task> DeleteWithHttpMessagesAsync(string resourceGroupName, string automationAccountName, string nodeId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string automationAccountName, string nodeId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -118,7 +115,7 @@ internal DscNodeOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2018-01-15"; + string apiVersion = "2020-01-13-preview"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -233,31 +230,13 @@ internal DscNodeOperations(AutomationClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) { _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); @@ -332,7 +311,7 @@ internal DscNodeOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2018-01-15"; + string apiVersion = "2020-01-13-preview"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -553,7 +532,7 @@ internal DscNodeOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2018-01-15"; + string apiVersion = "2020-01-13-preview"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -773,7 +752,7 @@ internal DscNodeOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2018-01-15"; + string apiVersion = "2020-01-13-preview"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -913,7 +892,7 @@ internal DscNodeOperations(AutomationClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -1082,7 +1061,7 @@ internal DscNodeOperations(AutomationClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { diff --git a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/DscNodeOperationsExtensions.cs b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/DscNodeOperationsExtensions.cs index 448650f49455..97e942d649ef 100644 --- a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/DscNodeOperationsExtensions.cs +++ b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/DscNodeOperationsExtensions.cs @@ -38,9 +38,9 @@ public static partial class DscNodeOperationsExtensions /// /// The node id. /// - public static DscNode Delete(this IDscNodeOperations operations, string resourceGroupName, string automationAccountName, string nodeId) + public static void Delete(this IDscNodeOperations operations, string resourceGroupName, string automationAccountName, string nodeId) { - return operations.DeleteAsync(resourceGroupName, automationAccountName, nodeId).GetAwaiter().GetResult(); + operations.DeleteAsync(resourceGroupName, automationAccountName, nodeId).GetAwaiter().GetResult(); } /// @@ -62,12 +62,9 @@ public static DscNode Delete(this IDscNodeOperations operations, string resource /// /// The cancellation token. /// - public static async Task DeleteAsync(this IDscNodeOperations operations, string resourceGroupName, string automationAccountName, string nodeId, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task DeleteAsync(this IDscNodeOperations operations, string resourceGroupName, string automationAccountName, string nodeId, CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.DeleteWithHttpMessagesAsync(resourceGroupName, automationAccountName, nodeId, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, automationAccountName, nodeId, null, cancellationToken).ConfigureAwait(false)).Dispose(); } /// diff --git a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/FieldsOperations.cs b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/FieldsOperations.cs index fb8bc2dd252d..22a0ff3bc21f 100644 --- a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/FieldsOperations.cs +++ b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/FieldsOperations.cs @@ -124,7 +124,7 @@ internal FieldsOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2015-10-31"; + string apiVersion = "2020-01-13-preview"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -254,7 +254,7 @@ internal FieldsOperations(AutomationClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { diff --git a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/HybridRunbookWorkerGroupOperations.cs b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/HybridRunbookWorkerGroupOperations.cs index 83229895b0e4..453e07969316 100644 --- a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/HybridRunbookWorkerGroupOperations.cs +++ b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/HybridRunbookWorkerGroupOperations.cs @@ -115,7 +115,7 @@ internal HybridRunbookWorkerGroupOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2015-10-31"; + string apiVersion = "2020-01-13-preview"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -311,7 +311,7 @@ internal HybridRunbookWorkerGroupOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2015-10-31"; + string apiVersion = "2020-01-13-preview"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -532,7 +532,7 @@ internal HybridRunbookWorkerGroupOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2015-10-31"; + string apiVersion = "2020-01-13-preview"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -749,7 +749,7 @@ internal HybridRunbookWorkerGroupOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2015-10-31"; + string apiVersion = "2020-01-13-preview"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -884,7 +884,7 @@ internal HybridRunbookWorkerGroupOperations(AutomationClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -1053,7 +1053,7 @@ internal HybridRunbookWorkerGroupOperations(AutomationClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { diff --git a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/IAutomationClient.cs b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/IAutomationClient.cs index b7d22fc4d5c7..47fc4bb15e89 100644 --- a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/IAutomationClient.cs +++ b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/IAutomationClient.cs @@ -67,14 +67,74 @@ public partial interface IAutomationClient : System.IDisposable /// - /// Gets the IAutomationAccountOperations. + /// Gets the IPrivateEndpointConnectionsOperations. /// - IAutomationAccountOperations AutomationAccount { get; } + IPrivateEndpointConnectionsOperations PrivateEndpointConnections { get; } /// - /// Gets the IOperations. + /// Gets the IPrivateLinkResourcesOperations. /// - IOperations Operations { get; } + IPrivateLinkResourcesOperations PrivateLinkResources { get; } + + /// + /// Gets the IPython2PackageOperations. + /// + IPython2PackageOperations Python2Package { get; } + + /// + /// Gets the IAgentRegistrationInformationOperations. + /// + IAgentRegistrationInformationOperations AgentRegistrationInformation { get; } + + /// + /// Gets the IDscNodeOperations. + /// + IDscNodeOperations DscNode { get; } + + /// + /// Gets the INodeReportsOperations. + /// + INodeReportsOperations NodeReports { get; } + + /// + /// Gets the IDscNodeConfigurationOperations. + /// + IDscNodeConfigurationOperations DscNodeConfiguration { get; } + + /// + /// Gets the IDscCompilationJobOperations. + /// + IDscCompilationJobOperations DscCompilationJob { get; } + + /// + /// Gets the IDscCompilationJobStreamOperations. + /// + IDscCompilationJobStreamOperations DscCompilationJobStream { get; } + + /// + /// Gets the INodeCountInformationOperations. + /// + INodeCountInformationOperations NodeCountInformation { get; } + + /// + /// Gets the ISourceControlOperations. + /// + ISourceControlOperations SourceControl { get; } + + /// + /// Gets the ISourceControlSyncJobOperations. + /// + ISourceControlSyncJobOperations SourceControlSyncJob { get; } + + /// + /// Gets the ISourceControlSyncJobStreamsOperations. + /// + ISourceControlSyncJobStreamsOperations SourceControlSyncJobStreams { get; } + + /// + /// Gets the IAutomationAccountOperations. + /// + IAutomationAccountOperations AutomationAccount { get; } /// /// Gets the IStatisticsOperations. @@ -111,11 +171,6 @@ public partial interface IAutomationClient : System.IDisposable /// ICredentialOperations Credential { get; } - /// - /// Gets the IDscConfigurationOperations. - /// - IDscConfigurationOperations DscConfiguration { get; } - /// /// Gets the IHybridRunbookWorkerGroupOperations. /// @@ -161,45 +216,15 @@ public partial interface IAutomationClient : System.IDisposable /// IVariableOperations Variable { get; } - /// - /// Gets the IWebhookOperations. - /// - IWebhookOperations Webhook { get; } - /// /// Gets the IWatcherOperations. /// IWatcherOperations Watcher { get; } /// - /// Gets the ISoftwareUpdateConfigurationsOperations. - /// - ISoftwareUpdateConfigurationsOperations SoftwareUpdateConfigurations { get; } - - /// - /// Gets the ISoftwareUpdateConfigurationRunsOperations. - /// - ISoftwareUpdateConfigurationRunsOperations SoftwareUpdateConfigurationRuns { get; } - - /// - /// Gets the ISoftwareUpdateConfigurationMachineRunsOperations. - /// - ISoftwareUpdateConfigurationMachineRunsOperations SoftwareUpdateConfigurationMachineRuns { get; } - - /// - /// Gets the ISourceControlOperations. - /// - ISourceControlOperations SourceControl { get; } - - /// - /// Gets the ISourceControlSyncJobOperations. - /// - ISourceControlSyncJobOperations SourceControlSyncJob { get; } - - /// - /// Gets the ISourceControlSyncJobStreamsOperations. + /// Gets the IDscConfigurationOperations. /// - ISourceControlSyncJobStreamsOperations SourceControlSyncJobStreams { get; } + IDscConfigurationOperations DscConfiguration { get; } /// /// Gets the IJobOperations. @@ -212,39 +237,9 @@ public partial interface IAutomationClient : System.IDisposable IJobStreamOperations JobStream { get; } /// - /// Gets the IAgentRegistrationInformationOperations. - /// - IAgentRegistrationInformationOperations AgentRegistrationInformation { get; } - - /// - /// Gets the IDscNodeOperations. - /// - IDscNodeOperations DscNode { get; } - - /// - /// Gets the INodeReportsOperations. - /// - INodeReportsOperations NodeReports { get; } - - /// - /// Gets the IDscCompilationJobOperations. - /// - IDscCompilationJobOperations DscCompilationJob { get; } - - /// - /// Gets the IDscCompilationJobStreamOperations. - /// - IDscCompilationJobStreamOperations DscCompilationJobStream { get; } - - /// - /// Gets the IDscNodeConfigurationOperations. - /// - IDscNodeConfigurationOperations DscNodeConfiguration { get; } - - /// - /// Gets the INodeCountInformationOperations. + /// Gets the IOperations. /// - INodeCountInformationOperations NodeCountInformation { get; } + IOperations Operations { get; } /// /// Gets the IRunbookDraftOperations. @@ -267,9 +262,19 @@ public partial interface IAutomationClient : System.IDisposable ITestJobOperations TestJob { get; } /// - /// Gets the IPython2PackageOperations. + /// Gets the ISoftwareUpdateConfigurationRunsOperations. /// - IPython2PackageOperations Python2Package { get; } + ISoftwareUpdateConfigurationRunsOperations SoftwareUpdateConfigurationRuns { get; } + + /// + /// Gets the ISoftwareUpdateConfigurationMachineRunsOperations. + /// + ISoftwareUpdateConfigurationMachineRunsOperations SoftwareUpdateConfigurationMachineRuns { get; } + + /// + /// Gets the IWebhookOperations. + /// + IWebhookOperations Webhook { get; } } } diff --git a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/IConnectionOperations.cs b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/IConnectionOperations.cs index 40c417574188..f0349cd68057 100644 --- a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/IConnectionOperations.cs +++ b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/IConnectionOperations.cs @@ -45,13 +45,10 @@ public partial interface IConnectionOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when unable to deserialize the response - /// /// /// Thrown when a required parameter is null /// - Task> DeleteWithHttpMessagesAsync(string resourceGroupName, string automationAccountName, string connectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task DeleteWithHttpMessagesAsync(string resourceGroupName, string automationAccountName, string connectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Retrieve the connection identified by connection name. /// diff --git a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/IDscCompilationJobOperations.cs b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/IDscCompilationJobOperations.cs index 8483b75ca4c4..bcfbd06102e5 100644 --- a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/IDscCompilationJobOperations.cs +++ b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/IDscCompilationJobOperations.cs @@ -35,7 +35,7 @@ public partial interface IDscCompilationJobOperations /// The name of the automation account. /// /// - /// The the DSC configuration Id. + /// The DSC configuration Id. /// /// /// The parameters supplied to the create compilation job operation. @@ -68,7 +68,7 @@ public partial interface IDscCompilationJobOperations /// The name of the automation account. /// /// - /// The the DSC configuration Id. + /// The DSC configuration Id. /// /// /// The headers that will be added to request. @@ -158,7 +158,7 @@ public partial interface IDscCompilationJobOperations /// The name of the automation account. /// /// - /// The the DSC configuration Id. + /// The DSC configuration Id. /// /// /// The parameters supplied to the create compilation job operation. diff --git a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/IDscConfigurationOperations.cs b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/IDscConfigurationOperations.cs index d36e8155045d..910102b3c613 100644 --- a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/IDscConfigurationOperations.cs +++ b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/IDscConfigurationOperations.cs @@ -16,7 +16,6 @@ namespace Microsoft.Azure.Management.Automation using Models; using System.Collections; using System.Collections.Generic; - using System.IO; using System.Threading; using System.Threading.Tasks; @@ -172,7 +171,7 @@ public partial interface IDscConfigurationOperations /// /// Thrown when a required parameter is null /// - Task> GetContentWithHttpMessagesAsync(string resourceGroupName, string automationAccountName, string configurationName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> GetContentWithHttpMessagesAsync(string resourceGroupName, string automationAccountName, string configurationName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Retrieve a list of configurations. /// diff --git a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/IDscNodeOperations.cs b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/IDscNodeOperations.cs index 5ec548ae4965..ecb92c540159 100644 --- a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/IDscNodeOperations.cs +++ b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/IDscNodeOperations.cs @@ -46,13 +46,10 @@ public partial interface IDscNodeOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when unable to deserialize the response - /// /// /// Thrown when a required parameter is null /// - Task> DeleteWithHttpMessagesAsync(string resourceGroupName, string automationAccountName, string nodeId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task DeleteWithHttpMessagesAsync(string resourceGroupName, string automationAccountName, string nodeId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Retrieve the dsc node identified by node id. /// diff --git a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/IJobOperations.cs b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/IJobOperations.cs index fa6879ea9250..8fb8f2f8e80d 100644 --- a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/IJobOperations.cs +++ b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/IJobOperations.cs @@ -16,7 +16,6 @@ namespace Microsoft.Azure.Management.Automation using Models; using System.Collections; using System.Collections.Generic; - using System.IO; using System.Threading; using System.Threading.Tasks; @@ -56,7 +55,7 @@ public partial interface IJobOperations /// /// Thrown when a required parameter is null /// - Task> GetOutputWithHttpMessagesAsync(string resourceGroupName, string automationAccountName, string jobName, string clientRequestId = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> GetOutputWithHttpMessagesAsync(string resourceGroupName, string automationAccountName, string jobName, string clientRequestId = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Retrieve the runbook content of the job identified by job name. /// @@ -79,7 +78,7 @@ public partial interface IJobOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -88,7 +87,7 @@ public partial interface IJobOperations /// /// Thrown when a required parameter is null /// - Task> GetRunbookContentWithHttpMessagesAsync(string resourceGroupName, string automationAccountName, string jobName, string clientRequestId = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> GetRunbookContentWithHttpMessagesAsync(string resourceGroupName, string automationAccountName, string jobName, string clientRequestId = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Suspend the job identified by job name. /// diff --git a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/ISoftwareUpdateConfigurationsOperations.cs b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/IPrivateEndpointConnectionsOperations.cs similarity index 50% rename from sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/ISoftwareUpdateConfigurationsOperations.cs rename to sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/IPrivateEndpointConnectionsOperations.cs index 5d82085c11f9..f2682c7f2ef7 100644 --- a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/ISoftwareUpdateConfigurationsOperations.cs +++ b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/IPrivateEndpointConnectionsOperations.cs @@ -19,14 +19,12 @@ namespace Microsoft.Azure.Management.Automation using System.Threading.Tasks; /// - /// SoftwareUpdateConfigurationsOperations operations. + /// PrivateEndpointConnectionsOperations operations. /// - public partial interface ISoftwareUpdateConfigurationsOperations + public partial interface IPrivateEndpointConnectionsOperations { /// - /// Create a new software update configuration with the name given in - /// the URI. - /// + /// List all private endpoint connections on a Automation account. /// /// /// Name of an Azure Resource group. @@ -34,14 +32,33 @@ public partial interface ISoftwareUpdateConfigurationsOperations /// /// The name of the automation account. /// - /// - /// The name of the software update configuration to be created. + /// + /// The headers that will be added to request. /// - /// - /// Request body. + /// + /// The cancellation token. /// - /// - /// Identifies this specific client request. + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListByAutomationAccountWithHttpMessagesAsync(string resourceGroupName, string automationAccountName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets a private endpoint connection. + /// + /// + /// Name of an Azure Resource group. + /// + /// + /// The name of the automation account. + /// + /// + /// The name of the private endpoint connection. /// /// /// The headers that will be added to request. @@ -49,7 +66,7 @@ public partial interface ISoftwareUpdateConfigurationsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -58,10 +75,9 @@ public partial interface ISoftwareUpdateConfigurationsOperations /// /// Thrown when a required parameter is null /// - Task> CreateWithHttpMessagesAsync(string resourceGroupName, string automationAccountName, string softwareUpdateConfigurationName, SoftwareUpdateConfiguration parameters, string clientRequestId = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> GetWithHttpMessagesAsync(string resourceGroupName, string automationAccountName, string privateEndpointConnectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Get a single software update configuration by name. - /// + /// Approve or reject a private endpoint connection with a given name. /// /// /// Name of an Azure Resource group. @@ -69,11 +85,10 @@ public partial interface ISoftwareUpdateConfigurationsOperations /// /// The name of the automation account. /// - /// - /// The name of the software update configuration to be created. + /// + /// The name of the private endpoint connection. /// - /// - /// Identifies this specific client request. + /// /// /// /// The headers that will be added to request. @@ -90,10 +105,9 @@ public partial interface ISoftwareUpdateConfigurationsOperations /// /// Thrown when a required parameter is null /// - Task> GetByNameWithHttpMessagesAsync(string resourceGroupName, string automationAccountName, string softwareUpdateConfigurationName, string clientRequestId = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string automationAccountName, string privateEndpointConnectionName, PrivateEndpointConnection parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// delete a specific software update configuration. - /// + /// Deletes a private endpoint connection with a given name. /// /// /// Name of an Azure Resource group. @@ -101,11 +115,8 @@ public partial interface ISoftwareUpdateConfigurationsOperations /// /// The name of the automation account. /// - /// - /// The name of the software update configuration to be created. - /// - /// - /// Identifies this specific client request. + /// + /// The name of the private endpoint connection. /// /// /// The headers that will be added to request. @@ -119,10 +130,9 @@ public partial interface ISoftwareUpdateConfigurationsOperations /// /// Thrown when a required parameter is null /// - Task DeleteWithHttpMessagesAsync(string resourceGroupName, string automationAccountName, string softwareUpdateConfigurationName, string clientRequestId = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task DeleteWithHttpMessagesAsync(string resourceGroupName, string automationAccountName, string privateEndpointConnectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Get all software update configurations for the account. - /// + /// Approve or reject a private endpoint connection with a given name. /// /// /// Name of an Azure Resource group. @@ -130,11 +140,10 @@ public partial interface ISoftwareUpdateConfigurationsOperations /// /// The name of the automation account. /// - /// - /// Identifies this specific client request. + /// + /// The name of the private endpoint connection. /// - /// - /// The filter to apply on the operation. + /// /// /// /// The headers that will be added to request. @@ -151,6 +160,31 @@ public partial interface ISoftwareUpdateConfigurationsOperations /// /// Thrown when a required parameter is null /// - Task> ListWithHttpMessagesAsync(string resourceGroupName, string automationAccountName, string clientRequestId = default(string), string filter = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string automationAccountName, string privateEndpointConnectionName, PrivateEndpointConnection parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Deletes a private endpoint connection with a given name. + /// + /// + /// Name of an Azure Resource group. + /// + /// + /// The name of the automation account. + /// + /// + /// The name of the private endpoint connection. + /// + /// + /// 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 BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string automationAccountName, string privateEndpointConnectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/IPrivateLinkResourcesOperations.cs b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/IPrivateLinkResourcesOperations.cs new file mode 100644 index 000000000000..e36381cb26f4 --- /dev/null +++ b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/IPrivateLinkResourcesOperations.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.Automation +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// PrivateLinkResourcesOperations operations. + /// + public partial interface IPrivateLinkResourcesOperations + { + /// + /// Gets the private link resources that need to be created for + /// Automation account. + /// + /// + /// Name of an Azure Resource group. + /// + /// + /// The name of the automation account. + /// + /// + /// 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>> AutomationMethodWithHttpMessagesAsync(string resourceGroupName, string automationAccountName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/IRunbookDraftOperations.cs b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/IRunbookDraftOperations.cs index 8162e80fc575..ed32730f0a1d 100644 --- a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/IRunbookDraftOperations.cs +++ b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/IRunbookDraftOperations.cs @@ -52,7 +52,7 @@ public partial interface IRunbookDraftOperations /// /// Thrown when a required parameter is null /// - Task> GetContentWithHttpMessagesAsync(string resourceGroupName, string automationAccountName, string runbookName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> GetContentWithHttpMessagesAsync(string resourceGroupName, string automationAccountName, string runbookName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Replaces the runbook draft content. /// @@ -67,7 +67,7 @@ public partial interface IRunbookDraftOperations /// The runbook name. /// /// - /// The runbook draft content. + /// The runbook draft content. /// /// /// The headers that will be added to request. @@ -78,13 +78,10 @@ public partial interface IRunbookDraftOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when unable to deserialize the response - /// /// /// Thrown when a required parameter is null /// - Task> ReplaceContentWithHttpMessagesAsync(string resourceGroupName, string automationAccountName, string runbookName, Stream runbookContent, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> ReplaceContentWithHttpMessagesAsync(string resourceGroupName, string automationAccountName, string runbookName, Stream runbookContent, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Retrieve the runbook draft identified by runbook name. /// @@ -137,13 +134,10 @@ public partial interface IRunbookDraftOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when unable to deserialize the response - /// /// /// Thrown when a required parameter is null /// - Task> UndoEditWithHttpMessagesAsync(string resourceGroupName, string automationAccountName, string runbookName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task UndoEditWithHttpMessagesAsync(string resourceGroupName, string automationAccountName, string runbookName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Replaces the runbook draft content. /// @@ -158,7 +152,7 @@ public partial interface IRunbookDraftOperations /// The runbook name. /// /// - /// The runbook draft content. + /// The runbook draft content. /// /// /// The headers that will be added to request. @@ -169,12 +163,9 @@ public partial interface IRunbookDraftOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when unable to deserialize the response - /// /// /// Thrown when a required parameter is null /// - Task> BeginReplaceContentWithHttpMessagesAsync(string resourceGroupName, string automationAccountName, string runbookName, Stream runbookContent, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> BeginReplaceContentWithHttpMessagesAsync(string resourceGroupName, string automationAccountName, string runbookName, Stream runbookContent, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/IRunbookOperations.cs b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/IRunbookOperations.cs index c585c34dfd1a..a5eb01c48d76 100644 --- a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/IRunbookOperations.cs +++ b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/IRunbookOperations.cs @@ -15,7 +15,6 @@ namespace Microsoft.Azure.Management.Automation using Models; using System.Collections; using System.Collections.Generic; - using System.IO; using System.Threading; using System.Threading.Tasks; @@ -78,7 +77,7 @@ public partial interface IRunbookOperations /// /// Thrown when a required parameter is null /// - Task> GetContentWithHttpMessagesAsync(string resourceGroupName, string automationAccountName, string runbookName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> GetContentWithHttpMessagesAsync(string resourceGroupName, string automationAccountName, string runbookName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Retrieve the runbook identified by runbook name. /// diff --git a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/JobOperations.cs b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/JobOperations.cs index 4acac7a7fee9..5b04b48843d4 100644 --- a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/JobOperations.cs +++ b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/JobOperations.cs @@ -17,7 +17,6 @@ namespace Microsoft.Azure.Management.Automation using Newtonsoft.Json; using System.Collections; using System.Collections.Generic; - using System.IO; using System.Linq; using System.Net; using System.Net.Http; @@ -89,7 +88,7 @@ internal JobOperations(AutomationClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetOutputWithHttpMessagesAsync(string resourceGroupName, string automationAccountName, string jobName, string clientRequestId = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetOutputWithHttpMessagesAsync(string resourceGroupName, string automationAccountName, string jobName, string clientRequestId = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.SubscriptionId == null) { @@ -122,7 +121,7 @@ internal JobOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "jobName"); } - string apiVersion = "2017-05-15-preview"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -208,7 +207,7 @@ internal JobOperations(AutomationClient client) ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); @@ -251,7 +250,7 @@ internal JobOperations(AutomationClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -261,7 +260,20 @@ internal JobOperations(AutomationClient client) // Deserialize Response if ((int)_statusCode == 200) { - _result.Body = await _httpResponse.Content.ReadAsStreamAsync().ConfigureAwait(false); + _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) { @@ -292,7 +304,7 @@ internal JobOperations(AutomationClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -307,7 +319,7 @@ internal JobOperations(AutomationClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetRunbookContentWithHttpMessagesAsync(string resourceGroupName, string automationAccountName, string jobName, string clientRequestId = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetRunbookContentWithHttpMessagesAsync(string resourceGroupName, string automationAccountName, string jobName, string clientRequestId = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.SubscriptionId == null) { @@ -340,7 +352,7 @@ internal JobOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "jobName"); } - string apiVersion = "2017-05-15-preview"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -426,7 +438,7 @@ internal JobOperations(AutomationClient client) ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); @@ -436,13 +448,14 @@ internal JobOperations(AutomationClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { + ex = new CloudException(_errorBody.Message); ex.Body = _errorBody; } } @@ -452,6 +465,10 @@ internal JobOperations(AutomationClient client) } ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } if (_shouldTrace) { ServiceClientTracing.Error(_invocationId, ex); @@ -464,7 +481,7 @@ internal JobOperations(AutomationClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -474,7 +491,20 @@ internal JobOperations(AutomationClient client) // Deserialize Response if ((int)_statusCode == 200) { - _result.Body = await _httpResponse.Content.ReadAsStreamAsync().ConfigureAwait(false); + _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) { @@ -550,7 +580,7 @@ internal JobOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "jobName"); } - string apiVersion = "2017-05-15-preview"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -755,7 +785,7 @@ internal JobOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2017-05-15-preview"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -963,7 +993,7 @@ internal JobOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "jobName"); } - string apiVersion = "2017-05-15-preview"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1196,7 +1226,7 @@ internal JobOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); } - string apiVersion = "2017-05-15-preview"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1425,7 +1455,7 @@ internal JobOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2017-05-15-preview"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1569,7 +1599,7 @@ internal JobOperations(AutomationClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -1655,7 +1685,7 @@ internal JobOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2017-05-15-preview"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1955,7 +1985,7 @@ internal JobOperations(AutomationClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { diff --git a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/JobOperationsExtensions.cs b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/JobOperationsExtensions.cs index 2c0f037b16e4..b334975effa6 100644 --- a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/JobOperationsExtensions.cs +++ b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/JobOperationsExtensions.cs @@ -14,7 +14,6 @@ namespace Microsoft.Azure.Management.Automation using Microsoft.Rest.Azure; using Microsoft.Rest.Azure.OData; using Models; - using System.IO; using System.Threading; using System.Threading.Tasks; @@ -42,7 +41,7 @@ public static partial class JobOperationsExtensions /// /// Identifies this specific client request. /// - public static Stream GetOutput(this IJobOperations operations, string resourceGroupName, string automationAccountName, string jobName, string clientRequestId = default(string)) + public static string GetOutput(this IJobOperations operations, string resourceGroupName, string automationAccountName, string jobName, string clientRequestId = default(string)) { return operations.GetOutputAsync(resourceGroupName, automationAccountName, jobName, clientRequestId).GetAwaiter().GetResult(); } @@ -69,11 +68,12 @@ public static partial class JobOperationsExtensions /// /// The cancellation token. /// - public static async Task GetOutputAsync(this IJobOperations operations, string resourceGroupName, string automationAccountName, string jobName, string clientRequestId = default(string), CancellationToken cancellationToken = default(CancellationToken)) + public static async Task GetOutputAsync(this IJobOperations operations, string resourceGroupName, string automationAccountName, string jobName, string clientRequestId = default(string), CancellationToken cancellationToken = default(CancellationToken)) { - var _result = await operations.GetOutputWithHttpMessagesAsync(resourceGroupName, automationAccountName, jobName, clientRequestId, null, cancellationToken).ConfigureAwait(false); - _result.Request.Dispose(); - return _result.Body; + using (var _result = await operations.GetOutputWithHttpMessagesAsync(resourceGroupName, automationAccountName, jobName, clientRequestId, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } } /// @@ -95,7 +95,7 @@ public static partial class JobOperationsExtensions /// /// Identifies this specific client request. /// - public static Stream GetRunbookContent(this IJobOperations operations, string resourceGroupName, string automationAccountName, string jobName, string clientRequestId = default(string)) + public static string GetRunbookContent(this IJobOperations operations, string resourceGroupName, string automationAccountName, string jobName, string clientRequestId = default(string)) { return operations.GetRunbookContentAsync(resourceGroupName, automationAccountName, jobName, clientRequestId).GetAwaiter().GetResult(); } @@ -122,11 +122,12 @@ public static partial class JobOperationsExtensions /// /// The cancellation token. /// - public static async Task GetRunbookContentAsync(this IJobOperations operations, string resourceGroupName, string automationAccountName, string jobName, string clientRequestId = default(string), CancellationToken cancellationToken = default(CancellationToken)) + public static async Task GetRunbookContentAsync(this IJobOperations operations, string resourceGroupName, string automationAccountName, string jobName, string clientRequestId = default(string), CancellationToken cancellationToken = default(CancellationToken)) { - var _result = await operations.GetRunbookContentWithHttpMessagesAsync(resourceGroupName, automationAccountName, jobName, clientRequestId, null, cancellationToken).ConfigureAwait(false); - _result.Request.Dispose(); - return _result.Body; + using (var _result = await operations.GetRunbookContentWithHttpMessagesAsync(resourceGroupName, automationAccountName, jobName, clientRequestId, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } } /// diff --git a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/JobScheduleOperations.cs b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/JobScheduleOperations.cs index a34b4a31cfca..798e5a0371e1 100644 --- a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/JobScheduleOperations.cs +++ b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/JobScheduleOperations.cs @@ -111,7 +111,7 @@ internal JobScheduleOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2015-10-31"; + string apiVersion = "2020-01-13-preview"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -303,7 +303,7 @@ internal JobScheduleOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2015-10-31"; + string apiVersion = "2020-01-13-preview"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -524,7 +524,7 @@ internal JobScheduleOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2015-10-31"; + string apiVersion = "2020-01-13-preview"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -741,7 +741,7 @@ internal JobScheduleOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2015-10-31"; + string apiVersion = "2020-01-13-preview"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -876,7 +876,7 @@ internal JobScheduleOperations(AutomationClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -1045,7 +1045,7 @@ internal JobScheduleOperations(AutomationClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { diff --git a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/JobStreamOperations.cs b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/JobStreamOperations.cs index 73d36990f4a5..5d74fbf4284c 100644 --- a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/JobStreamOperations.cs +++ b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/JobStreamOperations.cs @@ -127,7 +127,7 @@ internal JobStreamOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "jobStreamId"); } - string apiVersion = "2017-05-15-preview"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -358,7 +358,7 @@ internal JobStreamOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2017-05-15-preview"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -500,7 +500,7 @@ internal JobStreamOperations(AutomationClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -681,7 +681,7 @@ internal JobStreamOperations(AutomationClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { diff --git a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/KeysOperations.cs b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/KeysOperations.cs index 9d1b528ab9b9..4f62a96de029 100644 --- a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/KeysOperations.cs +++ b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/KeysOperations.cs @@ -109,7 +109,7 @@ internal KeysOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2015-10-31"; + string apiVersion = "2020-01-13-preview"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/LinkedWorkspaceOperations.cs b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/LinkedWorkspaceOperations.cs index 96b5a736d02f..bf1a70c57bfe 100644 --- a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/LinkedWorkspaceOperations.cs +++ b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/LinkedWorkspaceOperations.cs @@ -110,7 +110,7 @@ internal LinkedWorkspaceOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2015-10-31"; + string apiVersion = "2020-01-13-preview"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/AutomationAccount.cs b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/AutomationAccount.cs index 090d9973742b..f8f30962e8c4 100644 --- a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/AutomationAccount.cs +++ b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/AutomationAccount.cs @@ -49,8 +49,15 @@ public AutomationAccount() /// Gets the creation time. /// Gets the last modified time. /// Gets or sets the description. + /// Encryption properties for the automation + /// account + /// List of Automation + /// operations supported by the Automation resource provider. + /// Indicates whether traffic on the + /// non-ARM endpoint (Webhook/Agent) is allowed from the public + /// internet /// Gets or sets the etag of the resource. - public AutomationAccount(string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), string location = default(string), Sku sku = default(Sku), string lastModifiedBy = default(string), string state = default(string), System.DateTimeOffset creationTime = default(System.DateTimeOffset), System.DateTimeOffset lastModifiedTime = default(System.DateTimeOffset), string description = default(string), string etag = default(string)) + public AutomationAccount(string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), string location = default(string), Sku sku = default(Sku), string lastModifiedBy = default(string), string state = default(string), System.DateTimeOffset creationTime = default(System.DateTimeOffset), System.DateTimeOffset lastModifiedTime = default(System.DateTimeOffset), string description = default(string), EncryptionProperties encryption = default(EncryptionProperties), IList privateEndpointConnections = default(IList), bool? publicNetworkAccess = default(bool?), string etag = default(string), Identity identity = default(Identity)) : base(id, name, type, tags, location) { Sku = sku; @@ -59,7 +66,11 @@ public AutomationAccount() CreationTime = creationTime; LastModifiedTime = lastModifiedTime; Description = description; + Encryption = encryption; + PrivateEndpointConnections = privateEndpointConnections; + PublicNetworkAccess = publicNetworkAccess; Etag = etag; + Identity = identity; CustomInit(); } @@ -105,12 +116,37 @@ public AutomationAccount() [JsonProperty(PropertyName = "properties.description")] public string Description { get; set; } + /// + /// Gets or sets encryption properties for the automation account + /// + [JsonProperty(PropertyName = "properties.encryption")] + public EncryptionProperties Encryption { get; set; } + + /// + /// Gets or sets list of Automation operations supported by the + /// Automation resource provider. + /// + [JsonProperty(PropertyName = "properties.privateEndpointConnections")] + public IList PrivateEndpointConnections { get; set; } + + /// + /// Gets or sets indicates whether traffic on the non-ARM endpoint + /// (Webhook/Agent) is allowed from the public internet + /// + [JsonProperty(PropertyName = "properties.publicNetworkAccess")] + public bool? PublicNetworkAccess { get; set; } + /// /// Gets or sets the etag of the resource. /// [JsonProperty(PropertyName = "etag")] public string Etag { get; set; } + /// + /// + [JsonProperty(PropertyName = "identity")] + public Identity Identity { get; set; } + /// /// Validate the object. /// diff --git a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/AutomationAccountCreateOrUpdateParameters.cs b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/AutomationAccountCreateOrUpdateParameters.cs index 4a22dfd7bd5a..1ebade965c5e 100644 --- a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/AutomationAccountCreateOrUpdateParameters.cs +++ b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/AutomationAccountCreateOrUpdateParameters.cs @@ -38,16 +38,26 @@ public AutomationAccountCreateOrUpdateParameters() /// AutomationAccountCreateOrUpdateParameters class. /// /// Gets or sets account SKU. + /// Set the encryption properties for the + /// automation account + /// Indicates whether traffic on the + /// non-ARM endpoint (Webhook/Agent) is allowed from the public + /// internet /// Gets or sets name of the resource. /// Gets or sets the location of the /// resource. + /// Sets the identity property for automation + /// account /// Gets or sets the tags attached to the /// resource. - public AutomationAccountCreateOrUpdateParameters(Sku sku = default(Sku), string name = default(string), string location = default(string), IDictionary tags = default(IDictionary)) + public AutomationAccountCreateOrUpdateParameters(Sku sku = default(Sku), EncryptionProperties encryption = default(EncryptionProperties), bool? publicNetworkAccess = default(bool?), string name = default(string), string location = default(string), Identity identity = default(Identity), IDictionary tags = default(IDictionary)) { Sku = sku; + Encryption = encryption; + PublicNetworkAccess = publicNetworkAccess; Name = name; Location = location; + Identity = identity; Tags = tags; CustomInit(); } @@ -63,6 +73,20 @@ public AutomationAccountCreateOrUpdateParameters() [JsonProperty(PropertyName = "properties.sku")] public Sku Sku { get; set; } + /// + /// Gets or sets set the encryption properties for the automation + /// account + /// + [JsonProperty(PropertyName = "properties.encryption")] + public EncryptionProperties Encryption { get; set; } + + /// + /// Gets or sets indicates whether traffic on the non-ARM endpoint + /// (Webhook/Agent) is allowed from the public internet + /// + [JsonProperty(PropertyName = "properties.publicNetworkAccess")] + public bool? PublicNetworkAccess { get; set; } + /// /// Gets or sets name of the resource. /// @@ -75,6 +99,12 @@ public AutomationAccountCreateOrUpdateParameters() [JsonProperty(PropertyName = "location")] public string Location { get; set; } + /// + /// Gets or sets sets the identity property for automation account + /// + [JsonProperty(PropertyName = "identity")] + public Identity Identity { get; set; } + /// /// Gets or sets the tags attached to the resource. /// diff --git a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/AutomationAccountUpdateParameters.cs b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/AutomationAccountUpdateParameters.cs index d1e4f904093a..826604ee9c87 100644 --- a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/AutomationAccountUpdateParameters.cs +++ b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/AutomationAccountUpdateParameters.cs @@ -37,16 +37,26 @@ public AutomationAccountUpdateParameters() /// class. /// /// Gets or sets account SKU. + /// Set the encryption properties for the + /// automation account + /// Indicates whether traffic on the + /// non-ARM endpoint (Webhook/Agent) is allowed from the public + /// internet /// Gets or sets the name of the resource. /// Gets or sets the location of the /// resource. + /// Sets the identity property for automation + /// account /// Gets or sets the tags attached to the /// resource. - public AutomationAccountUpdateParameters(Sku sku = default(Sku), string name = default(string), string location = default(string), IDictionary tags = default(IDictionary)) + public AutomationAccountUpdateParameters(Sku sku = default(Sku), EncryptionProperties encryption = default(EncryptionProperties), bool? publicNetworkAccess = default(bool?), string name = default(string), string location = default(string), Identity identity = default(Identity), IDictionary tags = default(IDictionary)) { Sku = sku; + Encryption = encryption; + PublicNetworkAccess = publicNetworkAccess; Name = name; Location = location; + Identity = identity; Tags = tags; CustomInit(); } @@ -62,6 +72,20 @@ public AutomationAccountUpdateParameters() [JsonProperty(PropertyName = "properties.sku")] public Sku Sku { get; set; } + /// + /// Gets or sets set the encryption properties for the automation + /// account + /// + [JsonProperty(PropertyName = "properties.encryption")] + public EncryptionProperties Encryption { get; set; } + + /// + /// Gets or sets indicates whether traffic on the non-ARM endpoint + /// (Webhook/Agent) is allowed from the public internet + /// + [JsonProperty(PropertyName = "properties.publicNetworkAccess")] + public bool? PublicNetworkAccess { get; set; } + /// /// Gets or sets the name of the resource. /// @@ -74,6 +98,12 @@ public AutomationAccountUpdateParameters() [JsonProperty(PropertyName = "location")] public string Location { get; set; } + /// + /// Gets or sets sets the identity property for automation account + /// + [JsonProperty(PropertyName = "identity")] + public Identity Identity { get; set; } + /// /// Gets or sets the tags attached to the resource. /// diff --git a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/AzureQueryProperties.cs b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/AzureQueryProperties.cs deleted file mode 100644 index d620f9623c89..000000000000 --- a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/AzureQueryProperties.cs +++ /dev/null @@ -1,71 +0,0 @@ -// -// 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.Automation.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Azure query for the update configuration. - /// - public partial class AzureQueryProperties - { - /// - /// Initializes a new instance of the AzureQueryProperties class. - /// - public AzureQueryProperties() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the AzureQueryProperties class. - /// - /// List of Subscription or Resource Group ARM - /// Ids. - /// List of locations to scope the query - /// to. - /// Tag settings for the VM. - public AzureQueryProperties(IList scope = default(IList), IList locations = default(IList), TagSettingsProperties tagSettings = default(TagSettingsProperties)) - { - Scope = scope; - Locations = locations; - TagSettings = tagSettings; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets list of Subscription or Resource Group ARM Ids. - /// - [JsonProperty(PropertyName = "scope")] - public IList Scope { get; set; } - - /// - /// Gets or sets list of locations to scope the query to. - /// - [JsonProperty(PropertyName = "locations")] - public IList Locations { get; set; } - - /// - /// Gets or sets tag settings for the VM. - /// - [JsonProperty(PropertyName = "tagSettings")] - public TagSettingsProperties TagSettings { get; set; } - - } -} diff --git a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/CollectionItemUpdateConfiguration.cs b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/CollectionItemUpdateConfiguration.cs deleted file mode 100644 index 615220bfada9..000000000000 --- a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/CollectionItemUpdateConfiguration.cs +++ /dev/null @@ -1,71 +0,0 @@ -// -// 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.Automation.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// object returned when requesting a collection of software update - /// configuration - /// - public partial class CollectionItemUpdateConfiguration - { - /// - /// Initializes a new instance of the CollectionItemUpdateConfiguration - /// class. - /// - public CollectionItemUpdateConfiguration() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the CollectionItemUpdateConfiguration - /// class. - /// - /// List of azure resource Ids for - /// azure virtual machines targeted by the software update - /// configuration. - /// Maximum time allowed for the software update - /// configuration run. Duration needs to be specified using the format - /// PT[n]H[n]M[n]S as per ISO8601 - public CollectionItemUpdateConfiguration(IList azureVirtualMachines = default(IList), System.TimeSpan? duration = default(System.TimeSpan?)) - { - AzureVirtualMachines = azureVirtualMachines; - Duration = duration; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets list of azure resource Ids for azure virtual machines - /// targeted by the software update configuration. - /// - [JsonProperty(PropertyName = "azureVirtualMachines")] - public IList AzureVirtualMachines { get; set; } - - /// - /// Gets or sets maximum time allowed for the software update - /// configuration run. Duration needs to be specified using the format - /// PT[n]H[n]M[n]S as per ISO8601 - /// - [JsonProperty(PropertyName = "duration")] - public System.TimeSpan? Duration { get; set; } - - } -} diff --git a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/EncryptionKeySourceType.cs b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/EncryptionKeySourceType.cs new file mode 100644 index 000000000000..d13eabb9d4b1 --- /dev/null +++ b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/EncryptionKeySourceType.cs @@ -0,0 +1,60 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Automation.Models +{ + using Newtonsoft.Json; + using Newtonsoft.Json.Converters; + using System.Runtime; + using System.Runtime.Serialization; + + /// + /// Defines values for EncryptionKeySourceType. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum EncryptionKeySourceType + { + [EnumMember(Value = "Microsoft.Automation")] + MicrosoftAutomation, + [EnumMember(Value = "Microsoft.Keyvault")] + MicrosoftKeyvault + } + internal static class EncryptionKeySourceTypeEnumExtension + { + internal static string ToSerializedValue(this EncryptionKeySourceType? value) + { + return value == null ? null : ((EncryptionKeySourceType)value).ToSerializedValue(); + } + + internal static string ToSerializedValue(this EncryptionKeySourceType value) + { + switch( value ) + { + case EncryptionKeySourceType.MicrosoftAutomation: + return "Microsoft.Automation"; + case EncryptionKeySourceType.MicrosoftKeyvault: + return "Microsoft.Keyvault"; + } + return null; + } + + internal static EncryptionKeySourceType? ParseEncryptionKeySourceType(this string value) + { + switch( value ) + { + case "Microsoft.Automation": + return EncryptionKeySourceType.MicrosoftAutomation; + case "Microsoft.Keyvault": + return EncryptionKeySourceType.MicrosoftKeyvault; + } + return null; + } + } +} diff --git a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/EncryptionProperties.cs b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/EncryptionProperties.cs new file mode 100644 index 000000000000..8a9f593f61be --- /dev/null +++ b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/EncryptionProperties.cs @@ -0,0 +1,69 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Automation.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// The encryption settings for automation account + /// + public partial class EncryptionProperties + { + /// + /// Initializes a new instance of the EncryptionProperties class. + /// + public EncryptionProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the EncryptionProperties class. + /// + /// Key vault properties. + /// Encryption Key Source. Possible values + /// include: 'Microsoft.Automation', 'Microsoft.Keyvault' + /// User identity used for CMK. + public EncryptionProperties(KeyVaultProperties keyVaultProperties = default(KeyVaultProperties), EncryptionKeySourceType? keySource = default(EncryptionKeySourceType?), EncryptionPropertiesIdentity identity = default(EncryptionPropertiesIdentity)) + { + KeyVaultProperties = keyVaultProperties; + KeySource = keySource; + Identity = identity; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets key vault properties. + /// + [JsonProperty(PropertyName = "keyVaultProperties")] + public KeyVaultProperties KeyVaultProperties { get; set; } + + /// + /// Gets or sets encryption Key Source. Possible values include: + /// 'Microsoft.Automation', 'Microsoft.Keyvault' + /// + [JsonProperty(PropertyName = "keySource")] + public EncryptionKeySourceType? KeySource { get; set; } + + /// + /// Gets or sets user identity used for CMK. + /// + [JsonProperty(PropertyName = "identity")] + public EncryptionPropertiesIdentity Identity { get; set; } + + } +} diff --git a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/EncryptionPropertiesIdentity.cs b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/EncryptionPropertiesIdentity.cs new file mode 100644 index 000000000000..72d0897c3d84 --- /dev/null +++ b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/EncryptionPropertiesIdentity.cs @@ -0,0 +1,57 @@ +// +// 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.Automation.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// User identity used for CMK. + /// + public partial class EncryptionPropertiesIdentity + { + /// + /// Initializes a new instance of the EncryptionPropertiesIdentity + /// class. + /// + public EncryptionPropertiesIdentity() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the EncryptionPropertiesIdentity + /// class. + /// + /// The user identity used for CMK. + /// It will be an ARM resource id in the form: + /// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + public EncryptionPropertiesIdentity(object userAssignedIdentity = default(object)) + { + UserAssignedIdentity = userAssignedIdentity; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the user identity used for CMK. It will be an ARM + /// resource id in the form: + /// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + /// + [JsonProperty(PropertyName = "userAssignedIdentity")] + public object UserAssignedIdentity { get; set; } + + } +} diff --git a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/Identity.cs b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/Identity.cs new file mode 100644 index 000000000000..123ed8607442 --- /dev/null +++ b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/Identity.cs @@ -0,0 +1,88 @@ +// +// 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.Automation.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Identity for the resource. + /// + public partial class Identity + { + /// + /// Initializes a new instance of the Identity class. + /// + public Identity() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the Identity class. + /// + /// The principal ID of resource + /// identity. + /// The tenant ID of resource. + /// The identity type. Possible values include: + /// 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', + /// 'None' + /// The list of user identities + /// associated with the resource. The user identity dictionary key + /// references will be ARM resource ids in the form: + /// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + public Identity(string principalId = default(string), string tenantId = default(string), ResourceIdentityType? type = default(ResourceIdentityType?), IDictionary userAssignedIdentities = default(IDictionary)) + { + PrincipalId = principalId; + TenantId = tenantId; + Type = type; + UserAssignedIdentities = userAssignedIdentities; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets the principal ID of resource identity. + /// + [JsonProperty(PropertyName = "principalId")] + public string PrincipalId { get; private set; } + + /// + /// Gets the tenant ID of resource. + /// + [JsonProperty(PropertyName = "tenantId")] + public string TenantId { get; private set; } + + /// + /// Gets or sets the identity type. Possible values include: + /// 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', + /// 'None' + /// + [JsonProperty(PropertyName = "type")] + public ResourceIdentityType? Type { get; set; } + + /// + /// Gets or sets the list of user identities associated with the + /// resource. The user identity dictionary key references will be ARM + /// resource ids in the form: + /// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + /// + [JsonProperty(PropertyName = "userAssignedIdentities")] + public IDictionary UserAssignedIdentities { get; set; } + + } +} diff --git a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/IdentityUserAssignedIdentitiesValue.cs b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/IdentityUserAssignedIdentitiesValue.cs new file mode 100644 index 000000000000..5c7e504aa616 --- /dev/null +++ b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/IdentityUserAssignedIdentitiesValue.cs @@ -0,0 +1,60 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Automation.Models +{ + using Newtonsoft.Json; + using System.Linq; + + public partial class IdentityUserAssignedIdentitiesValue + { + /// + /// Initializes a new instance of the + /// IdentityUserAssignedIdentitiesValue class. + /// + public IdentityUserAssignedIdentitiesValue() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// IdentityUserAssignedIdentitiesValue class. + /// + /// The principal id of user assigned + /// identity. + /// The client id of user assigned + /// identity. + public IdentityUserAssignedIdentitiesValue(string principalId = default(string), string clientId = default(string)) + { + PrincipalId = principalId; + ClientId = clientId; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets the principal id of user assigned identity. + /// + [JsonProperty(PropertyName = "principalId")] + public string PrincipalId { get; private set; } + + /// + /// Gets the client id of user assigned identity. + /// + [JsonProperty(PropertyName = "clientId")] + public string ClientId { get; private set; } + + } +} diff --git a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/KeyVaultProperties.cs b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/KeyVaultProperties.cs new file mode 100644 index 000000000000..d02913d92193 --- /dev/null +++ b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/KeyVaultProperties.cs @@ -0,0 +1,69 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Automation.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Settings concerning key vault encryption for a configuration store. + /// + public partial class KeyVaultProperties + { + /// + /// Initializes a new instance of the KeyVaultProperties class. + /// + public KeyVaultProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the KeyVaultProperties class. + /// + /// The URI of the key vault key used to + /// encrypt data. + /// The name of key used to encrypt data. + /// The key version of the key used to encrypt + /// data. + public KeyVaultProperties(string keyvaultUri = default(string), string keyName = default(string), string keyVersion = default(string)) + { + KeyvaultUri = keyvaultUri; + KeyName = keyName; + KeyVersion = keyVersion; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the URI of the key vault key used to encrypt data. + /// + [JsonProperty(PropertyName = "keyvaultUri")] + public string KeyvaultUri { get; set; } + + /// + /// Gets or sets the name of key used to encrypt data. + /// + [JsonProperty(PropertyName = "keyName")] + public string KeyName { get; set; } + + /// + /// Gets or sets the key version of the key used to encrypt data. + /// + [JsonProperty(PropertyName = "keyVersion")] + public string KeyVersion { get; set; } + + } +} diff --git a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/LinuxProperties.cs b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/LinuxProperties.cs deleted file mode 100644 index 08dfef52ae3d..000000000000 --- a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/LinuxProperties.cs +++ /dev/null @@ -1,86 +0,0 @@ -// -// 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.Automation.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Linux specific update configuration. - /// - public partial class LinuxProperties - { - /// - /// Initializes a new instance of the LinuxProperties class. - /// - public LinuxProperties() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the LinuxProperties class. - /// - /// Update classifications - /// included in the software update configuration. Possible values - /// include: 'Unclassified', 'Critical', 'Security', 'Other' - /// packages excluded from the - /// software update configuration. - /// packages included from the - /// software update configuration. - /// Reboot setting for the software update - /// configuration. - public LinuxProperties(string includedPackageClassifications = default(string), IList excludedPackageNameMasks = default(IList), IList includedPackageNameMasks = default(IList), string rebootSetting = default(string)) - { - IncludedPackageClassifications = includedPackageClassifications; - ExcludedPackageNameMasks = excludedPackageNameMasks; - IncludedPackageNameMasks = includedPackageNameMasks; - RebootSetting = rebootSetting; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets update classifications included in the software update - /// configuration. Possible values include: 'Unclassified', 'Critical', - /// 'Security', 'Other' - /// - [JsonProperty(PropertyName = "includedPackageClassifications")] - public string IncludedPackageClassifications { get; set; } - - /// - /// Gets or sets packages excluded from the software update - /// configuration. - /// - [JsonProperty(PropertyName = "excludedPackageNameMasks")] - public IList ExcludedPackageNameMasks { get; set; } - - /// - /// Gets or sets packages included from the software update - /// configuration. - /// - [JsonProperty(PropertyName = "includedPackageNameMasks")] - public IList IncludedPackageNameMasks { get; set; } - - /// - /// Gets or sets reboot setting for the software update configuration. - /// - [JsonProperty(PropertyName = "rebootSetting")] - public string RebootSetting { get; set; } - - } -} diff --git a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/LinuxUpdateClasses.cs b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/LinuxUpdateClasses.cs deleted file mode 100644 index 178444a7426a..000000000000 --- a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/LinuxUpdateClasses.cs +++ /dev/null @@ -1,24 +0,0 @@ -// -// 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.Automation.Models -{ - - /// - /// Defines values for LinuxUpdateClasses. - /// - public static class LinuxUpdateClasses - { - public const string Unclassified = "Unclassified"; - public const string Critical = "Critical"; - public const string Security = "Security"; - public const string Other = "Other"; - } -} diff --git a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/NonAzureQueryProperties.cs b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/NonAzureQueryProperties.cs deleted file mode 100644 index 60301c6f81d2..000000000000 --- a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/NonAzureQueryProperties.cs +++ /dev/null @@ -1,62 +0,0 @@ -// -// 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.Automation.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Non Azure query for the update configuration. - /// - public partial class NonAzureQueryProperties - { - /// - /// Initializes a new instance of the NonAzureQueryProperties class. - /// - public NonAzureQueryProperties() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the NonAzureQueryProperties class. - /// - /// Log Analytics Saved Search - /// name. - /// Workspace Id for Log Analytics in which - /// the saved Search is resided. - public NonAzureQueryProperties(string functionAlias = default(string), string workspaceId = default(string)) - { - FunctionAlias = functionAlias; - WorkspaceId = workspaceId; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets log Analytics Saved Search name. - /// - [JsonProperty(PropertyName = "functionAlias")] - public string FunctionAlias { get; set; } - - /// - /// Gets or sets workspace Id for Log Analytics in which the saved - /// Search is resided. - /// - [JsonProperty(PropertyName = "workspaceId")] - public string WorkspaceId { get; set; } - - } -} diff --git a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/OperatingSystemType.cs b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/OperatingSystemType.cs deleted file mode 100644 index 11e38a646169..000000000000 --- a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/OperatingSystemType.cs +++ /dev/null @@ -1,60 +0,0 @@ -// -// 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.Automation.Models -{ - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime; - using System.Runtime.Serialization; - - /// - /// Defines values for OperatingSystemType. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum OperatingSystemType - { - [EnumMember(Value = "Windows")] - Windows, - [EnumMember(Value = "Linux")] - Linux - } - internal static class OperatingSystemTypeEnumExtension - { - internal static string ToSerializedValue(this OperatingSystemType? value) - { - return value == null ? null : ((OperatingSystemType)value).ToSerializedValue(); - } - - internal static string ToSerializedValue(this OperatingSystemType value) - { - switch( value ) - { - case OperatingSystemType.Windows: - return "Windows"; - case OperatingSystemType.Linux: - return "Linux"; - } - return null; - } - - internal static OperatingSystemType? ParseOperatingSystemType(this string value) - { - switch( value ) - { - case "Windows": - return OperatingSystemType.Windows; - case "Linux": - return OperatingSystemType.Linux; - } - return null; - } - } -} diff --git a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/Page.cs b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/Page.cs index 5ab787089876..6c4e450fa4df 100644 --- a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/Page.cs +++ b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/Page.cs @@ -26,7 +26,7 @@ public class Page : IPage /// /// Gets the link to the next page. /// - [JsonProperty("nextLink")] + [JsonProperty("")] public string NextPageLink { get; private set; } [JsonProperty("value")] diff --git a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/Page1.cs b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/Page1.cs index c56ad3aa1051..7ef3a88b5b1c 100644 --- a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/Page1.cs +++ b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/Page1.cs @@ -26,7 +26,7 @@ public class Page1 : IPage /// /// Gets the link to the next page. /// - [JsonProperty("")] + [JsonProperty("nextLink")] public string NextPageLink { get; private set; } [JsonProperty("value")] diff --git a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/PrivateEndpointConnection.cs b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/PrivateEndpointConnection.cs new file mode 100644 index 000000000000..e69a0239f617 --- /dev/null +++ b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/PrivateEndpointConnection.cs @@ -0,0 +1,69 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Automation.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Linq; + + /// + /// A private endpoint connection + /// + [Rest.Serialization.JsonTransformation] + public partial class PrivateEndpointConnection : ProxyResource + { + /// + /// Initializes a new instance of the PrivateEndpointConnection class. + /// + public PrivateEndpointConnection() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the PrivateEndpointConnection class. + /// + /// Fully qualified resource Id for the + /// resource + /// The name of the resource + /// The type of the resource. + /// Private endpoint which the connection + /// belongs to. + /// Connection State of + /// the Private Endpoint Connection. + public PrivateEndpointConnection(string id = default(string), string name = default(string), string type = default(string), PrivateEndpointProperty privateEndpoint = default(PrivateEndpointProperty), PrivateLinkServiceConnectionStateProperty privateLinkServiceConnectionState = default(PrivateLinkServiceConnectionStateProperty)) + : base(id, name, type) + { + PrivateEndpoint = privateEndpoint; + PrivateLinkServiceConnectionState = privateLinkServiceConnectionState; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets private endpoint which the connection belongs to. + /// + [JsonProperty(PropertyName = "properties.privateEndpoint")] + public PrivateEndpointProperty PrivateEndpoint { get; set; } + + /// + /// Gets or sets connection State of the Private Endpoint Connection. + /// + [JsonProperty(PropertyName = "properties.privateLinkServiceConnectionState")] + public PrivateLinkServiceConnectionStateProperty PrivateLinkServiceConnectionState { get; set; } + + } +} diff --git a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/PrivateEndpointProperty.cs b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/PrivateEndpointProperty.cs new file mode 100644 index 000000000000..a29edf1b55c7 --- /dev/null +++ b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/PrivateEndpointProperty.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.Automation.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Private endpoint which the connection belongs to. + /// + public partial class PrivateEndpointProperty + { + /// + /// Initializes a new instance of the PrivateEndpointProperty class. + /// + public PrivateEndpointProperty() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the PrivateEndpointProperty class. + /// + /// Resource id of the private endpoint. + public PrivateEndpointProperty(string id = default(string)) + { + Id = id; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets resource id of the private endpoint. + /// + [JsonProperty(PropertyName = "id")] + public string Id { get; set; } + + } +} diff --git a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/PrivateLinkResource.cs b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/PrivateLinkResource.cs new file mode 100644 index 000000000000..7e3071542840 --- /dev/null +++ b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/PrivateLinkResource.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.Automation.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A private link resource + /// + [Rest.Serialization.JsonTransformation] + public partial class PrivateLinkResource : ProxyResource + { + /// + /// Initializes a new instance of the PrivateLinkResource class. + /// + public PrivateLinkResource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the PrivateLinkResource class. + /// + /// Fully qualified resource Id for the + /// resource + /// The name of the resource + /// The type of the resource. + /// The private link resource group id. + /// The private link resource required + /// member names. + public PrivateLinkResource(string id = default(string), string name = default(string), string type = default(string), string groupId = default(string), IList requiredMembers = default(IList)) + : base(id, name, type) + { + GroupId = groupId; + RequiredMembers = requiredMembers; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets the private link resource group id. + /// + [JsonProperty(PropertyName = "properties.groupId")] + public string GroupId { get; private set; } + + /// + /// Gets the private link resource required member names. + /// + [JsonProperty(PropertyName = "properties.requiredMembers")] + public IList RequiredMembers { get; private set; } + + } +} diff --git a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/PrivateLinkServiceConnectionStateProperty.cs b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/PrivateLinkServiceConnectionStateProperty.cs new file mode 100644 index 000000000000..ce99f54e8ae4 --- /dev/null +++ b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/PrivateLinkServiceConnectionStateProperty.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.Automation.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Connection State of the Private Endpoint Connection. + /// + public partial class PrivateLinkServiceConnectionStateProperty + { + /// + /// Initializes a new instance of the + /// PrivateLinkServiceConnectionStateProperty class. + /// + public PrivateLinkServiceConnectionStateProperty() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// PrivateLinkServiceConnectionStateProperty class. + /// + /// The private link service connection + /// status. + /// The private link service connection + /// description. + /// Any action that is required beyond + /// basic workflow (approve/ reject/ disconnect) + public PrivateLinkServiceConnectionStateProperty(string status = default(string), string description = default(string), string actionsRequired = default(string)) + { + Status = status; + Description = description; + ActionsRequired = actionsRequired; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the private link service connection status. + /// + [JsonProperty(PropertyName = "status")] + public string Status { get; set; } + + /// + /// Gets or sets the private link service connection description. + /// + [JsonProperty(PropertyName = "description")] + public string Description { get; set; } + + /// + /// Gets any action that is required beyond basic workflow (approve/ + /// reject/ disconnect) + /// + [JsonProperty(PropertyName = "actionsRequired")] + public string ActionsRequired { get; private set; } + + } +} diff --git a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/ResourceIdentityType.cs b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/ResourceIdentityType.cs new file mode 100644 index 000000000000..50a37167b887 --- /dev/null +++ b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/ResourceIdentityType.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.Automation.Models +{ + using Newtonsoft.Json; + using Newtonsoft.Json.Converters; + using System.Runtime; + using System.Runtime.Serialization; + + /// + /// Defines values for ResourceIdentityType. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum ResourceIdentityType + { + [EnumMember(Value = "SystemAssigned")] + SystemAssigned, + [EnumMember(Value = "UserAssigned")] + UserAssigned, + [EnumMember(Value = "SystemAssigned, UserAssigned")] + SystemAssignedUserAssigned, + [EnumMember(Value = "None")] + None + } + internal static class ResourceIdentityTypeEnumExtension + { + internal static string ToSerializedValue(this ResourceIdentityType? value) + { + return value == null ? null : ((ResourceIdentityType)value).ToSerializedValue(); + } + + internal static string ToSerializedValue(this ResourceIdentityType value) + { + switch( value ) + { + case ResourceIdentityType.SystemAssigned: + return "SystemAssigned"; + case ResourceIdentityType.UserAssigned: + return "UserAssigned"; + case ResourceIdentityType.SystemAssignedUserAssigned: + return "SystemAssigned, UserAssigned"; + case ResourceIdentityType.None: + return "None"; + } + return null; + } + + internal static ResourceIdentityType? ParseResourceIdentityType(this string value) + { + switch( value ) + { + case "SystemAssigned": + return ResourceIdentityType.SystemAssigned; + case "UserAssigned": + return ResourceIdentityType.UserAssigned; + case "SystemAssigned, UserAssigned": + return ResourceIdentityType.SystemAssignedUserAssigned; + case "None": + return ResourceIdentityType.None; + } + return null; + } + } +} diff --git a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/Schedule.cs b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/Schedule.cs index 3c9cf1844884..4345aa21be5c 100644 --- a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/Schedule.cs +++ b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/Schedule.cs @@ -63,7 +63,7 @@ public Schedule() /// Gets or sets the last modified /// time. /// Gets or sets the description. - public Schedule(string id = default(string), string name = default(string), string type = default(string), System.DateTimeOffset startTime = default(System.DateTimeOffset), double startTimeOffsetMinutes = default(double), System.DateTimeOffset? expiryTime = default(System.DateTimeOffset?), double expiryTimeOffsetMinutes = default(double), bool? isEnabled = default(bool?), System.DateTimeOffset? nextRun = default(System.DateTimeOffset?), double nextRunOffsetMinutes = default(double), int? interval = default(int?), string frequency = default(string), string timeZone = default(string), AdvancedSchedule advancedSchedule = default(AdvancedSchedule), System.DateTimeOffset creationTime = default(System.DateTimeOffset), System.DateTimeOffset lastModifiedTime = default(System.DateTimeOffset), string description = default(string)) + public Schedule(string id = default(string), string name = default(string), string type = default(string), System.DateTimeOffset startTime = default(System.DateTimeOffset), double startTimeOffsetMinutes = default(double), System.DateTimeOffset? expiryTime = default(System.DateTimeOffset?), double expiryTimeOffsetMinutes = default(double), bool? isEnabled = default(bool?), System.DateTimeOffset? nextRun = default(System.DateTimeOffset?), double nextRunOffsetMinutes = default(double), object interval = default(object), string frequency = default(string), string timeZone = default(string), AdvancedSchedule advancedSchedule = default(AdvancedSchedule), System.DateTimeOffset creationTime = default(System.DateTimeOffset), System.DateTimeOffset lastModifiedTime = default(System.DateTimeOffset), string description = default(string)) : base(id, name, type) { StartTime = startTime; @@ -134,7 +134,7 @@ public Schedule() /// Gets or sets the interval of the schedule. /// [JsonProperty(PropertyName = "properties.interval")] - public int? Interval { get; set; } + public object Interval { get; set; } /// /// Gets or sets the frequency of the schedule. Possible values diff --git a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/ScheduleProperties.cs b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/ScheduleProperties.cs deleted file mode 100644 index 0fed430cd8a6..000000000000 --- a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/ScheduleProperties.cs +++ /dev/null @@ -1,169 +0,0 @@ -// -// 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.Automation.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Definition of schedule parameters. - /// - public partial class ScheduleProperties - { - /// - /// Initializes a new instance of the ScheduleProperties class. - /// - public ScheduleProperties() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the ScheduleProperties class. - /// - /// Gets or sets the start time of the - /// schedule. - /// Gets the start time's offset - /// in minutes. - /// Gets or sets the end time of the - /// schedule. - /// Gets or sets the expiry - /// time's offset in minutes. - /// Gets or sets a value indicating whether - /// this schedule is enabled. - /// Gets or sets the next run time of the - /// schedule. - /// Gets or sets the next run time's - /// offset in minutes. - /// Gets or sets the interval of the - /// schedule. - /// Gets or sets the frequency of the schedule. - /// Possible values include: 'OneTime', 'Day', 'Hour', 'Week', 'Month', - /// 'Minute' - /// Gets or sets the time zone of the - /// schedule. - /// Gets or sets the advanced - /// schedule. - /// Gets or sets the creation time. - /// Gets or sets the last modified - /// time. - /// Gets or sets the description. - public ScheduleProperties(System.DateTimeOffset startTime = default(System.DateTimeOffset), double startTimeOffsetMinutes = default(double), System.DateTimeOffset? expiryTime = default(System.DateTimeOffset?), double expiryTimeOffsetMinutes = default(double), bool? isEnabled = default(bool?), System.DateTimeOffset? nextRun = default(System.DateTimeOffset?), double nextRunOffsetMinutes = default(double), int? interval = default(int?), string frequency = default(string), string timeZone = default(string), AdvancedSchedule advancedSchedule = default(AdvancedSchedule), System.DateTimeOffset creationTime = default(System.DateTimeOffset), System.DateTimeOffset lastModifiedTime = default(System.DateTimeOffset), string description = default(string)) - { - StartTime = startTime; - StartTimeOffsetMinutes = startTimeOffsetMinutes; - ExpiryTime = expiryTime; - ExpiryTimeOffsetMinutes = expiryTimeOffsetMinutes; - IsEnabled = isEnabled; - NextRun = nextRun; - NextRunOffsetMinutes = nextRunOffsetMinutes; - Interval = interval; - Frequency = frequency; - TimeZone = timeZone; - AdvancedSchedule = advancedSchedule; - CreationTime = creationTime; - LastModifiedTime = lastModifiedTime; - Description = description; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the start time of the schedule. - /// - [JsonProperty(PropertyName = "startTime")] - public System.DateTimeOffset StartTime { get; set; } - - /// - /// Gets the start time's offset in minutes. - /// - [JsonProperty(PropertyName = "startTimeOffsetMinutes")] - public double StartTimeOffsetMinutes { get; private set; } - - /// - /// Gets or sets the end time of the schedule. - /// - [JsonProperty(PropertyName = "expiryTime")] - public System.DateTimeOffset? ExpiryTime { get; set; } - - /// - /// Gets or sets the expiry time's offset in minutes. - /// - [JsonProperty(PropertyName = "expiryTimeOffsetMinutes")] - public double ExpiryTimeOffsetMinutes { get; set; } - - /// - /// Gets or sets a value indicating whether this schedule is enabled. - /// - [JsonProperty(PropertyName = "isEnabled")] - public bool? IsEnabled { get; set; } - - /// - /// Gets or sets the next run time of the schedule. - /// - [JsonProperty(PropertyName = "nextRun")] - public System.DateTimeOffset? NextRun { get; set; } - - /// - /// Gets or sets the next run time's offset in minutes. - /// - [JsonProperty(PropertyName = "nextRunOffsetMinutes")] - public double NextRunOffsetMinutes { get; set; } - - /// - /// Gets or sets the interval of the schedule. - /// - [JsonProperty(PropertyName = "interval")] - public int? Interval { get; set; } - - /// - /// Gets or sets the frequency of the schedule. Possible values - /// include: 'OneTime', 'Day', 'Hour', 'Week', 'Month', 'Minute' - /// - [JsonProperty(PropertyName = "frequency")] - public string Frequency { get; set; } - - /// - /// Gets or sets the time zone of the schedule. - /// - [JsonProperty(PropertyName = "timeZone")] - public string TimeZone { get; set; } - - /// - /// Gets or sets the advanced schedule. - /// - [JsonProperty(PropertyName = "advancedSchedule")] - public AdvancedSchedule AdvancedSchedule { get; set; } - - /// - /// Gets or sets the creation time. - /// - [JsonProperty(PropertyName = "creationTime")] - public System.DateTimeOffset CreationTime { get; set; } - - /// - /// Gets or sets the last modified time. - /// - [JsonProperty(PropertyName = "lastModifiedTime")] - public System.DateTimeOffset LastModifiedTime { get; set; } - - /// - /// Gets or sets the description. - /// - [JsonProperty(PropertyName = "description")] - public string Description { get; set; } - - } -} diff --git a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/SoftwareUpdateConfiguration.cs b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/SoftwareUpdateConfiguration.cs deleted file mode 100644 index 7e86d5aff937..000000000000 --- a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/SoftwareUpdateConfiguration.cs +++ /dev/null @@ -1,180 +0,0 @@ -// -// 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.Automation.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Software update configuration properties. - /// - [Rest.Serialization.JsonTransformation] - public partial class SoftwareUpdateConfiguration : IResource - { - /// - /// Initializes a new instance of the SoftwareUpdateConfiguration - /// class. - /// - public SoftwareUpdateConfiguration() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the SoftwareUpdateConfiguration - /// class. - /// - /// update specific properties for - /// the Software update configuration - /// Schedule information for the Software - /// update configuration - /// Resource name. - /// Resource Id. - /// Resource type - /// Provisioning state for the software - /// update configuration, which only appears in the response. - /// Details of provisioning error - /// Creation time of the resource, which - /// only appears in the response. - /// CreatedBy property, which only appears in - /// the response. - /// Last time resource was modified, - /// which only appears in the response. - /// LastModifiedBy property, which only - /// appears in the response. - /// Tasks information for the Software update - /// configuration. - public SoftwareUpdateConfiguration(UpdateConfiguration updateConfiguration, ScheduleProperties scheduleInfo, string name = default(string), string id = default(string), string type = default(string), string provisioningState = default(string), ErrorResponse error = default(ErrorResponse), System.DateTimeOffset creationTime = default(System.DateTimeOffset), string createdBy = default(string), System.DateTimeOffset lastModifiedTime = default(System.DateTimeOffset), string lastModifiedBy = default(string), SoftwareUpdateConfigurationTasks tasks = default(SoftwareUpdateConfigurationTasks)) - { - Name = name; - Id = id; - Type = type; - UpdateConfiguration = updateConfiguration; - ScheduleInfo = scheduleInfo; - ProvisioningState = provisioningState; - Error = error; - CreationTime = creationTime; - CreatedBy = createdBy; - LastModifiedTime = lastModifiedTime; - LastModifiedBy = lastModifiedBy; - Tasks = tasks; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets resource name. - /// - [JsonProperty(PropertyName = "name")] - public string Name { get; private set; } - - /// - /// Gets resource Id. - /// - [JsonProperty(PropertyName = "id")] - public string Id { get; private set; } - - /// - /// Gets resource type - /// - [JsonProperty(PropertyName = "type")] - public string Type { get; private set; } - - /// - /// Gets or sets update specific properties for the Software update - /// configuration - /// - [JsonProperty(PropertyName = "properties.updateConfiguration")] - public UpdateConfiguration UpdateConfiguration { get; set; } - - /// - /// Gets or sets schedule information for the Software update - /// configuration - /// - [JsonProperty(PropertyName = "properties.scheduleInfo")] - public ScheduleProperties ScheduleInfo { get; set; } - - /// - /// Gets provisioning state for the software update configuration, - /// which only appears in the response. - /// - [JsonProperty(PropertyName = "properties.provisioningState")] - public string ProvisioningState { get; private set; } - - /// - /// Gets or sets details of provisioning error - /// - [JsonProperty(PropertyName = "properties.error")] - public ErrorResponse Error { get; set; } - - /// - /// Gets creation time of the resource, which only appears in the - /// response. - /// - [JsonProperty(PropertyName = "properties.creationTime")] - public System.DateTimeOffset CreationTime { get; private set; } - - /// - /// Gets createdBy property, which only appears in the response. - /// - [JsonProperty(PropertyName = "properties.createdBy")] - public string CreatedBy { get; private set; } - - /// - /// Gets last time resource was modified, which only appears in the - /// response. - /// - [JsonProperty(PropertyName = "properties.lastModifiedTime")] - public System.DateTimeOffset LastModifiedTime { get; private set; } - - /// - /// Gets lastModifiedBy property, which only appears in the response. - /// - [JsonProperty(PropertyName = "properties.lastModifiedBy")] - public string LastModifiedBy { get; private set; } - - /// - /// Gets or sets tasks information for the Software update - /// configuration. - /// - [JsonProperty(PropertyName = "properties.tasks")] - public SoftwareUpdateConfigurationTasks Tasks { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (UpdateConfiguration == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "UpdateConfiguration"); - } - if (ScheduleInfo == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "ScheduleInfo"); - } - if (UpdateConfiguration != null) - { - UpdateConfiguration.Validate(); - } - } - } -} diff --git a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/SoftwareUpdateConfigurationCollectionItem.cs b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/SoftwareUpdateConfigurationCollectionItem.cs deleted file mode 100644 index 21dde84d8006..000000000000 --- a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/SoftwareUpdateConfigurationCollectionItem.cs +++ /dev/null @@ -1,136 +0,0 @@ -// -// 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.Automation.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Software update configuration collection item properties. - /// - [Rest.Serialization.JsonTransformation] - public partial class SoftwareUpdateConfigurationCollectionItem - { - /// - /// Initializes a new instance of the - /// SoftwareUpdateConfigurationCollectionItem class. - /// - public SoftwareUpdateConfigurationCollectionItem() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the - /// SoftwareUpdateConfigurationCollectionItem class. - /// - /// Name of the software update - /// configuration. - /// Resource Id of the software update - /// configuration - /// Update specific properties of the - /// software update configuration. - /// execution frequency of the schedule - /// associated with the software update configuration. Possible values - /// include: 'OneTime', 'Day', 'Hour', 'Week', 'Month', - /// 'Minute' - /// the start time of the update. - /// Creation time of the software update - /// configuration, which only appears in the response. - /// Last time software update - /// configuration was modified, which only appears in the - /// response. - /// Provisioning state for the software - /// update configuration, which only appears in the response. - /// ext run time of the update. - public SoftwareUpdateConfigurationCollectionItem(string name = default(string), string id = default(string), CollectionItemUpdateConfiguration updateConfiguration = default(CollectionItemUpdateConfiguration), string frequency = default(string), System.DateTimeOffset startTime = default(System.DateTimeOffset), System.DateTimeOffset creationTime = default(System.DateTimeOffset), System.DateTimeOffset lastModifiedTime = default(System.DateTimeOffset), string provisioningState = default(string), System.DateTimeOffset? nextRun = default(System.DateTimeOffset?)) - { - Name = name; - Id = id; - UpdateConfiguration = updateConfiguration; - Frequency = frequency; - StartTime = startTime; - CreationTime = creationTime; - LastModifiedTime = lastModifiedTime; - ProvisioningState = provisioningState; - NextRun = nextRun; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets name of the software update configuration. - /// - [JsonProperty(PropertyName = "name")] - public string Name { get; private set; } - - /// - /// Gets resource Id of the software update configuration - /// - [JsonProperty(PropertyName = "id")] - public string Id { get; private set; } - - /// - /// Gets or sets update specific properties of the software update - /// configuration. - /// - [JsonProperty(PropertyName = "properties.updateConfiguration")] - public CollectionItemUpdateConfiguration UpdateConfiguration { get; set; } - - /// - /// Gets or sets execution frequency of the schedule associated with - /// the software update configuration. Possible values include: - /// 'OneTime', 'Day', 'Hour', 'Week', 'Month', 'Minute' - /// - [JsonProperty(PropertyName = "properties.frequency")] - public string Frequency { get; set; } - - /// - /// Gets or sets the start time of the update. - /// - [JsonProperty(PropertyName = "properties.startTime")] - public System.DateTimeOffset StartTime { get; set; } - - /// - /// Gets creation time of the software update configuration, which only - /// appears in the response. - /// - [JsonProperty(PropertyName = "properties.creationTime")] - public System.DateTimeOffset CreationTime { get; private set; } - - /// - /// Gets last time software update configuration was modified, which - /// only appears in the response. - /// - [JsonProperty(PropertyName = "properties.lastModifiedTime")] - public System.DateTimeOffset LastModifiedTime { get; private set; } - - /// - /// Gets provisioning state for the software update configuration, - /// which only appears in the response. - /// - [JsonProperty(PropertyName = "properties.provisioningState")] - public string ProvisioningState { get; private set; } - - /// - /// Gets or sets ext run time of the update. - /// - [JsonProperty(PropertyName = "properties.nextRun")] - public System.DateTimeOffset? NextRun { get; set; } - - } -} diff --git a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/SoftwareUpdateConfigurationListResult.cs b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/SoftwareUpdateConfigurationListResult.cs deleted file mode 100644 index 8540b5bcaeb7..000000000000 --- a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/SoftwareUpdateConfigurationListResult.cs +++ /dev/null @@ -1,57 +0,0 @@ -// -// 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.Automation.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// result of listing all software update configuration - /// - public partial class SoftwareUpdateConfigurationListResult - { - /// - /// Initializes a new instance of the - /// SoftwareUpdateConfigurationListResult class. - /// - public SoftwareUpdateConfigurationListResult() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the - /// SoftwareUpdateConfigurationListResult class. - /// - /// outer object returned when listing all software - /// update configurations - public SoftwareUpdateConfigurationListResult(IList value = default(IList)) - { - Value = value; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets outer object returned when listing all software update - /// configurations - /// - [JsonProperty(PropertyName = "value")] - public IList Value { get; set; } - - } -} diff --git a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/SoftwareUpdateConfigurationRun.cs b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/SoftwareUpdateConfigurationRun.cs index 456ca21f9bf5..4632020bbc94 100644 --- a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/SoftwareUpdateConfigurationRun.cs +++ b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/SoftwareUpdateConfigurationRun.cs @@ -64,7 +64,7 @@ public SoftwareUpdateConfigurationRun() /// appears in the response. /// Software update configuration tasks triggered /// in this run - public SoftwareUpdateConfigurationRun(string name = default(string), string id = default(string), UpdateConfigurationNavigation softwareUpdateConfiguration = default(UpdateConfigurationNavigation), string status = default(string), string configuredDuration = default(string), string osType = default(string), System.DateTimeOffset startTime = default(System.DateTimeOffset), System.DateTimeOffset? endTime = default(System.DateTimeOffset?), int? computerCount = default(int?), int? failedCount = default(int?), System.DateTimeOffset creationTime = default(System.DateTimeOffset), string createdBy = default(string), System.DateTimeOffset lastModifiedTime = default(System.DateTimeOffset), string lastModifiedBy = default(string), SoftareUpdateConfigurationRunTasks tasks = default(SoftareUpdateConfigurationRunTasks)) + public SoftwareUpdateConfigurationRun(string name = default(string), string id = default(string), UpdateConfigurationNavigation softwareUpdateConfiguration = default(UpdateConfigurationNavigation), string status = default(string), string configuredDuration = default(string), string osType = default(string), System.DateTimeOffset startTime = default(System.DateTimeOffset), System.DateTimeOffset? endTime = default(System.DateTimeOffset?), int? computerCount = default(int?), int? failedCount = default(int?), System.DateTimeOffset creationTime = default(System.DateTimeOffset), string createdBy = default(string), System.DateTimeOffset lastModifiedTime = default(System.DateTimeOffset), string lastModifiedBy = default(string), SoftwareUpdateConfigurationRunTasks tasks = default(SoftwareUpdateConfigurationRunTasks)) { Name = name; Id = id; @@ -181,7 +181,7 @@ public SoftwareUpdateConfigurationRun() /// run /// [JsonProperty(PropertyName = "properties.tasks")] - public SoftareUpdateConfigurationRunTasks Tasks { get; set; } + public SoftwareUpdateConfigurationRunTasks Tasks { get; set; } } } diff --git a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/SoftareUpdateConfigurationRunTaskProperties.cs b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/SoftwareUpdateConfigurationRunTaskProperties.cs similarity index 81% rename from sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/SoftareUpdateConfigurationRunTaskProperties.cs rename to sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/SoftwareUpdateConfigurationRunTaskProperties.cs index eca687f8cd8e..72250471e200 100644 --- a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/SoftareUpdateConfigurationRunTaskProperties.cs +++ b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/SoftwareUpdateConfigurationRunTaskProperties.cs @@ -16,25 +16,25 @@ namespace Microsoft.Azure.Management.Automation.Models /// /// Task properties of the software update configuration. /// - public partial class SoftareUpdateConfigurationRunTaskProperties + public partial class SoftwareUpdateConfigurationRunTaskProperties { /// /// Initializes a new instance of the - /// SoftareUpdateConfigurationRunTaskProperties class. + /// SoftwareUpdateConfigurationRunTaskProperties class. /// - public SoftareUpdateConfigurationRunTaskProperties() + public SoftwareUpdateConfigurationRunTaskProperties() { CustomInit(); } /// /// Initializes a new instance of the - /// SoftareUpdateConfigurationRunTaskProperties class. + /// SoftwareUpdateConfigurationRunTaskProperties class. /// /// The status of the task. /// The name of the source of the task. /// The job id of the task. - public SoftareUpdateConfigurationRunTaskProperties(string status = default(string), string source = default(string), string jobId = default(string)) + public SoftwareUpdateConfigurationRunTaskProperties(string status = default(string), string source = default(string), string jobId = default(string)) { Status = status; Source = source; diff --git a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/SoftareUpdateConfigurationRunTasks.cs b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/SoftwareUpdateConfigurationRunTasks.cs similarity index 70% rename from sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/SoftareUpdateConfigurationRunTasks.cs rename to sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/SoftwareUpdateConfigurationRunTasks.cs index 53ff20c1dd10..43269b5242e2 100644 --- a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/SoftareUpdateConfigurationRunTasks.cs +++ b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/SoftwareUpdateConfigurationRunTasks.cs @@ -16,24 +16,24 @@ namespace Microsoft.Azure.Management.Automation.Models /// /// Software update configuration run tasks model. /// - public partial class SoftareUpdateConfigurationRunTasks + public partial class SoftwareUpdateConfigurationRunTasks { /// /// Initializes a new instance of the - /// SoftareUpdateConfigurationRunTasks class. + /// SoftwareUpdateConfigurationRunTasks class. /// - public SoftareUpdateConfigurationRunTasks() + public SoftwareUpdateConfigurationRunTasks() { CustomInit(); } /// /// Initializes a new instance of the - /// SoftareUpdateConfigurationRunTasks class. + /// SoftwareUpdateConfigurationRunTasks class. /// /// Pre task properties. /// Post task properties. - public SoftareUpdateConfigurationRunTasks(SoftareUpdateConfigurationRunTaskProperties preTask = default(SoftareUpdateConfigurationRunTaskProperties), SoftareUpdateConfigurationRunTaskProperties postTask = default(SoftareUpdateConfigurationRunTaskProperties)) + public SoftwareUpdateConfigurationRunTasks(SoftwareUpdateConfigurationRunTaskProperties preTask = default(SoftwareUpdateConfigurationRunTaskProperties), SoftwareUpdateConfigurationRunTaskProperties postTask = default(SoftwareUpdateConfigurationRunTaskProperties)) { PreTask = preTask; PostTask = postTask; @@ -49,13 +49,13 @@ public SoftareUpdateConfigurationRunTasks() /// Gets or sets pre task properties. /// [JsonProperty(PropertyName = "preTask")] - public SoftareUpdateConfigurationRunTaskProperties PreTask { get; set; } + public SoftwareUpdateConfigurationRunTaskProperties PreTask { get; set; } /// /// Gets or sets post task properties. /// [JsonProperty(PropertyName = "postTask")] - public SoftareUpdateConfigurationRunTaskProperties PostTask { get; set; } + public SoftwareUpdateConfigurationRunTaskProperties PostTask { get; set; } } } diff --git a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/SoftwareUpdateConfigurationTasks.cs b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/SoftwareUpdateConfigurationTasks.cs deleted file mode 100644 index cb746f1ea982..000000000000 --- a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/SoftwareUpdateConfigurationTasks.cs +++ /dev/null @@ -1,61 +0,0 @@ -// -// 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.Automation.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Task properties of the software update configuration. - /// - public partial class SoftwareUpdateConfigurationTasks - { - /// - /// Initializes a new instance of the SoftwareUpdateConfigurationTasks - /// class. - /// - public SoftwareUpdateConfigurationTasks() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the SoftwareUpdateConfigurationTasks - /// class. - /// - /// Pre task properties. - /// Post task properties. - public SoftwareUpdateConfigurationTasks(TaskProperties preTask = default(TaskProperties), TaskProperties postTask = default(TaskProperties)) - { - PreTask = preTask; - PostTask = postTask; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets pre task properties. - /// - [JsonProperty(PropertyName = "preTask")] - public TaskProperties PreTask { get; set; } - - /// - /// Gets or sets post task properties. - /// - [JsonProperty(PropertyName = "postTask")] - public TaskProperties PostTask { get; set; } - - } -} diff --git a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/TagOperators.cs b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/TagOperators.cs deleted file mode 100644 index dd61a4f3d968..000000000000 --- a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/TagOperators.cs +++ /dev/null @@ -1,60 +0,0 @@ -// -// 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.Automation.Models -{ - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime; - using System.Runtime.Serialization; - - /// - /// Defines values for TagOperators. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum TagOperators - { - [EnumMember(Value = "All")] - All, - [EnumMember(Value = "Any")] - Any - } - internal static class TagOperatorsEnumExtension - { - internal static string ToSerializedValue(this TagOperators? value) - { - return value == null ? null : ((TagOperators)value).ToSerializedValue(); - } - - internal static string ToSerializedValue(this TagOperators value) - { - switch( value ) - { - case TagOperators.All: - return "All"; - case TagOperators.Any: - return "Any"; - } - return null; - } - - internal static TagOperators? ParseTagOperators(this string value) - { - switch( value ) - { - case "All": - return TagOperators.All; - case "Any": - return TagOperators.Any; - } - return null; - } - } -} diff --git a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/TagSettingsProperties.cs b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/TagSettingsProperties.cs deleted file mode 100644 index f272d135e31e..000000000000 --- a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/TagSettingsProperties.cs +++ /dev/null @@ -1,64 +0,0 @@ -// -// 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.Automation.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Tag filter information for the VM. - /// - public partial class TagSettingsProperties - { - /// - /// Initializes a new instance of the TagSettingsProperties class. - /// - public TagSettingsProperties() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the TagSettingsProperties class. - /// - /// Dictionary of tags with its list of - /// values. - /// Filter VMs by Any or All specified - /// tags. Possible values include: 'All', 'Any' - public TagSettingsProperties(IDictionary> tags = default(IDictionary>), TagOperators? filterOperator = default(TagOperators?)) - { - Tags = tags; - FilterOperator = filterOperator; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets dictionary of tags with its list of values. - /// - [JsonProperty(PropertyName = "tags")] - public IDictionary> Tags { get; set; } - - /// - /// Gets or sets filter VMs by Any or All specified tags. Possible - /// values include: 'All', 'Any' - /// - [JsonProperty(PropertyName = "filterOperator")] - public TagOperators? FilterOperator { get; set; } - - } -} diff --git a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/TargetProperties.cs b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/TargetProperties.cs deleted file mode 100644 index 7c39b172b6ee..000000000000 --- a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/TargetProperties.cs +++ /dev/null @@ -1,65 +0,0 @@ -// -// 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.Automation.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Group specific to the update configuration. - /// - public partial class TargetProperties - { - /// - /// Initializes a new instance of the TargetProperties class. - /// - public TargetProperties() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the TargetProperties class. - /// - /// List of Azure queries in the software - /// update configuration. - /// List of non Azure queries in the - /// software update configuration. - public TargetProperties(IList azureQueries = default(IList), IList nonAzureQueries = default(IList)) - { - AzureQueries = azureQueries; - NonAzureQueries = nonAzureQueries; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets list of Azure queries in the software update - /// configuration. - /// - [JsonProperty(PropertyName = "azureQueries")] - public IList AzureQueries { get; set; } - - /// - /// Gets or sets list of non Azure queries in the software update - /// configuration. - /// - [JsonProperty(PropertyName = "nonAzureQueries")] - public IList NonAzureQueries { get; set; } - - } -} diff --git a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/TaskProperties.cs b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/TaskProperties.cs deleted file mode 100644 index ed7b5c069cb4..000000000000 --- a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/TaskProperties.cs +++ /dev/null @@ -1,62 +0,0 @@ -// -// 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.Automation.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Task properties of the software update configuration. - /// - public partial class TaskProperties - { - /// - /// Initializes a new instance of the TaskProperties class. - /// - public TaskProperties() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the TaskProperties class. - /// - /// Gets or sets the parameters of the - /// task. - /// Gets or sets the name of the runbook. - public TaskProperties(IDictionary parameters = default(IDictionary), string source = default(string)) - { - Parameters = parameters; - Source = source; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the parameters of the task. - /// - [JsonProperty(PropertyName = "parameters")] - public IDictionary Parameters { get; set; } - - /// - /// Gets or sets the name of the runbook. - /// - [JsonProperty(PropertyName = "source")] - public string Source { get; set; } - - } -} diff --git a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/UpdateConfiguration.cs b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/UpdateConfiguration.cs deleted file mode 100644 index 2c528b9f3a00..000000000000 --- a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/UpdateConfiguration.cs +++ /dev/null @@ -1,123 +0,0 @@ -// -// 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.Automation.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Update specific properties of the software update configuration. - /// - public partial class UpdateConfiguration - { - /// - /// Initializes a new instance of the UpdateConfiguration class. - /// - public UpdateConfiguration() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the UpdateConfiguration class. - /// - /// operating system of target machines. - /// Possible values include: 'Windows', 'Linux' - /// Windows specific update - /// configuration. - /// Linux specific update configuration. - /// Maximum time allowed for the software update - /// configuration run. Duration needs to be specified using the format - /// PT[n]H[n]M[n]S as per ISO8601 - /// List of azure resource Ids for - /// azure virtual machines targeted by the software update - /// configuration. - /// List of names of non-azure - /// machines targeted by the software update configuration. - /// Group targets for the software update - /// configuration. - public UpdateConfiguration(OperatingSystemType operatingSystem, WindowsProperties windows = default(WindowsProperties), LinuxProperties linux = default(LinuxProperties), System.TimeSpan? duration = default(System.TimeSpan?), IList azureVirtualMachines = default(IList), IList nonAzureComputerNames = default(IList), TargetProperties targets = default(TargetProperties)) - { - OperatingSystem = operatingSystem; - Windows = windows; - Linux = linux; - Duration = duration; - AzureVirtualMachines = azureVirtualMachines; - NonAzureComputerNames = nonAzureComputerNames; - Targets = targets; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets operating system of target machines. Possible values - /// include: 'Windows', 'Linux' - /// - [JsonProperty(PropertyName = "operatingSystem")] - public OperatingSystemType OperatingSystem { get; set; } - - /// - /// Gets or sets windows specific update configuration. - /// - [JsonProperty(PropertyName = "windows")] - public WindowsProperties Windows { get; set; } - - /// - /// Gets or sets linux specific update configuration. - /// - [JsonProperty(PropertyName = "linux")] - public LinuxProperties Linux { get; set; } - - /// - /// Gets or sets maximum time allowed for the software update - /// configuration run. Duration needs to be specified using the format - /// PT[n]H[n]M[n]S as per ISO8601 - /// - [JsonProperty(PropertyName = "duration")] - public System.TimeSpan? Duration { get; set; } - - /// - /// Gets or sets list of azure resource Ids for azure virtual machines - /// targeted by the software update configuration. - /// - [JsonProperty(PropertyName = "azureVirtualMachines")] - public IList AzureVirtualMachines { get; set; } - - /// - /// Gets or sets list of names of non-azure machines targeted by the - /// software update configuration. - /// - [JsonProperty(PropertyName = "nonAzureComputerNames")] - public IList NonAzureComputerNames { get; set; } - - /// - /// Gets or sets group targets for the software update configuration. - /// - [JsonProperty(PropertyName = "targets")] - public TargetProperties Targets { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - } - } -} diff --git a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/Watcher.cs b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/Watcher.cs index bf2c8b9bef4f..0a1d90e8906e 100644 --- a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/Watcher.cs +++ b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/Watcher.cs @@ -21,7 +21,7 @@ namespace Microsoft.Azure.Management.Automation.Models /// Definition of the watcher type. /// [Rest.Serialization.JsonTransformation] - public partial class Watcher : TrackedResource + public partial class Watcher : Resource { /// /// Initializes a new instance of the Watcher class. @@ -38,9 +38,6 @@ public Watcher() /// resource /// The name of the resource /// The type of the resource. - /// Resource tags. - /// The Azure Region where the resource - /// lives /// Gets or sets the /// frequency at which the watcher is invoked. /// Gets or sets the name of the script the @@ -59,8 +56,11 @@ public Watcher() /// the watcher. /// Gets or sets the description. /// Gets or sets the etag of the resource. - public Watcher(string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), string location = default(string), long? executionFrequencyInSeconds = default(long?), string scriptName = default(string), IDictionary scriptParameters = default(IDictionary), string scriptRunOn = default(string), string status = default(string), System.DateTimeOffset creationTime = default(System.DateTimeOffset), System.DateTimeOffset lastModifiedTime = default(System.DateTimeOffset), string lastModifiedBy = default(string), string description = default(string), string etag = default(string)) - : base(id, name, type, tags, location) + /// Resource tags. + /// The geo-location where the resource + /// lives + public Watcher(string id = default(string), string name = default(string), string type = default(string), long? executionFrequencyInSeconds = default(long?), string scriptName = default(string), IDictionary scriptParameters = default(IDictionary), string scriptRunOn = default(string), string status = default(string), System.DateTimeOffset creationTime = default(System.DateTimeOffset), System.DateTimeOffset lastModifiedTime = default(System.DateTimeOffset), string lastModifiedBy = default(string), string description = default(string), string etag = default(string), IDictionary tags = default(IDictionary), string location = default(string)) + : base(id, name, type) { ExecutionFrequencyInSeconds = executionFrequencyInSeconds; ScriptName = scriptName; @@ -72,6 +72,8 @@ public Watcher() LastModifiedBy = lastModifiedBy; Description = description; Etag = etag; + Tags = tags; + Location = location; CustomInit(); } @@ -142,5 +144,17 @@ public Watcher() [JsonProperty(PropertyName = "etag")] public string Etag { get; set; } + /// + /// Gets or sets resource tags. + /// + [JsonProperty(PropertyName = "tags")] + public IDictionary Tags { get; set; } + + /// + /// Gets or sets the geo-location where the resource lives + /// + [JsonProperty(PropertyName = "location")] + public string Location { get; set; } + } } diff --git a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/WindowsProperties.cs b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/WindowsProperties.cs deleted file mode 100644 index 8dc51df43ac7..000000000000 --- a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/WindowsProperties.cs +++ /dev/null @@ -1,91 +0,0 @@ -// -// 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.Automation.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Windows specific update configuration. - /// - public partial class WindowsProperties - { - /// - /// Initializes a new instance of the WindowsProperties class. - /// - public WindowsProperties() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the WindowsProperties class. - /// - /// Update classification - /// included in the software update configuration. A comma separated - /// string with required values. Possible values include: - /// 'Unclassified', 'Critical', 'Security', 'UpdateRollup', - /// 'FeaturePack', 'ServicePack', 'Definition', 'Tools', - /// 'Updates' - /// KB numbers excluded from the - /// software update configuration. - /// KB numbers included from the - /// software update configuration. - /// Reboot setting for the software update - /// configuration. - public WindowsProperties(string includedUpdateClassifications = default(string), IList excludedKbNumbers = default(IList), IList includedKbNumbers = default(IList), string rebootSetting = default(string)) - { - IncludedUpdateClassifications = includedUpdateClassifications; - ExcludedKbNumbers = excludedKbNumbers; - IncludedKbNumbers = includedKbNumbers; - RebootSetting = rebootSetting; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets update classification included in the software update - /// configuration. A comma separated string with required values. - /// Possible values include: 'Unclassified', 'Critical', 'Security', - /// 'UpdateRollup', 'FeaturePack', 'ServicePack', 'Definition', - /// 'Tools', 'Updates' - /// - [JsonProperty(PropertyName = "includedUpdateClassifications")] - public string IncludedUpdateClassifications { get; set; } - - /// - /// Gets or sets KB numbers excluded from the software update - /// configuration. - /// - [JsonProperty(PropertyName = "excludedKbNumbers")] - public IList ExcludedKbNumbers { get; set; } - - /// - /// Gets or sets KB numbers included from the software update - /// configuration. - /// - [JsonProperty(PropertyName = "includedKbNumbers")] - public IList IncludedKbNumbers { get; set; } - - /// - /// Gets or sets reboot setting for the software update configuration. - /// - [JsonProperty(PropertyName = "rebootSetting")] - public string RebootSetting { get; set; } - - } -} diff --git a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/WindowsUpdateClasses.cs b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/WindowsUpdateClasses.cs deleted file mode 100644 index 5af409cacfc5..000000000000 --- a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Models/WindowsUpdateClasses.cs +++ /dev/null @@ -1,29 +0,0 @@ -// -// 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.Automation.Models -{ - - /// - /// Defines values for WindowsUpdateClasses. - /// - public static class WindowsUpdateClasses - { - public const string Unclassified = "Unclassified"; - public const string Critical = "Critical"; - public const string Security = "Security"; - public const string UpdateRollup = "UpdateRollup"; - public const string FeaturePack = "FeaturePack"; - public const string ServicePack = "ServicePack"; - public const string Definition = "Definition"; - public const string Tools = "Tools"; - public const string Updates = "Updates"; - } -} diff --git a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/ModuleOperations.cs b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/ModuleOperations.cs index 393d6bf7e83f..fa3425057023 100644 --- a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/ModuleOperations.cs +++ b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/ModuleOperations.cs @@ -114,7 +114,7 @@ internal ModuleOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2015-10-31"; + string apiVersion = "2020-01-13-preview"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -310,7 +310,7 @@ internal ModuleOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2015-10-31"; + string apiVersion = "2020-01-13-preview"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -535,7 +535,7 @@ internal ModuleOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2015-10-31"; + string apiVersion = "2020-01-13-preview"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -781,7 +781,7 @@ internal ModuleOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2015-10-31"; + string apiVersion = "2020-01-13-preview"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -995,7 +995,7 @@ internal ModuleOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2015-10-31"; + string apiVersion = "2020-01-13-preview"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1121,7 +1121,7 @@ internal ModuleOperations(AutomationClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -1290,7 +1290,7 @@ internal ModuleOperations(AutomationClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { diff --git a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/NodeCountInformationOperations.cs b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/NodeCountInformationOperations.cs index 4c6bec193fa7..0ea63171ae80 100644 --- a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/NodeCountInformationOperations.cs +++ b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/NodeCountInformationOperations.cs @@ -118,7 +118,7 @@ internal NodeCountInformationOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2018-01-15"; + string apiVersion = "2020-01-13-preview"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/NodeReportsOperations.cs b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/NodeReportsOperations.cs index cb4dfbd1c7e6..5fe1c1e40cb4 100644 --- a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/NodeReportsOperations.cs +++ b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/NodeReportsOperations.cs @@ -121,7 +121,7 @@ internal NodeReportsOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2018-01-15"; + string apiVersion = "2020-01-13-preview"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -258,7 +258,7 @@ internal NodeReportsOperations(AutomationClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -351,7 +351,7 @@ internal NodeReportsOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2018-01-15"; + string apiVersion = "2020-01-13-preview"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -574,7 +574,7 @@ internal NodeReportsOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2018-01-15"; + string apiVersion = "2020-01-13-preview"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -873,7 +873,7 @@ internal NodeReportsOperations(AutomationClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { diff --git a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/ObjectDataTypesOperations.cs b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/ObjectDataTypesOperations.cs index 8b31b71d175f..44ff1a3a6c76 100644 --- a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/ObjectDataTypesOperations.cs +++ b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/ObjectDataTypesOperations.cs @@ -124,7 +124,7 @@ internal ObjectDataTypesOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2015-10-31"; + string apiVersion = "2020-01-13-preview"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -254,7 +254,7 @@ internal ObjectDataTypesOperations(AutomationClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -340,7 +340,7 @@ internal ObjectDataTypesOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2015-10-31"; + string apiVersion = "2020-01-13-preview"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -468,7 +468,7 @@ internal ObjectDataTypesOperations(AutomationClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { diff --git a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Operations.cs b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Operations.cs index c73175553f50..15285ffeddf8 100644 --- a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Operations.cs +++ b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Operations.cs @@ -70,7 +70,7 @@ internal Operations(AutomationClient client) /// public async Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { - string apiVersion = "2015-10-31"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -191,7 +191,7 @@ internal Operations(AutomationClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { diff --git a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/SoftwareUpdateConfigurationsOperations.cs b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/PrivateEndpointConnectionsOperations.cs similarity index 80% rename from sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/SoftwareUpdateConfigurationsOperations.cs rename to sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/PrivateEndpointConnectionsOperations.cs index 5e4090eb4625..f10885a8b0e1 100644 --- a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/SoftwareUpdateConfigurationsOperations.cs +++ b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/PrivateEndpointConnectionsOperations.cs @@ -23,12 +23,12 @@ namespace Microsoft.Azure.Management.Automation using System.Threading.Tasks; /// - /// SoftwareUpdateConfigurationsOperations operations. + /// PrivateEndpointConnectionsOperations operations. /// - internal partial class SoftwareUpdateConfigurationsOperations : IServiceOperations, ISoftwareUpdateConfigurationsOperations + internal partial class PrivateEndpointConnectionsOperations : IServiceOperations, IPrivateEndpointConnectionsOperations { /// - /// Initializes a new instance of the SoftwareUpdateConfigurationsOperations class. + /// Initializes a new instance of the PrivateEndpointConnectionsOperations class. /// /// /// Reference to the service client. @@ -36,7 +36,7 @@ internal partial class SoftwareUpdateConfigurationsOperations : IServiceOperatio /// /// Thrown when a required parameter is null /// - internal SoftwareUpdateConfigurationsOperations(AutomationClient client) + internal PrivateEndpointConnectionsOperations(AutomationClient client) { if (client == null) { @@ -51,8 +51,7 @@ internal SoftwareUpdateConfigurationsOperations(AutomationClient client) public AutomationClient Client { get; private set; } /// - /// Create a new software update configuration with the name given in the URI. - /// + /// List all private endpoint connections on a Automation account. /// /// /// Name of an Azure Resource group. @@ -60,22 +59,13 @@ internal SoftwareUpdateConfigurationsOperations(AutomationClient client) /// /// The name of the automation account. /// - /// - /// The name of the software update configuration to be created. - /// - /// - /// Request body. - /// - /// - /// Identifies this specific client request. - /// /// /// Headers that will be added to request. /// /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -90,7 +80,7 @@ internal SoftwareUpdateConfigurationsOperations(AutomationClient client) /// /// A response object containing the response body and response headers. /// - public async Task> CreateWithHttpMessagesAsync(string resourceGroupName, string automationAccountName, string softwareUpdateConfigurationName, SoftwareUpdateConfiguration parameters, string clientRequestId = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListByAutomationAccountWithHttpMessagesAsync(string resourceGroupName, string automationAccountName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.SubscriptionId == null) { @@ -119,19 +109,7 @@ internal SoftwareUpdateConfigurationsOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "automationAccountName"); } - if (softwareUpdateConfigurationName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "softwareUpdateConfigurationName"); - } - if (parameters == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); - } - if (parameters != null) - { - parameters.Validate(); - } - string apiVersion = "2017-05-15-preview"; + string apiVersion = "2020-01-13-preview"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -140,21 +118,17 @@ internal SoftwareUpdateConfigurationsOperations(AutomationClient client) _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); - tracingParameters.Add("automationAccountName", automationAccountName); - tracingParameters.Add("softwareUpdateConfigurationName", softwareUpdateConfigurationName); tracingParameters.Add("apiVersion", apiVersion); - tracingParameters.Add("clientRequestId", clientRequestId); - tracingParameters.Add("parameters", parameters); + tracingParameters.Add("automationAccountName", automationAccountName); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Create", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListByAutomationAccount", 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.Automation/automationAccounts/{automationAccountName}/softwareUpdateConfigurations/{softwareUpdateConfigurationName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/privateEndpointConnections").ToString(); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{automationAccountName}", System.Uri.EscapeDataString(automationAccountName)); - _url = _url.Replace("{softwareUpdateConfigurationName}", System.Uri.EscapeDataString(softwareUpdateConfigurationName)); List _queryParameters = new List(); if (apiVersion != null) { @@ -167,21 +141,13 @@ internal SoftwareUpdateConfigurationsOperations(AutomationClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("PUT"); + _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 (clientRequestId != null) - { - if (_httpRequest.Headers.Contains("clientRequestId")) - { - _httpRequest.Headers.Remove("clientRequestId"); - } - _httpRequest.Headers.TryAddWithoutValidation("clientRequestId", clientRequestId); - } if (Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) @@ -206,12 +172,6 @@ internal SoftwareUpdateConfigurationsOperations(AutomationClient client) // Serialize Request string _requestContent = null; - if(parameters != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); - _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); - } // Set Credentials if (Client.Credentials != null) { @@ -232,15 +192,16 @@ internal SoftwareUpdateConfigurationsOperations(AutomationClient client) System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 201) + if ((int)_statusCode != 200) { - var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { + ex = new CloudException(_errorBody.Message); ex.Body = _errorBody; } } @@ -250,6 +211,10 @@ internal SoftwareUpdateConfigurationsOperations(AutomationClient client) } ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } if (_shouldTrace) { ServiceClientTracing.Error(_invocationId, ex); @@ -262,7 +227,7 @@ internal SoftwareUpdateConfigurationsOperations(AutomationClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -275,25 +240,7 @@ internal SoftwareUpdateConfigurationsOperations(AutomationClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 201) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -313,8 +260,7 @@ internal SoftwareUpdateConfigurationsOperations(AutomationClient client) } /// - /// Get a single software update configuration by name. - /// + /// Gets a private endpoint connection. /// /// /// Name of an Azure Resource group. @@ -322,11 +268,8 @@ internal SoftwareUpdateConfigurationsOperations(AutomationClient client) /// /// The name of the automation account. /// - /// - /// The name of the software update configuration to be created. - /// - /// - /// Identifies this specific client request. + /// + /// The name of the private endpoint connection. /// /// /// Headers that will be added to request. @@ -334,7 +277,7 @@ internal SoftwareUpdateConfigurationsOperations(AutomationClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -349,7 +292,7 @@ internal SoftwareUpdateConfigurationsOperations(AutomationClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetByNameWithHttpMessagesAsync(string resourceGroupName, string automationAccountName, string softwareUpdateConfigurationName, string clientRequestId = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string automationAccountName, string privateEndpointConnectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.SubscriptionId == null) { @@ -378,11 +321,11 @@ internal SoftwareUpdateConfigurationsOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "automationAccountName"); } - if (softwareUpdateConfigurationName == null) + if (privateEndpointConnectionName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "softwareUpdateConfigurationName"); + throw new ValidationException(ValidationRules.CannotBeNull, "privateEndpointConnectionName"); } - string apiVersion = "2017-05-15-preview"; + string apiVersion = "2020-01-13-preview"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -391,20 +334,19 @@ internal SoftwareUpdateConfigurationsOperations(AutomationClient client) _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); - tracingParameters.Add("automationAccountName", automationAccountName); - tracingParameters.Add("softwareUpdateConfigurationName", softwareUpdateConfigurationName); tracingParameters.Add("apiVersion", apiVersion); - tracingParameters.Add("clientRequestId", clientRequestId); + tracingParameters.Add("automationAccountName", automationAccountName); + tracingParameters.Add("privateEndpointConnectionName", privateEndpointConnectionName); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetByName", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/softwareUpdateConfigurations/{softwareUpdateConfigurationName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/privateEndpointConnections/{privateEndpointConnectionName}").ToString(); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{automationAccountName}", System.Uri.EscapeDataString(automationAccountName)); - _url = _url.Replace("{softwareUpdateConfigurationName}", System.Uri.EscapeDataString(softwareUpdateConfigurationName)); + _url = _url.Replace("{privateEndpointConnectionName}", System.Uri.EscapeDataString(privateEndpointConnectionName)); List _queryParameters = new List(); if (apiVersion != null) { @@ -424,14 +366,6 @@ internal SoftwareUpdateConfigurationsOperations(AutomationClient client) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (clientRequestId != null) - { - if (_httpRequest.Headers.Contains("clientRequestId")) - { - _httpRequest.Headers.Remove("clientRequestId"); - } - _httpRequest.Headers.TryAddWithoutValidation("clientRequestId", clientRequestId); - } if (Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) @@ -478,13 +412,14 @@ internal SoftwareUpdateConfigurationsOperations(AutomationClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { + ex = new CloudException(_errorBody.Message); ex.Body = _errorBody; } } @@ -494,6 +429,10 @@ internal SoftwareUpdateConfigurationsOperations(AutomationClient client) } ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } if (_shouldTrace) { ServiceClientTracing.Error(_invocationId, ex); @@ -506,7 +445,7 @@ internal SoftwareUpdateConfigurationsOperations(AutomationClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -519,7 +458,7 @@ internal SoftwareUpdateConfigurationsOperations(AutomationClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -539,8 +478,59 @@ internal SoftwareUpdateConfigurationsOperations(AutomationClient client) } /// - /// delete a specific software update configuration. - /// + /// Approve or reject a private endpoint connection with a given name. + /// + /// + /// Name of an Azure Resource group. + /// + /// + /// The name of the automation account. + /// + /// + /// The name of the private endpoint connection. + /// + /// + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string automationAccountName, string privateEndpointConnectionName, PrivateEndpointConnection parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send Request + AzureOperationResponse _response = await BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, automationAccountName, privateEndpointConnectionName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Deletes a private endpoint connection with a given name. + /// + /// + /// Name of an Azure Resource group. + /// + /// + /// The name of the automation account. + /// + /// + /// The name of the private endpoint connection. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string automationAccountName, string privateEndpointConnectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(resourceGroupName, automationAccountName, privateEndpointConnectionName, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Approve or reject a private endpoint connection with a given name. /// /// /// Name of an Azure Resource group. @@ -548,11 +538,10 @@ internal SoftwareUpdateConfigurationsOperations(AutomationClient client) /// /// The name of the automation account. /// - /// - /// The name of the software update configuration to be created. + /// + /// The name of the private endpoint connection. /// - /// - /// Identifies this specific client request. + /// /// /// /// Headers that will be added to request. @@ -563,6 +552,9 @@ internal SoftwareUpdateConfigurationsOperations(AutomationClient client) /// /// Thrown when the operation returned an invalid status code /// + /// + /// Thrown when unable to deserialize the response + /// /// /// Thrown when a required parameter is null /// @@ -572,7 +564,7 @@ internal SoftwareUpdateConfigurationsOperations(AutomationClient client) /// /// A response object containing the response body and response headers. /// - public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string automationAccountName, string softwareUpdateConfigurationName, string clientRequestId = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string automationAccountName, string privateEndpointConnectionName, PrivateEndpointConnection parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.SubscriptionId == null) { @@ -601,11 +593,15 @@ internal SoftwareUpdateConfigurationsOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "automationAccountName"); } - if (softwareUpdateConfigurationName == null) + if (privateEndpointConnectionName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "softwareUpdateConfigurationName"); + throw new ValidationException(ValidationRules.CannotBeNull, "privateEndpointConnectionName"); } - string apiVersion = "2017-05-15-preview"; + if (parameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + } + string apiVersion = "2020-01-13-preview"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -614,20 +610,20 @@ internal SoftwareUpdateConfigurationsOperations(AutomationClient client) _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); - tracingParameters.Add("automationAccountName", automationAccountName); - tracingParameters.Add("softwareUpdateConfigurationName", softwareUpdateConfigurationName); tracingParameters.Add("apiVersion", apiVersion); - tracingParameters.Add("clientRequestId", clientRequestId); + tracingParameters.Add("automationAccountName", automationAccountName); + tracingParameters.Add("privateEndpointConnectionName", privateEndpointConnectionName); + tracingParameters.Add("parameters", parameters); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Delete", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "BeginCreateOrUpdate", 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.Automation/automationAccounts/{automationAccountName}/softwareUpdateConfigurations/{softwareUpdateConfigurationName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/privateEndpointConnections/{privateEndpointConnectionName}").ToString(); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{automationAccountName}", System.Uri.EscapeDataString(automationAccountName)); - _url = _url.Replace("{softwareUpdateConfigurationName}", System.Uri.EscapeDataString(softwareUpdateConfigurationName)); + _url = _url.Replace("{privateEndpointConnectionName}", System.Uri.EscapeDataString(privateEndpointConnectionName)); List _queryParameters = new List(); if (apiVersion != null) { @@ -640,21 +636,13 @@ internal SoftwareUpdateConfigurationsOperations(AutomationClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.Method = new HttpMethod("PUT"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (clientRequestId != null) - { - if (_httpRequest.Headers.Contains("clientRequestId")) - { - _httpRequest.Headers.Remove("clientRequestId"); - } - _httpRequest.Headers.TryAddWithoutValidation("clientRequestId", clientRequestId); - } if (Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) @@ -679,6 +667,12 @@ internal SoftwareUpdateConfigurationsOperations(AutomationClient client) // Serialize Request string _requestContent = null; + if(parameters != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } // Set Credentials if (Client.Credentials != null) { @@ -699,7 +693,7 @@ internal SoftwareUpdateConfigurationsOperations(AutomationClient client) System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 204) + if ((int)_statusCode != 200 && (int)_statusCode != 202) { var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -729,13 +723,31 @@ internal SoftwareUpdateConfigurationsOperations(AutomationClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) { _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); @@ -744,8 +756,7 @@ internal SoftwareUpdateConfigurationsOperations(AutomationClient client) } /// - /// Get all software update configurations for the account. - /// + /// Deletes a private endpoint connection with a given name. /// /// /// Name of an Azure Resource group. @@ -753,11 +764,8 @@ internal SoftwareUpdateConfigurationsOperations(AutomationClient client) /// /// The name of the automation account. /// - /// - /// Identifies this specific client request. - /// - /// - /// The filter to apply on the operation. + /// + /// The name of the private endpoint connection. /// /// /// Headers that will be added to request. @@ -768,9 +776,6 @@ internal SoftwareUpdateConfigurationsOperations(AutomationClient client) /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when unable to deserialize the response - /// /// /// Thrown when a required parameter is null /// @@ -780,7 +785,7 @@ internal SoftwareUpdateConfigurationsOperations(AutomationClient client) /// /// A response object containing the response body and response headers. /// - public async Task> ListWithHttpMessagesAsync(string resourceGroupName, string automationAccountName, string clientRequestId = default(string), string filter = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string automationAccountName, string privateEndpointConnectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.SubscriptionId == null) { @@ -809,7 +814,11 @@ internal SoftwareUpdateConfigurationsOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "automationAccountName"); } - string apiVersion = "2017-05-15-preview"; + if (privateEndpointConnectionName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "privateEndpointConnectionName"); + } + string apiVersion = "2020-01-13-preview"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -818,28 +827,24 @@ internal SoftwareUpdateConfigurationsOperations(AutomationClient client) _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); - tracingParameters.Add("automationAccountName", automationAccountName); tracingParameters.Add("apiVersion", apiVersion); - tracingParameters.Add("clientRequestId", clientRequestId); - tracingParameters.Add("filter", filter); + tracingParameters.Add("automationAccountName", automationAccountName); + tracingParameters.Add("privateEndpointConnectionName", privateEndpointConnectionName); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "BeginDelete", 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.Automation/automationAccounts/{automationAccountName}/softwareUpdateConfigurations").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/privateEndpointConnections/{privateEndpointConnectionName}").ToString(); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{automationAccountName}", System.Uri.EscapeDataString(automationAccountName)); + _url = _url.Replace("{privateEndpointConnectionName}", System.Uri.EscapeDataString(privateEndpointConnectionName)); List _queryParameters = new List(); if (apiVersion != null) { _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); } - if (filter != null) - { - _queryParameters.Add(string.Format("$filter={0}", System.Uri.EscapeDataString(filter))); - } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); @@ -847,21 +852,13 @@ internal SoftwareUpdateConfigurationsOperations(AutomationClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.Method = new HttpMethod("DELETE"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (clientRequestId != null) - { - if (_httpRequest.Headers.Contains("clientRequestId")) - { - _httpRequest.Headers.Remove("clientRequestId"); - } - _httpRequest.Headers.TryAddWithoutValidation("clientRequestId", clientRequestId); - } if (Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) @@ -906,7 +903,7 @@ internal SoftwareUpdateConfigurationsOperations(AutomationClient client) System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200) + if ((int)_statusCode != 202 && (int)_statusCode != 204) { var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -936,31 +933,13 @@ internal SoftwareUpdateConfigurationsOperations(AutomationClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) { _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); diff --git a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/PrivateEndpointConnectionsOperationsExtensions.cs b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/PrivateEndpointConnectionsOperationsExtensions.cs new file mode 100644 index 000000000000..9e2d35b9f2a5 --- /dev/null +++ b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/PrivateEndpointConnectionsOperationsExtensions.cs @@ -0,0 +1,299 @@ +// +// 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.Automation +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for PrivateEndpointConnectionsOperations. + /// + public static partial class PrivateEndpointConnectionsOperationsExtensions + { + /// + /// List all private endpoint connections on a Automation account. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of an Azure Resource group. + /// + /// + /// The name of the automation account. + /// + public static IEnumerable ListByAutomationAccount(this IPrivateEndpointConnectionsOperations operations, string resourceGroupName, string automationAccountName) + { + return operations.ListByAutomationAccountAsync(resourceGroupName, automationAccountName).GetAwaiter().GetResult(); + } + + /// + /// List all private endpoint connections on a Automation account. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of an Azure Resource group. + /// + /// + /// The name of the automation account. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByAutomationAccountAsync(this IPrivateEndpointConnectionsOperations operations, string resourceGroupName, string automationAccountName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByAutomationAccountWithHttpMessagesAsync(resourceGroupName, automationAccountName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets a private endpoint connection. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of an Azure Resource group. + /// + /// + /// The name of the automation account. + /// + /// + /// The name of the private endpoint connection. + /// + public static PrivateEndpointConnection Get(this IPrivateEndpointConnectionsOperations operations, string resourceGroupName, string automationAccountName, string privateEndpointConnectionName) + { + return operations.GetAsync(resourceGroupName, automationAccountName, privateEndpointConnectionName).GetAwaiter().GetResult(); + } + + /// + /// Gets a private endpoint connection. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of an Azure Resource group. + /// + /// + /// The name of the automation account. + /// + /// + /// The name of the private endpoint connection. + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this IPrivateEndpointConnectionsOperations operations, string resourceGroupName, string automationAccountName, string privateEndpointConnectionName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, automationAccountName, privateEndpointConnectionName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Approve or reject a private endpoint connection with a given name. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of an Azure Resource group. + /// + /// + /// The name of the automation account. + /// + /// + /// The name of the private endpoint connection. + /// + /// + /// + public static PrivateEndpointConnection CreateOrUpdate(this IPrivateEndpointConnectionsOperations operations, string resourceGroupName, string automationAccountName, string privateEndpointConnectionName, PrivateEndpointConnection parameters) + { + return operations.CreateOrUpdateAsync(resourceGroupName, automationAccountName, privateEndpointConnectionName, parameters).GetAwaiter().GetResult(); + } + + /// + /// Approve or reject a private endpoint connection with a given name. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of an Azure Resource group. + /// + /// + /// The name of the automation account. + /// + /// + /// The name of the private endpoint connection. + /// + /// + /// + /// + /// The cancellation token. + /// + public static async Task CreateOrUpdateAsync(this IPrivateEndpointConnectionsOperations operations, string resourceGroupName, string automationAccountName, string privateEndpointConnectionName, PrivateEndpointConnection parameters, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, automationAccountName, privateEndpointConnectionName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Deletes a private endpoint connection with a given name. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of an Azure Resource group. + /// + /// + /// The name of the automation account. + /// + /// + /// The name of the private endpoint connection. + /// + public static void Delete(this IPrivateEndpointConnectionsOperations operations, string resourceGroupName, string automationAccountName, string privateEndpointConnectionName) + { + operations.DeleteAsync(resourceGroupName, automationAccountName, privateEndpointConnectionName).GetAwaiter().GetResult(); + } + + /// + /// Deletes a private endpoint connection with a given name. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of an Azure Resource group. + /// + /// + /// The name of the automation account. + /// + /// + /// The name of the private endpoint connection. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteAsync(this IPrivateEndpointConnectionsOperations operations, string resourceGroupName, string automationAccountName, string privateEndpointConnectionName, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, automationAccountName, privateEndpointConnectionName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Approve or reject a private endpoint connection with a given name. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of an Azure Resource group. + /// + /// + /// The name of the automation account. + /// + /// + /// The name of the private endpoint connection. + /// + /// + /// + public static PrivateEndpointConnection BeginCreateOrUpdate(this IPrivateEndpointConnectionsOperations operations, string resourceGroupName, string automationAccountName, string privateEndpointConnectionName, PrivateEndpointConnection parameters) + { + return operations.BeginCreateOrUpdateAsync(resourceGroupName, automationAccountName, privateEndpointConnectionName, parameters).GetAwaiter().GetResult(); + } + + /// + /// Approve or reject a private endpoint connection with a given name. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of an Azure Resource group. + /// + /// + /// The name of the automation account. + /// + /// + /// The name of the private endpoint connection. + /// + /// + /// + /// + /// The cancellation token. + /// + public static async Task BeginCreateOrUpdateAsync(this IPrivateEndpointConnectionsOperations operations, string resourceGroupName, string automationAccountName, string privateEndpointConnectionName, PrivateEndpointConnection parameters, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, automationAccountName, privateEndpointConnectionName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Deletes a private endpoint connection with a given name. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of an Azure Resource group. + /// + /// + /// The name of the automation account. + /// + /// + /// The name of the private endpoint connection. + /// + public static void BeginDelete(this IPrivateEndpointConnectionsOperations operations, string resourceGroupName, string automationAccountName, string privateEndpointConnectionName) + { + operations.BeginDeleteAsync(resourceGroupName, automationAccountName, privateEndpointConnectionName).GetAwaiter().GetResult(); + } + + /// + /// Deletes a private endpoint connection with a given name. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of an Azure Resource group. + /// + /// + /// The name of the automation account. + /// + /// + /// The name of the private endpoint connection. + /// + /// + /// The cancellation token. + /// + public static async Task BeginDeleteAsync(this IPrivateEndpointConnectionsOperations operations, string resourceGroupName, string automationAccountName, string privateEndpointConnectionName, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, automationAccountName, privateEndpointConnectionName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + } +} diff --git a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/PrivateLinkResourcesOperations.cs b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/PrivateLinkResourcesOperations.cs new file mode 100644 index 000000000000..08c656915806 --- /dev/null +++ b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/PrivateLinkResourcesOperations.cs @@ -0,0 +1,264 @@ +// +// 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.Automation +{ + 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; + + /// + /// PrivateLinkResourcesOperations operations. + /// + internal partial class PrivateLinkResourcesOperations : IServiceOperations, IPrivateLinkResourcesOperations + { + /// + /// Initializes a new instance of the PrivateLinkResourcesOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal PrivateLinkResourcesOperations(AutomationClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the AutomationClient + /// + public AutomationClient Client { get; private set; } + + /// + /// Gets the private link resources that need to be created for Automation + /// account. + /// + /// + /// Name of an Azure Resource group. + /// + /// + /// The name of the automation account. + /// + /// + /// 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>> AutomationMethodWithHttpMessagesAsync(string resourceGroupName, string automationAccountName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._]+$"); + } + } + if (automationAccountName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "automationAccountName"); + } + string apiVersion = "2020-01-13-preview"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("automationAccountName", automationAccountName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "AutomationMethod", 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.Automation/automationAccounts/{automationAccountName}/privateLinkResources").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{automationAccountName}", System.Uri.EscapeDataString(automationAccountName)); + List _queryParameters = new List(); + if (apiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + } +} diff --git a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/PrivateLinkResourcesOperationsExtensions.cs b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/PrivateLinkResourcesOperationsExtensions.cs new file mode 100644 index 000000000000..a85392a3e42a --- /dev/null +++ b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/PrivateLinkResourcesOperationsExtensions.cs @@ -0,0 +1,69 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Automation +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for PrivateLinkResourcesOperations. + /// + public static partial class PrivateLinkResourcesOperationsExtensions + { + /// + /// Gets the private link resources that need to be created for Automation + /// account. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of an Azure Resource group. + /// + /// + /// The name of the automation account. + /// + public static IEnumerable AutomationMethod(this IPrivateLinkResourcesOperations operations, string resourceGroupName, string automationAccountName) + { + return operations.AutomationMethodAsync(resourceGroupName, automationAccountName).GetAwaiter().GetResult(); + } + + /// + /// Gets the private link resources that need to be created for Automation + /// account. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of an Azure Resource group. + /// + /// + /// The name of the automation account. + /// + /// + /// The cancellation token. + /// + public static async Task> AutomationMethodAsync(this IPrivateLinkResourcesOperations operations, string resourceGroupName, string automationAccountName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.AutomationMethodWithHttpMessagesAsync(resourceGroupName, automationAccountName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Python2PackageOperations.cs b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Python2PackageOperations.cs index 50a290b9746e..538533acc038 100644 --- a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Python2PackageOperations.cs +++ b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/Python2PackageOperations.cs @@ -114,7 +114,7 @@ internal Python2PackageOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2018-06-30"; + string apiVersion = "2020-01-13-preview"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -310,7 +310,7 @@ internal Python2PackageOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2018-06-30"; + string apiVersion = "2020-01-13-preview"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -535,7 +535,7 @@ internal Python2PackageOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2018-06-30"; + string apiVersion = "2020-01-13-preview"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -781,7 +781,7 @@ internal Python2PackageOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2018-06-30"; + string apiVersion = "2020-01-13-preview"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -995,7 +995,7 @@ internal Python2PackageOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2018-06-30"; + string apiVersion = "2020-01-13-preview"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1121,7 +1121,7 @@ internal Python2PackageOperations(AutomationClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -1290,7 +1290,7 @@ internal Python2PackageOperations(AutomationClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { diff --git a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/RunbookDraftOperations.cs b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/RunbookDraftOperations.cs index 672df085f726..9ffe6e6e448f 100644 --- a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/RunbookDraftOperations.cs +++ b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/RunbookDraftOperations.cs @@ -85,7 +85,7 @@ internal RunbookDraftOperations(AutomationClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetContentWithHttpMessagesAsync(string resourceGroupName, string automationAccountName, string runbookName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetContentWithHttpMessagesAsync(string resourceGroupName, string automationAccountName, string runbookName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.SubscriptionId == null) { @@ -118,7 +118,7 @@ internal RunbookDraftOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "runbookName"); } - string apiVersion = "2018-06-30"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -195,7 +195,7 @@ internal RunbookDraftOperations(AutomationClient client) ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); @@ -238,7 +238,7 @@ internal RunbookDraftOperations(AutomationClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -248,7 +248,20 @@ internal RunbookDraftOperations(AutomationClient client) // Deserialize Response if ((int)_statusCode == 200) { - _result.Body = await _httpResponse.Content.ReadAsStreamAsync().ConfigureAwait(false); + _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) { @@ -271,7 +284,7 @@ internal RunbookDraftOperations(AutomationClient client) /// The runbook name. /// /// - /// The runbook draft content. + /// The runbook draft content. /// /// /// The headers that will be added to request. @@ -279,10 +292,10 @@ internal RunbookDraftOperations(AutomationClient client) /// /// The cancellation token. /// - public async Task> ReplaceContentWithHttpMessagesAsync(string resourceGroupName, string automationAccountName, string runbookName, Stream runbookContent, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> ReplaceContentWithHttpMessagesAsync(string resourceGroupName, string automationAccountName, string runbookName, Stream runbookContent, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { // Send Request - AzureOperationResponse _response = await BeginReplaceContentWithHttpMessagesAsync(resourceGroupName, automationAccountName, runbookName, runbookContent, customHeaders, cancellationToken).ConfigureAwait(false); + AzureOperationHeaderResponse _response = await BeginReplaceContentWithHttpMessagesAsync(resourceGroupName, automationAccountName, runbookName, runbookContent, customHeaders, cancellationToken).ConfigureAwait(false); return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } @@ -353,7 +366,7 @@ internal RunbookDraftOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "runbookName"); } - string apiVersion = "2018-06-30"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -522,9 +535,6 @@ internal RunbookDraftOperations(AutomationClient client) /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when unable to deserialize the response - /// /// /// Thrown when a required parameter is null /// @@ -534,7 +544,7 @@ internal RunbookDraftOperations(AutomationClient client) /// /// A response object containing the response body and response headers. /// - public async Task> UndoEditWithHttpMessagesAsync(string resourceGroupName, string automationAccountName, string runbookName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task UndoEditWithHttpMessagesAsync(string resourceGroupName, string automationAccountName, string runbookName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.SubscriptionId == null) { @@ -567,7 +577,7 @@ internal RunbookDraftOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "runbookName"); } - string apiVersion = "2018-06-30"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -682,31 +692,13 @@ internal RunbookDraftOperations(AutomationClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) { _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); @@ -728,7 +720,7 @@ internal RunbookDraftOperations(AutomationClient client) /// The runbook name. /// /// - /// The runbook draft content. + /// The runbook draft content. /// /// /// Headers that will be added to request. @@ -739,9 +731,6 @@ internal RunbookDraftOperations(AutomationClient client) /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when unable to deserialize the response - /// /// /// Thrown when a required parameter is null /// @@ -751,7 +740,7 @@ internal RunbookDraftOperations(AutomationClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginReplaceContentWithHttpMessagesAsync(string resourceGroupName, string automationAccountName, string runbookName, Stream runbookContent, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> BeginReplaceContentWithHttpMessagesAsync(string resourceGroupName, string automationAccountName, string runbookName, Stream runbookContent, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.SubscriptionId == null) { @@ -788,7 +777,7 @@ internal RunbookDraftOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "runbookContent"); } - string apiVersion = "2018-06-30"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -875,7 +864,7 @@ internal RunbookDraftOperations(AutomationClient client) ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); @@ -913,18 +902,13 @@ internal RunbookDraftOperations(AutomationClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationHeaderResponse(); _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) - { - _result.Body = await _httpResponse.Content.ReadAsStreamAsync().ConfigureAwait(false); - } try { _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(JsonSerializer.Create(Client.DeserializationSettings)); diff --git a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/RunbookDraftOperationsExtensions.cs b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/RunbookDraftOperationsExtensions.cs index 8b8eb5227c9c..d999adca6a56 100644 --- a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/RunbookDraftOperationsExtensions.cs +++ b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/RunbookDraftOperationsExtensions.cs @@ -38,7 +38,7 @@ public static partial class RunbookDraftOperationsExtensions /// /// The runbook name. /// - public static Stream GetContent(this IRunbookDraftOperations operations, string resourceGroupName, string automationAccountName, string runbookName) + public static string GetContent(this IRunbookDraftOperations operations, string resourceGroupName, string automationAccountName, string runbookName) { return operations.GetContentAsync(resourceGroupName, automationAccountName, runbookName).GetAwaiter().GetResult(); } @@ -62,11 +62,12 @@ public static Stream GetContent(this IRunbookDraftOperations operations, string /// /// The cancellation token. /// - public static async Task GetContentAsync(this IRunbookDraftOperations operations, string resourceGroupName, string automationAccountName, string runbookName, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task GetContentAsync(this IRunbookDraftOperations operations, string resourceGroupName, string automationAccountName, string runbookName, CancellationToken cancellationToken = default(CancellationToken)) { - var _result = await operations.GetContentWithHttpMessagesAsync(resourceGroupName, automationAccountName, runbookName, null, cancellationToken).ConfigureAwait(false); - _result.Request.Dispose(); - return _result.Body; + using (var _result = await operations.GetContentWithHttpMessagesAsync(resourceGroupName, automationAccountName, runbookName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } } /// @@ -86,9 +87,9 @@ public static Stream GetContent(this IRunbookDraftOperations operations, string /// The runbook name. /// /// - /// The runbook draft content. + /// The runbook draft content. /// - public static Stream ReplaceContent(this IRunbookDraftOperations operations, string resourceGroupName, string automationAccountName, string runbookName, Stream runbookContent) + public static RunbookDraftReplaceContentHeaders ReplaceContent(this IRunbookDraftOperations operations, string resourceGroupName, string automationAccountName, string runbookName, Stream runbookContent) { return operations.ReplaceContentAsync(resourceGroupName, automationAccountName, runbookName, runbookContent).GetAwaiter().GetResult(); } @@ -110,16 +111,17 @@ public static Stream ReplaceContent(this IRunbookDraftOperations operations, str /// The runbook name. /// /// - /// The runbook draft content. + /// The runbook draft content. /// /// /// The cancellation token. /// - public static async Task ReplaceContentAsync(this IRunbookDraftOperations operations, string resourceGroupName, string automationAccountName, string runbookName, Stream runbookContent, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task ReplaceContentAsync(this IRunbookDraftOperations operations, string resourceGroupName, string automationAccountName, string runbookName, Stream runbookContent, CancellationToken cancellationToken = default(CancellationToken)) { - var _result = await operations.ReplaceContentWithHttpMessagesAsync(resourceGroupName, automationAccountName, runbookName, runbookContent, null, cancellationToken).ConfigureAwait(false); - _result.Request.Dispose(); - return _result.Body; + using (var _result = await operations.ReplaceContentWithHttpMessagesAsync(resourceGroupName, automationAccountName, runbookName, runbookContent, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Headers; + } } /// @@ -186,9 +188,9 @@ public static RunbookDraft Get(this IRunbookDraftOperations operations, string r /// /// The runbook name. /// - public static RunbookDraftUndoEditResult UndoEdit(this IRunbookDraftOperations operations, string resourceGroupName, string automationAccountName, string runbookName) + public static void UndoEdit(this IRunbookDraftOperations operations, string resourceGroupName, string automationAccountName, string runbookName) { - return operations.UndoEditAsync(resourceGroupName, automationAccountName, runbookName).GetAwaiter().GetResult(); + operations.UndoEditAsync(resourceGroupName, automationAccountName, runbookName).GetAwaiter().GetResult(); } /// @@ -210,12 +212,9 @@ public static RunbookDraftUndoEditResult UndoEdit(this IRunbookDraftOperations o /// /// The cancellation token. /// - public static async Task UndoEditAsync(this IRunbookDraftOperations operations, string resourceGroupName, string automationAccountName, string runbookName, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task UndoEditAsync(this IRunbookDraftOperations operations, string resourceGroupName, string automationAccountName, string runbookName, CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.UndoEditWithHttpMessagesAsync(resourceGroupName, automationAccountName, runbookName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + (await operations.UndoEditWithHttpMessagesAsync(resourceGroupName, automationAccountName, runbookName, null, cancellationToken).ConfigureAwait(false)).Dispose(); } /// @@ -235,9 +234,9 @@ public static RunbookDraftUndoEditResult UndoEdit(this IRunbookDraftOperations o /// The runbook name. /// /// - /// The runbook draft content. + /// The runbook draft content. /// - public static Stream BeginReplaceContent(this IRunbookDraftOperations operations, string resourceGroupName, string automationAccountName, string runbookName, Stream runbookContent) + public static RunbookDraftReplaceContentHeaders BeginReplaceContent(this IRunbookDraftOperations operations, string resourceGroupName, string automationAccountName, string runbookName, Stream runbookContent) { return operations.BeginReplaceContentAsync(resourceGroupName, automationAccountName, runbookName, runbookContent).GetAwaiter().GetResult(); } @@ -259,16 +258,17 @@ public static Stream BeginReplaceContent(this IRunbookDraftOperations operations /// The runbook name. /// /// - /// The runbook draft content. + /// The runbook draft content. /// /// /// The cancellation token. /// - public static async Task BeginReplaceContentAsync(this IRunbookDraftOperations operations, string resourceGroupName, string automationAccountName, string runbookName, Stream runbookContent, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task BeginReplaceContentAsync(this IRunbookDraftOperations operations, string resourceGroupName, string automationAccountName, string runbookName, Stream runbookContent, CancellationToken cancellationToken = default(CancellationToken)) { - var _result = await operations.BeginReplaceContentWithHttpMessagesAsync(resourceGroupName, automationAccountName, runbookName, runbookContent, null, cancellationToken).ConfigureAwait(false); - _result.Request.Dispose(); - return _result.Body; + using (var _result = await operations.BeginReplaceContentWithHttpMessagesAsync(resourceGroupName, automationAccountName, runbookName, runbookContent, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Headers; + } } } diff --git a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/RunbookOperations.cs b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/RunbookOperations.cs index 01d8003c70ae..b4b7eefd915e 100644 --- a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/RunbookOperations.cs +++ b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/RunbookOperations.cs @@ -16,7 +16,6 @@ namespace Microsoft.Azure.Management.Automation using Newtonsoft.Json; using System.Collections; using System.Collections.Generic; - using System.IO; using System.Linq; using System.Net; using System.Net.Http; @@ -111,7 +110,7 @@ internal RunbookOperations(AutomationClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetContentWithHttpMessagesAsync(string resourceGroupName, string automationAccountName, string runbookName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetContentWithHttpMessagesAsync(string resourceGroupName, string automationAccountName, string runbookName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.SubscriptionId == null) { @@ -144,7 +143,7 @@ internal RunbookOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "runbookName"); } - string apiVersion = "2018-06-30"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -221,7 +220,7 @@ internal RunbookOperations(AutomationClient client) ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); @@ -264,7 +263,7 @@ internal RunbookOperations(AutomationClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -274,7 +273,20 @@ internal RunbookOperations(AutomationClient client) // Deserialize Response if ((int)_statusCode == 200) { - _result.Body = await _httpResponse.Content.ReadAsStreamAsync().ConfigureAwait(false); + _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) { @@ -350,7 +362,7 @@ internal RunbookOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "runbookName"); } - string apiVersion = "2018-06-30"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -576,7 +588,7 @@ internal RunbookOperations(AutomationClient client) { parameters.Validate(); } - string apiVersion = "2018-06-30"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -822,7 +834,7 @@ internal RunbookOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); } - string apiVersion = "2018-06-30"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1040,7 +1052,7 @@ internal RunbookOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "runbookName"); } - string apiVersion = "2018-06-30"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1229,7 +1241,7 @@ internal RunbookOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "automationAccountName"); } - string apiVersion = "2018-06-30"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1355,7 +1367,7 @@ internal RunbookOperations(AutomationClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -1438,7 +1450,7 @@ internal RunbookOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "runbookName"); } - string apiVersion = "2018-06-30"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1730,7 +1742,7 @@ internal RunbookOperations(AutomationClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { diff --git a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/RunbookOperationsExtensions.cs b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/RunbookOperationsExtensions.cs index ec4cdc5d6da4..c91f8fe2da13 100644 --- a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/RunbookOperationsExtensions.cs +++ b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/RunbookOperationsExtensions.cs @@ -13,7 +13,6 @@ namespace Microsoft.Azure.Management.Automation using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.IO; using System.Threading; using System.Threading.Tasks; @@ -86,7 +85,7 @@ public static RunbookPublishHeaders Publish(this IRunbookOperations operations, /// /// The runbook name. /// - public static Stream GetContent(this IRunbookOperations operations, string resourceGroupName, string automationAccountName, string runbookName) + public static string GetContent(this IRunbookOperations operations, string resourceGroupName, string automationAccountName, string runbookName) { return operations.GetContentAsync(resourceGroupName, automationAccountName, runbookName).GetAwaiter().GetResult(); } @@ -110,11 +109,12 @@ public static Stream GetContent(this IRunbookOperations operations, string resou /// /// The cancellation token. /// - public static async Task GetContentAsync(this IRunbookOperations operations, string resourceGroupName, string automationAccountName, string runbookName, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task GetContentAsync(this IRunbookOperations operations, string resourceGroupName, string automationAccountName, string runbookName, CancellationToken cancellationToken = default(CancellationToken)) { - var _result = await operations.GetContentWithHttpMessagesAsync(resourceGroupName, automationAccountName, runbookName, null, cancellationToken).ConfigureAwait(false); - _result.Request.Dispose(); - return _result.Body; + using (var _result = await operations.GetContentWithHttpMessagesAsync(resourceGroupName, automationAccountName, runbookName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } } /// diff --git a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/ScheduleOperations.cs b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/ScheduleOperations.cs index 31761cf1744c..84f932d6ab6b 100644 --- a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/ScheduleOperations.cs +++ b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/ScheduleOperations.cs @@ -128,7 +128,7 @@ internal ScheduleOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2015-10-31"; + string apiVersion = "2020-01-13-preview"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -374,7 +374,7 @@ internal ScheduleOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2015-10-31"; + string apiVersion = "2020-01-13-preview"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -595,7 +595,7 @@ internal ScheduleOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2015-10-31"; + string apiVersion = "2020-01-13-preview"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -806,7 +806,7 @@ internal ScheduleOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2015-10-31"; + string apiVersion = "2020-01-13-preview"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -995,7 +995,7 @@ internal ScheduleOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2015-10-31"; + string apiVersion = "2020-01-13-preview"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1121,7 +1121,7 @@ internal ScheduleOperations(AutomationClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -1290,7 +1290,7 @@ internal ScheduleOperations(AutomationClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { diff --git a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/SdkInfo_AutomationClient.cs b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/SdkInfo_AutomationClient.cs index 449551b0cd6d..3bf54a72c311 100644 --- a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/SdkInfo_AutomationClient.cs +++ b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/SdkInfo_AutomationClient.cs @@ -19,60 +19,50 @@ public static IEnumerable> ApiInfo_AutomationClien { return new Tuple[] { - new Tuple("Automation", "Activity", "2015-10-31"), - new Tuple("Automation", "AgentRegistrationInformation", "2018-01-15"), - new Tuple("Automation", "AutomationAccount", "2015-10-31"), - new Tuple("Automation", "Certificate", "2015-10-31"), - new Tuple("Automation", "Connection", "2015-10-31"), - new Tuple("Automation", "ConnectionType", "2015-10-31"), - new Tuple("Automation", "Credential", "2015-10-31"), - new Tuple("Automation", "DscCompilationJob", "2018-01-15"), - new Tuple("Automation", "DscCompilationJobStream", "2018-01-15"), - new Tuple("Automation", "DscConfiguration", "2015-10-31"), - new Tuple("Automation", "DscNode", "2018-01-15"), - new Tuple("Automation", "DscNodeConfiguration", "2018-01-15"), - new Tuple("Automation", "Fields", "2015-10-31"), - new Tuple("Automation", "HybridRunbookWorkerGroup", "2015-10-31"), - new Tuple("Automation", "Job", "2017-05-15-preview"), - new Tuple("Automation", "JobSchedule", "2015-10-31"), - new Tuple("Automation", "JobStream", "2017-05-15-preview"), - new Tuple("Automation", "Keys", "2015-10-31"), - new Tuple("Automation", "LinkedWorkspace", "2015-10-31"), - new Tuple("Automation", "Module", "2015-10-31"), - new Tuple("Automation", "NodeCountInformation", "2018-01-15"), - new Tuple("Automation", "NodeReports", "2018-01-15"), - new Tuple("Automation", "ObjectDataTypes", "2015-10-31"), - new Tuple("Automation", "Operations", "2015-10-31"), - new Tuple("Automation", "Python2Package", "2018-06-30"), - new Tuple("Automation", "Runbook", "2018-06-30"), - new Tuple("Automation", "RunbookDraft", "2018-06-30"), - new Tuple("Automation", "Schedule", "2015-10-31"), - new Tuple("Automation", "SoftwareUpdateConfigurationMachineRuns", "2017-05-15-preview"), - new Tuple("Automation", "SoftwareUpdateConfigurationRuns", "2017-05-15-preview"), - new Tuple("Automation", "SoftwareUpdateConfigurations", "2017-05-15-preview"), - new Tuple("Automation", "SourceControl", "2017-05-15-preview"), - new Tuple("Automation", "SourceControlSyncJob", "2017-05-15-preview"), - new Tuple("Automation", "SourceControlSyncJobStreams", "2017-05-15-preview"), - new Tuple("Automation", "Statistics", "2015-10-31"), - new Tuple("Automation", "TestJob", "2018-06-30"), - new Tuple("Automation", "TestJobStreams", "2018-06-30"), - new Tuple("Automation", "Usages", "2015-10-31"), - new Tuple("Automation", "Variable", "2015-10-31"), - new Tuple("Automation", "Watcher", "2015-10-31"), + new Tuple("Automation", "Activity", "2020-01-13-preview"), + new Tuple("Automation", "AgentRegistrationInformation", "2020-01-13-preview"), + new Tuple("Automation", "AutomationAccount", "2020-01-13-preview"), + new Tuple("Automation", "Certificate", "2020-01-13-preview"), + new Tuple("Automation", "Connection", "2020-01-13-preview"), + new Tuple("Automation", "ConnectionType", "2020-01-13-preview"), + new Tuple("Automation", "Credential", "2020-01-13-preview"), + new Tuple("Automation", "DscCompilationJob", "2020-01-13-preview"), + new Tuple("Automation", "DscCompilationJobStream", "2020-01-13-preview"), + new Tuple("Automation", "DscConfiguration", "2019-06-01"), + new Tuple("Automation", "DscNode", "2020-01-13-preview"), + new Tuple("Automation", "DscNodeConfiguration", "2020-01-13-preview"), + new Tuple("Automation", "Fields", "2020-01-13-preview"), + new Tuple("Automation", "HybridRunbookWorkerGroup", "2020-01-13-preview"), + new Tuple("Automation", "Job", "2019-06-01"), + new Tuple("Automation", "JobSchedule", "2020-01-13-preview"), + new Tuple("Automation", "JobStream", "2019-06-01"), + new Tuple("Automation", "Keys", "2020-01-13-preview"), + new Tuple("Automation", "LinkedWorkspace", "2020-01-13-preview"), + new Tuple("Automation", "Module", "2020-01-13-preview"), + new Tuple("Automation", "NodeCountInformation", "2020-01-13-preview"), + new Tuple("Automation", "NodeReports", "2020-01-13-preview"), + new Tuple("Automation", "ObjectDataTypes", "2020-01-13-preview"), + new Tuple("Automation", "Operations", "2019-06-01"), + new Tuple("Automation", "PrivateEndpointConnections", "2020-01-13-preview"), + new Tuple("Automation", "PrivateLinkResources", "2020-01-13-preview"), + new Tuple("Automation", "Python2Package", "2020-01-13-preview"), + new Tuple("Automation", "Runbook", "2019-06-01"), + new Tuple("Automation", "RunbookDraft", "2019-06-01"), + new Tuple("Automation", "Schedule", "2020-01-13-preview"), + new Tuple("Automation", "SoftwareUpdateConfigurationMachineRuns", "2019-06-01"), + new Tuple("Automation", "SoftwareUpdateConfigurationRuns", "2019-06-01"), + new Tuple("Automation", "SourceControl", "2020-01-13-preview"), + new Tuple("Automation", "SourceControlSyncJob", "2020-01-13-preview"), + new Tuple("Automation", "SourceControlSyncJobStreams", "2020-01-13-preview"), + new Tuple("Automation", "Statistics", "2020-01-13-preview"), + new Tuple("Automation", "TestJob", "2019-06-01"), + new Tuple("Automation", "TestJobStreams", "2019-06-01"), + new Tuple("Automation", "Usages", "2020-01-13-preview"), + new Tuple("Automation", "Variable", "2020-01-13-preview"), + new Tuple("Automation", "Watcher", "2020-01-13-preview"), new Tuple("Automation", "Webhook", "2015-10-31"), }.AsEnumerable(); } } - // BEGIN: Code Generation Metadata Section - public static readonly String AutoRestVersion = "latest"; - public static readonly String AutoRestBootStrapperVersion = "autorest@2.0.4283"; - public static readonly String AutoRestCmdExecuted = "cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/automation/resource-manager/readme.md --csharp --version=latest --reflect-api-versions --csharp-sdks-folder=C:\\Git\\azure-sdk-for-net\\src\\SDKs"; - public static readonly String GithubForkName = "Azure"; - public static readonly String GithubBranchName = "master"; - public static readonly String GithubCommidId = "97aede4213f5ffb9bee11ef972a782e21bc1eb92"; - public static readonly String CodeGenerationErrors = ""; - public static readonly String GithubRepoName = "azure-rest-api-specs"; - // END: Code Generation Metadata Section } } - diff --git a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/SoftwareUpdateConfigurationMachineRunsOperations.cs b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/SoftwareUpdateConfigurationMachineRunsOperations.cs index 7069f47c9409..6ed8b9d2ac3a 100644 --- a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/SoftwareUpdateConfigurationMachineRunsOperations.cs +++ b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/SoftwareUpdateConfigurationMachineRunsOperations.cs @@ -116,7 +116,7 @@ internal SoftwareUpdateConfigurationMachineRunsOperations(AutomationClient clien { throw new ValidationException(ValidationRules.CannotBeNull, "automationAccountName"); } - string apiVersion = "2017-05-15-preview"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -346,7 +346,7 @@ internal SoftwareUpdateConfigurationMachineRunsOperations(AutomationClient clien { throw new ValidationException(ValidationRules.CannotBeNull, "automationAccountName"); } - string apiVersion = "2017-05-15-preview"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/SoftwareUpdateConfigurationRunsOperations.cs b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/SoftwareUpdateConfigurationRunsOperations.cs index 3634d352b1b7..7d1fcf1d57fc 100644 --- a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/SoftwareUpdateConfigurationRunsOperations.cs +++ b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/SoftwareUpdateConfigurationRunsOperations.cs @@ -116,7 +116,7 @@ internal SoftwareUpdateConfigurationRunsOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "automationAccountName"); } - string apiVersion = "2017-05-15-preview"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -346,7 +346,7 @@ internal SoftwareUpdateConfigurationRunsOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "automationAccountName"); } - string apiVersion = "2017-05-15-preview"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/SoftwareUpdateConfigurationsOperationsExtensions.cs b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/SoftwareUpdateConfigurationsOperationsExtensions.cs deleted file mode 100644 index abc52bac3852..000000000000 --- a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/SoftwareUpdateConfigurationsOperationsExtensions.cs +++ /dev/null @@ -1,244 +0,0 @@ -// -// 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.Automation -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using System.Threading; - using System.Threading.Tasks; - - /// - /// Extension methods for SoftwareUpdateConfigurationsOperations. - /// - public static partial class SoftwareUpdateConfigurationsOperationsExtensions - { - /// - /// Create a new software update configuration with the name given in the URI. - /// - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of an Azure Resource group. - /// - /// - /// The name of the automation account. - /// - /// - /// The name of the software update configuration to be created. - /// - /// - /// Request body. - /// - /// - /// Identifies this specific client request. - /// - public static SoftwareUpdateConfiguration Create(this ISoftwareUpdateConfigurationsOperations operations, string resourceGroupName, string automationAccountName, string softwareUpdateConfigurationName, SoftwareUpdateConfiguration parameters, string clientRequestId = default(string)) - { - return operations.CreateAsync(resourceGroupName, automationAccountName, softwareUpdateConfigurationName, parameters, clientRequestId).GetAwaiter().GetResult(); - } - - /// - /// Create a new software update configuration with the name given in the URI. - /// - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of an Azure Resource group. - /// - /// - /// The name of the automation account. - /// - /// - /// The name of the software update configuration to be created. - /// - /// - /// Request body. - /// - /// - /// Identifies this specific client request. - /// - /// - /// The cancellation token. - /// - public static async Task CreateAsync(this ISoftwareUpdateConfigurationsOperations operations, string resourceGroupName, string automationAccountName, string softwareUpdateConfigurationName, SoftwareUpdateConfiguration parameters, string clientRequestId = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CreateWithHttpMessagesAsync(resourceGroupName, automationAccountName, softwareUpdateConfigurationName, parameters, clientRequestId, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get a single software update configuration by name. - /// - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of an Azure Resource group. - /// - /// - /// The name of the automation account. - /// - /// - /// The name of the software update configuration to be created. - /// - /// - /// Identifies this specific client request. - /// - public static SoftwareUpdateConfiguration GetByName(this ISoftwareUpdateConfigurationsOperations operations, string resourceGroupName, string automationAccountName, string softwareUpdateConfigurationName, string clientRequestId = default(string)) - { - return operations.GetByNameAsync(resourceGroupName, automationAccountName, softwareUpdateConfigurationName, clientRequestId).GetAwaiter().GetResult(); - } - - /// - /// Get a single software update configuration by name. - /// - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of an Azure Resource group. - /// - /// - /// The name of the automation account. - /// - /// - /// The name of the software update configuration to be created. - /// - /// - /// Identifies this specific client request. - /// - /// - /// The cancellation token. - /// - public static async Task GetByNameAsync(this ISoftwareUpdateConfigurationsOperations operations, string resourceGroupName, string automationAccountName, string softwareUpdateConfigurationName, string clientRequestId = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetByNameWithHttpMessagesAsync(resourceGroupName, automationAccountName, softwareUpdateConfigurationName, clientRequestId, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// delete a specific software update configuration. - /// - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of an Azure Resource group. - /// - /// - /// The name of the automation account. - /// - /// - /// The name of the software update configuration to be created. - /// - /// - /// Identifies this specific client request. - /// - public static void Delete(this ISoftwareUpdateConfigurationsOperations operations, string resourceGroupName, string automationAccountName, string softwareUpdateConfigurationName, string clientRequestId = default(string)) - { - operations.DeleteAsync(resourceGroupName, automationAccountName, softwareUpdateConfigurationName, clientRequestId).GetAwaiter().GetResult(); - } - - /// - /// delete a specific software update configuration. - /// - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of an Azure Resource group. - /// - /// - /// The name of the automation account. - /// - /// - /// The name of the software update configuration to be created. - /// - /// - /// Identifies this specific client request. - /// - /// - /// The cancellation token. - /// - public static async Task DeleteAsync(this ISoftwareUpdateConfigurationsOperations operations, string resourceGroupName, string automationAccountName, string softwareUpdateConfigurationName, string clientRequestId = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, automationAccountName, softwareUpdateConfigurationName, clientRequestId, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Get all software update configurations for the account. - /// - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of an Azure Resource group. - /// - /// - /// The name of the automation account. - /// - /// - /// Identifies this specific client request. - /// - /// - /// The filter to apply on the operation. - /// - public static SoftwareUpdateConfigurationListResult List(this ISoftwareUpdateConfigurationsOperations operations, string resourceGroupName, string automationAccountName, string clientRequestId = default(string), string filter = default(string)) - { - return operations.ListAsync(resourceGroupName, automationAccountName, clientRequestId, filter).GetAwaiter().GetResult(); - } - - /// - /// Get all software update configurations for the account. - /// - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of an Azure Resource group. - /// - /// - /// The name of the automation account. - /// - /// - /// Identifies this specific client request. - /// - /// - /// The filter to apply on the operation. - /// - /// - /// The cancellation token. - /// - public static async Task ListAsync(this ISoftwareUpdateConfigurationsOperations operations, string resourceGroupName, string automationAccountName, string clientRequestId = default(string), string filter = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, automationAccountName, clientRequestId, filter, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - } -} diff --git a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/SourceControlOperations.cs b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/SourceControlOperations.cs index d6a501c0e5fe..0c06caa1062d 100644 --- a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/SourceControlOperations.cs +++ b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/SourceControlOperations.cs @@ -128,7 +128,7 @@ internal SourceControlOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2017-05-15-preview"; + string apiVersion = "2020-01-13-preview"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -374,7 +374,7 @@ internal SourceControlOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2017-05-15-preview"; + string apiVersion = "2020-01-13-preview"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -592,7 +592,7 @@ internal SourceControlOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2017-05-15-preview"; + string apiVersion = "2020-01-13-preview"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -788,7 +788,7 @@ internal SourceControlOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2017-05-15-preview"; + string apiVersion = "2020-01-13-preview"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -998,7 +998,7 @@ internal SourceControlOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2017-05-15-preview"; + string apiVersion = "2020-01-13-preview"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1129,7 +1129,7 @@ internal SourceControlOperations(AutomationClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -1298,7 +1298,7 @@ internal SourceControlOperations(AutomationClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { diff --git a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/SourceControlSyncJobOperations.cs b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/SourceControlSyncJobOperations.cs index 5128615b452f..c4c96e3ba594 100644 --- a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/SourceControlSyncJobOperations.cs +++ b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/SourceControlSyncJobOperations.cs @@ -131,7 +131,7 @@ internal SourceControlSyncJobOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2017-05-15-preview"; + string apiVersion = "2020-01-13-preview"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -357,7 +357,7 @@ internal SourceControlSyncJobOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2017-05-15-preview"; + string apiVersion = "2020-01-13-preview"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -576,7 +576,7 @@ internal SourceControlSyncJobOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2017-05-15-preview"; + string apiVersion = "2020-01-13-preview"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -709,7 +709,7 @@ internal SourceControlSyncJobOperations(AutomationClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -878,7 +878,7 @@ internal SourceControlSyncJobOperations(AutomationClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { diff --git a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/SourceControlSyncJobStreamsOperations.cs b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/SourceControlSyncJobStreamsOperations.cs index b0d61f3aa197..eb73491d311d 100644 --- a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/SourceControlSyncJobStreamsOperations.cs +++ b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/SourceControlSyncJobStreamsOperations.cs @@ -123,7 +123,7 @@ internal SourceControlSyncJobStreamsOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2017-05-15-preview"; + string apiVersion = "2020-01-13-preview"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -258,7 +258,7 @@ internal SourceControlSyncJobStreamsOperations(AutomationClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -354,7 +354,7 @@ internal SourceControlSyncJobStreamsOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2017-05-15-preview"; + string apiVersion = "2020-01-13-preview"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -655,7 +655,7 @@ internal SourceControlSyncJobStreamsOperations(AutomationClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { diff --git a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/StatisticsOperations.cs b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/StatisticsOperations.cs index 7b6742914161..28c55d07d639 100644 --- a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/StatisticsOperations.cs +++ b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/StatisticsOperations.cs @@ -113,7 +113,7 @@ internal StatisticsOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2015-10-31"; + string apiVersion = "2020-01-13-preview"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -244,7 +244,7 @@ internal StatisticsOperations(AutomationClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { diff --git a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/TestJobOperations.cs b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/TestJobOperations.cs index ee6f56725978..c21b9e3640bd 100644 --- a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/TestJobOperations.cs +++ b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/TestJobOperations.cs @@ -124,7 +124,7 @@ internal TestJobOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); } - string apiVersion = "2018-06-30"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -345,7 +345,7 @@ internal TestJobOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "runbookName"); } - string apiVersion = "2018-06-30"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -556,7 +556,7 @@ internal TestJobOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "runbookName"); } - string apiVersion = "2018-06-30"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -749,7 +749,7 @@ internal TestJobOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "runbookName"); } - string apiVersion = "2018-06-30"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -942,7 +942,7 @@ internal TestJobOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "runbookName"); } - string apiVersion = "2018-06-30"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/TestJobStreamsOperations.cs b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/TestJobStreamsOperations.cs index d4ae589cf461..a219943c65f6 100644 --- a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/TestJobStreamsOperations.cs +++ b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/TestJobStreamsOperations.cs @@ -125,7 +125,7 @@ internal TestJobStreamsOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "jobStreamId"); } - string apiVersion = "2018-06-30"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -344,7 +344,7 @@ internal TestJobStreamsOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "runbookName"); } - string apiVersion = "2018-06-30"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -477,7 +477,7 @@ internal TestJobStreamsOperations(AutomationClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -646,7 +646,7 @@ internal TestJobStreamsOperations(AutomationClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { diff --git a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/UsagesOperations.cs b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/UsagesOperations.cs index aec2791d038f..2df39115c078 100644 --- a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/UsagesOperations.cs +++ b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/UsagesOperations.cs @@ -110,7 +110,7 @@ internal UsagesOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2015-10-31"; + string apiVersion = "2020-01-13-preview"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -236,7 +236,7 @@ internal UsagesOperations(AutomationClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { diff --git a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/VariableOperations.cs b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/VariableOperations.cs index 74adeddb0070..b9aa20f4de3a 100644 --- a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/VariableOperations.cs +++ b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/VariableOperations.cs @@ -128,7 +128,7 @@ internal VariableOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2015-10-31"; + string apiVersion = "2020-01-13-preview"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -374,7 +374,7 @@ internal VariableOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2015-10-31"; + string apiVersion = "2020-01-13-preview"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -592,7 +592,7 @@ internal VariableOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2015-10-31"; + string apiVersion = "2020-01-13-preview"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -788,7 +788,7 @@ internal VariableOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2015-10-31"; + string apiVersion = "2020-01-13-preview"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -995,7 +995,7 @@ internal VariableOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2015-10-31"; + string apiVersion = "2020-01-13-preview"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1121,7 +1121,7 @@ internal VariableOperations(AutomationClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -1290,7 +1290,7 @@ internal VariableOperations(AutomationClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { diff --git a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/WatcherOperations.cs b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/WatcherOperations.cs index 2b4f823cd5fe..450db4a5b170 100644 --- a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/WatcherOperations.cs +++ b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/WatcherOperations.cs @@ -125,7 +125,7 @@ internal WatcherOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2015-10-31"; + string apiVersion = "2020-01-13-preview"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -364,7 +364,7 @@ internal WatcherOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2015-10-31"; + string apiVersion = "2020-01-13-preview"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -585,7 +585,7 @@ internal WatcherOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2015-10-31"; + string apiVersion = "2020-01-13-preview"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -803,7 +803,7 @@ internal WatcherOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2015-10-31"; + string apiVersion = "2020-01-13-preview"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -996,7 +996,7 @@ internal WatcherOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2015-10-31"; + string apiVersion = "2020-01-13-preview"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1189,7 +1189,7 @@ internal WatcherOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2015-10-31"; + string apiVersion = "2020-01-13-preview"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1381,7 +1381,7 @@ internal WatcherOperations(AutomationClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2015-10-31"; + string apiVersion = "2020-01-13-preview"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1516,7 +1516,7 @@ internal WatcherOperations(AutomationClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -1685,7 +1685,7 @@ internal WatcherOperations(AutomationClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { diff --git a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/WebhookOperations.cs b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/WebhookOperations.cs index 0354ee02aacc..33d2e6c59e28 100644 --- a/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/WebhookOperations.cs +++ b/sdk/automation/Microsoft.Azure.Management.Automation/src/Generated/WebhookOperations.cs @@ -1339,7 +1339,7 @@ internal WebhookOperations(AutomationClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -1508,7 +1508,7 @@ internal WebhookOperations(AutomationClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) {