diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IIntegrationRuntimeAuthKeysOperations.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IIntegrationRuntimeAuthKeysOperations.cs new file mode 100644 index 000000000000..09cc00a7067a --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IIntegrationRuntimeAuthKeysOperations.cs @@ -0,0 +1,93 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Synapse +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// IntegrationRuntimeAuthKeysOperations operations. + /// + public partial interface IIntegrationRuntimeAuthKeysOperations + { + /// + /// Regenerate integration runtime authentication key + /// + /// + /// Regenerate the authentication key for an integration runtime + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// Integration runtime name + /// + /// + /// The parameters for regenerating integration runtime authentication + /// key. + /// + /// + /// 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> RegenerateWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string integrationRuntimeName, IntegrationRuntimeRegenerateKeyParameters regenerateKeyParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// List integration runtime authentication keys + /// + /// + /// List authentication keys in an integration runtime + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// Integration runtime name + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> ListWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string integrationRuntimeName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IIntegrationRuntimeConnectionInfosOperations.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IIntegrationRuntimeConnectionInfosOperations.cs new file mode 100644 index 000000000000..f60b85845683 --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IIntegrationRuntimeConnectionInfosOperations.cs @@ -0,0 +1,58 @@ +// +// 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.Synapse +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// IntegrationRuntimeConnectionInfosOperations operations. + /// + public partial interface IIntegrationRuntimeConnectionInfosOperations + { + /// + /// Get integration runtime connection info + /// + /// + /// Get connection info for an integration runtime + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// Integration runtime name + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> GetWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string integrationRuntimeName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IIntegrationRuntimeCredentialsOperations.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IIntegrationRuntimeCredentialsOperations.cs new file mode 100644 index 000000000000..4775eb7b380e --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IIntegrationRuntimeCredentialsOperations.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.Synapse +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// IntegrationRuntimeCredentialsOperations operations. + /// + public partial interface IIntegrationRuntimeCredentialsOperations + { + /// + /// Sync integration runtime credentials + /// + /// + /// Force the integration runtime to synchronize credentials across + /// integration runtime nodes, and this will override the credentials + /// across all worker nodes with those available on the dispatcher + /// node. If you already have the latest credential backup file, you + /// should manually import it (preferred) on any self-hosted + /// integration runtime node than using this API directly. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// Integration runtime name + /// + /// + /// 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 SyncWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string integrationRuntimeName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IIntegrationRuntimeMonitoringDataOperations.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IIntegrationRuntimeMonitoringDataOperations.cs new file mode 100644 index 000000000000..475202f3c332 --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IIntegrationRuntimeMonitoringDataOperations.cs @@ -0,0 +1,58 @@ +// +// 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.Synapse +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// IntegrationRuntimeMonitoringDataOperations operations. + /// + public partial interface IIntegrationRuntimeMonitoringDataOperations + { + /// + /// Get integration runtime monitoring data + /// + /// + /// Get monitoring data for an integration runtime + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// Integration runtime name + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> GetWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string integrationRuntimeName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IIntegrationRuntimeNodeIpAddressOperations.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IIntegrationRuntimeNodeIpAddressOperations.cs new file mode 100644 index 000000000000..279d340942ce --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IIntegrationRuntimeNodeIpAddressOperations.cs @@ -0,0 +1,61 @@ +// +// 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.Synapse +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// IntegrationRuntimeNodeIpAddressOperations operations. + /// + public partial interface IIntegrationRuntimeNodeIpAddressOperations + { + /// + /// Get integration runtime node IP address + /// + /// + /// Get the IP address of an integration runtime node + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// Integration runtime name + /// + /// + /// Integration runtime node name + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> GetWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string integrationRuntimeName, string nodeName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IIntegrationRuntimeNodesOperations.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IIntegrationRuntimeNodesOperations.cs new file mode 100644 index 000000000000..bcb0c996f658 --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IIntegrationRuntimeNodesOperations.cs @@ -0,0 +1,129 @@ +// +// 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.Synapse +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// IntegrationRuntimeNodesOperations operations. + /// + public partial interface IIntegrationRuntimeNodesOperations + { + /// + /// Get integration runtime node + /// + /// + /// Get an integration runtime node + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// Integration runtime name + /// + /// + /// Integration runtime node name + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> GetWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string integrationRuntimeName, string nodeName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Create integration runtime node + /// + /// + /// Create an integration runtime node + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// Integration runtime name + /// + /// + /// Integration runtime node name + /// + /// + /// The parameters for updating an integration runtime node. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string integrationRuntimeName, string nodeName, UpdateIntegrationRuntimeNodeRequest updateIntegrationRuntimeNodeRequest, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Delete integration runtime node + /// + /// + /// Delete an integration runtime node + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// Integration runtime name + /// + /// + /// Integration runtime node name + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + Task DeleteWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string integrationRuntimeName, string nodeName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IIntegrationRuntimeObjectMetadataOperations.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IIntegrationRuntimeObjectMetadataOperations.cs new file mode 100644 index 000000000000..2db33f0b6fa9 --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IIntegrationRuntimeObjectMetadataOperations.cs @@ -0,0 +1,92 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Synapse +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// IntegrationRuntimeObjectMetadataOperations operations. + /// + public partial interface IIntegrationRuntimeObjectMetadataOperations + { + /// + /// Get integration runtime object metadata + /// + /// + /// Get object metadata from an integration runtime + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// Integration runtime name + /// + /// + /// The parameters for getting a SSIS object metadata. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> GetWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string integrationRuntimeName, GetSsisObjectMetadataRequest getMetadataRequest = default(GetSsisObjectMetadataRequest), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Refresh integration runtime object metadata + /// + /// + /// Refresh the object metadata in an integration runtime + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// Integration runtime name + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> RefreshWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string integrationRuntimeName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IIntegrationRuntimeStatusOperations.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IIntegrationRuntimeStatusOperations.cs new file mode 100644 index 000000000000..7f5521ed3155 --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IIntegrationRuntimeStatusOperations.cs @@ -0,0 +1,58 @@ +// +// 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.Synapse +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// IntegrationRuntimeStatusOperations operations. + /// + public partial interface IIntegrationRuntimeStatusOperations + { + /// + /// Get integration runtime status + /// + /// + /// Get the integration runtime status + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// Integration runtime name + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> GetWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string integrationRuntimeName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IIntegrationRuntimesOperations.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IIntegrationRuntimesOperations.cs new file mode 100644 index 000000000000..6b77b0f061ca --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IIntegrationRuntimesOperations.cs @@ -0,0 +1,304 @@ +// +// 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.Synapse +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// IntegrationRuntimesOperations operations. + /// + public partial interface IIntegrationRuntimesOperations + { + /// + /// Update integration runtime + /// + /// + /// Update an integration runtime + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// Integration runtime name + /// + /// + /// The parameters for updating an integration runtime. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string integrationRuntimeName, UpdateIntegrationRuntimeRequest updateIntegrationRuntimeRequest, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Get integration runtime + /// + /// + /// Get an integration runtime + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// Integration runtime name + /// + /// + /// ETag of the integration runtime entity. Should only be specified + /// for get. If the ETag matches the existing entity tag, or if * was + /// provided, then no content will be returned. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> GetWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string integrationRuntimeName, string ifNoneMatch = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Create integration runtime + /// + /// + /// Create an integration runtime + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// Integration runtime name + /// + /// + /// Integration runtime resource definition. + /// + /// + /// ETag of the integration runtime entity. Should only be specified + /// for update, for which it should match existing entity or can be * + /// for unconditional update. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> CreateWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string integrationRuntimeName, IntegrationRuntimeResource integrationRuntime, string ifMatch = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Delete integration runtime + /// + /// + /// Delete an integration runtime + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// Integration runtime name + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + Task DeleteWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string integrationRuntimeName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Upgrade integration runtime + /// + /// + /// Upgrade an integration runtime + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// Integration runtime name + /// + /// + /// 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 UpgradeWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string integrationRuntimeName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// List integration runtimes + /// + /// + /// List all integration runtimes + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// 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>> ListByWorkspaceWithHttpMessagesAsync(string resourceGroupName, string workspaceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Start integration runtime + /// + /// + /// Start an integration runtime + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// Integration runtime name + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> StartWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string integrationRuntimeName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Stop integration runtime + /// + /// + /// Stop an integration runtime + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// Integration runtime name + /// + /// + /// 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 StopWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string integrationRuntimeName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// List integration runtimes + /// + /// + /// List all integration runtimes + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListByWorkspaceNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/ISynapseManagementClient.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/ISynapseManagementClient.cs index 8cc2f5c8dfcf..ce162dce9014 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/ISynapseManagementClient.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/ISynapseManagementClient.cs @@ -199,5 +199,50 @@ public partial interface ISynapseManagementClient : System.IDisposable /// IWorkspaceManagedIdentitySqlControlSettingsOperations WorkspaceManagedIdentitySqlControlSettings { get; } + /// + /// Gets the IIntegrationRuntimesOperations. + /// + IIntegrationRuntimesOperations IntegrationRuntimes { get; } + + /// + /// Gets the IIntegrationRuntimeNodeIpAddressOperations. + /// + IIntegrationRuntimeNodeIpAddressOperations IntegrationRuntimeNodeIpAddress { get; } + + /// + /// Gets the IIntegrationRuntimeObjectMetadataOperations. + /// + IIntegrationRuntimeObjectMetadataOperations IntegrationRuntimeObjectMetadata { get; } + + /// + /// Gets the IIntegrationRuntimeNodesOperations. + /// + IIntegrationRuntimeNodesOperations IntegrationRuntimeNodes { get; } + + /// + /// Gets the IIntegrationRuntimeCredentialsOperations. + /// + IIntegrationRuntimeCredentialsOperations IntegrationRuntimeCredentials { get; } + + /// + /// Gets the IIntegrationRuntimeConnectionInfosOperations. + /// + IIntegrationRuntimeConnectionInfosOperations IntegrationRuntimeConnectionInfos { get; } + + /// + /// Gets the IIntegrationRuntimeAuthKeysOperations. + /// + IIntegrationRuntimeAuthKeysOperations IntegrationRuntimeAuthKeys { get; } + + /// + /// Gets the IIntegrationRuntimeMonitoringDataOperations. + /// + IIntegrationRuntimeMonitoringDataOperations IntegrationRuntimeMonitoringData { get; } + + /// + /// Gets the IIntegrationRuntimeStatusOperations. + /// + IIntegrationRuntimeStatusOperations IntegrationRuntimeStatus { get; } + } } diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IntegrationRuntimeAuthKeysOperations.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IntegrationRuntimeAuthKeysOperations.cs new file mode 100644 index 000000000000..b8a109902de3 --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IntegrationRuntimeAuthKeysOperations.cs @@ -0,0 +1,542 @@ +// +// 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.Synapse +{ + 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; + + /// + /// IntegrationRuntimeAuthKeysOperations operations. + /// + internal partial class IntegrationRuntimeAuthKeysOperations : IServiceOperations, IIntegrationRuntimeAuthKeysOperations + { + /// + /// Initializes a new instance of the IntegrationRuntimeAuthKeysOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal IntegrationRuntimeAuthKeysOperations(SynapseManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the SynapseManagementClient + /// + public SynapseManagementClient Client { get; private set; } + + /// + /// Regenerate integration runtime authentication key + /// + /// + /// Regenerate the authentication key for an integration runtime + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// Integration runtime name + /// + /// + /// The parameters for regenerating integration runtime authentication key. + /// + /// + /// 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> RegenerateWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string integrationRuntimeName, IntegrationRuntimeRegenerateKeyParameters regenerateKeyParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ApiVersion != null) + { + if (Client.ApiVersion.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); + } + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (Client.SubscriptionId != null) + { + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } + if (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 (workspaceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "workspaceName"); + } + if (integrationRuntimeName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "integrationRuntimeName"); + } + if (regenerateKeyParameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "regenerateKeyParameters"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("workspaceName", workspaceName); + tracingParameters.Add("integrationRuntimeName", integrationRuntimeName); + tracingParameters.Add("regenerateKeyParameters", regenerateKeyParameters); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Regenerate", 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.Synapse/workspaces/{workspaceName}/integrationRuntimes/{integrationRuntimeName}/regenerateAuthKey").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{workspaceName}", System.Uri.EscapeDataString(workspaceName)); + _url = _url.Replace("{integrationRuntimeName}", System.Uri.EscapeDataString(integrationRuntimeName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(regenerateKeyParameters != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(regenerateKeyParameters, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// List integration runtime authentication keys + /// + /// + /// List authentication keys in an integration runtime + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// Integration runtime name + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ListWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string integrationRuntimeName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ApiVersion != null) + { + if (Client.ApiVersion.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); + } + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (Client.SubscriptionId != null) + { + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } + if (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 (workspaceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "workspaceName"); + } + if (integrationRuntimeName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "integrationRuntimeName"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("workspaceName", workspaceName); + tracingParameters.Add("integrationRuntimeName", integrationRuntimeName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/integrationRuntimes/{integrationRuntimeName}/listAuthKeys").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{workspaceName}", System.Uri.EscapeDataString(workspaceName)); + _url = _url.Replace("{integrationRuntimeName}", System.Uri.EscapeDataString(integrationRuntimeName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IntegrationRuntimeAuthKeysOperationsExtensions.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IntegrationRuntimeAuthKeysOperationsExtensions.cs new file mode 100644 index 000000000000..664c8c014ac6 --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IntegrationRuntimeAuthKeysOperationsExtensions.cs @@ -0,0 +1,135 @@ +// +// 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.Synapse +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for IntegrationRuntimeAuthKeysOperations. + /// + public static partial class IntegrationRuntimeAuthKeysOperationsExtensions + { + /// + /// Regenerate integration runtime authentication key + /// + /// + /// Regenerate the authentication key for an integration runtime + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// Integration runtime name + /// + /// + /// The parameters for regenerating integration runtime authentication key. + /// + public static IntegrationRuntimeAuthKeys Regenerate(this IIntegrationRuntimeAuthKeysOperations operations, string resourceGroupName, string workspaceName, string integrationRuntimeName, IntegrationRuntimeRegenerateKeyParameters regenerateKeyParameters) + { + return operations.RegenerateAsync(resourceGroupName, workspaceName, integrationRuntimeName, regenerateKeyParameters).GetAwaiter().GetResult(); + } + + /// + /// Regenerate integration runtime authentication key + /// + /// + /// Regenerate the authentication key for an integration runtime + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// Integration runtime name + /// + /// + /// The parameters for regenerating integration runtime authentication key. + /// + /// + /// The cancellation token. + /// + public static async Task RegenerateAsync(this IIntegrationRuntimeAuthKeysOperations operations, string resourceGroupName, string workspaceName, string integrationRuntimeName, IntegrationRuntimeRegenerateKeyParameters regenerateKeyParameters, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.RegenerateWithHttpMessagesAsync(resourceGroupName, workspaceName, integrationRuntimeName, regenerateKeyParameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// List integration runtime authentication keys + /// + /// + /// List authentication keys in an integration runtime + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// Integration runtime name + /// + public static IntegrationRuntimeAuthKeys List(this IIntegrationRuntimeAuthKeysOperations operations, string resourceGroupName, string workspaceName, string integrationRuntimeName) + { + return operations.ListAsync(resourceGroupName, workspaceName, integrationRuntimeName).GetAwaiter().GetResult(); + } + + /// + /// List integration runtime authentication keys + /// + /// + /// List authentication keys in an integration runtime + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// Integration runtime name + /// + /// + /// The cancellation token. + /// + public static async Task ListAsync(this IIntegrationRuntimeAuthKeysOperations operations, string resourceGroupName, string workspaceName, string integrationRuntimeName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, workspaceName, integrationRuntimeName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IntegrationRuntimeConnectionInfosOperations.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IntegrationRuntimeConnectionInfosOperations.cs new file mode 100644 index 000000000000..136e137651f6 --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IntegrationRuntimeConnectionInfosOperations.cs @@ -0,0 +1,291 @@ +// +// 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.Synapse +{ + 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; + + /// + /// IntegrationRuntimeConnectionInfosOperations operations. + /// + internal partial class IntegrationRuntimeConnectionInfosOperations : IServiceOperations, IIntegrationRuntimeConnectionInfosOperations + { + /// + /// Initializes a new instance of the IntegrationRuntimeConnectionInfosOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal IntegrationRuntimeConnectionInfosOperations(SynapseManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the SynapseManagementClient + /// + public SynapseManagementClient Client { get; private set; } + + /// + /// Get integration runtime connection info + /// + /// + /// Get connection info for an integration runtime + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// Integration runtime name + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string integrationRuntimeName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ApiVersion != null) + { + if (Client.ApiVersion.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); + } + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (Client.SubscriptionId != null) + { + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } + if (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 (workspaceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "workspaceName"); + } + if (integrationRuntimeName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "integrationRuntimeName"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("workspaceName", workspaceName); + tracingParameters.Add("integrationRuntimeName", integrationRuntimeName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/integrationRuntimes/{integrationRuntimeName}/getConnectionInfo").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{workspaceName}", System.Uri.EscapeDataString(workspaceName)); + _url = _url.Replace("{integrationRuntimeName}", System.Uri.EscapeDataString(integrationRuntimeName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IntegrationRuntimeConnectionInfosOperationsExtensions.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IntegrationRuntimeConnectionInfosOperationsExtensions.cs new file mode 100644 index 000000000000..b51717d2e7cc --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IntegrationRuntimeConnectionInfosOperationsExtensions.cs @@ -0,0 +1,77 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Synapse +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for IntegrationRuntimeConnectionInfosOperations. + /// + public static partial class IntegrationRuntimeConnectionInfosOperationsExtensions + { + /// + /// Get integration runtime connection info + /// + /// + /// Get connection info for an integration runtime + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// Integration runtime name + /// + public static IntegrationRuntimeConnectionInfo Get(this IIntegrationRuntimeConnectionInfosOperations operations, string resourceGroupName, string workspaceName, string integrationRuntimeName) + { + return operations.GetAsync(resourceGroupName, workspaceName, integrationRuntimeName).GetAwaiter().GetResult(); + } + + /// + /// Get integration runtime connection info + /// + /// + /// Get connection info for an integration runtime + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// Integration runtime name + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this IIntegrationRuntimeConnectionInfosOperations operations, string resourceGroupName, string workspaceName, string integrationRuntimeName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, workspaceName, integrationRuntimeName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IntegrationRuntimeCredentialsOperations.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IntegrationRuntimeCredentialsOperations.cs new file mode 100644 index 000000000000..fcacb8449e39 --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IntegrationRuntimeCredentialsOperations.cs @@ -0,0 +1,274 @@ +// +// 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.Synapse +{ + 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; + + /// + /// IntegrationRuntimeCredentialsOperations operations. + /// + internal partial class IntegrationRuntimeCredentialsOperations : IServiceOperations, IIntegrationRuntimeCredentialsOperations + { + /// + /// Initializes a new instance of the IntegrationRuntimeCredentialsOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal IntegrationRuntimeCredentialsOperations(SynapseManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the SynapseManagementClient + /// + public SynapseManagementClient Client { get; private set; } + + /// + /// Sync integration runtime credentials + /// + /// + /// Force the integration runtime to synchronize credentials across integration + /// runtime nodes, and this will override the credentials across all worker + /// nodes with those available on the dispatcher node. If you already have the + /// latest credential backup file, you should manually import it (preferred) on + /// any self-hosted integration runtime node than using this API directly. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// Integration runtime name + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task SyncWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string integrationRuntimeName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ApiVersion != null) + { + if (Client.ApiVersion.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); + } + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (Client.SubscriptionId != null) + { + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } + if (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 (workspaceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "workspaceName"); + } + if (integrationRuntimeName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "integrationRuntimeName"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("workspaceName", workspaceName); + tracingParameters.Add("integrationRuntimeName", integrationRuntimeName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Sync", 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.Synapse/workspaces/{workspaceName}/integrationRuntimes/{integrationRuntimeName}/syncCredentials").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{workspaceName}", System.Uri.EscapeDataString(workspaceName)); + _url = _url.Replace("{integrationRuntimeName}", System.Uri.EscapeDataString(integrationRuntimeName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IntegrationRuntimeCredentialsOperationsExtensions.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IntegrationRuntimeCredentialsOperationsExtensions.cs new file mode 100644 index 000000000000..a240570a2ba5 --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IntegrationRuntimeCredentialsOperationsExtensions.cs @@ -0,0 +1,82 @@ +// +// 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.Synapse +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for IntegrationRuntimeCredentialsOperations. + /// + public static partial class IntegrationRuntimeCredentialsOperationsExtensions + { + /// + /// Sync integration runtime credentials + /// + /// + /// Force the integration runtime to synchronize credentials across integration + /// runtime nodes, and this will override the credentials across all worker + /// nodes with those available on the dispatcher node. If you already have the + /// latest credential backup file, you should manually import it (preferred) on + /// any self-hosted integration runtime node than using this API directly. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// Integration runtime name + /// + public static void Sync(this IIntegrationRuntimeCredentialsOperations operations, string resourceGroupName, string workspaceName, string integrationRuntimeName) + { + operations.SyncAsync(resourceGroupName, workspaceName, integrationRuntimeName).GetAwaiter().GetResult(); + } + + /// + /// Sync integration runtime credentials + /// + /// + /// Force the integration runtime to synchronize credentials across integration + /// runtime nodes, and this will override the credentials across all worker + /// nodes with those available on the dispatcher node. If you already have the + /// latest credential backup file, you should manually import it (preferred) on + /// any self-hosted integration runtime node than using this API directly. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// Integration runtime name + /// + /// + /// The cancellation token. + /// + public static async Task SyncAsync(this IIntegrationRuntimeCredentialsOperations operations, string resourceGroupName, string workspaceName, string integrationRuntimeName, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.SyncWithHttpMessagesAsync(resourceGroupName, workspaceName, integrationRuntimeName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IntegrationRuntimeMonitoringDataOperations.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IntegrationRuntimeMonitoringDataOperations.cs new file mode 100644 index 000000000000..9dfcd86b6198 --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IntegrationRuntimeMonitoringDataOperations.cs @@ -0,0 +1,291 @@ +// +// 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.Synapse +{ + 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; + + /// + /// IntegrationRuntimeMonitoringDataOperations operations. + /// + internal partial class IntegrationRuntimeMonitoringDataOperations : IServiceOperations, IIntegrationRuntimeMonitoringDataOperations + { + /// + /// Initializes a new instance of the IntegrationRuntimeMonitoringDataOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal IntegrationRuntimeMonitoringDataOperations(SynapseManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the SynapseManagementClient + /// + public SynapseManagementClient Client { get; private set; } + + /// + /// Get integration runtime monitoring data + /// + /// + /// Get monitoring data for an integration runtime + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// Integration runtime name + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string integrationRuntimeName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ApiVersion != null) + { + if (Client.ApiVersion.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); + } + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (Client.SubscriptionId != null) + { + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } + if (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 (workspaceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "workspaceName"); + } + if (integrationRuntimeName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "integrationRuntimeName"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("workspaceName", workspaceName); + tracingParameters.Add("integrationRuntimeName", integrationRuntimeName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/integrationRuntimes/{integrationRuntimeName}/monitoringData").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{workspaceName}", System.Uri.EscapeDataString(workspaceName)); + _url = _url.Replace("{integrationRuntimeName}", System.Uri.EscapeDataString(integrationRuntimeName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IntegrationRuntimeMonitoringDataOperationsExtensions.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IntegrationRuntimeMonitoringDataOperationsExtensions.cs new file mode 100644 index 000000000000..e9fbe5733bb5 --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IntegrationRuntimeMonitoringDataOperationsExtensions.cs @@ -0,0 +1,77 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Synapse +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for IntegrationRuntimeMonitoringDataOperations. + /// + public static partial class IntegrationRuntimeMonitoringDataOperationsExtensions + { + /// + /// Get integration runtime monitoring data + /// + /// + /// Get monitoring data for an integration runtime + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// Integration runtime name + /// + public static IntegrationRuntimeMonitoringData Get(this IIntegrationRuntimeMonitoringDataOperations operations, string resourceGroupName, string workspaceName, string integrationRuntimeName) + { + return operations.GetAsync(resourceGroupName, workspaceName, integrationRuntimeName).GetAwaiter().GetResult(); + } + + /// + /// Get integration runtime monitoring data + /// + /// + /// Get monitoring data for an integration runtime + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// Integration runtime name + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this IIntegrationRuntimeMonitoringDataOperations operations, string resourceGroupName, string workspaceName, string integrationRuntimeName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, workspaceName, integrationRuntimeName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IntegrationRuntimeNodeIpAddressOperations.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IntegrationRuntimeNodeIpAddressOperations.cs new file mode 100644 index 000000000000..97bedf98bd8c --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IntegrationRuntimeNodeIpAddressOperations.cs @@ -0,0 +1,300 @@ +// +// 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.Synapse +{ + 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; + + /// + /// IntegrationRuntimeNodeIpAddressOperations operations. + /// + internal partial class IntegrationRuntimeNodeIpAddressOperations : IServiceOperations, IIntegrationRuntimeNodeIpAddressOperations + { + /// + /// Initializes a new instance of the IntegrationRuntimeNodeIpAddressOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal IntegrationRuntimeNodeIpAddressOperations(SynapseManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the SynapseManagementClient + /// + public SynapseManagementClient Client { get; private set; } + + /// + /// Get integration runtime node IP address + /// + /// + /// Get the IP address of an integration runtime node + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// Integration runtime name + /// + /// + /// Integration runtime node name + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string integrationRuntimeName, string nodeName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ApiVersion != null) + { + if (Client.ApiVersion.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); + } + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (Client.SubscriptionId != null) + { + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } + if (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 (workspaceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "workspaceName"); + } + if (integrationRuntimeName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "integrationRuntimeName"); + } + if (nodeName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "nodeName"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("workspaceName", workspaceName); + tracingParameters.Add("integrationRuntimeName", integrationRuntimeName); + tracingParameters.Add("nodeName", nodeName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/integrationRuntimes/{integrationRuntimeName}/nodes/{nodeName}/ipAddress").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{workspaceName}", System.Uri.EscapeDataString(workspaceName)); + _url = _url.Replace("{integrationRuntimeName}", System.Uri.EscapeDataString(integrationRuntimeName)); + _url = _url.Replace("{nodeName}", System.Uri.EscapeDataString(nodeName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IntegrationRuntimeNodeIpAddressOperationsExtensions.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IntegrationRuntimeNodeIpAddressOperationsExtensions.cs new file mode 100644 index 000000000000..248b29b93f33 --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IntegrationRuntimeNodeIpAddressOperationsExtensions.cs @@ -0,0 +1,83 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Synapse +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for IntegrationRuntimeNodeIpAddressOperations. + /// + public static partial class IntegrationRuntimeNodeIpAddressOperationsExtensions + { + /// + /// Get integration runtime node IP address + /// + /// + /// Get the IP address of an integration runtime node + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// Integration runtime name + /// + /// + /// Integration runtime node name + /// + public static IntegrationRuntimeNodeIpAddress Get(this IIntegrationRuntimeNodeIpAddressOperations operations, string resourceGroupName, string workspaceName, string integrationRuntimeName, string nodeName) + { + return operations.GetAsync(resourceGroupName, workspaceName, integrationRuntimeName, nodeName).GetAwaiter().GetResult(); + } + + /// + /// Get integration runtime node IP address + /// + /// + /// Get the IP address of an integration runtime node + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// Integration runtime name + /// + /// + /// Integration runtime node name + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this IIntegrationRuntimeNodeIpAddressOperations operations, string resourceGroupName, string workspaceName, string integrationRuntimeName, string nodeName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, workspaceName, integrationRuntimeName, nodeName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IntegrationRuntimeNodesOperations.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IntegrationRuntimeNodesOperations.cs new file mode 100644 index 000000000000..bc40021074dc --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IntegrationRuntimeNodesOperations.cs @@ -0,0 +1,785 @@ +// +// 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.Synapse +{ + 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; + + /// + /// IntegrationRuntimeNodesOperations operations. + /// + internal partial class IntegrationRuntimeNodesOperations : IServiceOperations, IIntegrationRuntimeNodesOperations + { + /// + /// Initializes a new instance of the IntegrationRuntimeNodesOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal IntegrationRuntimeNodesOperations(SynapseManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the SynapseManagementClient + /// + public SynapseManagementClient Client { get; private set; } + + /// + /// Get integration runtime node + /// + /// + /// Get an integration runtime node + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// Integration runtime name + /// + /// + /// Integration runtime node name + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string integrationRuntimeName, string nodeName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ApiVersion != null) + { + if (Client.ApiVersion.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); + } + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (Client.SubscriptionId != null) + { + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } + if (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 (workspaceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "workspaceName"); + } + if (integrationRuntimeName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "integrationRuntimeName"); + } + if (nodeName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "nodeName"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("workspaceName", workspaceName); + tracingParameters.Add("integrationRuntimeName", integrationRuntimeName); + tracingParameters.Add("nodeName", nodeName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/integrationRuntimes/{integrationRuntimeName}/nodes/{nodeName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{workspaceName}", System.Uri.EscapeDataString(workspaceName)); + _url = _url.Replace("{integrationRuntimeName}", System.Uri.EscapeDataString(integrationRuntimeName)); + _url = _url.Replace("{nodeName}", System.Uri.EscapeDataString(nodeName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Create integration runtime node + /// + /// + /// Create an integration runtime node + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// Integration runtime name + /// + /// + /// Integration runtime node name + /// + /// + /// The parameters for updating an integration runtime node. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string integrationRuntimeName, string nodeName, UpdateIntegrationRuntimeNodeRequest updateIntegrationRuntimeNodeRequest, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ApiVersion != null) + { + if (Client.ApiVersion.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); + } + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (Client.SubscriptionId != null) + { + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } + if (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 (workspaceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "workspaceName"); + } + if (integrationRuntimeName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "integrationRuntimeName"); + } + if (nodeName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "nodeName"); + } + if (updateIntegrationRuntimeNodeRequest == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "updateIntegrationRuntimeNodeRequest"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("workspaceName", workspaceName); + tracingParameters.Add("integrationRuntimeName", integrationRuntimeName); + tracingParameters.Add("nodeName", nodeName); + tracingParameters.Add("updateIntegrationRuntimeNodeRequest", updateIntegrationRuntimeNodeRequest); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Update", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/integrationRuntimes/{integrationRuntimeName}/nodes/{nodeName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{workspaceName}", System.Uri.EscapeDataString(workspaceName)); + _url = _url.Replace("{integrationRuntimeName}", System.Uri.EscapeDataString(integrationRuntimeName)); + _url = _url.Replace("{nodeName}", System.Uri.EscapeDataString(nodeName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(updateIntegrationRuntimeNodeRequest != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(updateIntegrationRuntimeNodeRequest, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Delete integration runtime node + /// + /// + /// Delete an integration runtime node + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// Integration runtime name + /// + /// + /// Integration runtime node name + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string integrationRuntimeName, string nodeName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ApiVersion != null) + { + if (Client.ApiVersion.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); + } + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (Client.SubscriptionId != null) + { + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } + if (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 (workspaceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "workspaceName"); + } + if (integrationRuntimeName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "integrationRuntimeName"); + } + if (nodeName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "nodeName"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("workspaceName", workspaceName); + tracingParameters.Add("integrationRuntimeName", integrationRuntimeName); + tracingParameters.Add("nodeName", nodeName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Delete", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/integrationRuntimes/{integrationRuntimeName}/nodes/{nodeName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{workspaceName}", System.Uri.EscapeDataString(workspaceName)); + _url = _url.Replace("{integrationRuntimeName}", System.Uri.EscapeDataString(integrationRuntimeName)); + _url = _url.Replace("{nodeName}", System.Uri.EscapeDataString(nodeName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 204) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IntegrationRuntimeNodesOperationsExtensions.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IntegrationRuntimeNodesOperationsExtensions.cs new file mode 100644 index 000000000000..d3414a7df823 --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IntegrationRuntimeNodesOperationsExtensions.cs @@ -0,0 +1,202 @@ +// +// 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.Synapse +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for IntegrationRuntimeNodesOperations. + /// + public static partial class IntegrationRuntimeNodesOperationsExtensions + { + /// + /// Get integration runtime node + /// + /// + /// Get an integration runtime node + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// Integration runtime name + /// + /// + /// Integration runtime node name + /// + public static SelfHostedIntegrationRuntimeNode Get(this IIntegrationRuntimeNodesOperations operations, string resourceGroupName, string workspaceName, string integrationRuntimeName, string nodeName) + { + return operations.GetAsync(resourceGroupName, workspaceName, integrationRuntimeName, nodeName).GetAwaiter().GetResult(); + } + + /// + /// Get integration runtime node + /// + /// + /// Get an integration runtime node + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// Integration runtime name + /// + /// + /// Integration runtime node name + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this IIntegrationRuntimeNodesOperations operations, string resourceGroupName, string workspaceName, string integrationRuntimeName, string nodeName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, workspaceName, integrationRuntimeName, nodeName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Create integration runtime node + /// + /// + /// Create an integration runtime node + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// Integration runtime name + /// + /// + /// Integration runtime node name + /// + /// + /// The parameters for updating an integration runtime node. + /// + public static SelfHostedIntegrationRuntimeNode Update(this IIntegrationRuntimeNodesOperations operations, string resourceGroupName, string workspaceName, string integrationRuntimeName, string nodeName, UpdateIntegrationRuntimeNodeRequest updateIntegrationRuntimeNodeRequest) + { + return operations.UpdateAsync(resourceGroupName, workspaceName, integrationRuntimeName, nodeName, updateIntegrationRuntimeNodeRequest).GetAwaiter().GetResult(); + } + + /// + /// Create integration runtime node + /// + /// + /// Create an integration runtime node + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// Integration runtime name + /// + /// + /// Integration runtime node name + /// + /// + /// The parameters for updating an integration runtime node. + /// + /// + /// The cancellation token. + /// + public static async Task UpdateAsync(this IIntegrationRuntimeNodesOperations operations, string resourceGroupName, string workspaceName, string integrationRuntimeName, string nodeName, UpdateIntegrationRuntimeNodeRequest updateIntegrationRuntimeNodeRequest, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, workspaceName, integrationRuntimeName, nodeName, updateIntegrationRuntimeNodeRequest, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Delete integration runtime node + /// + /// + /// Delete an integration runtime node + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// Integration runtime name + /// + /// + /// Integration runtime node name + /// + public static void Delete(this IIntegrationRuntimeNodesOperations operations, string resourceGroupName, string workspaceName, string integrationRuntimeName, string nodeName) + { + operations.DeleteAsync(resourceGroupName, workspaceName, integrationRuntimeName, nodeName).GetAwaiter().GetResult(); + } + + /// + /// Delete integration runtime node + /// + /// + /// Delete an integration runtime node + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// Integration runtime name + /// + /// + /// Integration runtime node name + /// + /// + /// The cancellation token. + /// + public static async Task DeleteAsync(this IIntegrationRuntimeNodesOperations operations, string resourceGroupName, string workspaceName, string integrationRuntimeName, string nodeName, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, workspaceName, integrationRuntimeName, nodeName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IntegrationRuntimeObjectMetadataOperations.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IntegrationRuntimeObjectMetadataOperations.cs new file mode 100644 index 000000000000..2deab43388b6 --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IntegrationRuntimeObjectMetadataOperations.cs @@ -0,0 +1,538 @@ +// +// 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.Synapse +{ + 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; + + /// + /// IntegrationRuntimeObjectMetadataOperations operations. + /// + internal partial class IntegrationRuntimeObjectMetadataOperations : IServiceOperations, IIntegrationRuntimeObjectMetadataOperations + { + /// + /// Initializes a new instance of the IntegrationRuntimeObjectMetadataOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal IntegrationRuntimeObjectMetadataOperations(SynapseManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the SynapseManagementClient + /// + public SynapseManagementClient Client { get; private set; } + + /// + /// Get integration runtime object metadata + /// + /// + /// Get object metadata from an integration runtime + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// Integration runtime name + /// + /// + /// The parameters for getting a SSIS object metadata. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string integrationRuntimeName, GetSsisObjectMetadataRequest getMetadataRequest = default(GetSsisObjectMetadataRequest), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ApiVersion != null) + { + if (Client.ApiVersion.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); + } + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (Client.SubscriptionId != null) + { + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } + if (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 (workspaceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "workspaceName"); + } + if (integrationRuntimeName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "integrationRuntimeName"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("workspaceName", workspaceName); + tracingParameters.Add("integrationRuntimeName", integrationRuntimeName); + tracingParameters.Add("getMetadataRequest", getMetadataRequest); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/integrationRuntimes/{integrationRuntimeName}/getObjectMetadata").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{workspaceName}", System.Uri.EscapeDataString(workspaceName)); + _url = _url.Replace("{integrationRuntimeName}", System.Uri.EscapeDataString(integrationRuntimeName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(getMetadataRequest != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(getMetadataRequest, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Refresh integration runtime object metadata + /// + /// + /// Refresh the object metadata in an integration runtime + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// Integration runtime name + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> RefreshWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string integrationRuntimeName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ApiVersion != null) + { + if (Client.ApiVersion.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); + } + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (Client.SubscriptionId != null) + { + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } + if (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 (workspaceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "workspaceName"); + } + if (integrationRuntimeName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "integrationRuntimeName"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("workspaceName", workspaceName); + tracingParameters.Add("integrationRuntimeName", integrationRuntimeName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Refresh", 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.Synapse/workspaces/{workspaceName}/integrationRuntimes/{integrationRuntimeName}/refreshObjectMetadata").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{workspaceName}", System.Uri.EscapeDataString(workspaceName)); + _url = _url.Replace("{integrationRuntimeName}", System.Uri.EscapeDataString(integrationRuntimeName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) + { + 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/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IntegrationRuntimeObjectMetadataOperationsExtensions.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IntegrationRuntimeObjectMetadataOperationsExtensions.cs new file mode 100644 index 000000000000..b618149321fb --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IntegrationRuntimeObjectMetadataOperationsExtensions.cs @@ -0,0 +1,135 @@ +// +// 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.Synapse +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for IntegrationRuntimeObjectMetadataOperations. + /// + public static partial class IntegrationRuntimeObjectMetadataOperationsExtensions + { + /// + /// Get integration runtime object metadata + /// + /// + /// Get object metadata from an integration runtime + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// Integration runtime name + /// + /// + /// The parameters for getting a SSIS object metadata. + /// + public static SsisObjectMetadataListResponse Get(this IIntegrationRuntimeObjectMetadataOperations operations, string resourceGroupName, string workspaceName, string integrationRuntimeName, GetSsisObjectMetadataRequest getMetadataRequest = default(GetSsisObjectMetadataRequest)) + { + return operations.GetAsync(resourceGroupName, workspaceName, integrationRuntimeName, getMetadataRequest).GetAwaiter().GetResult(); + } + + /// + /// Get integration runtime object metadata + /// + /// + /// Get object metadata from an integration runtime + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// Integration runtime name + /// + /// + /// The parameters for getting a SSIS object metadata. + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this IIntegrationRuntimeObjectMetadataOperations operations, string resourceGroupName, string workspaceName, string integrationRuntimeName, GetSsisObjectMetadataRequest getMetadataRequest = default(GetSsisObjectMetadataRequest), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, workspaceName, integrationRuntimeName, getMetadataRequest, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Refresh integration runtime object metadata + /// + /// + /// Refresh the object metadata in an integration runtime + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// Integration runtime name + /// + public static SsisObjectMetadataStatusResponse Refresh(this IIntegrationRuntimeObjectMetadataOperations operations, string resourceGroupName, string workspaceName, string integrationRuntimeName) + { + return operations.RefreshAsync(resourceGroupName, workspaceName, integrationRuntimeName).GetAwaiter().GetResult(); + } + + /// + /// Refresh integration runtime object metadata + /// + /// + /// Refresh the object metadata in an integration runtime + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// Integration runtime name + /// + /// + /// The cancellation token. + /// + public static async Task RefreshAsync(this IIntegrationRuntimeObjectMetadataOperations operations, string resourceGroupName, string workspaceName, string integrationRuntimeName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.RefreshWithHttpMessagesAsync(resourceGroupName, workspaceName, integrationRuntimeName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IntegrationRuntimeStatusOperations.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IntegrationRuntimeStatusOperations.cs new file mode 100644 index 000000000000..9b25d3e9ac77 --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IntegrationRuntimeStatusOperations.cs @@ -0,0 +1,291 @@ +// +// 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.Synapse +{ + 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; + + /// + /// IntegrationRuntimeStatusOperations operations. + /// + internal partial class IntegrationRuntimeStatusOperations : IServiceOperations, IIntegrationRuntimeStatusOperations + { + /// + /// Initializes a new instance of the IntegrationRuntimeStatusOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal IntegrationRuntimeStatusOperations(SynapseManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the SynapseManagementClient + /// + public SynapseManagementClient Client { get; private set; } + + /// + /// Get integration runtime status + /// + /// + /// Get the integration runtime status + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// Integration runtime name + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string integrationRuntimeName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ApiVersion != null) + { + if (Client.ApiVersion.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); + } + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (Client.SubscriptionId != null) + { + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } + if (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 (workspaceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "workspaceName"); + } + if (integrationRuntimeName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "integrationRuntimeName"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("workspaceName", workspaceName); + tracingParameters.Add("integrationRuntimeName", integrationRuntimeName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/integrationRuntimes/{integrationRuntimeName}/getStatus").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{workspaceName}", System.Uri.EscapeDataString(workspaceName)); + _url = _url.Replace("{integrationRuntimeName}", System.Uri.EscapeDataString(integrationRuntimeName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IntegrationRuntimeStatusOperationsExtensions.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IntegrationRuntimeStatusOperationsExtensions.cs new file mode 100644 index 000000000000..3ce3f8a8b6a9 --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IntegrationRuntimeStatusOperationsExtensions.cs @@ -0,0 +1,77 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Synapse +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for IntegrationRuntimeStatusOperations. + /// + public static partial class IntegrationRuntimeStatusOperationsExtensions + { + /// + /// Get integration runtime status + /// + /// + /// Get the integration runtime status + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// Integration runtime name + /// + public static IntegrationRuntimeStatusResponse Get(this IIntegrationRuntimeStatusOperations operations, string resourceGroupName, string workspaceName, string integrationRuntimeName) + { + return operations.GetAsync(resourceGroupName, workspaceName, integrationRuntimeName).GetAwaiter().GetResult(); + } + + /// + /// Get integration runtime status + /// + /// + /// Get the integration runtime status + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// Integration runtime name + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this IIntegrationRuntimeStatusOperations operations, string resourceGroupName, string workspaceName, string integrationRuntimeName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, workspaceName, integrationRuntimeName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IntegrationRuntimesOperations.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IntegrationRuntimesOperations.cs new file mode 100644 index 000000000000..7cf2b6fa0736 --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IntegrationRuntimesOperations.cs @@ -0,0 +1,2114 @@ +// +// 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.Synapse +{ + 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; + + /// + /// IntegrationRuntimesOperations operations. + /// + internal partial class IntegrationRuntimesOperations : IServiceOperations, IIntegrationRuntimesOperations + { + /// + /// Initializes a new instance of the IntegrationRuntimesOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal IntegrationRuntimesOperations(SynapseManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the SynapseManagementClient + /// + public SynapseManagementClient Client { get; private set; } + + /// + /// Update integration runtime + /// + /// + /// Update an integration runtime + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// Integration runtime name + /// + /// + /// The parameters for updating an integration runtime. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string integrationRuntimeName, UpdateIntegrationRuntimeRequest updateIntegrationRuntimeRequest, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ApiVersion != null) + { + if (Client.ApiVersion.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); + } + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (Client.SubscriptionId != null) + { + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } + if (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 (workspaceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "workspaceName"); + } + if (integrationRuntimeName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "integrationRuntimeName"); + } + if (updateIntegrationRuntimeRequest == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "updateIntegrationRuntimeRequest"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("workspaceName", workspaceName); + tracingParameters.Add("integrationRuntimeName", integrationRuntimeName); + tracingParameters.Add("updateIntegrationRuntimeRequest", updateIntegrationRuntimeRequest); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Update", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/integrationRuntimes/{integrationRuntimeName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{workspaceName}", System.Uri.EscapeDataString(workspaceName)); + _url = _url.Replace("{integrationRuntimeName}", System.Uri.EscapeDataString(integrationRuntimeName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(updateIntegrationRuntimeRequest != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(updateIntegrationRuntimeRequest, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Get integration runtime + /// + /// + /// Get an integration runtime + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// Integration runtime name + /// + /// + /// ETag of the integration runtime entity. Should only be specified for get. + /// If the ETag matches the existing entity tag, or if * was provided, then no + /// content will be returned. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string integrationRuntimeName, string ifNoneMatch = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ApiVersion != null) + { + if (Client.ApiVersion.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); + } + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (Client.SubscriptionId != null) + { + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } + if (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 (workspaceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "workspaceName"); + } + if (integrationRuntimeName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "integrationRuntimeName"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("workspaceName", workspaceName); + tracingParameters.Add("integrationRuntimeName", integrationRuntimeName); + tracingParameters.Add("ifNoneMatch", ifNoneMatch); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/integrationRuntimes/{integrationRuntimeName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{workspaceName}", System.Uri.EscapeDataString(workspaceName)); + _url = _url.Replace("{integrationRuntimeName}", System.Uri.EscapeDataString(integrationRuntimeName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (ifNoneMatch != null) + { + if (_httpRequest.Headers.Contains("If-None-Match")) + { + _httpRequest.Headers.Remove("If-None-Match"); + } + _httpRequest.Headers.TryAddWithoutValidation("If-None-Match", ifNoneMatch); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 304) + { + 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; + } + + /// + /// Create integration runtime + /// + /// + /// Create an integration runtime + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// Integration runtime name + /// + /// + /// Integration runtime resource definition. + /// + /// + /// ETag of the integration runtime entity. Should only be specified for + /// update, for which it should match existing entity or can be * for + /// unconditional update. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> CreateWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string integrationRuntimeName, IntegrationRuntimeResource integrationRuntime, string ifMatch = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ApiVersion != null) + { + if (Client.ApiVersion.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); + } + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (Client.SubscriptionId != null) + { + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } + if (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 (workspaceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "workspaceName"); + } + if (integrationRuntimeName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "integrationRuntimeName"); + } + if (integrationRuntime == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "integrationRuntime"); + } + if (integrationRuntime != null) + { + integrationRuntime.Validate(); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("workspaceName", workspaceName); + tracingParameters.Add("integrationRuntimeName", integrationRuntimeName); + tracingParameters.Add("ifMatch", ifMatch); + tracingParameters.Add("integrationRuntime", integrationRuntime); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Create", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/integrationRuntimes/{integrationRuntimeName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{workspaceName}", System.Uri.EscapeDataString(workspaceName)); + _url = _url.Replace("{integrationRuntimeName}", System.Uri.EscapeDataString(integrationRuntimeName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (ifMatch != null) + { + if (_httpRequest.Headers.Contains("If-Match")) + { + _httpRequest.Headers.Remove("If-Match"); + } + _httpRequest.Headers.TryAddWithoutValidation("If-Match", ifMatch); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(integrationRuntime != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(integrationRuntime, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Delete integration runtime + /// + /// + /// Delete an integration runtime + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// Integration runtime name + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string integrationRuntimeName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ApiVersion != null) + { + if (Client.ApiVersion.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); + } + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (Client.SubscriptionId != null) + { + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } + if (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 (workspaceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "workspaceName"); + } + if (integrationRuntimeName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "integrationRuntimeName"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("workspaceName", workspaceName); + tracingParameters.Add("integrationRuntimeName", integrationRuntimeName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Delete", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/integrationRuntimes/{integrationRuntimeName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{workspaceName}", System.Uri.EscapeDataString(workspaceName)); + _url = _url.Replace("{integrationRuntimeName}", System.Uri.EscapeDataString(integrationRuntimeName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 204) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Upgrade integration runtime + /// + /// + /// Upgrade an integration runtime + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// Integration runtime name + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task UpgradeWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string integrationRuntimeName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ApiVersion != null) + { + if (Client.ApiVersion.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); + } + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (Client.SubscriptionId != null) + { + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } + if (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 (workspaceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "workspaceName"); + } + if (integrationRuntimeName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "integrationRuntimeName"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("workspaceName", workspaceName); + tracingParameters.Add("integrationRuntimeName", integrationRuntimeName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Upgrade", 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.Synapse/workspaces/{workspaceName}/integrationRuntimes/{integrationRuntimeName}/upgrade").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{workspaceName}", System.Uri.EscapeDataString(workspaceName)); + _url = _url.Replace("{integrationRuntimeName}", System.Uri.EscapeDataString(integrationRuntimeName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// List integration runtimes + /// + /// + /// List all integration runtimes + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// 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>> ListByWorkspaceWithHttpMessagesAsync(string resourceGroupName, string workspaceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ApiVersion != null) + { + if (Client.ApiVersion.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); + } + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (Client.SubscriptionId != null) + { + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } + if (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 (workspaceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "workspaceName"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("workspaceName", workspaceName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByWorkspace", 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.Synapse/workspaces/{workspaceName}/integrationRuntimes").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{workspaceName}", System.Uri.EscapeDataString(workspaceName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Start integration runtime + /// + /// + /// Start an integration runtime + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// Integration runtime name + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> StartWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string integrationRuntimeName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ApiVersion != null) + { + if (Client.ApiVersion.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); + } + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (Client.SubscriptionId != null) + { + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } + if (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 (workspaceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "workspaceName"); + } + if (integrationRuntimeName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "integrationRuntimeName"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("workspaceName", workspaceName); + tracingParameters.Add("integrationRuntimeName", integrationRuntimeName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Start", 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.Synapse/workspaces/{workspaceName}/integrationRuntimes/{integrationRuntimeName}/start").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{workspaceName}", System.Uri.EscapeDataString(workspaceName)); + _url = _url.Replace("{integrationRuntimeName}", System.Uri.EscapeDataString(integrationRuntimeName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) + { + 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; + } + + /// + /// Stop integration runtime + /// + /// + /// Stop an integration runtime + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// Integration runtime name + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task StopWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string integrationRuntimeName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ApiVersion != null) + { + if (Client.ApiVersion.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); + } + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (Client.SubscriptionId != null) + { + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } + if (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 (workspaceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "workspaceName"); + } + if (integrationRuntimeName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "integrationRuntimeName"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("workspaceName", workspaceName); + tracingParameters.Add("integrationRuntimeName", integrationRuntimeName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Stop", 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.Synapse/workspaces/{workspaceName}/integrationRuntimes/{integrationRuntimeName}/stop").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{workspaceName}", System.Uri.EscapeDataString(workspaceName)); + _url = _url.Replace("{integrationRuntimeName}", System.Uri.EscapeDataString(integrationRuntimeName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// List integration runtimes + /// + /// + /// List all integration runtimes + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task>> ListByWorkspaceNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (nextPageLink == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("nextPageLink", nextPageLink); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByWorkspaceNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + List _queryParameters = new List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IntegrationRuntimesOperationsExtensions.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IntegrationRuntimesOperationsExtensions.cs new file mode 100644 index 000000000000..5cfec801faec --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IntegrationRuntimesOperationsExtensions.cs @@ -0,0 +1,498 @@ +// +// 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.Synapse +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for IntegrationRuntimesOperations. + /// + public static partial class IntegrationRuntimesOperationsExtensions + { + /// + /// Update integration runtime + /// + /// + /// Update an integration runtime + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// Integration runtime name + /// + /// + /// The parameters for updating an integration runtime. + /// + public static IntegrationRuntimeResource Update(this IIntegrationRuntimesOperations operations, string resourceGroupName, string workspaceName, string integrationRuntimeName, UpdateIntegrationRuntimeRequest updateIntegrationRuntimeRequest) + { + return operations.UpdateAsync(resourceGroupName, workspaceName, integrationRuntimeName, updateIntegrationRuntimeRequest).GetAwaiter().GetResult(); + } + + /// + /// Update integration runtime + /// + /// + /// Update an integration runtime + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// Integration runtime name + /// + /// + /// The parameters for updating an integration runtime. + /// + /// + /// The cancellation token. + /// + public static async Task UpdateAsync(this IIntegrationRuntimesOperations operations, string resourceGroupName, string workspaceName, string integrationRuntimeName, UpdateIntegrationRuntimeRequest updateIntegrationRuntimeRequest, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, workspaceName, integrationRuntimeName, updateIntegrationRuntimeRequest, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Get integration runtime + /// + /// + /// Get an integration runtime + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// Integration runtime name + /// + /// + /// ETag of the integration runtime entity. Should only be specified for get. + /// If the ETag matches the existing entity tag, or if * was provided, then no + /// content will be returned. + /// + public static IntegrationRuntimeResource Get(this IIntegrationRuntimesOperations operations, string resourceGroupName, string workspaceName, string integrationRuntimeName, string ifNoneMatch = default(string)) + { + return operations.GetAsync(resourceGroupName, workspaceName, integrationRuntimeName, ifNoneMatch).GetAwaiter().GetResult(); + } + + /// + /// Get integration runtime + /// + /// + /// Get an integration runtime + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// Integration runtime name + /// + /// + /// ETag of the integration runtime entity. Should only be specified for get. + /// If the ETag matches the existing entity tag, or if * was provided, then no + /// content will be returned. + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this IIntegrationRuntimesOperations operations, string resourceGroupName, string workspaceName, string integrationRuntimeName, string ifNoneMatch = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, workspaceName, integrationRuntimeName, ifNoneMatch, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Create integration runtime + /// + /// + /// Create an integration runtime + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// Integration runtime name + /// + /// + /// Integration runtime resource definition. + /// + /// + /// ETag of the integration runtime entity. Should only be specified for + /// update, for which it should match existing entity or can be * for + /// unconditional update. + /// + public static IntegrationRuntimeResource Create(this IIntegrationRuntimesOperations operations, string resourceGroupName, string workspaceName, string integrationRuntimeName, IntegrationRuntimeResource integrationRuntime, string ifMatch = default(string)) + { + return operations.CreateAsync(resourceGroupName, workspaceName, integrationRuntimeName, integrationRuntime, ifMatch).GetAwaiter().GetResult(); + } + + /// + /// Create integration runtime + /// + /// + /// Create an integration runtime + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// Integration runtime name + /// + /// + /// Integration runtime resource definition. + /// + /// + /// ETag of the integration runtime entity. Should only be specified for + /// update, for which it should match existing entity or can be * for + /// unconditional update. + /// + /// + /// The cancellation token. + /// + public static async Task CreateAsync(this IIntegrationRuntimesOperations operations, string resourceGroupName, string workspaceName, string integrationRuntimeName, IntegrationRuntimeResource integrationRuntime, string ifMatch = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateWithHttpMessagesAsync(resourceGroupName, workspaceName, integrationRuntimeName, integrationRuntime, ifMatch, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Delete integration runtime + /// + /// + /// Delete an integration runtime + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// Integration runtime name + /// + public static void Delete(this IIntegrationRuntimesOperations operations, string resourceGroupName, string workspaceName, string integrationRuntimeName) + { + operations.DeleteAsync(resourceGroupName, workspaceName, integrationRuntimeName).GetAwaiter().GetResult(); + } + + /// + /// Delete integration runtime + /// + /// + /// Delete an integration runtime + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// Integration runtime name + /// + /// + /// The cancellation token. + /// + public static async Task DeleteAsync(this IIntegrationRuntimesOperations operations, string resourceGroupName, string workspaceName, string integrationRuntimeName, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, workspaceName, integrationRuntimeName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Upgrade integration runtime + /// + /// + /// Upgrade an integration runtime + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// Integration runtime name + /// + public static void Upgrade(this IIntegrationRuntimesOperations operations, string resourceGroupName, string workspaceName, string integrationRuntimeName) + { + operations.UpgradeAsync(resourceGroupName, workspaceName, integrationRuntimeName).GetAwaiter().GetResult(); + } + + /// + /// Upgrade integration runtime + /// + /// + /// Upgrade an integration runtime + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// Integration runtime name + /// + /// + /// The cancellation token. + /// + public static async Task UpgradeAsync(this IIntegrationRuntimesOperations operations, string resourceGroupName, string workspaceName, string integrationRuntimeName, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.UpgradeWithHttpMessagesAsync(resourceGroupName, workspaceName, integrationRuntimeName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// List integration runtimes + /// + /// + /// List all integration runtimes + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + public static IPage ListByWorkspace(this IIntegrationRuntimesOperations operations, string resourceGroupName, string workspaceName) + { + return operations.ListByWorkspaceAsync(resourceGroupName, workspaceName).GetAwaiter().GetResult(); + } + + /// + /// List integration runtimes + /// + /// + /// List all integration runtimes + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// The cancellation token. + /// + public static async Task> ListByWorkspaceAsync(this IIntegrationRuntimesOperations operations, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByWorkspaceWithHttpMessagesAsync(resourceGroupName, workspaceName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Start integration runtime + /// + /// + /// Start an integration runtime + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// Integration runtime name + /// + public static IntegrationRuntimeStatusResponse Start(this IIntegrationRuntimesOperations operations, string resourceGroupName, string workspaceName, string integrationRuntimeName) + { + return operations.StartAsync(resourceGroupName, workspaceName, integrationRuntimeName).GetAwaiter().GetResult(); + } + + /// + /// Start integration runtime + /// + /// + /// Start an integration runtime + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// Integration runtime name + /// + /// + /// The cancellation token. + /// + public static async Task StartAsync(this IIntegrationRuntimesOperations operations, string resourceGroupName, string workspaceName, string integrationRuntimeName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.StartWithHttpMessagesAsync(resourceGroupName, workspaceName, integrationRuntimeName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Stop integration runtime + /// + /// + /// Stop an integration runtime + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// Integration runtime name + /// + public static void Stop(this IIntegrationRuntimesOperations operations, string resourceGroupName, string workspaceName, string integrationRuntimeName) + { + operations.StopAsync(resourceGroupName, workspaceName, integrationRuntimeName).GetAwaiter().GetResult(); + } + + /// + /// Stop integration runtime + /// + /// + /// Stop an integration runtime + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// Integration runtime name + /// + /// + /// The cancellation token. + /// + public static async Task StopAsync(this IIntegrationRuntimesOperations operations, string resourceGroupName, string workspaceName, string integrationRuntimeName, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.StopWithHttpMessagesAsync(resourceGroupName, workspaceName, integrationRuntimeName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// List integration runtimes + /// + /// + /// List all integration runtimes + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListByWorkspaceNext(this IIntegrationRuntimesOperations operations, string nextPageLink) + { + return operations.ListByWorkspaceNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// List integration runtimes + /// + /// + /// List all integration runtimes + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByWorkspaceNextAsync(this IIntegrationRuntimesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByWorkspaceNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/CmdkeySetup.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/CmdkeySetup.cs new file mode 100644 index 000000000000..febc57fd713d --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/CmdkeySetup.cs @@ -0,0 +1,92 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Synapse.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Linq; + + /// + /// The custom setup of running cmdkey commands. + /// + [Rest.Serialization.JsonTransformation] + public partial class CmdkeySetup : CustomSetupBase + { + /// + /// Initializes a new instance of the CmdkeySetup class. + /// + public CmdkeySetup() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the CmdkeySetup class. + /// + /// The server name of data source + /// access. + /// The user name of data source access. + /// The password of data source access. + public CmdkeySetup(object targetName, object userName, SecretBase password) + { + TargetName = targetName; + UserName = userName; + Password = password; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the server name of data source access. + /// + [JsonProperty(PropertyName = "typeProperties.targetName")] + public object TargetName { get; set; } + + /// + /// Gets or sets the user name of data source access. + /// + [JsonProperty(PropertyName = "typeProperties.userName")] + public object UserName { get; set; } + + /// + /// Gets or sets the password of data source access. + /// + [JsonProperty(PropertyName = "typeProperties.password")] + public SecretBase Password { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (TargetName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "TargetName"); + } + if (UserName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "UserName"); + } + if (Password == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Password"); + } + } + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/ComponentSetup.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/ComponentSetup.cs new file mode 100644 index 000000000000..a169067a5e03 --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/ComponentSetup.cs @@ -0,0 +1,77 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Synapse.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Linq; + + /// + /// The custom setup of installing 3rd party components. + /// + [Rest.Serialization.JsonTransformation] + public partial class ComponentSetup : CustomSetupBase + { + /// + /// Initializes a new instance of the ComponentSetup class. + /// + public ComponentSetup() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ComponentSetup class. + /// + /// The name of the 3rd party + /// component. + /// The license key to activate the + /// component. + public ComponentSetup(string componentName, SecretBase licenseKey = default(SecretBase)) + { + ComponentName = componentName; + LicenseKey = licenseKey; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the name of the 3rd party component. + /// + [JsonProperty(PropertyName = "typeProperties.componentName")] + public string ComponentName { get; set; } + + /// + /// Gets or sets the license key to activate the component. + /// + [JsonProperty(PropertyName = "typeProperties.licenseKey")] + public SecretBase LicenseKey { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (ComponentName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ComponentName"); + } + } + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/CustomSetupBase.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/CustomSetupBase.cs new file mode 100644 index 000000000000..0c380de02ff8 --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/CustomSetupBase.cs @@ -0,0 +1,35 @@ +// +// 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.Synapse.Models +{ + using System.Linq; + + /// + /// The base definition of the custom setup. + /// + public partial class CustomSetupBase + { + /// + /// Initializes a new instance of the CustomSetupBase class. + /// + public CustomSetupBase() + { + CustomInit(); + } + + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/DataFlowComputeType.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/DataFlowComputeType.cs new file mode 100644 index 000000000000..4467cefe8ac5 --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/DataFlowComputeType.cs @@ -0,0 +1,23 @@ +// +// 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.Synapse.Models +{ + + /// + /// Defines values for DataFlowComputeType. + /// + public static class DataFlowComputeType + { + public const string General = "General"; + public const string MemoryOptimized = "MemoryOptimized"; + public const string ComputeOptimized = "ComputeOptimized"; + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/EntityReference.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/EntityReference.cs new file mode 100644 index 000000000000..5bce4e042bc6 --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/EntityReference.cs @@ -0,0 +1,63 @@ +// +// 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.Synapse.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// The entity reference. + /// + public partial class EntityReference + { + /// + /// Initializes a new instance of the EntityReference class. + /// + public EntityReference() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the EntityReference class. + /// + /// The type of this referenced entity. Possible + /// values include: 'IntegrationRuntimeReference', + /// 'LinkedServiceReference' + /// The name of this referenced + /// entity. + public EntityReference(string type = default(string), string referenceName = default(string)) + { + Type = type; + ReferenceName = referenceName; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the type of this referenced entity. Possible values + /// include: 'IntegrationRuntimeReference', 'LinkedServiceReference' + /// + [JsonProperty(PropertyName = "type")] + public string Type { get; set; } + + /// + /// Gets or sets the name of this referenced entity. + /// + [JsonProperty(PropertyName = "referenceName")] + public string ReferenceName { get; set; } + + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/EnvironmentVariableSetup.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/EnvironmentVariableSetup.cs new file mode 100644 index 000000000000..f6e9033ff337 --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/EnvironmentVariableSetup.cs @@ -0,0 +1,81 @@ +// +// 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.Synapse.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Linq; + + /// + /// The custom setup of setting environment variable. + /// + [Rest.Serialization.JsonTransformation] + public partial class EnvironmentVariableSetup : CustomSetupBase + { + /// + /// Initializes a new instance of the EnvironmentVariableSetup class. + /// + public EnvironmentVariableSetup() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the EnvironmentVariableSetup class. + /// + /// The name of the environment + /// variable. + /// The value of the environment + /// variable. + public EnvironmentVariableSetup(string variableName, string variableValue) + { + VariableName = variableName; + VariableValue = variableValue; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the name of the environment variable. + /// + [JsonProperty(PropertyName = "typeProperties.variableName")] + public string VariableName { get; set; } + + /// + /// Gets or sets the value of the environment variable. + /// + [JsonProperty(PropertyName = "typeProperties.variableValue")] + public string VariableValue { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (VariableName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "VariableName"); + } + if (VariableValue == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "VariableValue"); + } + } + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/GetSsisObjectMetadataRequest.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/GetSsisObjectMetadataRequest.cs new file mode 100644 index 000000000000..87574075943e --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/GetSsisObjectMetadataRequest.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.Synapse.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// The request payload of get SSIS object metadata. + /// + public partial class GetSsisObjectMetadataRequest + { + /// + /// Initializes a new instance of the GetSsisObjectMetadataRequest + /// class. + /// + public GetSsisObjectMetadataRequest() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the GetSsisObjectMetadataRequest + /// class. + /// + /// Metadata path. + public GetSsisObjectMetadataRequest(string metadataPath = default(string)) + { + MetadataPath = metadataPath; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets metadata path. + /// + [JsonProperty(PropertyName = "metadataPath")] + public string MetadataPath { get; set; } + + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/IntegrationRuntime.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/IntegrationRuntime.cs new file mode 100644 index 000000000000..f47ccb469af9 --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/IntegrationRuntime.cs @@ -0,0 +1,64 @@ +// +// 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.Synapse.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Azure Synapse nested object which serves as a compute resource for + /// activities. + /// + public partial class IntegrationRuntime + { + /// + /// Initializes a new instance of the IntegrationRuntime class. + /// + public IntegrationRuntime() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the IntegrationRuntime class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Integration runtime description. + public IntegrationRuntime(IDictionary additionalProperties = default(IDictionary), string description = default(string)) + { + AdditionalProperties = additionalProperties; + Description = description; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets unmatched properties from the message are deserialized + /// this collection + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Gets or sets integration runtime description. + /// + [JsonProperty(PropertyName = "description")] + public string Description { get; set; } + + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/IntegrationRuntimeAuthKeyName.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/IntegrationRuntimeAuthKeyName.cs new file mode 100644 index 000000000000..7fd4fe3afcf1 --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/IntegrationRuntimeAuthKeyName.cs @@ -0,0 +1,22 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Synapse.Models +{ + + /// + /// Defines values for IntegrationRuntimeAuthKeyName. + /// + public static class IntegrationRuntimeAuthKeyName + { + public const string AuthKey1 = "authKey1"; + public const string AuthKey2 = "authKey2"; + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/IntegrationRuntimeAuthKeys.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/IntegrationRuntimeAuthKeys.cs new file mode 100644 index 000000000000..bc9692e8c7c9 --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/IntegrationRuntimeAuthKeys.cs @@ -0,0 +1,61 @@ +// +// 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.Synapse.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// The integration runtime authentication keys. + /// + public partial class IntegrationRuntimeAuthKeys + { + /// + /// Initializes a new instance of the IntegrationRuntimeAuthKeys class. + /// + public IntegrationRuntimeAuthKeys() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the IntegrationRuntimeAuthKeys class. + /// + /// The primary integration runtime + /// authentication key. + /// The secondary integration runtime + /// authentication key. + public IntegrationRuntimeAuthKeys(string authKey1 = default(string), string authKey2 = default(string)) + { + AuthKey1 = authKey1; + AuthKey2 = authKey2; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the primary integration runtime authentication key. + /// + [JsonProperty(PropertyName = "authKey1")] + public string AuthKey1 { get; set; } + + /// + /// Gets or sets the secondary integration runtime authentication key. + /// + [JsonProperty(PropertyName = "authKey2")] + public string AuthKey2 { get; set; } + + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/IntegrationRuntimeAutoUpdate.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/IntegrationRuntimeAutoUpdate.cs new file mode 100644 index 000000000000..86908ffd028d --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/IntegrationRuntimeAutoUpdate.cs @@ -0,0 +1,22 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Synapse.Models +{ + + /// + /// Defines values for IntegrationRuntimeAutoUpdate. + /// + public static class IntegrationRuntimeAutoUpdate + { + public const string On = "On"; + public const string Off = "Off"; + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/IntegrationRuntimeComputeProperties.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/IntegrationRuntimeComputeProperties.cs new file mode 100644 index 000000000000..580433e100e0 --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/IntegrationRuntimeComputeProperties.cs @@ -0,0 +1,139 @@ +// +// 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.Synapse.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The compute resource properties for managed integration runtime. + /// + public partial class IntegrationRuntimeComputeProperties + { + /// + /// Initializes a new instance of the + /// IntegrationRuntimeComputeProperties class. + /// + public IntegrationRuntimeComputeProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// IntegrationRuntimeComputeProperties class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// The location for managed integration + /// runtime. The supported regions could be found on + /// https://docs.microsoft.com/en-us/azure/data-factory/data-factory-data-movement-activities + /// The node size requirement to managed + /// integration runtime. + /// The required number of nodes for + /// managed integration runtime. + /// Maximum parallel + /// executions count per node for managed integration runtime. + /// Data flow properties for managed + /// integration runtime. + /// VNet properties for managed + /// integration runtime. + public IntegrationRuntimeComputeProperties(IDictionary additionalProperties = default(IDictionary), string location = default(string), string nodeSize = default(string), int? numberOfNodes = default(int?), int? maxParallelExecutionsPerNode = default(int?), IntegrationRuntimeDataFlowProperties dataFlowProperties = default(IntegrationRuntimeDataFlowProperties), IntegrationRuntimeVNetProperties vNetProperties = default(IntegrationRuntimeVNetProperties)) + { + AdditionalProperties = additionalProperties; + Location = location; + NodeSize = nodeSize; + NumberOfNodes = numberOfNodes; + MaxParallelExecutionsPerNode = maxParallelExecutionsPerNode; + DataFlowProperties = dataFlowProperties; + VNetProperties = vNetProperties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets unmatched properties from the message are deserialized + /// this collection + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Gets or sets the location for managed integration runtime. The + /// supported regions could be found on + /// https://docs.microsoft.com/en-us/azure/data-factory/data-factory-data-movement-activities + /// + [JsonProperty(PropertyName = "location")] + public string Location { get; set; } + + /// + /// Gets or sets the node size requirement to managed integration + /// runtime. + /// + [JsonProperty(PropertyName = "nodeSize")] + public string NodeSize { get; set; } + + /// + /// Gets or sets the required number of nodes for managed integration + /// runtime. + /// + [JsonProperty(PropertyName = "numberOfNodes")] + public int? NumberOfNodes { get; set; } + + /// + /// Gets or sets maximum parallel executions count per node for managed + /// integration runtime. + /// + [JsonProperty(PropertyName = "maxParallelExecutionsPerNode")] + public int? MaxParallelExecutionsPerNode { get; set; } + + /// + /// Gets or sets data flow properties for managed integration runtime. + /// + [JsonProperty(PropertyName = "dataFlowProperties")] + public IntegrationRuntimeDataFlowProperties DataFlowProperties { get; set; } + + /// + /// Gets or sets vNet properties for managed integration runtime. + /// + [JsonProperty(PropertyName = "vNetProperties")] + public IntegrationRuntimeVNetProperties VNetProperties { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (NumberOfNodes < 1) + { + throw new ValidationException(ValidationRules.InclusiveMinimum, "NumberOfNodes", 1); + } + if (MaxParallelExecutionsPerNode < 1) + { + throw new ValidationException(ValidationRules.InclusiveMinimum, "MaxParallelExecutionsPerNode", 1); + } + if (DataFlowProperties != null) + { + DataFlowProperties.Validate(); + } + } + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/IntegrationRuntimeConnectionInfo.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/IntegrationRuntimeConnectionInfo.cs new file mode 100644 index 000000000000..2bcb79bf01b8 --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/IntegrationRuntimeConnectionInfo.cs @@ -0,0 +1,116 @@ +// +// 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.Synapse.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Connection information for encrypting the on-premises data source + /// credentials. + /// + public partial class IntegrationRuntimeConnectionInfo + { + /// + /// Initializes a new instance of the IntegrationRuntimeConnectionInfo + /// class. + /// + public IntegrationRuntimeConnectionInfo() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the IntegrationRuntimeConnectionInfo + /// class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// The token generated in service. Callers + /// use this token to authenticate to integration runtime. + /// The integration runtime SSL + /// certificate thumbprint. Click-Once application uses it to do server + /// validation. + /// The on-premises integration runtime + /// host URL. + /// The integration runtime version. + /// The public key for encrypting a credential + /// when transferring the credential to the integration + /// runtime. + /// Whether the identity + /// certificate is expired. + public IntegrationRuntimeConnectionInfo(IDictionary additionalProperties = default(IDictionary), string serviceToken = default(string), string identityCertThumbprint = default(string), string hostServiceUri = default(string), string version = default(string), string publicKey = default(string), bool? isIdentityCertExprired = default(bool?)) + { + AdditionalProperties = additionalProperties; + ServiceToken = serviceToken; + IdentityCertThumbprint = identityCertThumbprint; + HostServiceUri = hostServiceUri; + Version = version; + PublicKey = publicKey; + IsIdentityCertExprired = isIdentityCertExprired; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets unmatched properties from the message are deserialized + /// this collection + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Gets the token generated in service. Callers use this token to + /// authenticate to integration runtime. + /// + [JsonProperty(PropertyName = "serviceToken")] + public string ServiceToken { get; private set; } + + /// + /// Gets the integration runtime SSL certificate thumbprint. Click-Once + /// application uses it to do server validation. + /// + [JsonProperty(PropertyName = "identityCertThumbprint")] + public string IdentityCertThumbprint { get; private set; } + + /// + /// Gets the on-premises integration runtime host URL. + /// + [JsonProperty(PropertyName = "hostServiceUri")] + public string HostServiceUri { get; private set; } + + /// + /// Gets the integration runtime version. + /// + [JsonProperty(PropertyName = "version")] + public string Version { get; private set; } + + /// + /// Gets the public key for encrypting a credential when transferring + /// the credential to the integration runtime. + /// + [JsonProperty(PropertyName = "publicKey")] + public string PublicKey { get; private set; } + + /// + /// Gets whether the identity certificate is expired. + /// + [JsonProperty(PropertyName = "isIdentityCertExprired")] + public bool? IsIdentityCertExprired { get; private set; } + + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/IntegrationRuntimeCustomSetupScriptProperties.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/IntegrationRuntimeCustomSetupScriptProperties.cs new file mode 100644 index 000000000000..280a09228d4b --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/IntegrationRuntimeCustomSetupScriptProperties.cs @@ -0,0 +1,78 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Synapse.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Custom setup script properties for a managed dedicated integration + /// runtime. + /// + public partial class IntegrationRuntimeCustomSetupScriptProperties + { + /// + /// Initializes a new instance of the + /// IntegrationRuntimeCustomSetupScriptProperties class. + /// + public IntegrationRuntimeCustomSetupScriptProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// IntegrationRuntimeCustomSetupScriptProperties class. + /// + /// The URI of the Azure blob container + /// that contains the custom setup script. + /// The SAS token of the Azure blob + /// container. + public IntegrationRuntimeCustomSetupScriptProperties(string blobContainerUri = default(string), SecureString sasToken = default(SecureString)) + { + BlobContainerUri = blobContainerUri; + SasToken = sasToken; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the URI of the Azure blob container that contains the + /// custom setup script. + /// + [JsonProperty(PropertyName = "blobContainerUri")] + public string BlobContainerUri { get; set; } + + /// + /// Gets or sets the SAS token of the Azure blob container. + /// + [JsonProperty(PropertyName = "sasToken")] + public SecureString SasToken { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (SasToken != null) + { + SasToken.Validate(); + } + } + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/IntegrationRuntimeDataFlowProperties.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/IntegrationRuntimeDataFlowProperties.cs new file mode 100644 index 000000000000..746948808bf2 --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/IntegrationRuntimeDataFlowProperties.cs @@ -0,0 +1,104 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Synapse.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Data flow properties for managed integration runtime. + /// + public partial class IntegrationRuntimeDataFlowProperties + { + /// + /// Initializes a new instance of the + /// IntegrationRuntimeDataFlowProperties class. + /// + public IntegrationRuntimeDataFlowProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// IntegrationRuntimeDataFlowProperties class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Compute type of the cluster which will + /// execute data flow job. Possible values include: 'General', + /// 'MemoryOptimized', 'ComputeOptimized' + /// Core count of the cluster which will + /// execute data flow job. Supported values are: 8, 16, 32, 48, 80, 144 + /// and 272. + /// Time to live (in minutes) setting of the + /// cluster which will execute data flow job. + public IntegrationRuntimeDataFlowProperties(IDictionary additionalProperties = default(IDictionary), string computeType = default(string), int? coreCount = default(int?), int? timeToLive = default(int?)) + { + AdditionalProperties = additionalProperties; + ComputeType = computeType; + CoreCount = coreCount; + TimeToLive = timeToLive; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets unmatched properties from the message are deserialized + /// this collection + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Gets or sets compute type of the cluster which will execute data + /// flow job. Possible values include: 'General', 'MemoryOptimized', + /// 'ComputeOptimized' + /// + [JsonProperty(PropertyName = "computeType")] + public string ComputeType { get; set; } + + /// + /// Gets or sets core count of the cluster which will execute data flow + /// job. Supported values are: 8, 16, 32, 48, 80, 144 and 272. + /// + [JsonProperty(PropertyName = "coreCount")] + public int? CoreCount { get; set; } + + /// + /// Gets or sets time to live (in minutes) setting of the cluster which + /// will execute data flow job. + /// + [JsonProperty(PropertyName = "timeToLive")] + public int? TimeToLive { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (TimeToLive < 0) + { + throw new ValidationException(ValidationRules.InclusiveMinimum, "TimeToLive", 0); + } + } + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/IntegrationRuntimeDataProxyProperties.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/IntegrationRuntimeDataProxyProperties.cs new file mode 100644 index 000000000000..115c42866caa --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/IntegrationRuntimeDataProxyProperties.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.Synapse.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Data proxy properties for a managed dedicated integration runtime. + /// + public partial class IntegrationRuntimeDataProxyProperties + { + /// + /// Initializes a new instance of the + /// IntegrationRuntimeDataProxyProperties class. + /// + public IntegrationRuntimeDataProxyProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// IntegrationRuntimeDataProxyProperties class. + /// + /// The self-hosted integration runtime + /// reference. + /// The staging linked service + /// reference. + /// The path to contain the staged data in the Blob + /// storage. + public IntegrationRuntimeDataProxyProperties(EntityReference connectVia = default(EntityReference), EntityReference stagingLinkedService = default(EntityReference), string path = default(string)) + { + ConnectVia = connectVia; + StagingLinkedService = stagingLinkedService; + Path = path; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the self-hosted integration runtime reference. + /// + [JsonProperty(PropertyName = "connectVia")] + public EntityReference ConnectVia { get; set; } + + /// + /// Gets or sets the staging linked service reference. + /// + [JsonProperty(PropertyName = "stagingLinkedService")] + public EntityReference StagingLinkedService { get; set; } + + /// + /// Gets or sets the path to contain the staged data in the Blob + /// storage. + /// + [JsonProperty(PropertyName = "path")] + public string Path { get; set; } + + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/IntegrationRuntimeEdition.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/IntegrationRuntimeEdition.cs new file mode 100644 index 000000000000..7d4ec2b8568e --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/IntegrationRuntimeEdition.cs @@ -0,0 +1,22 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Synapse.Models +{ + + /// + /// Defines values for IntegrationRuntimeEdition. + /// + public static class IntegrationRuntimeEdition + { + public const string Standard = "Standard"; + public const string Enterprise = "Enterprise"; + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/IntegrationRuntimeEntityReferenceType.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/IntegrationRuntimeEntityReferenceType.cs new file mode 100644 index 000000000000..56a8c77b70d2 --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/IntegrationRuntimeEntityReferenceType.cs @@ -0,0 +1,22 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Synapse.Models +{ + + /// + /// Defines values for IntegrationRuntimeEntityReferenceType. + /// + public static class IntegrationRuntimeEntityReferenceType + { + public const string IntegrationRuntimeReference = "IntegrationRuntimeReference"; + public const string LinkedServiceReference = "LinkedServiceReference"; + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/IntegrationRuntimeInternalChannelEncryptionMode.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/IntegrationRuntimeInternalChannelEncryptionMode.cs new file mode 100644 index 000000000000..f5647b63a1d3 --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/IntegrationRuntimeInternalChannelEncryptionMode.cs @@ -0,0 +1,23 @@ +// +// 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.Synapse.Models +{ + + /// + /// Defines values for IntegrationRuntimeInternalChannelEncryptionMode. + /// + public static class IntegrationRuntimeInternalChannelEncryptionMode + { + public const string NotSet = "NotSet"; + public const string SslEncrypted = "SslEncrypted"; + public const string NotEncrypted = "NotEncrypted"; + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/IntegrationRuntimeLicenseType.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/IntegrationRuntimeLicenseType.cs new file mode 100644 index 000000000000..d42b1d7caaae --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/IntegrationRuntimeLicenseType.cs @@ -0,0 +1,22 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Synapse.Models +{ + + /// + /// Defines values for IntegrationRuntimeLicenseType. + /// + public static class IntegrationRuntimeLicenseType + { + public const string BasePrice = "BasePrice"; + public const string LicenseIncluded = "LicenseIncluded"; + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/IntegrationRuntimeMonitoringData.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/IntegrationRuntimeMonitoringData.cs new file mode 100644 index 000000000000..cdc3ac8a9325 --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/IntegrationRuntimeMonitoringData.cs @@ -0,0 +1,64 @@ +// +// 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.Synapse.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Get monitoring data response. + /// + public partial class IntegrationRuntimeMonitoringData + { + /// + /// Initializes a new instance of the IntegrationRuntimeMonitoringData + /// class. + /// + public IntegrationRuntimeMonitoringData() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the IntegrationRuntimeMonitoringData + /// class. + /// + /// Integration runtime name. + /// Integration runtime node monitoring + /// data. + public IntegrationRuntimeMonitoringData(string name = default(string), IList nodes = default(IList)) + { + Name = name; + Nodes = nodes; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets integration runtime name. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or sets integration runtime node monitoring data. + /// + [JsonProperty(PropertyName = "nodes")] + public IList Nodes { get; set; } + + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/IntegrationRuntimeNodeIpAddress.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/IntegrationRuntimeNodeIpAddress.cs new file mode 100644 index 000000000000..8c67148cf93e --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/IntegrationRuntimeNodeIpAddress.cs @@ -0,0 +1,54 @@ +// +// 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.Synapse.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// The IP address of self-hosted integration runtime node. + /// + public partial class IntegrationRuntimeNodeIpAddress + { + /// + /// Initializes a new instance of the IntegrationRuntimeNodeIpAddress + /// class. + /// + public IntegrationRuntimeNodeIpAddress() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the IntegrationRuntimeNodeIpAddress + /// class. + /// + /// The IP address of self-hosted integration + /// runtime node. + public IntegrationRuntimeNodeIpAddress(string ipAddress = default(string)) + { + IpAddress = ipAddress; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets the IP address of self-hosted integration runtime node. + /// + [JsonProperty(PropertyName = "ipAddress")] + public string IpAddress { get; private set; } + + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/IntegrationRuntimeNodeMonitoringData.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/IntegrationRuntimeNodeMonitoringData.cs new file mode 100644 index 000000000000..5d42b5663ff5 --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/IntegrationRuntimeNodeMonitoringData.cs @@ -0,0 +1,130 @@ +// +// 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.Synapse.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Monitoring data for integration runtime node. + /// + public partial class IntegrationRuntimeNodeMonitoringData + { + /// + /// Initializes a new instance of the + /// IntegrationRuntimeNodeMonitoringData class. + /// + public IntegrationRuntimeNodeMonitoringData() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// IntegrationRuntimeNodeMonitoringData class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Name of the integration runtime + /// node. + /// Available memory (MB) on the + /// integration runtime node. + /// CPU percentage on the integration + /// runtime node. + /// Maximum concurrent jobs on the + /// integration runtime node. + /// The number of jobs currently + /// running on the integration runtime node. + /// The maximum concurrent jobs in this + /// integration runtime. + /// Sent bytes on the integration runtime + /// node. + /// Received bytes on the integration + /// runtime node. + public IntegrationRuntimeNodeMonitoringData(IDictionary additionalProperties = default(IDictionary), string nodeName = default(string), int? availableMemoryInMB = default(int?), int? cpuUtilization = default(int?), int? concurrentJobsLimit = default(int?), int? concurrentJobsRunning = default(int?), int? maxConcurrentJobs = default(int?), double? sentBytes = default(double?), double? receivedBytes = default(double?)) + { + AdditionalProperties = additionalProperties; + NodeName = nodeName; + AvailableMemoryInMB = availableMemoryInMB; + CpuUtilization = cpuUtilization; + ConcurrentJobsLimit = concurrentJobsLimit; + ConcurrentJobsRunning = concurrentJobsRunning; + MaxConcurrentJobs = maxConcurrentJobs; + SentBytes = sentBytes; + ReceivedBytes = receivedBytes; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets unmatched properties from the message are deserialized + /// this collection + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Gets name of the integration runtime node. + /// + [JsonProperty(PropertyName = "nodeName")] + public string NodeName { get; private set; } + + /// + /// Gets available memory (MB) on the integration runtime node. + /// + [JsonProperty(PropertyName = "availableMemoryInMB")] + public int? AvailableMemoryInMB { get; private set; } + + /// + /// Gets CPU percentage on the integration runtime node. + /// + [JsonProperty(PropertyName = "cpuUtilization")] + public int? CpuUtilization { get; private set; } + + /// + /// Gets maximum concurrent jobs on the integration runtime node. + /// + [JsonProperty(PropertyName = "concurrentJobsLimit")] + public int? ConcurrentJobsLimit { get; private set; } + + /// + /// Gets the number of jobs currently running on the integration + /// runtime node. + /// + [JsonProperty(PropertyName = "concurrentJobsRunning")] + public int? ConcurrentJobsRunning { get; private set; } + + /// + /// Gets the maximum concurrent jobs in this integration runtime. + /// + [JsonProperty(PropertyName = "maxConcurrentJobs")] + public int? MaxConcurrentJobs { get; private set; } + + /// + /// Gets sent bytes on the integration runtime node. + /// + [JsonProperty(PropertyName = "sentBytes")] + public double? SentBytes { get; private set; } + + /// + /// Gets received bytes on the integration runtime node. + /// + [JsonProperty(PropertyName = "receivedBytes")] + public double? ReceivedBytes { get; private set; } + + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/IntegrationRuntimeRegenerateKeyParameters.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/IntegrationRuntimeRegenerateKeyParameters.cs new file mode 100644 index 000000000000..54f63ad682c9 --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/IntegrationRuntimeRegenerateKeyParameters.cs @@ -0,0 +1,55 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Synapse.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Parameters to regenerate the authentication key. + /// + public partial class IntegrationRuntimeRegenerateKeyParameters + { + /// + /// Initializes a new instance of the + /// IntegrationRuntimeRegenerateKeyParameters class. + /// + public IntegrationRuntimeRegenerateKeyParameters() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// IntegrationRuntimeRegenerateKeyParameters class. + /// + /// The name of the authentication key to + /// regenerate. Possible values include: 'authKey1', 'authKey2' + public IntegrationRuntimeRegenerateKeyParameters(string keyName = default(string)) + { + KeyName = keyName; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the name of the authentication key to regenerate. + /// Possible values include: 'authKey1', 'authKey2' + /// + [JsonProperty(PropertyName = "keyName")] + public string KeyName { get; set; } + + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/IntegrationRuntimeResource.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/IntegrationRuntimeResource.cs new file mode 100644 index 000000000000..4241f0fc7a8f --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/IntegrationRuntimeResource.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.Synapse.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Integration runtime resource type. + /// + public partial class IntegrationRuntimeResource : SubResource + { + /// + /// Initializes a new instance of the IntegrationRuntimeResource class. + /// + public IntegrationRuntimeResource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the IntegrationRuntimeResource class. + /// + /// Integration runtime properties. + /// The resource identifier. + /// The resource name. + /// The resource type. + /// Etag identifies change in the resource. + public IntegrationRuntimeResource(IntegrationRuntime properties, string id = default(string), string name = default(string), string type = default(string), string etag = default(string)) + : base(id, name, type, etag) + { + Properties = properties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets integration runtime properties. + /// + [JsonProperty(PropertyName = "properties")] + public IntegrationRuntime Properties { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Properties == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Properties"); + } + } + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/IntegrationRuntimeSsisCatalogInfo.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/IntegrationRuntimeSsisCatalogInfo.cs new file mode 100644 index 000000000000..064b08b14f23 --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/IntegrationRuntimeSsisCatalogInfo.cs @@ -0,0 +1,126 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Synapse.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Catalog information for managed dedicated integration runtime. + /// + public partial class IntegrationRuntimeSsisCatalogInfo + { + /// + /// Initializes a new instance of the IntegrationRuntimeSsisCatalogInfo + /// class. + /// + public IntegrationRuntimeSsisCatalogInfo() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the IntegrationRuntimeSsisCatalogInfo + /// class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// The catalog database server + /// URL. + /// The administrator user name of + /// catalog database. + /// The password of the + /// administrator user account of the catalog database. + /// The pricing tier for the catalog + /// database. The valid values could be found in + /// https://azure.microsoft.com/en-us/pricing/details/sql-database/. + /// Possible values include: 'Basic', 'Standard', 'Premium', + /// 'PremiumRS' + public IntegrationRuntimeSsisCatalogInfo(IDictionary additionalProperties = default(IDictionary), string catalogServerEndpoint = default(string), string catalogAdminUserName = default(string), SecureString catalogAdminPassword = default(SecureString), string catalogPricingTier = default(string)) + { + AdditionalProperties = additionalProperties; + CatalogServerEndpoint = catalogServerEndpoint; + CatalogAdminUserName = catalogAdminUserName; + CatalogAdminPassword = catalogAdminPassword; + CatalogPricingTier = catalogPricingTier; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets unmatched properties from the message are deserialized + /// this collection + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Gets or sets the catalog database server URL. + /// + [JsonProperty(PropertyName = "catalogServerEndpoint")] + public string CatalogServerEndpoint { get; set; } + + /// + /// Gets or sets the administrator user name of catalog database. + /// + [JsonProperty(PropertyName = "catalogAdminUserName")] + public string CatalogAdminUserName { get; set; } + + /// + /// Gets or sets the password of the administrator user account of the + /// catalog database. + /// + [JsonProperty(PropertyName = "catalogAdminPassword")] + public SecureString CatalogAdminPassword { get; set; } + + /// + /// Gets or sets the pricing tier for the catalog database. The valid + /// values could be found in + /// https://azure.microsoft.com/en-us/pricing/details/sql-database/. + /// Possible values include: 'Basic', 'Standard', 'Premium', + /// 'PremiumRS' + /// + [JsonProperty(PropertyName = "catalogPricingTier")] + public string CatalogPricingTier { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (CatalogAdminUserName != null) + { + if (CatalogAdminUserName.Length > 128) + { + throw new ValidationException(ValidationRules.MaxLength, "CatalogAdminUserName", 128); + } + if (CatalogAdminUserName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "CatalogAdminUserName", 1); + } + } + if (CatalogAdminPassword != null) + { + CatalogAdminPassword.Validate(); + } + } + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/IntegrationRuntimeSsisCatalogPricingTier.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/IntegrationRuntimeSsisCatalogPricingTier.cs new file mode 100644 index 000000000000..825ded62ff83 --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/IntegrationRuntimeSsisCatalogPricingTier.cs @@ -0,0 +1,24 @@ +// +// 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.Synapse.Models +{ + + /// + /// Defines values for IntegrationRuntimeSsisCatalogPricingTier. + /// + public static class IntegrationRuntimeSsisCatalogPricingTier + { + public const string Basic = "Basic"; + public const string Standard = "Standard"; + public const string Premium = "Premium"; + public const string PremiumRS = "PremiumRS"; + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/IntegrationRuntimeSsisProperties.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/IntegrationRuntimeSsisProperties.cs new file mode 100644 index 000000000000..e12e62bb8914 --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/IntegrationRuntimeSsisProperties.cs @@ -0,0 +1,135 @@ +// +// 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.Synapse.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// SSIS properties for managed integration runtime. + /// + public partial class IntegrationRuntimeSsisProperties + { + /// + /// Initializes a new instance of the IntegrationRuntimeSsisProperties + /// class. + /// + public IntegrationRuntimeSsisProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the IntegrationRuntimeSsisProperties + /// class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Catalog information for managed dedicated + /// integration runtime. + /// License type for bringing your own + /// license scenario. Possible values include: 'BasePrice', + /// 'LicenseIncluded' + /// Custom setup script + /// properties for a managed dedicated integration runtime. + /// Data proxy properties for a + /// managed dedicated integration runtime. + /// The edition for the SSIS Integration Runtime. + /// Possible values include: 'Standard', 'Enterprise' + /// Custom setup without + /// script properties for a SSIS integration runtime. + public IntegrationRuntimeSsisProperties(IDictionary additionalProperties = default(IDictionary), IntegrationRuntimeSsisCatalogInfo catalogInfo = default(IntegrationRuntimeSsisCatalogInfo), string licenseType = default(string), IntegrationRuntimeCustomSetupScriptProperties customSetupScriptProperties = default(IntegrationRuntimeCustomSetupScriptProperties), IntegrationRuntimeDataProxyProperties dataProxyProperties = default(IntegrationRuntimeDataProxyProperties), string edition = default(string), IList expressCustomSetupProperties = default(IList)) + { + AdditionalProperties = additionalProperties; + CatalogInfo = catalogInfo; + LicenseType = licenseType; + CustomSetupScriptProperties = customSetupScriptProperties; + DataProxyProperties = dataProxyProperties; + Edition = edition; + ExpressCustomSetupProperties = expressCustomSetupProperties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets unmatched properties from the message are deserialized + /// this collection + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Gets or sets catalog information for managed dedicated integration + /// runtime. + /// + [JsonProperty(PropertyName = "catalogInfo")] + public IntegrationRuntimeSsisCatalogInfo CatalogInfo { get; set; } + + /// + /// Gets or sets license type for bringing your own license scenario. + /// Possible values include: 'BasePrice', 'LicenseIncluded' + /// + [JsonProperty(PropertyName = "licenseType")] + public string LicenseType { get; set; } + + /// + /// Gets or sets custom setup script properties for a managed dedicated + /// integration runtime. + /// + [JsonProperty(PropertyName = "customSetupScriptProperties")] + public IntegrationRuntimeCustomSetupScriptProperties CustomSetupScriptProperties { get; set; } + + /// + /// Gets or sets data proxy properties for a managed dedicated + /// integration runtime. + /// + [JsonProperty(PropertyName = "dataProxyProperties")] + public IntegrationRuntimeDataProxyProperties DataProxyProperties { get; set; } + + /// + /// Gets or sets the edition for the SSIS Integration Runtime. Possible + /// values include: 'Standard', 'Enterprise' + /// + [JsonProperty(PropertyName = "edition")] + public string Edition { get; set; } + + /// + /// Gets or sets custom setup without script properties for a SSIS + /// integration runtime. + /// + [JsonProperty(PropertyName = "expressCustomSetupProperties")] + public IList ExpressCustomSetupProperties { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (CatalogInfo != null) + { + CatalogInfo.Validate(); + } + if (CustomSetupScriptProperties != null) + { + CustomSetupScriptProperties.Validate(); + } + } + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/IntegrationRuntimeState.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/IntegrationRuntimeState.cs new file mode 100644 index 000000000000..cc6b340917d0 --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/IntegrationRuntimeState.cs @@ -0,0 +1,30 @@ +// +// 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.Synapse.Models +{ + + /// + /// Defines values for IntegrationRuntimeState. + /// + public static class IntegrationRuntimeState + { + public const string Initial = "Initial"; + public const string Stopped = "Stopped"; + public const string Started = "Started"; + public const string Starting = "Starting"; + public const string Stopping = "Stopping"; + public const string NeedRegistration = "NeedRegistration"; + public const string Online = "Online"; + public const string Limited = "Limited"; + public const string Offline = "Offline"; + public const string AccessDenied = "AccessDenied"; + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/IntegrationRuntimeStatus.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/IntegrationRuntimeStatus.cs new file mode 100644 index 000000000000..c4e00102a95a --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/IntegrationRuntimeStatus.cs @@ -0,0 +1,77 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Synapse.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Integration runtime status. + /// + public partial class IntegrationRuntimeStatus + { + /// + /// Initializes a new instance of the IntegrationRuntimeStatus class. + /// + public IntegrationRuntimeStatus() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the IntegrationRuntimeStatus class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// The workspace name which the + /// integration runtime belong to. + /// The state of integration runtime. Possible + /// values include: 'Initial', 'Stopped', 'Started', 'Starting', + /// 'Stopping', 'NeedRegistration', 'Online', 'Limited', 'Offline', + /// 'AccessDenied' + public IntegrationRuntimeStatus(IDictionary additionalProperties = default(IDictionary), string dataFactoryName = default(string), string state = default(string)) + { + AdditionalProperties = additionalProperties; + DataFactoryName = dataFactoryName; + State = state; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets unmatched properties from the message are deserialized + /// this collection + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Gets the workspace name which the integration runtime belong to. + /// + [JsonProperty(PropertyName = "dataFactoryName")] + public string DataFactoryName { get; private set; } + + /// + /// Gets the state of integration runtime. Possible values include: + /// 'Initial', 'Stopped', 'Started', 'Starting', 'Stopping', + /// 'NeedRegistration', 'Online', 'Limited', 'Offline', 'AccessDenied' + /// + [JsonProperty(PropertyName = "state")] + public string State { get; private set; } + + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/IntegrationRuntimeStatusResponse.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/IntegrationRuntimeStatusResponse.cs new file mode 100644 index 000000000000..8b642c8f5066 --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/IntegrationRuntimeStatusResponse.cs @@ -0,0 +1,75 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Synapse.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Integration runtime status response. + /// + public partial class IntegrationRuntimeStatusResponse + { + /// + /// Initializes a new instance of the IntegrationRuntimeStatusResponse + /// class. + /// + public IntegrationRuntimeStatusResponse() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the IntegrationRuntimeStatusResponse + /// class. + /// + /// Integration runtime properties. + /// The integration runtime name. + public IntegrationRuntimeStatusResponse(IntegrationRuntimeStatus properties, string name = default(string)) + { + Name = name; + Properties = properties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets the integration runtime name. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; private set; } + + /// + /// Gets or sets integration runtime properties. + /// + [JsonProperty(PropertyName = "properties")] + public IntegrationRuntimeStatus Properties { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Properties == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Properties"); + } + } + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/IntegrationRuntimeType.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/IntegrationRuntimeType.cs new file mode 100644 index 000000000000..643a63edac35 --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/IntegrationRuntimeType.cs @@ -0,0 +1,22 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Synapse.Models +{ + + /// + /// Defines values for IntegrationRuntimeType. + /// + public static class IntegrationRuntimeType + { + public const string Managed = "Managed"; + public const string SelfHosted = "SelfHosted"; + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/IntegrationRuntimeUpdateResult.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/IntegrationRuntimeUpdateResult.cs new file mode 100644 index 000000000000..fd357d23c621 --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/IntegrationRuntimeUpdateResult.cs @@ -0,0 +1,23 @@ +// +// 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.Synapse.Models +{ + + /// + /// Defines values for IntegrationRuntimeUpdateResult. + /// + public static class IntegrationRuntimeUpdateResult + { + public const string None = "None"; + public const string Succeed = "Succeed"; + public const string Fail = "Fail"; + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/IntegrationRuntimeVNetProperties.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/IntegrationRuntimeVNetProperties.cs new file mode 100644 index 000000000000..1b930883ff22 --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/IntegrationRuntimeVNetProperties.cs @@ -0,0 +1,87 @@ +// +// 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.Synapse.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// VNet properties for managed integration runtime. + /// + public partial class IntegrationRuntimeVNetProperties + { + /// + /// Initializes a new instance of the IntegrationRuntimeVNetProperties + /// class. + /// + public IntegrationRuntimeVNetProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the IntegrationRuntimeVNetProperties + /// class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// The ID of the VNet that this integration + /// runtime will join. + /// The name of the subnet this integration + /// runtime will join. + /// Resource IDs of the public IP addresses + /// that this integration runtime will use. + public IntegrationRuntimeVNetProperties(IDictionary additionalProperties = default(IDictionary), string vNetId = default(string), string subnet = default(string), IList publicIPs = default(IList)) + { + AdditionalProperties = additionalProperties; + VNetId = vNetId; + Subnet = subnet; + PublicIPs = publicIPs; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets unmatched properties from the message are deserialized + /// this collection + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Gets or sets the ID of the VNet that this integration runtime will + /// join. + /// + [JsonProperty(PropertyName = "vNetId")] + public string VNetId { get; set; } + + /// + /// Gets or sets the name of the subnet this integration runtime will + /// join. + /// + [JsonProperty(PropertyName = "subnet")] + public string Subnet { get; set; } + + /// + /// Gets or sets resource IDs of the public IP addresses that this + /// integration runtime will use. + /// + [JsonProperty(PropertyName = "publicIPs")] + public IList PublicIPs { get; set; } + + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/LinkedIntegrationRuntime.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/LinkedIntegrationRuntime.cs new file mode 100644 index 000000000000..d6182ce5ba62 --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/LinkedIntegrationRuntime.cs @@ -0,0 +1,91 @@ +// +// 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.Synapse.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// The linked integration runtime information. + /// + public partial class LinkedIntegrationRuntime + { + /// + /// Initializes a new instance of the LinkedIntegrationRuntime class. + /// + public LinkedIntegrationRuntime() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the LinkedIntegrationRuntime class. + /// + /// The name of the linked integration + /// runtime. + /// The subscription ID for which the + /// linked integration runtime belong to. + /// The name of the workspace for which + /// the linked integration runtime belong to. + /// The location of the workspace for + /// which the linked integration runtime belong to. + /// The creating time of the linked + /// integration runtime. + public LinkedIntegrationRuntime(string name = default(string), string subscriptionId = default(string), string dataFactoryName = default(string), string dataFactoryLocation = default(string), System.DateTime? createTime = default(System.DateTime?)) + { + Name = name; + SubscriptionId = subscriptionId; + DataFactoryName = dataFactoryName; + DataFactoryLocation = dataFactoryLocation; + CreateTime = createTime; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets the name of the linked integration runtime. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; private set; } + + /// + /// Gets the subscription ID for which the linked integration runtime + /// belong to. + /// + [JsonProperty(PropertyName = "subscriptionId")] + public string SubscriptionId { get; private set; } + + /// + /// Gets the name of the workspace for which the linked integration + /// runtime belong to. + /// + [JsonProperty(PropertyName = "dataFactoryName")] + public string DataFactoryName { get; private set; } + + /// + /// Gets the location of the workspace for which the linked integration + /// runtime belong to. + /// + [JsonProperty(PropertyName = "dataFactoryLocation")] + public string DataFactoryLocation { get; private set; } + + /// + /// Gets the creating time of the linked integration runtime. + /// + [JsonProperty(PropertyName = "createTime")] + public System.DateTime? CreateTime { get; private set; } + + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/LinkedIntegrationRuntimeKeyAuthorization.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/LinkedIntegrationRuntimeKeyAuthorization.cs new file mode 100644 index 000000000000..61766fac65d6 --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/LinkedIntegrationRuntimeKeyAuthorization.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.Synapse.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// The key authorization type integration runtime. + /// + [Newtonsoft.Json.JsonObject("Key")] + public partial class LinkedIntegrationRuntimeKeyAuthorization : LinkedIntegrationRuntimeType + { + /// + /// Initializes a new instance of the + /// LinkedIntegrationRuntimeKeyAuthorization class. + /// + public LinkedIntegrationRuntimeKeyAuthorization() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// LinkedIntegrationRuntimeKeyAuthorization class. + /// + /// The key used for authorization. + public LinkedIntegrationRuntimeKeyAuthorization(SecureString key) + { + Key = key; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the key used for authorization. + /// + [JsonProperty(PropertyName = "key")] + public SecureString Key { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Key == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Key"); + } + if (Key != null) + { + Key.Validate(); + } + } + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/LinkedIntegrationRuntimeRbacAuthorization.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/LinkedIntegrationRuntimeRbacAuthorization.cs new file mode 100644 index 000000000000..2c54f380b702 --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/LinkedIntegrationRuntimeRbacAuthorization.cs @@ -0,0 +1,71 @@ +// +// 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.Synapse.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// The role based access control (RBAC) authorization type integration + /// runtime. + /// + [Newtonsoft.Json.JsonObject("RBAC")] + public partial class LinkedIntegrationRuntimeRbacAuthorization : LinkedIntegrationRuntimeType + { + /// + /// Initializes a new instance of the + /// LinkedIntegrationRuntimeRbacAuthorization class. + /// + public LinkedIntegrationRuntimeRbacAuthorization() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// LinkedIntegrationRuntimeRbacAuthorization class. + /// + /// The resource identifier of the integration + /// runtime to be shared. + public LinkedIntegrationRuntimeRbacAuthorization(string resourceId) + { + ResourceId = resourceId; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the resource identifier of the integration runtime to + /// be shared. + /// + [JsonProperty(PropertyName = "resourceId")] + public string ResourceId { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (ResourceId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ResourceId"); + } + } + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/LinkedIntegrationRuntimeType.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/LinkedIntegrationRuntimeType.cs new file mode 100644 index 000000000000..262a7a4d4a57 --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/LinkedIntegrationRuntimeType.cs @@ -0,0 +1,36 @@ +// +// 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.Synapse.Models +{ + using System.Linq; + + /// + /// The base definition of a linked integration runtime. + /// + public partial class LinkedIntegrationRuntimeType + { + /// + /// Initializes a new instance of the LinkedIntegrationRuntimeType + /// class. + /// + public LinkedIntegrationRuntimeType() + { + CustomInit(); + } + + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/ManagedIntegrationRuntime.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/ManagedIntegrationRuntime.cs new file mode 100644 index 000000000000..5d888b9bc8cf --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/ManagedIntegrationRuntime.cs @@ -0,0 +1,104 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Synapse.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Managed integration runtime, including managed elastic and managed + /// dedicated integration runtimes. + /// + [Newtonsoft.Json.JsonObject("Managed")] + [Rest.Serialization.JsonTransformation] + public partial class ManagedIntegrationRuntime : IntegrationRuntime + { + /// + /// Initializes a new instance of the ManagedIntegrationRuntime class. + /// + public ManagedIntegrationRuntime() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ManagedIntegrationRuntime class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Integration runtime description. + /// Integration runtime state, only valid for + /// managed dedicated integration runtime. Possible values include: + /// 'Initial', 'Stopped', 'Started', 'Starting', 'Stopping', + /// 'NeedRegistration', 'Online', 'Limited', 'Offline', + /// 'AccessDenied' + /// The compute resource for managed + /// integration runtime. + /// SSIS properties for managed + /// integration runtime. + public ManagedIntegrationRuntime(IDictionary additionalProperties = default(IDictionary), string description = default(string), string state = default(string), IntegrationRuntimeComputeProperties computeProperties = default(IntegrationRuntimeComputeProperties), IntegrationRuntimeSsisProperties ssisProperties = default(IntegrationRuntimeSsisProperties)) + : base(additionalProperties, description) + { + State = state; + ComputeProperties = computeProperties; + SsisProperties = ssisProperties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets integration runtime state, only valid for managed dedicated + /// integration runtime. Possible values include: 'Initial', 'Stopped', + /// 'Started', 'Starting', 'Stopping', 'NeedRegistration', 'Online', + /// 'Limited', 'Offline', 'AccessDenied' + /// + [JsonProperty(PropertyName = "state")] + public string State { get; private set; } + + /// + /// Gets or sets the compute resource for managed integration runtime. + /// + [JsonProperty(PropertyName = "typeProperties.computeProperties")] + public IntegrationRuntimeComputeProperties ComputeProperties { get; set; } + + /// + /// Gets or sets SSIS properties for managed integration runtime. + /// + [JsonProperty(PropertyName = "typeProperties.ssisProperties")] + public IntegrationRuntimeSsisProperties SsisProperties { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (ComputeProperties != null) + { + ComputeProperties.Validate(); + } + if (SsisProperties != null) + { + SsisProperties.Validate(); + } + } + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/ManagedIntegrationRuntimeError.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/ManagedIntegrationRuntimeError.cs new file mode 100644 index 000000000000..e41e852dbd4b --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/ManagedIntegrationRuntimeError.cs @@ -0,0 +1,90 @@ +// +// 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.Synapse.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Error definition for managed integration runtime. + /// + public partial class ManagedIntegrationRuntimeError + { + /// + /// Initializes a new instance of the ManagedIntegrationRuntimeError + /// class. + /// + public ManagedIntegrationRuntimeError() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ManagedIntegrationRuntimeError + /// class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// The time when the error occurred. + /// Error code. + /// Managed integration runtime error + /// parameters. + /// Error message. + public ManagedIntegrationRuntimeError(IDictionary additionalProperties = default(IDictionary), System.DateTime? time = default(System.DateTime?), string code = default(string), IList parameters = default(IList), string message = default(string)) + { + AdditionalProperties = additionalProperties; + Time = time; + Code = code; + Parameters = parameters; + Message = message; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets unmatched properties from the message are deserialized + /// this collection + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Gets the time when the error occurred. + /// + [JsonProperty(PropertyName = "time")] + public System.DateTime? Time { get; private set; } + + /// + /// Gets error code. + /// + [JsonProperty(PropertyName = "code")] + public string Code { get; private set; } + + /// + /// Gets managed integration runtime error parameters. + /// + [JsonProperty(PropertyName = "parameters")] + public IList Parameters { get; private set; } + + /// + /// Gets error message. + /// + [JsonProperty(PropertyName = "message")] + public string Message { get; private set; } + + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/ManagedIntegrationRuntimeNode.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/ManagedIntegrationRuntimeNode.cs new file mode 100644 index 000000000000..aa82515b3ea2 --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/ManagedIntegrationRuntimeNode.cs @@ -0,0 +1,87 @@ +// +// 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.Synapse.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Properties of integration runtime node. + /// + public partial class ManagedIntegrationRuntimeNode + { + /// + /// Initializes a new instance of the ManagedIntegrationRuntimeNode + /// class. + /// + public ManagedIntegrationRuntimeNode() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ManagedIntegrationRuntimeNode + /// class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// The managed integration runtime node + /// id. + /// The managed integration runtime node status. + /// Possible values include: 'Starting', 'Available', 'Recycling', + /// 'Unavailable' + /// The errors that occurred on this integration + /// runtime node. + public ManagedIntegrationRuntimeNode(IDictionary additionalProperties = default(IDictionary), string nodeId = default(string), string status = default(string), IList errors = default(IList)) + { + AdditionalProperties = additionalProperties; + NodeId = nodeId; + Status = status; + Errors = errors; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets unmatched properties from the message are deserialized + /// this collection + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Gets the managed integration runtime node id. + /// + [JsonProperty(PropertyName = "nodeId")] + public string NodeId { get; private set; } + + /// + /// Gets the managed integration runtime node status. Possible values + /// include: 'Starting', 'Available', 'Recycling', 'Unavailable' + /// + [JsonProperty(PropertyName = "status")] + public string Status { get; private set; } + + /// + /// Gets or sets the errors that occurred on this integration runtime + /// node. + /// + [JsonProperty(PropertyName = "errors")] + public IList Errors { get; set; } + + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/ManagedIntegrationRuntimeNodeStatus.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/ManagedIntegrationRuntimeNodeStatus.cs new file mode 100644 index 000000000000..9ce1d86763e2 --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/ManagedIntegrationRuntimeNodeStatus.cs @@ -0,0 +1,24 @@ +// +// 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.Synapse.Models +{ + + /// + /// Defines values for ManagedIntegrationRuntimeNodeStatus. + /// + public static class ManagedIntegrationRuntimeNodeStatus + { + public const string Starting = "Starting"; + public const string Available = "Available"; + public const string Recycling = "Recycling"; + public const string Unavailable = "Unavailable"; + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/ManagedIntegrationRuntimeOperationResult.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/ManagedIntegrationRuntimeOperationResult.cs new file mode 100644 index 000000000000..53f5f4569065 --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/ManagedIntegrationRuntimeOperationResult.cs @@ -0,0 +1,108 @@ +// +// 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.Synapse.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Properties of managed integration runtime operation result. + /// + public partial class ManagedIntegrationRuntimeOperationResult + { + /// + /// Initializes a new instance of the + /// ManagedIntegrationRuntimeOperationResult class. + /// + public ManagedIntegrationRuntimeOperationResult() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// ManagedIntegrationRuntimeOperationResult class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// The operation type. Could be start or + /// stop. + /// The start time of the operation. + /// The operation result. + /// The error code. + /// Managed integration runtime error + /// parameters. + /// The activity id for the operation + /// request. + public ManagedIntegrationRuntimeOperationResult(IDictionary additionalProperties = default(IDictionary), string type = default(string), System.DateTime? startTime = default(System.DateTime?), string result = default(string), string errorCode = default(string), IList parameters = default(IList), string activityId = default(string)) + { + AdditionalProperties = additionalProperties; + Type = type; + StartTime = startTime; + Result = result; + ErrorCode = errorCode; + Parameters = parameters; + ActivityId = activityId; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets unmatched properties from the message are deserialized + /// this collection + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Gets the operation type. Could be start or stop. + /// + [JsonProperty(PropertyName = "type")] + public string Type { get; private set; } + + /// + /// Gets the start time of the operation. + /// + [JsonProperty(PropertyName = "startTime")] + public System.DateTime? StartTime { get; private set; } + + /// + /// Gets the operation result. + /// + [JsonProperty(PropertyName = "result")] + public string Result { get; private set; } + + /// + /// Gets the error code. + /// + [JsonProperty(PropertyName = "errorCode")] + public string ErrorCode { get; private set; } + + /// + /// Gets managed integration runtime error parameters. + /// + [JsonProperty(PropertyName = "parameters")] + public IList Parameters { get; private set; } + + /// + /// Gets the activity id for the operation request. + /// + [JsonProperty(PropertyName = "activityId")] + public string ActivityId { get; private set; } + + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/ManagedIntegrationRuntimeStatus.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/ManagedIntegrationRuntimeStatus.cs new file mode 100644 index 000000000000..bb42e21c4b60 --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/ManagedIntegrationRuntimeStatus.cs @@ -0,0 +1,98 @@ +// +// 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.Synapse.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Managed integration runtime status. + /// + [Newtonsoft.Json.JsonObject("Managed")] + [Rest.Serialization.JsonTransformation] + public partial class ManagedIntegrationRuntimeStatus : IntegrationRuntimeStatus + { + /// + /// Initializes a new instance of the ManagedIntegrationRuntimeStatus + /// class. + /// + public ManagedIntegrationRuntimeStatus() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ManagedIntegrationRuntimeStatus + /// class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// The workspace name which the + /// integration runtime belong to. + /// The state of integration runtime. Possible + /// values include: 'Initial', 'Stopped', 'Started', 'Starting', + /// 'Stopping', 'NeedRegistration', 'Online', 'Limited', 'Offline', + /// 'AccessDenied' + /// The time at which the integration runtime + /// was created, in ISO8601 format. + /// The list of nodes for managed integration + /// runtime. + /// The errors that occurred on this + /// integration runtime. + /// The last operation result that occurred + /// on this integration runtime. + public ManagedIntegrationRuntimeStatus(IDictionary additionalProperties = default(IDictionary), string dataFactoryName = default(string), string state = default(string), System.DateTime? createTime = default(System.DateTime?), IList nodes = default(IList), IList otherErrors = default(IList), ManagedIntegrationRuntimeOperationResult lastOperation = default(ManagedIntegrationRuntimeOperationResult)) + : base(additionalProperties, dataFactoryName, state) + { + CreateTime = createTime; + Nodes = nodes; + OtherErrors = otherErrors; + LastOperation = lastOperation; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets the time at which the integration runtime was created, in + /// ISO8601 format. + /// + [JsonProperty(PropertyName = "typeProperties.createTime")] + public System.DateTime? CreateTime { get; private set; } + + /// + /// Gets the list of nodes for managed integration runtime. + /// + [JsonProperty(PropertyName = "typeProperties.nodes")] + public IList Nodes { get; private set; } + + /// + /// Gets the errors that occurred on this integration runtime. + /// + [JsonProperty(PropertyName = "typeProperties.otherErrors")] + public IList OtherErrors { get; private set; } + + /// + /// Gets the last operation result that occurred on this integration + /// runtime. + /// + [JsonProperty(PropertyName = "typeProperties.lastOperation")] + public ManagedIntegrationRuntimeOperationResult LastOperation { get; private set; } + + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SecretBase.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SecretBase.cs new file mode 100644 index 000000000000..d104da9991df --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SecretBase.cs @@ -0,0 +1,35 @@ +// +// 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.Synapse.Models +{ + using System.Linq; + + /// + /// The base definition of a secret type. + /// + public partial class SecretBase + { + /// + /// Initializes a new instance of the SecretBase class. + /// + public SecretBase() + { + CustomInit(); + } + + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SecureString.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SecureString.cs new file mode 100644 index 000000000000..7a4c4ad5e523 --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SecureString.cs @@ -0,0 +1,66 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Synapse.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Azure Synapse secure string definition. The string value will be masked + /// with asterisks '*' during Get or List API calls. + /// + public partial class SecureString : SecretBase + { + /// + /// Initializes a new instance of the SecureString class. + /// + public SecureString() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SecureString class. + /// + /// Value of secure string. + public SecureString(string value) + { + Value = value; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets value of secure string. + /// + [JsonProperty(PropertyName = "value")] + public string Value { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Value == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Value"); + } + } + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SelfHostedIntegrationRuntime.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SelfHostedIntegrationRuntime.cs new file mode 100644 index 000000000000..357f07dd79cb --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SelfHostedIntegrationRuntime.cs @@ -0,0 +1,61 @@ +// +// 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.Synapse.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Self-hosted integration runtime. + /// + [Newtonsoft.Json.JsonObject("SelfHosted")] + [Rest.Serialization.JsonTransformation] + public partial class SelfHostedIntegrationRuntime : IntegrationRuntime + { + /// + /// Initializes a new instance of the SelfHostedIntegrationRuntime + /// class. + /// + public SelfHostedIntegrationRuntime() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SelfHostedIntegrationRuntime + /// class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Integration runtime description. + public SelfHostedIntegrationRuntime(IDictionary additionalProperties = default(IDictionary), string description = default(string), LinkedIntegrationRuntimeType linkedInfo = default(LinkedIntegrationRuntimeType)) + : base(additionalProperties, description) + { + LinkedInfo = linkedInfo; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// + [JsonProperty(PropertyName = "typeProperties.linkedInfo")] + public LinkedIntegrationRuntimeType LinkedInfo { get; set; } + + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SelfHostedIntegrationRuntimeNode.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SelfHostedIntegrationRuntimeNode.cs new file mode 100644 index 000000000000..a098f99a7a59 --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SelfHostedIntegrationRuntimeNode.cs @@ -0,0 +1,228 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Synapse.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Properties of Self-hosted integration runtime node. + /// + public partial class SelfHostedIntegrationRuntimeNode + { + /// + /// Initializes a new instance of the SelfHostedIntegrationRuntimeNode + /// class. + /// + public SelfHostedIntegrationRuntimeNode() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SelfHostedIntegrationRuntimeNode + /// class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Name of the integration runtime + /// node. + /// Machine name of the integration runtime + /// node. + /// URI for the host machine of the + /// integration runtime. + /// Status of the integration runtime node. + /// Possible values include: 'NeedRegistration', 'Online', 'Limited', + /// 'Offline', 'Upgrading', 'Initializing', 'InitializeFailed' + /// The integration runtime capabilities + /// dictionary + /// Status of the integration runtime node + /// version. + /// Version of the integration runtime + /// node. + /// The time at which the integration + /// runtime node was registered in ISO8601 format. + /// The most recent time at which the + /// integration runtime was connected in ISO8601 format. + /// The time at which the integration runtime + /// will expire in ISO8601 format. + /// The time the node last started + /// up. + /// The integration runtime node last stop + /// time. + /// The result of the last integration + /// runtime node update. Possible values include: 'None', 'Succeed', + /// 'Fail' + /// The last time for the integration + /// runtime node update start. + /// The last time for the integration + /// runtime node update end. + /// Indicates whether this node is the + /// active dispatcher for integration runtime requests. + /// Maximum concurrent jobs on the + /// integration runtime node. + /// The maximum concurrent jobs in this + /// integration runtime. + public SelfHostedIntegrationRuntimeNode(IDictionary additionalProperties = default(IDictionary), string nodeName = default(string), string machineName = default(string), string hostServiceUri = default(string), string status = default(string), IDictionary capabilities = default(IDictionary), string versionStatus = default(string), string version = default(string), System.DateTime? registerTime = default(System.DateTime?), System.DateTime? lastConnectTime = default(System.DateTime?), System.DateTime? expiryTime = default(System.DateTime?), System.DateTime? lastStartTime = default(System.DateTime?), System.DateTime? lastStopTime = default(System.DateTime?), string lastUpdateResult = default(string), System.DateTime? lastStartUpdateTime = default(System.DateTime?), System.DateTime? lastEndUpdateTime = default(System.DateTime?), bool? isActiveDispatcher = default(bool?), int? concurrentJobsLimit = default(int?), int? maxConcurrentJobs = default(int?)) + { + AdditionalProperties = additionalProperties; + NodeName = nodeName; + MachineName = machineName; + HostServiceUri = hostServiceUri; + Status = status; + Capabilities = capabilities; + VersionStatus = versionStatus; + Version = version; + RegisterTime = registerTime; + LastConnectTime = lastConnectTime; + ExpiryTime = expiryTime; + LastStartTime = lastStartTime; + LastStopTime = lastStopTime; + LastUpdateResult = lastUpdateResult; + LastStartUpdateTime = lastStartUpdateTime; + LastEndUpdateTime = lastEndUpdateTime; + IsActiveDispatcher = isActiveDispatcher; + ConcurrentJobsLimit = concurrentJobsLimit; + MaxConcurrentJobs = maxConcurrentJobs; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets unmatched properties from the message are deserialized + /// this collection + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Gets name of the integration runtime node. + /// + [JsonProperty(PropertyName = "nodeName")] + public string NodeName { get; private set; } + + /// + /// Gets machine name of the integration runtime node. + /// + [JsonProperty(PropertyName = "machineName")] + public string MachineName { get; private set; } + + /// + /// Gets URI for the host machine of the integration runtime. + /// + [JsonProperty(PropertyName = "hostServiceUri")] + public string HostServiceUri { get; private set; } + + /// + /// Gets status of the integration runtime node. Possible values + /// include: 'NeedRegistration', 'Online', 'Limited', 'Offline', + /// 'Upgrading', 'Initializing', 'InitializeFailed' + /// + [JsonProperty(PropertyName = "status")] + public string Status { get; private set; } + + /// + /// Gets the integration runtime capabilities dictionary + /// + [JsonProperty(PropertyName = "capabilities")] + public IDictionary Capabilities { get; private set; } + + /// + /// Gets status of the integration runtime node version. + /// + [JsonProperty(PropertyName = "versionStatus")] + public string VersionStatus { get; private set; } + + /// + /// Gets version of the integration runtime node. + /// + [JsonProperty(PropertyName = "version")] + public string Version { get; private set; } + + /// + /// Gets the time at which the integration runtime node was registered + /// in ISO8601 format. + /// + [JsonProperty(PropertyName = "registerTime")] + public System.DateTime? RegisterTime { get; private set; } + + /// + /// Gets the most recent time at which the integration runtime was + /// connected in ISO8601 format. + /// + [JsonProperty(PropertyName = "lastConnectTime")] + public System.DateTime? LastConnectTime { get; private set; } + + /// + /// Gets the time at which the integration runtime will expire in + /// ISO8601 format. + /// + [JsonProperty(PropertyName = "expiryTime")] + public System.DateTime? ExpiryTime { get; private set; } + + /// + /// Gets the time the node last started up. + /// + [JsonProperty(PropertyName = "lastStartTime")] + public System.DateTime? LastStartTime { get; private set; } + + /// + /// Gets the integration runtime node last stop time. + /// + [JsonProperty(PropertyName = "lastStopTime")] + public System.DateTime? LastStopTime { get; private set; } + + /// + /// Gets the result of the last integration runtime node update. + /// Possible values include: 'None', 'Succeed', 'Fail' + /// + [JsonProperty(PropertyName = "lastUpdateResult")] + public string LastUpdateResult { get; private set; } + + /// + /// Gets the last time for the integration runtime node update start. + /// + [JsonProperty(PropertyName = "lastStartUpdateTime")] + public System.DateTime? LastStartUpdateTime { get; private set; } + + /// + /// Gets the last time for the integration runtime node update end. + /// + [JsonProperty(PropertyName = "lastEndUpdateTime")] + public System.DateTime? LastEndUpdateTime { get; private set; } + + /// + /// Gets indicates whether this node is the active dispatcher for + /// integration runtime requests. + /// + [JsonProperty(PropertyName = "isActiveDispatcher")] + public bool? IsActiveDispatcher { get; private set; } + + /// + /// Gets maximum concurrent jobs on the integration runtime node. + /// + [JsonProperty(PropertyName = "concurrentJobsLimit")] + public int? ConcurrentJobsLimit { get; private set; } + + /// + /// Gets the maximum concurrent jobs in this integration runtime. + /// + [JsonProperty(PropertyName = "maxConcurrentJobs")] + public int? MaxConcurrentJobs { get; private set; } + + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SelfHostedIntegrationRuntimeNodeStatus.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SelfHostedIntegrationRuntimeNodeStatus.cs new file mode 100644 index 000000000000..8ed7bf03c40e --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SelfHostedIntegrationRuntimeNodeStatus.cs @@ -0,0 +1,27 @@ +// +// 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.Synapse.Models +{ + + /// + /// Defines values for SelfHostedIntegrationRuntimeNodeStatus. + /// + public static class SelfHostedIntegrationRuntimeNodeStatus + { + public const string NeedRegistration = "NeedRegistration"; + public const string Online = "Online"; + public const string Limited = "Limited"; + public const string Offline = "Offline"; + public const string Upgrading = "Upgrading"; + public const string Initializing = "Initializing"; + public const string InitializeFailed = "InitializeFailed"; + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SelfHostedIntegrationRuntimeStatus.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SelfHostedIntegrationRuntimeStatus.cs new file mode 100644 index 000000000000..e2ca3e87caeb --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SelfHostedIntegrationRuntimeStatus.cs @@ -0,0 +1,219 @@ +// +// 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.Synapse.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Self-hosted integration runtime status. + /// + [Newtonsoft.Json.JsonObject("SelfHosted")] + [Rest.Serialization.JsonTransformation] + public partial class SelfHostedIntegrationRuntimeStatus : IntegrationRuntimeStatus + { + /// + /// Initializes a new instance of the + /// SelfHostedIntegrationRuntimeStatus class. + /// + public SelfHostedIntegrationRuntimeStatus() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// SelfHostedIntegrationRuntimeStatus class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// The workspace name which the + /// integration runtime belong to. + /// The state of integration runtime. Possible + /// values include: 'Initial', 'Stopped', 'Started', 'Starting', + /// 'Stopping', 'NeedRegistration', 'Online', 'Limited', 'Offline', + /// 'AccessDenied' + /// The time at which the integration runtime + /// was created, in ISO8601 format. + /// The task queue id of the integration + /// runtime. + /// It is used to set the + /// encryption mode for node-node communication channel (when more than + /// 2 self-hosted integration runtime nodes exist). Possible values + /// include: 'NotSet', 'SslEncrypted', 'NotEncrypted' + /// Version of the integration runtime. + /// The list of nodes for this integration + /// runtime. + /// The date at which the integration + /// runtime will be scheduled to update, in ISO8601 format. + /// The time in the date scheduled by + /// service to update the integration runtime, e.g., PT03H is 3 + /// hours + /// The local time zone offset in + /// hours. + /// Object with additional information about + /// integration runtime capabilities. + /// The URLs for the services used in + /// integration runtime backend service. + /// Whether Self-hosted integration runtime + /// auto update has been turned on. Possible values include: 'On', + /// 'Off' + /// Status of the integration runtime + /// version. + /// The list of linked integration runtimes that + /// are created to share with this integration runtime. + /// The version that the integration + /// runtime is going to update to. + /// The latest version on download + /// center. + /// The estimated time when the self-hosted + /// integration runtime will be updated. + public SelfHostedIntegrationRuntimeStatus(IDictionary additionalProperties = default(IDictionary), string dataFactoryName = default(string), string state = default(string), System.DateTime? createTime = default(System.DateTime?), string taskQueueId = default(string), string internalChannelEncryption = default(string), string version = default(string), IList nodes = default(IList), System.DateTime? scheduledUpdateDate = default(System.DateTime?), string updateDelayOffset = default(string), string localTimeZoneOffset = default(string), IDictionary capabilities = default(IDictionary), IList serviceUrls = default(IList), string autoUpdate = default(string), string versionStatus = default(string), IList links = default(IList), string pushedVersion = default(string), string latestVersion = default(string), System.DateTime? autoUpdateETA = default(System.DateTime?)) + : base(additionalProperties, dataFactoryName, state) + { + CreateTime = createTime; + TaskQueueId = taskQueueId; + InternalChannelEncryption = internalChannelEncryption; + Version = version; + Nodes = nodes; + ScheduledUpdateDate = scheduledUpdateDate; + UpdateDelayOffset = updateDelayOffset; + LocalTimeZoneOffset = localTimeZoneOffset; + Capabilities = capabilities; + ServiceUrls = serviceUrls; + AutoUpdate = autoUpdate; + VersionStatus = versionStatus; + Links = links; + PushedVersion = pushedVersion; + LatestVersion = latestVersion; + AutoUpdateETA = autoUpdateETA; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets the time at which the integration runtime was created, in + /// ISO8601 format. + /// + [JsonProperty(PropertyName = "typeProperties.createTime")] + public System.DateTime? CreateTime { get; private set; } + + /// + /// Gets the task queue id of the integration runtime. + /// + [JsonProperty(PropertyName = "typeProperties.taskQueueId")] + public string TaskQueueId { get; private set; } + + /// + /// Gets it is used to set the encryption mode for node-node + /// communication channel (when more than 2 self-hosted integration + /// runtime nodes exist). Possible values include: 'NotSet', + /// 'SslEncrypted', 'NotEncrypted' + /// + [JsonProperty(PropertyName = "typeProperties.internalChannelEncryption")] + public string InternalChannelEncryption { get; private set; } + + /// + /// Gets version of the integration runtime. + /// + [JsonProperty(PropertyName = "typeProperties.version")] + public string Version { get; private set; } + + /// + /// Gets or sets the list of nodes for this integration runtime. + /// + [JsonProperty(PropertyName = "typeProperties.nodes")] + public IList Nodes { get; set; } + + /// + /// Gets the date at which the integration runtime will be scheduled to + /// update, in ISO8601 format. + /// + [JsonProperty(PropertyName = "typeProperties.scheduledUpdateDate")] + public System.DateTime? ScheduledUpdateDate { get; private set; } + + /// + /// Gets the time in the date scheduled by service to update the + /// integration runtime, e.g., PT03H is 3 hours + /// + [JsonProperty(PropertyName = "typeProperties.updateDelayOffset")] + public string UpdateDelayOffset { get; private set; } + + /// + /// Gets the local time zone offset in hours. + /// + [JsonProperty(PropertyName = "typeProperties.localTimeZoneOffset")] + public string LocalTimeZoneOffset { get; private set; } + + /// + /// Gets object with additional information about integration runtime + /// capabilities. + /// + [JsonProperty(PropertyName = "typeProperties.capabilities")] + public IDictionary Capabilities { get; private set; } + + /// + /// Gets the URLs for the services used in integration runtime backend + /// service. + /// + [JsonProperty(PropertyName = "typeProperties.serviceUrls")] + public IList ServiceUrls { get; private set; } + + /// + /// Gets whether Self-hosted integration runtime auto update has been + /// turned on. Possible values include: 'On', 'Off' + /// + [JsonProperty(PropertyName = "typeProperties.autoUpdate")] + public string AutoUpdate { get; private set; } + + /// + /// Gets status of the integration runtime version. + /// + [JsonProperty(PropertyName = "typeProperties.versionStatus")] + public string VersionStatus { get; private set; } + + /// + /// Gets or sets the list of linked integration runtimes that are + /// created to share with this integration runtime. + /// + [JsonProperty(PropertyName = "typeProperties.links")] + public IList Links { get; set; } + + /// + /// Gets the version that the integration runtime is going to update + /// to. + /// + [JsonProperty(PropertyName = "typeProperties.pushedVersion")] + public string PushedVersion { get; private set; } + + /// + /// Gets the latest version on download center. + /// + [JsonProperty(PropertyName = "typeProperties.latestVersion")] + public string LatestVersion { get; private set; } + + /// + /// Gets the estimated time when the self-hosted integration runtime + /// will be updated. + /// + [JsonProperty(PropertyName = "typeProperties.autoUpdateETA")] + public System.DateTime? AutoUpdateETA { get; private set; } + + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SsisEnvironment.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SsisEnvironment.cs new file mode 100644 index 000000000000..204f0d10f304 --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SsisEnvironment.cs @@ -0,0 +1,67 @@ +// +// 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.Synapse.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Ssis environment. + /// + [Newtonsoft.Json.JsonObject("Environment")] + public partial class SsisEnvironment : SsisObjectMetadata + { + /// + /// Initializes a new instance of the SsisEnvironment class. + /// + public SsisEnvironment() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SsisEnvironment class. + /// + /// Metadata id. + /// Metadata name. + /// Metadata description. + /// Folder id which contains + /// environment. + /// Variable in environment + public SsisEnvironment(long? id = default(long?), string name = default(string), string description = default(string), long? folderId = default(long?), IList variables = default(IList)) + : base(id, name, description) + { + FolderId = folderId; + Variables = variables; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets folder id which contains environment. + /// + [JsonProperty(PropertyName = "folderId")] + public long? FolderId { get; set; } + + /// + /// Gets or sets variable in environment + /// + [JsonProperty(PropertyName = "variables")] + public IList Variables { get; set; } + + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SsisEnvironmentReference.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SsisEnvironmentReference.cs new file mode 100644 index 000000000000..04da50bcf26f --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SsisEnvironmentReference.cs @@ -0,0 +1,76 @@ +// +// 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.Synapse.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Ssis environment reference. + /// + public partial class SsisEnvironmentReference + { + /// + /// Initializes a new instance of the SsisEnvironmentReference class. + /// + public SsisEnvironmentReference() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SsisEnvironmentReference class. + /// + /// Environment reference id. + /// Environment folder + /// name. + /// Environment name. + /// Reference type + public SsisEnvironmentReference(long? id = default(long?), string environmentFolderName = default(string), string environmentName = default(string), string referenceType = default(string)) + { + Id = id; + EnvironmentFolderName = environmentFolderName; + EnvironmentName = environmentName; + ReferenceType = referenceType; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets environment reference id. + /// + [JsonProperty(PropertyName = "id")] + public long? Id { get; set; } + + /// + /// Gets or sets environment folder name. + /// + [JsonProperty(PropertyName = "environmentFolderName")] + public string EnvironmentFolderName { get; set; } + + /// + /// Gets or sets environment name. + /// + [JsonProperty(PropertyName = "environmentName")] + public string EnvironmentName { get; set; } + + /// + /// Gets or sets reference type + /// + [JsonProperty(PropertyName = "referenceType")] + public string ReferenceType { get; set; } + + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SsisFolder.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SsisFolder.cs new file mode 100644 index 000000000000..aab5ca209f55 --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SsisFolder.cs @@ -0,0 +1,48 @@ +// +// 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.Synapse.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Ssis folder. + /// + [Newtonsoft.Json.JsonObject("Folder")] + public partial class SsisFolder : SsisObjectMetadata + { + /// + /// Initializes a new instance of the SsisFolder class. + /// + public SsisFolder() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SsisFolder class. + /// + /// Metadata id. + /// Metadata name. + /// Metadata description. + public SsisFolder(long? id = default(long?), string name = default(string), string description = default(string)) + : base(id, name, description) + { + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SsisObjectMetadata.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SsisObjectMetadata.cs new file mode 100644 index 000000000000..bd2544bf0f3d --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SsisObjectMetadata.cs @@ -0,0 +1,67 @@ +// +// 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.Synapse.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// SSIS object metadata. + /// + public partial class SsisObjectMetadata + { + /// + /// Initializes a new instance of the SsisObjectMetadata class. + /// + public SsisObjectMetadata() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SsisObjectMetadata class. + /// + /// Metadata id. + /// Metadata name. + /// Metadata description. + public SsisObjectMetadata(long? id = default(long?), string name = default(string), string description = default(string)) + { + Id = id; + Name = name; + Description = description; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets metadata id. + /// + [JsonProperty(PropertyName = "id")] + public long? Id { get; set; } + + /// + /// Gets or sets metadata name. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or sets metadata description. + /// + [JsonProperty(PropertyName = "description")] + public string Description { get; set; } + + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SsisObjectMetadataListResponse.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SsisObjectMetadataListResponse.cs new file mode 100644 index 000000000000..0063b2cab829 --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SsisObjectMetadataListResponse.cs @@ -0,0 +1,65 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Synapse.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A list of SSIS object metadata. + /// + public partial class SsisObjectMetadataListResponse + { + /// + /// Initializes a new instance of the SsisObjectMetadataListResponse + /// class. + /// + public SsisObjectMetadataListResponse() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SsisObjectMetadataListResponse + /// class. + /// + /// List of SSIS object metadata. + /// The link to the next page of results, if any + /// remaining results exist. + public SsisObjectMetadataListResponse(IList value = default(IList), string nextLink = default(string)) + { + Value = value; + NextLink = nextLink; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets list of SSIS object metadata. + /// + [JsonProperty(PropertyName = "value")] + public IList Value { get; set; } + + /// + /// Gets or sets the link to the next page of results, if any remaining + /// results exist. + /// + [JsonProperty(PropertyName = "nextLink")] + public string NextLink { get; set; } + + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SsisObjectMetadataStatusResponse.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SsisObjectMetadataStatusResponse.cs new file mode 100644 index 000000000000..3fdf70afcb3e --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SsisObjectMetadataStatusResponse.cs @@ -0,0 +1,77 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Synapse.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// The status of the operation. + /// + public partial class SsisObjectMetadataStatusResponse + { + /// + /// Initializes a new instance of the SsisObjectMetadataStatusResponse + /// class. + /// + public SsisObjectMetadataStatusResponse() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SsisObjectMetadataStatusResponse + /// class. + /// + /// The status of the operation. + /// The operation name. + /// The operation properties. + /// The operation error message. + public SsisObjectMetadataStatusResponse(string status = default(string), string name = default(string), string properties = default(string), string error = default(string)) + { + Status = status; + Name = name; + Properties = properties; + Error = error; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the status of the operation. + /// + [JsonProperty(PropertyName = "status")] + public string Status { get; set; } + + /// + /// Gets or sets the operation name. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or sets the operation properties. + /// + [JsonProperty(PropertyName = "properties")] + public string Properties { get; set; } + + /// + /// Gets or sets the operation error message. + /// + [JsonProperty(PropertyName = "error")] + public string Error { get; set; } + + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SsisObjectMetadataType.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SsisObjectMetadataType.cs new file mode 100644 index 000000000000..a4eeb420c478 --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SsisObjectMetadataType.cs @@ -0,0 +1,24 @@ +// +// 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.Synapse.Models +{ + + /// + /// Defines values for SsisObjectMetadataType. + /// + public static class SsisObjectMetadataType + { + public const string Folder = "Folder"; + public const string Project = "Project"; + public const string Package = "Package"; + public const string Environment = "Environment"; + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SsisPackage.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SsisPackage.cs new file mode 100644 index 000000000000..f8144de7ce7c --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SsisPackage.cs @@ -0,0 +1,83 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Synapse.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Ssis Package. + /// + [Newtonsoft.Json.JsonObject("Package")] + public partial class SsisPackage : SsisObjectMetadata + { + /// + /// Initializes a new instance of the SsisPackage class. + /// + public SsisPackage() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SsisPackage class. + /// + /// Metadata id. + /// Metadata name. + /// Metadata description. + /// Folder id which contains package. + /// Project version which contains + /// package. + /// Project id which contains package. + /// Parameters in package + public SsisPackage(long? id = default(long?), string name = default(string), string description = default(string), long? folderId = default(long?), long? projectVersion = default(long?), long? projectId = default(long?), IList parameters = default(IList)) + : base(id, name, description) + { + FolderId = folderId; + ProjectVersion = projectVersion; + ProjectId = projectId; + Parameters = parameters; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets folder id which contains package. + /// + [JsonProperty(PropertyName = "folderId")] + public long? FolderId { get; set; } + + /// + /// Gets or sets project version which contains package. + /// + [JsonProperty(PropertyName = "projectVersion")] + public long? ProjectVersion { get; set; } + + /// + /// Gets or sets project id which contains package. + /// + [JsonProperty(PropertyName = "projectId")] + public long? ProjectId { get; set; } + + /// + /// Gets or sets parameters in package + /// + [JsonProperty(PropertyName = "parameters")] + public IList Parameters { get; set; } + + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SsisParameter.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SsisParameter.cs new file mode 100644 index 000000000000..cddde62cd6c8 --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SsisParameter.cs @@ -0,0 +1,141 @@ +// +// 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.Synapse.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Ssis parameter. + /// + public partial class SsisParameter + { + /// + /// Initializes a new instance of the SsisParameter class. + /// + public SsisParameter() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SsisParameter class. + /// + /// Parameter id. + /// Parameter name. + /// Parameter description. + /// Parameter type. + /// Whether parameter is required. + /// Whether parameter is sensitive. + /// Design default value of + /// parameter. + /// Default value of parameter. + /// Default sensitive value of + /// parameter. + /// Parameter value type. + /// Parameter value set. + /// Parameter reference variable. + public SsisParameter(long? id = default(long?), string name = default(string), string description = default(string), string dataType = default(string), bool? required = default(bool?), bool? sensitive = default(bool?), string designDefaultValue = default(string), string defaultValue = default(string), string sensitiveDefaultValue = default(string), string valueType = default(string), bool? valueSet = default(bool?), string variable = default(string)) + { + Id = id; + Name = name; + Description = description; + DataType = dataType; + Required = required; + Sensitive = sensitive; + DesignDefaultValue = designDefaultValue; + DefaultValue = defaultValue; + SensitiveDefaultValue = sensitiveDefaultValue; + ValueType = valueType; + ValueSet = valueSet; + Variable = variable; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets parameter id. + /// + [JsonProperty(PropertyName = "id")] + public long? Id { get; set; } + + /// + /// Gets or sets parameter name. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or sets parameter description. + /// + [JsonProperty(PropertyName = "description")] + public string Description { get; set; } + + /// + /// Gets or sets parameter type. + /// + [JsonProperty(PropertyName = "dataType")] + public string DataType { get; set; } + + /// + /// Gets or sets whether parameter is required. + /// + [JsonProperty(PropertyName = "required")] + public bool? Required { get; set; } + + /// + /// Gets or sets whether parameter is sensitive. + /// + [JsonProperty(PropertyName = "sensitive")] + public bool? Sensitive { get; set; } + + /// + /// Gets or sets design default value of parameter. + /// + [JsonProperty(PropertyName = "designDefaultValue")] + public string DesignDefaultValue { get; set; } + + /// + /// Gets or sets default value of parameter. + /// + [JsonProperty(PropertyName = "defaultValue")] + public string DefaultValue { get; set; } + + /// + /// Gets or sets default sensitive value of parameter. + /// + [JsonProperty(PropertyName = "sensitiveDefaultValue")] + public string SensitiveDefaultValue { get; set; } + + /// + /// Gets or sets parameter value type. + /// + [JsonProperty(PropertyName = "valueType")] + public string ValueType { get; set; } + + /// + /// Gets or sets parameter value set. + /// + [JsonProperty(PropertyName = "valueSet")] + public bool? ValueSet { get; set; } + + /// + /// Gets or sets parameter reference variable. + /// + [JsonProperty(PropertyName = "variable")] + public string Variable { get; set; } + + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SsisProject.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SsisProject.cs new file mode 100644 index 000000000000..500e418c9086 --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SsisProject.cs @@ -0,0 +1,83 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Synapse.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Ssis project. + /// + [Newtonsoft.Json.JsonObject("Project")] + public partial class SsisProject : SsisObjectMetadata + { + /// + /// Initializes a new instance of the SsisProject class. + /// + public SsisProject() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SsisProject class. + /// + /// Metadata id. + /// Metadata name. + /// Metadata description. + /// Folder id which contains project. + /// Project version. + /// Environment reference in + /// project + /// Parameters in project + public SsisProject(long? id = default(long?), string name = default(string), string description = default(string), long? folderId = default(long?), long? version = default(long?), IList environmentRefs = default(IList), IList parameters = default(IList)) + : base(id, name, description) + { + FolderId = folderId; + Version = version; + EnvironmentRefs = environmentRefs; + Parameters = parameters; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets folder id which contains project. + /// + [JsonProperty(PropertyName = "folderId")] + public long? FolderId { get; set; } + + /// + /// Gets or sets project version. + /// + [JsonProperty(PropertyName = "version")] + public long? Version { get; set; } + + /// + /// Gets or sets environment reference in project + /// + [JsonProperty(PropertyName = "environmentRefs")] + public IList EnvironmentRefs { get; set; } + + /// + /// Gets or sets parameters in project + /// + [JsonProperty(PropertyName = "parameters")] + public IList Parameters { get; set; } + + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SsisVariable.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SsisVariable.cs new file mode 100644 index 000000000000..4eeb9d0c9d30 --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SsisVariable.cs @@ -0,0 +1,99 @@ +// +// 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.Synapse.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Ssis variable. + /// + public partial class SsisVariable + { + /// + /// Initializes a new instance of the SsisVariable class. + /// + public SsisVariable() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SsisVariable class. + /// + /// Variable id. + /// Variable name. + /// Variable description. + /// Variable type. + /// Whether variable is sensitive. + /// Variable value. + /// Variable sensitive value. + public SsisVariable(long? id = default(long?), string name = default(string), string description = default(string), string dataType = default(string), bool? sensitive = default(bool?), string value = default(string), string sensitiveValue = default(string)) + { + Id = id; + Name = name; + Description = description; + DataType = dataType; + Sensitive = sensitive; + Value = value; + SensitiveValue = sensitiveValue; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets variable id. + /// + [JsonProperty(PropertyName = "id")] + public long? Id { get; set; } + + /// + /// Gets or sets variable name. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or sets variable description. + /// + [JsonProperty(PropertyName = "description")] + public string Description { get; set; } + + /// + /// Gets or sets variable type. + /// + [JsonProperty(PropertyName = "dataType")] + public string DataType { get; set; } + + /// + /// Gets or sets whether variable is sensitive. + /// + [JsonProperty(PropertyName = "sensitive")] + public bool? Sensitive { get; set; } + + /// + /// Gets or sets variable value. + /// + [JsonProperty(PropertyName = "value")] + public string Value { get; set; } + + /// + /// Gets or sets variable sensitive value. + /// + [JsonProperty(PropertyName = "sensitiveValue")] + public string SensitiveValue { get; set; } + + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SubResource.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SubResource.cs new file mode 100644 index 000000000000..596dc811b8a1 --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SubResource.cs @@ -0,0 +1,77 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Synapse.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Azure Synapse nested resource, which belongs to a factory. + /// + public partial class SubResource : IResource + { + /// + /// Initializes a new instance of the SubResource class. + /// + public SubResource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SubResource class. + /// + /// The resource identifier. + /// The resource name. + /// The resource type. + /// Etag identifies change in the resource. + public SubResource(string id = default(string), string name = default(string), string type = default(string), string etag = default(string)) + { + Id = id; + Name = name; + Type = type; + Etag = etag; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets the resource identifier. + /// + [JsonProperty(PropertyName = "id")] + public string Id { get; private set; } + + /// + /// Gets the resource name. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; private set; } + + /// + /// Gets the resource type. + /// + [JsonProperty(PropertyName = "type")] + public string Type { get; private set; } + + /// + /// Gets etag identifies change in the resource. + /// + [JsonProperty(PropertyName = "etag")] + public string Etag { get; private set; } + + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/UpdateIntegrationRuntimeNodeRequest.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/UpdateIntegrationRuntimeNodeRequest.cs new file mode 100644 index 000000000000..2166ad174d2e --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/UpdateIntegrationRuntimeNodeRequest.cs @@ -0,0 +1,71 @@ +// +// 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.Synapse.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Update integration runtime node request. + /// + public partial class UpdateIntegrationRuntimeNodeRequest + { + /// + /// Initializes a new instance of the + /// UpdateIntegrationRuntimeNodeRequest class. + /// + public UpdateIntegrationRuntimeNodeRequest() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// UpdateIntegrationRuntimeNodeRequest class. + /// + /// The number of concurrent jobs + /// permitted to run on the integration runtime node. Values between 1 + /// and maxConcurrentJobs(inclusive) are allowed. + public UpdateIntegrationRuntimeNodeRequest(int? concurrentJobsLimit = default(int?)) + { + ConcurrentJobsLimit = concurrentJobsLimit; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the number of concurrent jobs permitted to run on the + /// integration runtime node. Values between 1 and + /// maxConcurrentJobs(inclusive) are allowed. + /// + [JsonProperty(PropertyName = "concurrentJobsLimit")] + public int? ConcurrentJobsLimit { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (ConcurrentJobsLimit < 1) + { + throw new ValidationException(ValidationRules.InclusiveMinimum, "ConcurrentJobsLimit", 1); + } + } + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/UpdateIntegrationRuntimeRequest.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/UpdateIntegrationRuntimeRequest.cs new file mode 100644 index 000000000000..b172305fc9b1 --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/UpdateIntegrationRuntimeRequest.cs @@ -0,0 +1,71 @@ +// +// 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.Synapse.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Update integration runtime request. + /// + public partial class UpdateIntegrationRuntimeRequest + { + /// + /// Initializes a new instance of the UpdateIntegrationRuntimeRequest + /// class. + /// + public UpdateIntegrationRuntimeRequest() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the UpdateIntegrationRuntimeRequest + /// class. + /// + /// Enables or disables the auto-update + /// feature of the self-hosted integration runtime. See + /// https://go.microsoft.com/fwlink/?linkid=854189. Possible values + /// include: 'On', 'Off' + /// The time offset (in hours) in the + /// day, e.g., PT03H is 3 hours. The integration runtime auto update + /// will happen on that time. + public UpdateIntegrationRuntimeRequest(string autoUpdate = default(string), string updateDelayOffset = default(string)) + { + AutoUpdate = autoUpdate; + UpdateDelayOffset = updateDelayOffset; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets enables or disables the auto-update feature of the + /// self-hosted integration runtime. See + /// https://go.microsoft.com/fwlink/?linkid=854189. Possible values + /// include: 'On', 'Off' + /// + [JsonProperty(PropertyName = "autoUpdate")] + public string AutoUpdate { get; set; } + + /// + /// Gets or sets the time offset (in hours) in the day, e.g., PT03H is + /// 3 hours. The integration runtime auto update will happen on that + /// time. + /// + [JsonProperty(PropertyName = "updateDelayOffset")] + public string UpdateDelayOffset { get; set; } + + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SdkInfo_SynapseManagementClient.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SdkInfo_SynapseManagementClient.cs index 2435fff2d9b5..d67925cd8d91 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SdkInfo_SynapseManagementClient.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SdkInfo_SynapseManagementClient.cs @@ -20,6 +20,15 @@ public static IEnumerable> ApiInfo_SynapseManageme return new Tuple[] { new Tuple("Synapse", "BigDataPools", "2019-06-01-preview"), + new Tuple("Synapse", "IntegrationRuntimeAuthKeys", "2019-06-01-preview"), + new Tuple("Synapse", "IntegrationRuntimeConnectionInfos", "2019-06-01-preview"), + new Tuple("Synapse", "IntegrationRuntimeCredentials", "2019-06-01-preview"), + new Tuple("Synapse", "IntegrationRuntimeMonitoringData", "2019-06-01-preview"), + new Tuple("Synapse", "IntegrationRuntimeNodeIpAddress", "2019-06-01-preview"), + new Tuple("Synapse", "IntegrationRuntimeNodes", "2019-06-01-preview"), + new Tuple("Synapse", "IntegrationRuntimeObjectMetadata", "2019-06-01-preview"), + new Tuple("Synapse", "IntegrationRuntimeStatus", "2019-06-01-preview"), + new Tuple("Synapse", "IntegrationRuntimes", "2019-06-01-preview"), new Tuple("Synapse", "IpFirewallRules", "2019-06-01-preview"), new Tuple("Synapse", "Operations", "2019-06-01-preview"), new Tuple("Synapse", "SqlPoolBlobAuditingPolicies", "2019-06-01-preview"), @@ -48,16 +57,5 @@ public static IEnumerable> ApiInfo_SynapseManageme }.AsEnumerable(); } } - // BEGIN: Code Generation Metadata Section - public static readonly String AutoRestVersion = "2.0.4413"; - public static readonly String AutoRestBootStrapperVersion = "autorest@2.0.4413"; - public static readonly String AutoRestCmdExecuted = "cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/synapse/resource-manager/readme.md --csharp --version=2.0.4413 --reflect-api-versions --csharp-sdks-folder=D:\\source\\azure-sdk-for-net\\sdk"; - public static readonly String GithubForkName = "Azure"; - public static readonly String GithubBranchName = "master"; - public static readonly String GithubCommidId = "3d35b48ed3a876696e5b53672c95a76228a2fdcc"; - public static readonly String CodeGenerationErrors = ""; - public static readonly String GithubRepoName = "azure-rest-api-specs"; - // END: Code Generation Metadata Section } } - diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolsOperations.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolsOperations.cs index 73bb4aba1826..3bfc5d5798dc 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolsOperations.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolsOperations.cs @@ -471,7 +471,7 @@ internal SqlPoolsOperations(SynapseManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200) + if ((int)_statusCode != 200 && (int)_statusCode != 202) { var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SynapseManagementClient.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SynapseManagementClient.cs index 763b49668fa5..943cfaaeddd7 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SynapseManagementClient.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SynapseManagementClient.cs @@ -204,6 +204,51 @@ public partial class SynapseManagementClient : ServiceClient public virtual IWorkspaceManagedIdentitySqlControlSettingsOperations WorkspaceManagedIdentitySqlControlSettings { get; private set; } + /// + /// Gets the IIntegrationRuntimesOperations. + /// + public virtual IIntegrationRuntimesOperations IntegrationRuntimes { get; private set; } + + /// + /// Gets the IIntegrationRuntimeNodeIpAddressOperations. + /// + public virtual IIntegrationRuntimeNodeIpAddressOperations IntegrationRuntimeNodeIpAddress { get; private set; } + + /// + /// Gets the IIntegrationRuntimeObjectMetadataOperations. + /// + public virtual IIntegrationRuntimeObjectMetadataOperations IntegrationRuntimeObjectMetadata { get; private set; } + + /// + /// Gets the IIntegrationRuntimeNodesOperations. + /// + public virtual IIntegrationRuntimeNodesOperations IntegrationRuntimeNodes { get; private set; } + + /// + /// Gets the IIntegrationRuntimeCredentialsOperations. + /// + public virtual IIntegrationRuntimeCredentialsOperations IntegrationRuntimeCredentials { get; private set; } + + /// + /// Gets the IIntegrationRuntimeConnectionInfosOperations. + /// + public virtual IIntegrationRuntimeConnectionInfosOperations IntegrationRuntimeConnectionInfos { get; private set; } + + /// + /// Gets the IIntegrationRuntimeAuthKeysOperations. + /// + public virtual IIntegrationRuntimeAuthKeysOperations IntegrationRuntimeAuthKeys { get; private set; } + + /// + /// Gets the IIntegrationRuntimeMonitoringDataOperations. + /// + public virtual IIntegrationRuntimeMonitoringDataOperations IntegrationRuntimeMonitoringData { get; private set; } + + /// + /// Gets the IIntegrationRuntimeStatusOperations. + /// + public virtual IIntegrationRuntimeStatusOperations IntegrationRuntimeStatus { get; private set; } + /// /// Initializes a new instance of the SynapseManagementClient class. /// @@ -471,6 +516,15 @@ private void Initialize() Workspaces = new WorkspacesOperations(this); WorkspaceAadAdmins = new WorkspaceAadAdminsOperations(this); WorkspaceManagedIdentitySqlControlSettings = new WorkspaceManagedIdentitySqlControlSettingsOperations(this); + IntegrationRuntimes = new IntegrationRuntimesOperations(this); + IntegrationRuntimeNodeIpAddress = new IntegrationRuntimeNodeIpAddressOperations(this); + IntegrationRuntimeObjectMetadata = new IntegrationRuntimeObjectMetadataOperations(this); + IntegrationRuntimeNodes = new IntegrationRuntimeNodesOperations(this); + IntegrationRuntimeCredentials = new IntegrationRuntimeCredentialsOperations(this); + IntegrationRuntimeConnectionInfos = new IntegrationRuntimeConnectionInfosOperations(this); + IntegrationRuntimeAuthKeys = new IntegrationRuntimeAuthKeysOperations(this); + IntegrationRuntimeMonitoringData = new IntegrationRuntimeMonitoringDataOperations(this); + IntegrationRuntimeStatus = new IntegrationRuntimeStatusOperations(this); BaseUri = new System.Uri("https://management.azure.com"); ApiVersion = "2019-06-01-preview"; AcceptLanguage = "en-US"; @@ -502,6 +556,18 @@ private void Initialize() new Iso8601TimeSpanConverter() } }; + SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("type")); + DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("type")); + SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("type")); + DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("type")); + SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("type")); + DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("type")); + SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("authorizationType")); + DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("authorizationType")); + SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("type")); + DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("type")); + SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("type")); + DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("type")); CustomInitialize(); DeserializationSettings.Converters.Add(new TransformationJsonConverter()); DeserializationSettings.Converters.Add(new CloudErrorJsonConverter());