diff --git a/sdk/synapse/Azure.Analytics.Synapse.AccessControl/CHANGELOG.md b/sdk/synapse/Azure.Analytics.Synapse.AccessControl/CHANGELOG.md new file mode 100644 index 000000000000..6bb129c6bb9a --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.AccessControl/CHANGELOG.md @@ -0,0 +1,4 @@ +# Release History + +## 1.0.0-preview.1 (Unreleased) +- Initial release diff --git a/sdk/synapse/Azure.Analytics.Synapse.AccessControl/Directory.Build.props b/sdk/synapse/Azure.Analytics.Synapse.AccessControl/Directory.Build.props new file mode 100644 index 000000000000..1a9611bd4924 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.AccessControl/Directory.Build.props @@ -0,0 +1,6 @@ + + + + diff --git a/sdk/synapse/Azure.Analytics.Synapse.AccessControl/README.md b/sdk/synapse/Azure.Analytics.Synapse.AccessControl/README.md new file mode 100644 index 000000000000..dc637fb70acf --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.AccessControl/README.md @@ -0,0 +1,121 @@ +# Azure Synapse Analytics Access Control client library for .NET + +This directory contains the open source subset of the .NET SDK. For documentation of the complete Azure SDK, please see the [Microsoft Azure .NET Developer Center](http://azure.microsoft.com/en-us/develop/net/). + +The Azure Synapse Analytics access control client library enables programmatically managing role assignments. + +Azure Synapse is a limitless analytics service that brings together enterprise data warehousing and Big Data analytics. It gives you the freedom to query data on your terms, using either serverless on-demand or provisioned resources—at scale. Azure Synapse brings these two worlds together with a unified experience to ingest, prepare, manage, and serve data for immediate BI and machine learning needs. + +## Getting started + +The complete Microsoft Azure SDK can be downloaded from the [Microsoft Azure Downloads Page](http://azure.microsoft.com/en-us/downloads/?sdk=net) and ships with support for building deployment packages, integrating with tooling, rich command line tooling, and more. + +For the best development experience, developers should use the official Microsoft NuGet packages for libraries. NuGet packages are regularly updated with new functionality and hotfixes. + +### Install the package +Install the Azure Synapse Analytics access control client library for .NET with [NuGet][nuget]: + +```PowerShell +dotnet add package Azure.Analytics.Synapse.AccessControl --version 0.1.0-preview.1 +``` + +### Prerequisites +* An [Azure subscription][azure_sub]. +* An existing Azure Synapse workspace. If you need to create an Azure Synapse workspace, you can use the Azure Portal or [Azure CLI][azure_cli]. + +If you use the Azure CLI, the command looks like below: + +```PowerShell +az synapse workspace create \ + --name \ + --resource-group \ + --storage-account \ + --file-system \ + --sql-admin-login-user \ + --sql-admin-login-password \ + --location +``` + +### Authenticate the client +In order to interact with the Azure Synapse Analytics service, you'll need to create an instance of the [AccessControlClient][accesscontrol_client_class] class. You need a **workspace endpoint**, which you may see as "Development endpoint" in the portal, + and **client secret credentials (client id, client secret, tenant id)** to instantiate a client object. + +Client secret credential authentication is being used in this getting started section but you can find more ways to authenticate with [Azure identity][azure_identity]. To use the [DefaultAzureCredential][DefaultAzureCredential] provider shown below, +or other credential providers provided with the Azure SDK, you should install the Azure.Identity package: + +```PowerShell +Install-Package Azure.Identity +``` + +## Key concepts + +### AccessControlClient +With a `AccessControlClient` you can get role assignments from the workspace, create new role assignments, and delete role assignments. + +### Role Assignment +The way you control access to Synapse resources is to create role assignments. A role assignment is the process of attaching a role definition to a user, group, service principal, or managed identity at a particular scope for the purpose of granting access. Access is granted by creating a role assignment, and access is revoked by removing a role assignment. + +## Examples +The Azure.Analytics.Synapse.AccessControl package supports synchronous and asynchronous APIs. The following section covers some of the most common Azure Synapse Analytics access control related tasks: + +### Role assignment examples +* [Create a role assignment](#create-a-role-assignment) +* [Retrieve a role assignment](#retrieve-a-role-assignment) +* [List role assignments](#list-role-assignments) +* [Delete a role assignment](#delete-a-role-assignment) + +### Create a role assignment + +`CreateRoleAssignment` creates a role assignment. + +```C# Snippet:CreateRoleAssignment +RoleAssignmentOptions options = new RoleAssignmentOptions(sqlAdminRoleId, principalId); +RoleAssignmentDetails roleAssignment = client.CreateRoleAssignment(options); +``` + +### Retrieve a role assignment + +`GetRoleAssignmentById` retrieves a role assignment by the given principal ID. + +```C# Snippet:RetrieveRoleAssignment +RoleAssignmentDetails roleAssignment = client.GetRoleAssignmentById(principalId); +``` + +### List role assignments +`GetRoleAssignments` enumerates the role assignments in the Synapse workspace. + +```C# Snippet:ListRoleAssignments +IReadOnlyList roleAssignments = client.GetRoleAssignments().Value; +foreach (RoleAssignmentDetails assignment in roleAssignments) +{ + Console.WriteLine(assignment.Id); +} +``` + +### Delete a role assignment + +`DeleteRoleAssignmentById` deletes a role assignment by the given principal ID. + +```C# Snippet:DeleteRoleAssignment +client.DeleteRoleAssignmentById(roleAssignment.Id); +``` + +## To build + +For information on building the Azure Synapse client library, please see [Building the Microsoft Azure SDK for .NET](https://github.com/azure/azure-sdk-for-net#to-build) + +## Target frameworks + +For information about the target frameworks of the Azure Synapse client library, please refer to the [Target Frameworks](https://github.com/azure/azure-sdk-for-net#target-frameworks) of the Microsoft Azure SDK for .NET. + +## Troubleshooting + +Please open issue in github. + +## Next steps + +The next step is adding more examples + +## Contributing + +This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. diff --git a/sdk/synapse/Azure.Analytics.Synapse.AccessControl/src/Azure.Analytics.Synapse.AccessControl.csproj b/sdk/synapse/Azure.Analytics.Synapse.AccessControl/src/Azure.Analytics.Synapse.AccessControl.csproj new file mode 100644 index 000000000000..00b27cd3219e --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.AccessControl/src/Azure.Analytics.Synapse.AccessControl.csproj @@ -0,0 +1,43 @@ + + + This is the Microsoft Azure Synapse Analytics Access Control client library + Azure.Analytics.Synapse.AccessControl + 1.0.0-preview.1 + Microsoft Azure Synapse Access Control;$(PackageCommonTags) + $(RequiredTargetFrameworks) + false + + + $(NoWarn); + SA1649; + CA1812; + + CS1591; + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sdk/synapse/Azure.Analytics.Synapse.AccessControl/src/Customization/AccessControlClient.cs b/sdk/synapse/Azure.Analytics.Synapse.AccessControl/src/Customization/AccessControlClient.cs new file mode 100644 index 000000000000..3d129c863d59 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.AccessControl/src/Customization/AccessControlClient.cs @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.Analytics.Synapse.AccessControl +{ + public partial class AccessControlClient + { + /// + /// Initializes a new instance of the . + /// + public AccessControlClient(Uri endpoint, TokenCredential credential) + : this(endpoint, credential, AccessControlClientOptions.Default) + { + } + + /// + /// Initializes a new instance of the . + /// + public AccessControlClient(Uri endpoint, TokenCredential credential, AccessControlClientOptions options) + : this(new ClientDiagnostics(options), + SynapseClientPipeline.Build(options, credential), + endpoint.ToString(), + options.VersionString) + { + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.AccessControl/src/Customization/AccessControlClientOptions.cs b/sdk/synapse/Azure.Analytics.Synapse.AccessControl/src/Customization/AccessControlClientOptions.cs new file mode 100644 index 000000000000..418c5bd75ffb --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.AccessControl/src/Customization/AccessControlClientOptions.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure.Core; +using System; + +namespace Azure.Analytics.Synapse.AccessControl +{ + /// + /// The options for . + /// + public class AccessControlClientOptions : ClientOptions + { + private const ServiceVersion Latest = ServiceVersion.V2020_02_01_preview; + + internal static AccessControlClientOptions Default { get; } = new AccessControlClientOptions(); + + /// + /// Initializes a new instance of the . + /// + public AccessControlClientOptions(ServiceVersion serviceVersion = Latest) + { + VersionString = serviceVersion switch + { + ServiceVersion.V2020_02_01_preview => "2020-02-01-preview", + _ => throw new ArgumentOutOfRangeException(nameof(serviceVersion)) + }; + } + + /// + /// API version for Azure Synapse Access Control service. + /// + internal string VersionString { get; } + + /// + /// The Synapse service version. + /// + public enum ServiceVersion + { + /// + /// The 2019-06-01-preview of the template service. + /// +#pragma warning disable CA1707 + V2020_02_01_preview = 1 +#pragma warning restore CA1707 + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.AccessControl/src/Generated/AccessControlClient.cs b/sdk/synapse/Azure.Analytics.Synapse.AccessControl/src/Generated/AccessControlClient.cs new file mode 100644 index 000000000000..4999c141c443 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.AccessControl/src/Generated/AccessControlClient.cs @@ -0,0 +1,333 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Analytics.Synapse.AccessControl.Models; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.Analytics.Synapse.AccessControl +{ + /// The AccessControl service client. + public partial class AccessControlClient + { + private readonly ClientDiagnostics _clientDiagnostics; + private readonly HttpPipeline _pipeline; + internal AccessControlRestClient RestClient { get; } + /// Initializes a new instance of AccessControlClient for mocking. + protected AccessControlClient() + { + } + /// Initializes a new instance of AccessControlClient. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The workspace development endpoint, for example https://myworkspace.dev.azuresynapse.net. + /// Api Version. + internal AccessControlClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string endpoint, string apiVersion = "2020-02-01-preview") + { + RestClient = new AccessControlRestClient(clientDiagnostics, pipeline, endpoint, apiVersion); + _clientDiagnostics = clientDiagnostics; + _pipeline = pipeline; + } + + /// Create role assignment. + /// Details of role id and object id. + /// The cancellation token to use. + public virtual async Task> CreateRoleAssignmentAsync(RoleAssignmentOptions createRoleAssignmentOptions, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("AccessControlClient.CreateRoleAssignment"); + scope.Start(); + try + { + return await RestClient.CreateRoleAssignmentAsync(createRoleAssignmentOptions, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Create role assignment. + /// Details of role id and object id. + /// The cancellation token to use. + public virtual Response CreateRoleAssignment(RoleAssignmentOptions createRoleAssignmentOptions, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("AccessControlClient.CreateRoleAssignment"); + scope.Start(); + try + { + return RestClient.CreateRoleAssignment(createRoleAssignmentOptions, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// List role assignments. + /// Synapse Built-In Role Id. + /// Object ID of the AAD principal or security-group. + /// Continuation token. + /// The cancellation token to use. + public virtual async Task>> GetRoleAssignmentsAsync(string roleId = null, string principalId = null, string continuationToken = null, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("AccessControlClient.GetRoleAssignments"); + scope.Start(); + try + { + return await RestClient.GetRoleAssignmentsAsync(roleId, principalId, continuationToken, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// List role assignments. + /// Synapse Built-In Role Id. + /// Object ID of the AAD principal or security-group. + /// Continuation token. + /// The cancellation token to use. + public virtual Response> GetRoleAssignments(string roleId = null, string principalId = null, string continuationToken = null, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("AccessControlClient.GetRoleAssignments"); + scope.Start(); + try + { + return RestClient.GetRoleAssignments(roleId, principalId, continuationToken, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Get role assignment by role assignment Id. + /// The ID of the role assignment. + /// The cancellation token to use. + public virtual async Task> GetRoleAssignmentByIdAsync(string roleAssignmentId, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("AccessControlClient.GetRoleAssignmentById"); + scope.Start(); + try + { + return await RestClient.GetRoleAssignmentByIdAsync(roleAssignmentId, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Get role assignment by role assignment Id. + /// The ID of the role assignment. + /// The cancellation token to use. + public virtual Response GetRoleAssignmentById(string roleAssignmentId, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("AccessControlClient.GetRoleAssignmentById"); + scope.Start(); + try + { + return RestClient.GetRoleAssignmentById(roleAssignmentId, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Delete role assignment by role assignment Id. + /// The ID of the role assignment. + /// The cancellation token to use. + public virtual async Task DeleteRoleAssignmentByIdAsync(string roleAssignmentId, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("AccessControlClient.DeleteRoleAssignmentById"); + scope.Start(); + try + { + return await RestClient.DeleteRoleAssignmentByIdAsync(roleAssignmentId, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Delete role assignment by role assignment Id. + /// The ID of the role assignment. + /// The cancellation token to use. + public virtual Response DeleteRoleAssignmentById(string roleAssignmentId, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("AccessControlClient.DeleteRoleAssignmentById"); + scope.Start(); + try + { + return RestClient.DeleteRoleAssignmentById(roleAssignmentId, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// List role assignments of the caller. + /// The cancellation token to use. + public virtual async Task>> GetCallerRoleAssignmentsAsync(CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("AccessControlClient.GetCallerRoleAssignments"); + scope.Start(); + try + { + return await RestClient.GetCallerRoleAssignmentsAsync(cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// List role assignments of the caller. + /// The cancellation token to use. + public virtual Response> GetCallerRoleAssignments(CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("AccessControlClient.GetCallerRoleAssignments"); + scope.Start(); + try + { + return RestClient.GetCallerRoleAssignments(cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Get role by role Id. + /// Synapse Built-In Role Id. + /// The cancellation token to use. + public virtual async Task> GetRoleDefinitionByIdAsync(string roleId, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("AccessControlClient.GetRoleDefinitionById"); + scope.Start(); + try + { + return await RestClient.GetRoleDefinitionByIdAsync(roleId, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Get role by role Id. + /// Synapse Built-In Role Id. + /// The cancellation token to use. + public virtual Response GetRoleDefinitionById(string roleId, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("AccessControlClient.GetRoleDefinitionById"); + scope.Start(); + try + { + return RestClient.GetRoleDefinitionById(roleId, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// List roles. + /// The cancellation token to use. + public virtual AsyncPageable GetRoleDefinitionsAsync(CancellationToken cancellationToken = default) + { + async Task> FirstPageFunc(int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("AccessControlClient.GetRoleDefinitions"); + scope.Start(); + try + { + var response = await RestClient.GetRoleDefinitionsAsync(cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + async Task> NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("AccessControlClient.GetRoleDefinitions"); + scope.Start(); + try + { + var response = await RestClient.GetRoleDefinitionsNextPageAsync(nextLink, cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); + } + + /// List roles. + /// The cancellation token to use. + public virtual Pageable GetRoleDefinitions(CancellationToken cancellationToken = default) + { + Page FirstPageFunc(int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("AccessControlClient.GetRoleDefinitions"); + scope.Start(); + try + { + var response = RestClient.GetRoleDefinitions(cancellationToken); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + Page NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("AccessControlClient.GetRoleDefinitions"); + scope.Start(); + try + { + var response = RestClient.GetRoleDefinitionsNextPage(nextLink, cancellationToken); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.AccessControl/src/Generated/AccessControlGetRoleAssignmentsHeaders.cs b/sdk/synapse/Azure.Analytics.Synapse.AccessControl/src/Generated/AccessControlGetRoleAssignmentsHeaders.cs new file mode 100644 index 000000000000..c44ce2fc19fe --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.AccessControl/src/Generated/AccessControlGetRoleAssignmentsHeaders.cs @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure; +using Azure.Core; + +namespace Azure.Analytics.Synapse.AccessControl +{ + internal class AccessControlGetRoleAssignmentsHeaders + { + private readonly Response _response; + public AccessControlGetRoleAssignmentsHeaders(Response response) + { + _response = response; + } + public string XMsContinuation => _response.Headers.TryGetValue("x-ms-continuation", out string value) ? value : null; + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.AccessControl/src/Generated/AccessControlRestClient.cs b/sdk/synapse/Azure.Analytics.Synapse.AccessControl/src/Generated/AccessControlRestClient.cs new file mode 100644 index 000000000000..0023df02b85d --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.AccessControl/src/Generated/AccessControlRestClient.cs @@ -0,0 +1,698 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Analytics.Synapse.AccessControl.Models; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.Analytics.Synapse.AccessControl +{ + internal partial class AccessControlRestClient + { + private string endpoint; + private string apiVersion; + private ClientDiagnostics _clientDiagnostics; + private HttpPipeline _pipeline; + + /// Initializes a new instance of AccessControlRestClient. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The workspace development endpoint, for example https://myworkspace.dev.azuresynapse.net. + /// Api Version. + /// This occurs when one of the required arguments is null. + public AccessControlRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string endpoint, string apiVersion = "2020-02-01-preview") + { + if (endpoint == null) + { + throw new ArgumentNullException(nameof(endpoint)); + } + if (apiVersion == null) + { + throw new ArgumentNullException(nameof(apiVersion)); + } + + this.endpoint = endpoint; + this.apiVersion = apiVersion; + _clientDiagnostics = clientDiagnostics; + _pipeline = pipeline; + } + + internal HttpMessage CreateCreateRoleAssignmentRequest(RoleAssignmentOptions createRoleAssignmentOptions) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.AppendRaw(endpoint, false); + uri.AppendPath("/rbac/roleAssignments", false); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(createRoleAssignmentOptions); + request.Content = content; + return message; + } + + /// Create role assignment. + /// Details of role id and object id. + /// The cancellation token to use. + public async Task> CreateRoleAssignmentAsync(RoleAssignmentOptions createRoleAssignmentOptions, CancellationToken cancellationToken = default) + { + if (createRoleAssignmentOptions == null) + { + throw new ArgumentNullException(nameof(createRoleAssignmentOptions)); + } + + using var message = CreateCreateRoleAssignmentRequest(createRoleAssignmentOptions); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + RoleAssignmentDetails value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + value = RoleAssignmentDetails.DeserializeRoleAssignmentDetails(document.RootElement); + } + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Create role assignment. + /// Details of role id and object id. + /// The cancellation token to use. + public Response CreateRoleAssignment(RoleAssignmentOptions createRoleAssignmentOptions, CancellationToken cancellationToken = default) + { + if (createRoleAssignmentOptions == null) + { + throw new ArgumentNullException(nameof(createRoleAssignmentOptions)); + } + + using var message = CreateCreateRoleAssignmentRequest(createRoleAssignmentOptions); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + RoleAssignmentDetails value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + value = RoleAssignmentDetails.DeserializeRoleAssignmentDetails(document.RootElement); + } + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetRoleAssignmentsRequest(string roleId, string principalId, string continuationToken) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.AppendRaw(endpoint, false); + uri.AppendPath("/rbac/roleAssignments", false); + uri.AppendQuery("api-version", apiVersion, true); + if (roleId != null) + { + uri.AppendQuery("roleId", roleId, true); + } + if (principalId != null) + { + uri.AppendQuery("principalId", principalId, true); + } + request.Uri = uri; + if (continuationToken != null) + { + request.Headers.Add("x-ms-continuation", continuationToken); + } + return message; + } + + /// List role assignments. + /// Synapse Built-In Role Id. + /// Object ID of the AAD principal or security-group. + /// Continuation token. + /// The cancellation token to use. + public async Task, AccessControlGetRoleAssignmentsHeaders>> GetRoleAssignmentsAsync(string roleId = null, string principalId = null, string continuationToken = null, CancellationToken cancellationToken = default) + { + using var message = CreateGetRoleAssignmentsRequest(roleId, principalId, continuationToken); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + var headers = new AccessControlGetRoleAssignmentsHeaders(message.Response); + switch (message.Response.Status) + { + case 200: + { + IReadOnlyList value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + List array = new List(); + foreach (var item in document.RootElement.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(RoleAssignmentDetails.DeserializeRoleAssignmentDetails(item)); + } + } + value = array; + } + return ResponseWithHeaders.FromValue(value, headers, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// List role assignments. + /// Synapse Built-In Role Id. + /// Object ID of the AAD principal or security-group. + /// Continuation token. + /// The cancellation token to use. + public ResponseWithHeaders, AccessControlGetRoleAssignmentsHeaders> GetRoleAssignments(string roleId = null, string principalId = null, string continuationToken = null, CancellationToken cancellationToken = default) + { + using var message = CreateGetRoleAssignmentsRequest(roleId, principalId, continuationToken); + _pipeline.Send(message, cancellationToken); + var headers = new AccessControlGetRoleAssignmentsHeaders(message.Response); + switch (message.Response.Status) + { + case 200: + { + IReadOnlyList value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + List array = new List(); + foreach (var item in document.RootElement.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(RoleAssignmentDetails.DeserializeRoleAssignmentDetails(item)); + } + } + value = array; + } + return ResponseWithHeaders.FromValue(value, headers, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetRoleAssignmentByIdRequest(string roleAssignmentId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.AppendRaw(endpoint, false); + uri.AppendPath("/rbac/roleAssignments/", false); + uri.AppendPath(roleAssignmentId, true); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + return message; + } + + /// Get role assignment by role assignment Id. + /// The ID of the role assignment. + /// The cancellation token to use. + public async Task> GetRoleAssignmentByIdAsync(string roleAssignmentId, CancellationToken cancellationToken = default) + { + if (roleAssignmentId == null) + { + throw new ArgumentNullException(nameof(roleAssignmentId)); + } + + using var message = CreateGetRoleAssignmentByIdRequest(roleAssignmentId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + RoleAssignmentDetails value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + value = RoleAssignmentDetails.DeserializeRoleAssignmentDetails(document.RootElement); + } + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Get role assignment by role assignment Id. + /// The ID of the role assignment. + /// The cancellation token to use. + public Response GetRoleAssignmentById(string roleAssignmentId, CancellationToken cancellationToken = default) + { + if (roleAssignmentId == null) + { + throw new ArgumentNullException(nameof(roleAssignmentId)); + } + + using var message = CreateGetRoleAssignmentByIdRequest(roleAssignmentId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + RoleAssignmentDetails value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + value = RoleAssignmentDetails.DeserializeRoleAssignmentDetails(document.RootElement); + } + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateDeleteRoleAssignmentByIdRequest(string roleAssignmentId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.AppendRaw(endpoint, false); + uri.AppendPath("/rbac/roleAssignments/", false); + uri.AppendPath(roleAssignmentId, true); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + return message; + } + + /// Delete role assignment by role assignment Id. + /// The ID of the role assignment. + /// The cancellation token to use. + public async Task DeleteRoleAssignmentByIdAsync(string roleAssignmentId, CancellationToken cancellationToken = default) + { + if (roleAssignmentId == null) + { + throw new ArgumentNullException(nameof(roleAssignmentId)); + } + + using var message = CreateDeleteRoleAssignmentByIdRequest(roleAssignmentId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Delete role assignment by role assignment Id. + /// The ID of the role assignment. + /// The cancellation token to use. + public Response DeleteRoleAssignmentById(string roleAssignmentId, CancellationToken cancellationToken = default) + { + if (roleAssignmentId == null) + { + throw new ArgumentNullException(nameof(roleAssignmentId)); + } + + using var message = CreateDeleteRoleAssignmentByIdRequest(roleAssignmentId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetCallerRoleAssignmentsRequest() + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.AppendRaw(endpoint, false); + uri.AppendPath("/rbac/getMyAssignedRoles", false); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + return message; + } + + /// List role assignments of the caller. + /// The cancellation token to use. + public async Task>> GetCallerRoleAssignmentsAsync(CancellationToken cancellationToken = default) + { + using var message = CreateGetCallerRoleAssignmentsRequest(); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + IReadOnlyList value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + List array = new List(); + foreach (var item in document.RootElement.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetString()); + } + } + value = array; + } + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// List role assignments of the caller. + /// The cancellation token to use. + public Response> GetCallerRoleAssignments(CancellationToken cancellationToken = default) + { + using var message = CreateGetCallerRoleAssignmentsRequest(); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + IReadOnlyList value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + List array = new List(); + foreach (var item in document.RootElement.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetString()); + } + } + value = array; + } + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetRoleDefinitionsRequest() + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.AppendRaw(endpoint, false); + uri.AppendPath("/rbac/roles", false); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + return message; + } + + /// List roles. + /// The cancellation token to use. + public async Task> GetRoleDefinitionsAsync(CancellationToken cancellationToken = default) + { + using var message = CreateGetRoleDefinitionsRequest(); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + RolesListResponse value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + value = RolesListResponse.DeserializeRolesListResponse(document.RootElement); + } + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// List roles. + /// The cancellation token to use. + public Response GetRoleDefinitions(CancellationToken cancellationToken = default) + { + using var message = CreateGetRoleDefinitionsRequest(); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + RolesListResponse value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + value = RolesListResponse.DeserializeRolesListResponse(document.RootElement); + } + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetRoleDefinitionByIdRequest(string roleId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.AppendRaw(endpoint, false); + uri.AppendPath("/rbac/roles/", false); + uri.AppendPath(roleId, true); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + return message; + } + + /// Get role by role Id. + /// Synapse Built-In Role Id. + /// The cancellation token to use. + public async Task> GetRoleDefinitionByIdAsync(string roleId, CancellationToken cancellationToken = default) + { + if (roleId == null) + { + throw new ArgumentNullException(nameof(roleId)); + } + + using var message = CreateGetRoleDefinitionByIdRequest(roleId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SynapseRole value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + value = SynapseRole.DeserializeSynapseRole(document.RootElement); + } + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Get role by role Id. + /// Synapse Built-In Role Id. + /// The cancellation token to use. + public Response GetRoleDefinitionById(string roleId, CancellationToken cancellationToken = default) + { + if (roleId == null) + { + throw new ArgumentNullException(nameof(roleId)); + } + + using var message = CreateGetRoleDefinitionByIdRequest(roleId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SynapseRole value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + value = SynapseRole.DeserializeSynapseRole(document.RootElement); + } + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetRoleDefinitionsNextPageRequest(string nextLink) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.AppendRaw(endpoint, false); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + return message; + } + + /// List roles. + /// The URL to the next page of results. + /// The cancellation token to use. + public async Task> GetRoleDefinitionsNextPageAsync(string nextLink, CancellationToken cancellationToken = default) + { + if (nextLink == null) + { + throw new ArgumentNullException(nameof(nextLink)); + } + + using var message = CreateGetRoleDefinitionsNextPageRequest(nextLink); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + RolesListResponse value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + value = RolesListResponse.DeserializeRolesListResponse(document.RootElement); + } + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// List roles. + /// The URL to the next page of results. + /// The cancellation token to use. + public Response GetRoleDefinitionsNextPage(string nextLink, CancellationToken cancellationToken = default) + { + if (nextLink == null) + { + throw new ArgumentNullException(nameof(nextLink)); + } + + using var message = CreateGetRoleDefinitionsNextPageRequest(nextLink); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + RolesListResponse value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + value = RolesListResponse.DeserializeRolesListResponse(document.RootElement); + } + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.AccessControl/src/Generated/Models/ErrorContract.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.AccessControl/src/Generated/Models/ErrorContract.Serialization.cs new file mode 100644 index 000000000000..0853ab1a512b --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.AccessControl/src/Generated/Models/ErrorContract.Serialization.cs @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.AccessControl.Models +{ + internal partial class ErrorContract + { + internal static ErrorContract DeserializeErrorContract(JsonElement element) + { + ErrorResponse error = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("error")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + error = ErrorResponse.DeserializeErrorResponse(property.Value); + continue; + } + } + return new ErrorContract(error); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.AccessControl/src/Generated/Models/ErrorContract.cs b/sdk/synapse/Azure.Analytics.Synapse.AccessControl/src/Generated/Models/ErrorContract.cs new file mode 100644 index 000000000000..4fb88b234f4e --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.AccessControl/src/Generated/Models/ErrorContract.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Analytics.Synapse.AccessControl.Models +{ + /// Contains details when the response code indicates an error. + internal partial class ErrorContract + { + /// Initializes a new instance of ErrorContract. + internal ErrorContract() + { + } + + /// Initializes a new instance of ErrorContract. + /// The error details. + internal ErrorContract(ErrorResponse error) + { + Error = error; + } + + /// The error details. + public ErrorResponse Error { get; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.AccessControl/src/Generated/Models/ErrorDetail.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.AccessControl/src/Generated/Models/ErrorDetail.Serialization.cs new file mode 100644 index 000000000000..406ca055a4e9 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.AccessControl/src/Generated/Models/ErrorDetail.Serialization.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.AccessControl.Models +{ + internal partial class ErrorDetail + { + internal static ErrorDetail DeserializeErrorDetail(JsonElement element) + { + string code = default; + string message = default; + string target = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("code")) + { + code = property.Value.GetString(); + continue; + } + if (property.NameEquals("message")) + { + message = property.Value.GetString(); + continue; + } + if (property.NameEquals("target")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + target = property.Value.GetString(); + continue; + } + } + return new ErrorDetail(code, message, target); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.AccessControl/src/Generated/Models/ErrorDetail.cs b/sdk/synapse/Azure.Analytics.Synapse.AccessControl/src/Generated/Models/ErrorDetail.cs new file mode 100644 index 000000000000..aed019a432b5 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.AccessControl/src/Generated/Models/ErrorDetail.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Analytics.Synapse.AccessControl.Models +{ + /// The ErrorDetail. + internal partial class ErrorDetail + { + /// Initializes a new instance of ErrorDetail. + /// . + /// . + internal ErrorDetail(string code, string message) + { + if (code == null) + { + throw new ArgumentNullException(nameof(code)); + } + if (message == null) + { + throw new ArgumentNullException(nameof(message)); + } + + Code = code; + Message = message; + } + + /// Initializes a new instance of ErrorDetail. + /// . + /// . + /// . + internal ErrorDetail(string code, string message, string target) + { + Code = code; + Message = message; + Target = target; + } + + public string Code { get; } + public string Message { get; } + public string Target { get; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.AccessControl/src/Generated/Models/ErrorResponse.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.AccessControl/src/Generated/Models/ErrorResponse.Serialization.cs new file mode 100644 index 000000000000..1b67ef0b7d96 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.AccessControl/src/Generated/Models/ErrorResponse.Serialization.cs @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.AccessControl.Models +{ + internal partial class ErrorResponse + { + internal static ErrorResponse DeserializeErrorResponse(JsonElement element) + { + string code = default; + string message = default; + string target = default; + IReadOnlyList details = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("code")) + { + code = property.Value.GetString(); + continue; + } + if (property.NameEquals("message")) + { + message = property.Value.GetString(); + continue; + } + if (property.NameEquals("target")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + target = property.Value.GetString(); + continue; + } + if (property.NameEquals("details")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(ErrorDetail.DeserializeErrorDetail(item)); + } + } + details = array; + continue; + } + } + return new ErrorResponse(code, message, target, details); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.AccessControl/src/Generated/Models/ErrorResponse.cs b/sdk/synapse/Azure.Analytics.Synapse.AccessControl/src/Generated/Models/ErrorResponse.cs new file mode 100644 index 000000000000..cb665fe91db7 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.AccessControl/src/Generated/Models/ErrorResponse.cs @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.AccessControl.Models +{ + /// The ErrorResponse. + internal partial class ErrorResponse + { + /// Initializes a new instance of ErrorResponse. + /// . + /// . + internal ErrorResponse(string code, string message) + { + if (code == null) + { + throw new ArgumentNullException(nameof(code)); + } + if (message == null) + { + throw new ArgumentNullException(nameof(message)); + } + + Code = code; + Message = message; + } + + /// Initializes a new instance of ErrorResponse. + /// . + /// . + /// . + /// . + internal ErrorResponse(string code, string message, string target, IReadOnlyList details) + { + Code = code; + Message = message; + Target = target; + Details = details; + } + + public string Code { get; } + public string Message { get; } + public string Target { get; } + public IReadOnlyList Details { get; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.AccessControl/src/Generated/Models/RoleAssignmentDetails.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.AccessControl/src/Generated/Models/RoleAssignmentDetails.Serialization.cs new file mode 100644 index 000000000000..334b91e52301 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.AccessControl/src/Generated/Models/RoleAssignmentDetails.Serialization.cs @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.AccessControl.Models +{ + public partial class RoleAssignmentDetails + { + internal static RoleAssignmentDetails DeserializeRoleAssignmentDetails(JsonElement element) + { + string id = default; + string roleId = default; + string principalId = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("roleId")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + roleId = property.Value.GetString(); + continue; + } + if (property.NameEquals("principalId")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + principalId = property.Value.GetString(); + continue; + } + } + return new RoleAssignmentDetails(id, roleId, principalId); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.AccessControl/src/Generated/Models/RoleAssignmentDetails.cs b/sdk/synapse/Azure.Analytics.Synapse.AccessControl/src/Generated/Models/RoleAssignmentDetails.cs new file mode 100644 index 000000000000..0a3093145926 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.AccessControl/src/Generated/Models/RoleAssignmentDetails.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Analytics.Synapse.AccessControl.Models +{ + /// Role Assignment response details. + public partial class RoleAssignmentDetails + { + /// Initializes a new instance of RoleAssignmentDetails. + internal RoleAssignmentDetails() + { + } + + /// Initializes a new instance of RoleAssignmentDetails. + /// Role Assignment ID. + /// Role ID of the Synapse Built-In Role. + /// Object ID of the AAD principal or security-group. + internal RoleAssignmentDetails(string id, string roleId, string principalId) + { + Id = id; + RoleId = roleId; + PrincipalId = principalId; + } + + /// Role Assignment ID. + public string Id { get; } + /// Role ID of the Synapse Built-In Role. + public string RoleId { get; } + /// Object ID of the AAD principal or security-group. + public string PrincipalId { get; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.AccessControl/src/Generated/Models/RoleAssignmentOptions.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.AccessControl/src/Generated/Models/RoleAssignmentOptions.Serialization.cs new file mode 100644 index 000000000000..0dfa9a4db410 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.AccessControl/src/Generated/Models/RoleAssignmentOptions.Serialization.cs @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.AccessControl.Models +{ + public partial class RoleAssignmentOptions : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("roleId"); + writer.WriteStringValue(RoleId); + writer.WritePropertyName("principalId"); + writer.WriteStringValue(PrincipalId); + writer.WriteEndObject(); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.AccessControl/src/Generated/Models/RoleAssignmentOptions.cs b/sdk/synapse/Azure.Analytics.Synapse.AccessControl/src/Generated/Models/RoleAssignmentOptions.cs new file mode 100644 index 000000000000..cd6aee4019b7 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.AccessControl/src/Generated/Models/RoleAssignmentOptions.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Analytics.Synapse.AccessControl.Models +{ + /// Role Assignment request details. + public partial class RoleAssignmentOptions + { + /// Initializes a new instance of RoleAssignmentOptions. + /// Role ID of the Synapse Built-In Role. + /// Object ID of the AAD principal or security-group. + public RoleAssignmentOptions(string roleId, string principalId) + { + if (roleId == null) + { + throw new ArgumentNullException(nameof(roleId)); + } + if (principalId == null) + { + throw new ArgumentNullException(nameof(principalId)); + } + + RoleId = roleId; + PrincipalId = principalId; + } + + /// Role ID of the Synapse Built-In Role. + public string RoleId { get; } + /// Object ID of the AAD principal or security-group. + public string PrincipalId { get; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.AccessControl/src/Generated/Models/RolesListResponse.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.AccessControl/src/Generated/Models/RolesListResponse.Serialization.cs new file mode 100644 index 000000000000..960ac936dc37 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.AccessControl/src/Generated/Models/RolesListResponse.Serialization.cs @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.AccessControl.Models +{ + public partial class RolesListResponse + { + internal static RolesListResponse DeserializeRolesListResponse(JsonElement element) + { + IReadOnlyList value = default; + string nextLink = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value")) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(SynapseRole.DeserializeSynapseRole(item)); + } + } + value = array; + continue; + } + if (property.NameEquals("nextLink")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = property.Value.GetString(); + continue; + } + } + return new RolesListResponse(value, nextLink); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.AccessControl/src/Generated/Models/RolesListResponse.cs b/sdk/synapse/Azure.Analytics.Synapse.AccessControl/src/Generated/Models/RolesListResponse.cs new file mode 100644 index 000000000000..5ad90d8393f5 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.AccessControl/src/Generated/Models/RolesListResponse.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.Analytics.Synapse.AccessControl.Models +{ + /// A list of Synapse roles available. + public partial class RolesListResponse + { + /// Initializes a new instance of RolesListResponse. + /// List of Synapse roles. + internal RolesListResponse(IEnumerable value) + { + if (value == null) + { + throw new ArgumentNullException(nameof(value)); + } + + Value = value.ToArray(); + } + + /// Initializes a new instance of RolesListResponse. + /// List of Synapse roles. + /// The link to the next page of results, if any remaining results exist. + internal RolesListResponse(IReadOnlyList value, string nextLink) + { + Value = value; + NextLink = nextLink; + } + + /// List of Synapse roles. + public IReadOnlyList Value { get; } + /// The link to the next page of results, if any remaining results exist. + public string NextLink { get; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.AccessControl/src/Generated/Models/SynapseRole.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.AccessControl/src/Generated/Models/SynapseRole.Serialization.cs new file mode 100644 index 000000000000..d8ca3efdee57 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.AccessControl/src/Generated/Models/SynapseRole.Serialization.cs @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.AccessControl.Models +{ + public partial class SynapseRole + { + internal static SynapseRole DeserializeSynapseRole(JsonElement element) + { + string id = default; + string name = default; + bool isBuiltIn = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("name")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("isBuiltIn")) + { + isBuiltIn = property.Value.GetBoolean(); + continue; + } + } + return new SynapseRole(id, name, isBuiltIn); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.AccessControl/src/Generated/Models/SynapseRole.cs b/sdk/synapse/Azure.Analytics.Synapse.AccessControl/src/Generated/Models/SynapseRole.cs new file mode 100644 index 000000000000..6ffbd4bb1978 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.AccessControl/src/Generated/Models/SynapseRole.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Analytics.Synapse.AccessControl.Models +{ + /// Synapse role details. + public partial class SynapseRole + { + /// Initializes a new instance of SynapseRole. + /// Is a built-in role or not. + internal SynapseRole(bool isBuiltIn) + { + IsBuiltIn = isBuiltIn; + } + + /// Initializes a new instance of SynapseRole. + /// Role ID. + /// Name of the Synapse role. + /// Is a built-in role or not. + internal SynapseRole(string id, string name, bool isBuiltIn) + { + Id = id; + Name = name; + IsBuiltIn = isBuiltIn; + } + + /// Role ID. + public string Id { get; } + /// Name of the Synapse role. + public string Name { get; } + /// Is a built-in role or not. + public bool IsBuiltIn { get; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.AccessControl/src/Properties/AssemblyInfo.cs b/sdk/synapse/Azure.Analytics.Synapse.AccessControl/src/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..4dba1d949da2 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.AccessControl/src/Properties/AssemblyInfo.cs @@ -0,0 +1,7 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System.Runtime.CompilerServices; + +[assembly: InternalsVisibleTo("Azure.Analytics.Synapse.AccessControl.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100d15ddcb29688295338af4b7686603fe614abd555e09efba8fb88ee09e1f7b1ccaeed2e8f823fa9eef3fdd60217fc012ea67d2479751a0b8c087a4185541b851bd8b16f8d91b840e51b1cb0ba6fe647997e57429265e85ef62d565db50a69ae1647d54d7bd855e4db3d8a91510e5bcbd0edfbbecaa20a7bd9ae74593daa7b11b4")] +[assembly: Azure.Core.AzureResourceProviderNamespace("Microsoft.Synapse")] diff --git a/sdk/synapse/Azure.Analytics.Synapse.AccessControl/src/autorest.md b/sdk/synapse/Azure.Analytics.Synapse.AccessControl/src/autorest.md new file mode 100644 index 000000000000..be3d3141cae2 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.AccessControl/src/autorest.md @@ -0,0 +1,17 @@ +# Microsoft.Azure.Synapse + +Run `dotnet msbuild /t:GenerateCode` to generate code. + +### AutoRest Configuration +> see https://aka.ms/autorest + +```yaml +repo: https://github.com/Azure/azure-rest-api-specs/blob/fdf4bbfd7a73b28960d3a62490440345d6f2e8e3 +``` + +``` yaml +public-clients: true +input-file: + - $(repo)/specification/synapse/data-plane/Microsoft.Synapse/preview/2020-02-01-preview/roleAssignments.json + - $(repo)/specification/synapse/data-plane/Microsoft.Synapse/preview/2020-02-01-preview/roles.json +``` diff --git a/sdk/synapse/Azure.Analytics.Synapse.AccessControl/tests/AccessControlClientLiveTests.cs b/sdk/synapse/Azure.Analytics.Synapse.AccessControl/tests/AccessControlClientLiveTests.cs new file mode 100644 index 000000000000..43fe776ca1cb --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.AccessControl/tests/AccessControlClientLiveTests.cs @@ -0,0 +1,92 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Azure.Analytics.Synapse.AccessControl.Models; +using Azure.Core.TestFramework; +using Newtonsoft.Json.Linq; +using NUnit.Framework; + +namespace Azure.Analytics.Synapse.Tests.AccessControl +{ + /// + /// The suite of tests for the class. + /// + /// + /// These tests have a dependency on live Azure services and may incur costs for the associated + /// Azure subscription. + /// + public class AccessControlClientLiveTests : AccessControlClientTestBase + { + /// + /// Initializes a new instance of the class. + /// + /// A flag used by the Azure Core Test Framework to differentiate between tests for asynchronous and synchronous methods. + public AccessControlClientLiveTests(bool isAsync) : base(isAsync) + { + } + + [Test] + public async Task TestGetRoleDefinition() + { + List roles = await AccessControlClient.GetRoleDefinitionsAsync().ToEnumerableAsync(); + CollectionAssert.IsNotEmpty(roles); + foreach (SynapseRole expectedRole in roles) + { + SynapseRole actualRole = await AccessControlClient.GetRoleDefinitionByIdAsync(expectedRole.Id.ToString()); + Assert.AreEqual(expectedRole.Name, actualRole.Name); + Assert.AreEqual(expectedRole.Id, actualRole.Id); + Assert.AreEqual(expectedRole.IsBuiltIn, actualRole.IsBuiltIn); + } + } + + [Test] + public async Task TestGetRoleAssignment() + { + IReadOnlyList roleAssignments = (await AccessControlClient.GetRoleAssignmentsAsync()).Value; + CollectionAssert.IsNotEmpty(roleAssignments); + foreach (RoleAssignmentDetails expectedRoleAssignment in roleAssignments) + { + RoleAssignmentDetails actualRoleAssignment = await AccessControlClient.GetRoleAssignmentByIdAsync(expectedRoleAssignment.Id); + Assert.AreEqual(expectedRoleAssignment.Id, actualRoleAssignment.Id); + Assert.AreEqual(expectedRoleAssignment.PrincipalId, actualRoleAssignment.PrincipalId); + Assert.AreEqual(expectedRoleAssignment.RoleId, actualRoleAssignment.RoleId); + } + } + + [Test] + public async Task TestCreateAndDeleteRoleAssignment() + { + string sqlAdminRoleId = "7af0c69a-a548-47d6-aea3-d00e69bd83aa"; + string principalId = Guid.NewGuid().ToString(); + + // Create role assignment. + RoleAssignmentDetails actualRoleAssignment = await AccessControlClient.CreateRoleAssignmentAsync(new RoleAssignmentOptions(roleId:sqlAdminRoleId, principalId: principalId)); + + // Verify the role assignment exists. + Assert.NotNull(actualRoleAssignment); + Assert.AreEqual(sqlAdminRoleId, actualRoleAssignment.RoleId); + Assert.AreEqual(principalId, actualRoleAssignment.PrincipalId); + + // Remove the role assignment. + await AccessControlClient.DeleteRoleAssignmentByIdAsync(actualRoleAssignment.Id); + + // Verify the role assignment doesn't exist. + actualRoleAssignment = (await AccessControlClient.GetRoleAssignmentsAsync()).Value.FirstOrDefault(ra => ra.PrincipalId == principalId); + Assert.IsNull(actualRoleAssignment); + } + + [Test] + public async Task TesGetCallerRoleAssignments() + { + IEnumerable expectedRoleIds = (await AccessControlClient.GetRoleDefinitionsAsync().ToEnumerableAsync()) + .Where(role=>role.IsBuiltIn) + .Select(role => role.Id); + Response> actualRoleIds = await AccessControlClient.GetCallerRoleAssignmentsAsync(); + CollectionAssert.AreEquivalent(expectedRoleIds, actualRoleIds.Value); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.AccessControl/tests/AccessControlClientTestBase.cs b/sdk/synapse/Azure.Analytics.Synapse.AccessControl/tests/AccessControlClientTestBase.cs new file mode 100644 index 000000000000..098eef3ffc24 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.AccessControl/tests/AccessControlClientTestBase.cs @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure.Analytics.Synapse.AccessControl; +using Azure.Core.TestFramework; +using NUnit.Framework; +using System; +using System.IO; + +namespace Azure.Analytics.Synapse.Tests.AccessControl +{ + [NonParallelizable] + public abstract class AccessControlClientTestBase : RecordedTestBase + { + public AccessControlClient AccessControlClient { get; set; } + + protected AccessControlClientTestBase(bool isAsync) : base(isAsync) + { +#if DEBUG + SaveDebugRecordingsOnFailure = true; +#endif + } + + public override void StartTestRecording() + { + base.StartTestRecording(); + + AccessControlClient = CreateAccessControlClient(); + } + + public override void StopTestRecording() + { + Recording.RewriteSessionRecords(GetSessionFilePath()); + Recording.ClearTextReplacementRules(); + base.StopTestRecording(); + } + + private string GetSessionFilePath(string name = null) + { + TestContext.TestAdapter testAdapter = TestContext.CurrentContext.Test; + + name ??= testAdapter.Name; + + string className = testAdapter.ClassName.Substring(testAdapter.ClassName.LastIndexOf('.') + 1); + string fileName = name + (IsAsync ? "Async" : string.Empty) + ".json"; + return Path.Combine(TestContext.CurrentContext.TestDirectory, "SessionRecords", className, fileName); + } + + internal AccessControlClient CreateAccessControlClient(TestRecording recording = null) + { + recording ??= Recording; + return InstrumentClient(new AccessControlClient( + new Uri(TestEnvironment.WorkspaceUrl), + TestEnvironment.Credential, + recording.InstrumentClientOptions(new AccessControlClientOptions()))); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.AccessControl/tests/Azure.Analytics.Synapse.AccessControl.Tests.csproj b/sdk/synapse/Azure.Analytics.Synapse.AccessControl/tests/Azure.Analytics.Synapse.AccessControl.Tests.csproj new file mode 100644 index 000000000000..852a7067cc8a --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.AccessControl/tests/Azure.Analytics.Synapse.AccessControl.Tests.csproj @@ -0,0 +1,22 @@ + + + $(RequiredTargetFrameworks) + + + + + + + + + + + + + + + + + + + diff --git a/sdk/synapse/Azure.Analytics.Synapse.AccessControl/tests/SessionRecords/AccessControlClientLiveTests/TesGetCallerRoleAssignments.json b/sdk/synapse/Azure.Analytics.Synapse.AccessControl/tests/SessionRecords/AccessControlClientLiveTests/TesGetCallerRoleAssignments.json new file mode 100644 index 000000000000..efcada75dee4 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.AccessControl/tests/SessionRecords/AccessControlClientLiveTests/TesGetCallerRoleAssignments.json @@ -0,0 +1,83 @@ +{ + "Entries": [ + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/rbac/roles?api-version=2020-02-01-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.AccessControl/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "3d2c25bc282aad39c91012ea9e321bc6", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Length": "272", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:53:32 GMT", + "Server": [ + "Microsoft-HTTPAPI/2.0", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "x-ms-client-request-id": "3d2c25bc282aad39c91012ea9e321bc6", + "x-ms-request-id": [ + "3120ee90-e659-49e4-804b-dba500f0397f", + "3120ee90-e659-49e4-804b-dba500f0397f" + ] + }, + "ResponseBody": { + "value": [ + { + "id": "6e4bf58a-b8e1-4cc3-bbf9-d73143322b78", + "name": "Workspace Admin", + "isBuiltIn": true + }, + { + "id": "c3a6d2f1-a26f-4810-9b0f-591308d5cbf1", + "name": "Apache Spark Admin", + "isBuiltIn": true + }, + { + "id": "7af0c69a-a548-47d6-aea3-d00e69bd83aa", + "name": "Sql Admin", + "isBuiltIn": true + } + ] + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/rbac/getMyAssignedRoles?api-version=2020-02-01-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-35042a6b4342d9428958533de193ef5e-155c16897c659949-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.AccessControl/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "16353bb23649213bc7bdf1d984ac60b2", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Length": "118", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:53:32 GMT", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "x-ms-client-request-id": "16353bb23649213bc7bdf1d984ac60b2", + "x-ms-request-id": "160996c9-6fb6-4c91-8469-cf31a6adaa16" + }, + "ResponseBody": "[\u00226e4bf58a-b8e1-4cc3-bbf9-d73143322b78\u0022,\u00227af0c69a-a548-47d6-aea3-d00e69bd83aa\u0022,\u0022c3a6d2f1-a26f-4810-9b0f-591308d5cbf1\u0022]" + } + ], + "Variables": { + "AZURE_SYNAPSE_WORKSPACE_URL": "https://testsynapseworkspace.dev.azuresynapse.net", + "RandomSeed": "1572800930" + } +} \ No newline at end of file diff --git a/sdk/synapse/Azure.Analytics.Synapse.AccessControl/tests/SessionRecords/AccessControlClientLiveTests/TesGetCallerRoleAssignmentsAsync.json b/sdk/synapse/Azure.Analytics.Synapse.AccessControl/tests/SessionRecords/AccessControlClientLiveTests/TesGetCallerRoleAssignmentsAsync.json new file mode 100644 index 000000000000..2de202453f75 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.AccessControl/tests/SessionRecords/AccessControlClientLiveTests/TesGetCallerRoleAssignmentsAsync.json @@ -0,0 +1,83 @@ +{ + "Entries": [ + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/rbac/roles?api-version=2020-02-01-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.AccessControl/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "43ee0239d7275c8456f1538df34357a7", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Length": "272", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:53:35 GMT", + "Server": [ + "Microsoft-HTTPAPI/2.0", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "x-ms-client-request-id": "43ee0239d7275c8456f1538df34357a7", + "x-ms-request-id": [ + "90c44c19-b362-4f26-8706-b3c84ccbc5b7", + "90c44c19-b362-4f26-8706-b3c84ccbc5b7" + ] + }, + "ResponseBody": { + "value": [ + { + "id": "6e4bf58a-b8e1-4cc3-bbf9-d73143322b78", + "name": "Workspace Admin", + "isBuiltIn": true + }, + { + "id": "c3a6d2f1-a26f-4810-9b0f-591308d5cbf1", + "name": "Apache Spark Admin", + "isBuiltIn": true + }, + { + "id": "7af0c69a-a548-47d6-aea3-d00e69bd83aa", + "name": "Sql Admin", + "isBuiltIn": true + } + ] + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/rbac/getMyAssignedRoles?api-version=2020-02-01-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-f225c0429ccb944fa5d23d32a5ae5f92-e9493764cd7c4c40-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.AccessControl/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "a512669bc97ab3448e55b7b7cfaf26c2", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Length": "118", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:53:35 GMT", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "x-ms-client-request-id": "a512669bc97ab3448e55b7b7cfaf26c2", + "x-ms-request-id": "9743aa2e-6390-4bc8-b559-6c217e7ed90f" + }, + "ResponseBody": "[\u00226e4bf58a-b8e1-4cc3-bbf9-d73143322b78\u0022,\u00227af0c69a-a548-47d6-aea3-d00e69bd83aa\u0022,\u0022c3a6d2f1-a26f-4810-9b0f-591308d5cbf1\u0022]" + } + ], + "Variables": { + "AZURE_SYNAPSE_WORKSPACE_URL": "https://testsynapseworkspace.dev.azuresynapse.net", + "RandomSeed": "1543734388" + } +} \ No newline at end of file diff --git a/sdk/synapse/Azure.Analytics.Synapse.AccessControl/tests/SessionRecords/AccessControlClientLiveTests/TestCreateAndDeleteRoleAssignment.json b/sdk/synapse/Azure.Analytics.Synapse.AccessControl/tests/SessionRecords/AccessControlClientLiveTests/TestCreateAndDeleteRoleAssignment.json new file mode 100644 index 000000000000..ca09d080d723 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.AccessControl/tests/SessionRecords/AccessControlClientLiveTests/TestCreateAndDeleteRoleAssignment.json @@ -0,0 +1,95 @@ +{ + "Entries": [ + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/rbac/roleAssignments?api-version=2020-02-01-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Authorization": "Sanitized", + "Content-Length": "102", + "Content-Type": "application/json", + "traceparent": "00-ac107be093a6b64db4c1d559d5fc14ea-9458c530e4c08b45-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.AccessControl/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "024168579fe07bc36ae654f6bd999c12", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "roleId": "7af0c69a-a548-47d6-aea3-d00e69bd83aa", + "principalId": "e7c7f5fb-c89e-430e-98a8-10cbcca56870" + }, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Length": "183", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:53:32 GMT", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "x-ms-client-request-id": "024168579fe07bc36ae654f6bd999c12", + "x-ms-request-id": "2266712c-6388-4b36-8311-ad1eb429994c" + }, + "ResponseBody": { + "id": "7af0c69a-a548-47d6-aea3-d00e69bd83aa-e7c7f5fb-c89e-430e-98a8-10cbcca56870", + "roleId": "7af0c69a-a548-47d6-aea3-d00e69bd83aa", + "principalId": "e7c7f5fb-c89e-430e-98a8-10cbcca56870" + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/rbac/roleAssignments/7af0c69a-a548-47d6-aea3-d00e69bd83aa-e7c7f5fb-c89e-430e-98a8-10cbcca56870?api-version=2020-02-01-preview", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-1f7b5146916315478335f9b5b0ce84ac-fd59e8ba64820046-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.AccessControl/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "e2dff03ce48183bd49a6a31e22a23495", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Mon, 25 May 2020 09:53:33 GMT", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "x-ms-client-request-id": "e2dff03ce48183bd49a6a31e22a23495", + "x-ms-request-id": "971ca785-5477-449a-a98f-0cb705c99518" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/rbac/roleAssignments?api-version=2020-02-01-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-8c230bee99eda343aca994c0011a7559-aac5028762be5e4f-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.AccessControl/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "bb2b862d33e9dca343d3fd2cfe727ac9", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Length": "2761", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:53:33 GMT", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "x-ms-client-request-id": "bb2b862d33e9dca343d3fd2cfe727ac9", + "x-ms-continuation": "", + "x-ms-request-id": "3cfef67f-2316-44d1-8f1f-548f2d6a493f" + }, + "ResponseBody": "[{\u0022id\u0022:\u00226e4bf58a-b8e1-4cc3-bbf9-d73143322b78-8f51e348-1fa6-4194-8d13-8e0368e3298a\u0022,\u0022roleId\u0022:\u00226e4bf58a-b8e1-4cc3-bbf9-d73143322b78\u0022,\u0022principalId\u0022:\u00228f51e348-1fa6-4194-8d13-8e0368e3298a\u0022},{\u0022id\u0022:\u00226e4bf58a-b8e1-4cc3-bbf9-d73143322b78-f63e7747-5fce-43a9-bd12-fb382caa5b7e\u0022,\u0022roleId\u0022:\u00226e4bf58a-b8e1-4cc3-bbf9-d73143322b78\u0022,\u0022principalId\u0022:\u0022f63e7747-5fce-43a9-bd12-fb382caa5b7e\u0022},{\u0022id\u0022:\u00226e4bf58a-b8e1-4cc3-bbf9-d73143322b78-6ece8f98-43d0-41c6-bb9a-7a0172e5a645\u0022,\u0022roleId\u0022:\u00226e4bf58a-b8e1-4cc3-bbf9-d73143322b78\u0022,\u0022principalId\u0022:\u00226ece8f98-43d0-41c6-bb9a-7a0172e5a645\u0022},{\u0022id\u0022:\u00226e4bf58a-b8e1-4cc3-bbf9-d73143322b78-ca728363-7297-4e35-a9c3-c6400837883e\u0022,\u0022roleId\u0022:\u00226e4bf58a-b8e1-4cc3-bbf9-d73143322b78\u0022,\u0022principalId\u0022:\u0022ca728363-7297-4e35-a9c3-c6400837883e\u0022},{\u0022id\u0022:\u00226e4bf58a-b8e1-4cc3-bbf9-d73143322b78-ed3c5c21-4f5d-4476-b9f6-f0c4bb404e1a\u0022,\u0022roleId\u0022:\u00226e4bf58a-b8e1-4cc3-bbf9-d73143322b78\u0022,\u0022principalId\u0022:\u0022ed3c5c21-4f5d-4476-b9f6-f0c4bb404e1a\u0022},{\u0022id\u0022:\u00226e4bf58a-b8e1-4cc3-bbf9-d73143322b78-b71a874a-f1a8-4811-b06d-6748316e45a7\u0022,\u0022roleId\u0022:\u00226e4bf58a-b8e1-4cc3-bbf9-d73143322b78\u0022,\u0022principalId\u0022:\u0022b71a874a-f1a8-4811-b06d-6748316e45a7\u0022},{\u0022id\u0022:\u0022c3a6d2f1-a26f-4810-9b0f-591308d5cbf1-b71a874a-f1a8-4811-b06d-6748316e45a7\u0022,\u0022roleId\u0022:\u0022c3a6d2f1-a26f-4810-9b0f-591308d5cbf1\u0022,\u0022principalId\u0022:\u0022b71a874a-f1a8-4811-b06d-6748316e45a7\u0022},{\u0022id\u0022:\u00227af0c69a-a548-47d6-aea3-d00e69bd83aa-b71a874a-f1a8-4811-b06d-6748316e45a7\u0022,\u0022roleId\u0022:\u00227af0c69a-a548-47d6-aea3-d00e69bd83aa\u0022,\u0022principalId\u0022:\u0022b71a874a-f1a8-4811-b06d-6748316e45a7\u0022},{\u0022id\u0022:\u0022c3a6d2f1-a26f-4810-9b0f-591308d5cbf1-e3688378-4440-43dc-9c10-8b8250fbd549\u0022,\u0022roleId\u0022:\u0022c3a6d2f1-a26f-4810-9b0f-591308d5cbf1\u0022,\u0022principalId\u0022:\u0022e3688378-4440-43dc-9c10-8b8250fbd549\u0022},{\u0022id\u0022:\u0022c3a6d2f1-a26f-4810-9b0f-591308d5cbf1-ca728363-7297-4e35-a9c3-c6400837883e\u0022,\u0022roleId\u0022:\u0022c3a6d2f1-a26f-4810-9b0f-591308d5cbf1\u0022,\u0022principalId\u0022:\u0022ca728363-7297-4e35-a9c3-c6400837883e\u0022},{\u0022id\u0022:\u00227af0c69a-a548-47d6-aea3-d00e69bd83aa-ca728363-7297-4e35-a9c3-c6400837883e\u0022,\u0022roleId\u0022:\u00227af0c69a-a548-47d6-aea3-d00e69bd83aa\u0022,\u0022principalId\u0022:\u0022ca728363-7297-4e35-a9c3-c6400837883e\u0022},{\u0022id\u0022:\u00227af0c69a-a548-47d6-aea3-d00e69bd83aa-e3688378-4440-43dc-9c10-8b8250fbd549\u0022,\u0022roleId\u0022:\u00227af0c69a-a548-47d6-aea3-d00e69bd83aa\u0022,\u0022principalId\u0022:\u0022e3688378-4440-43dc-9c10-8b8250fbd549\u0022},{\u0022id\u0022:\u00226e4bf58a-b8e1-4cc3-bbf9-d73143322b78-e3688378-4440-43dc-9c10-8b8250fbd549\u0022,\u0022roleId\u0022:\u00226e4bf58a-b8e1-4cc3-bbf9-d73143322b78\u0022,\u0022principalId\u0022:\u0022e3688378-4440-43dc-9c10-8b8250fbd549\u0022},{\u0022id\u0022:\u00227af0c69a-a548-47d6-aea3-d00e69bd83aa-3e537dfe-8cfd-4b17-b9e3-ae366f099311\u0022,\u0022roleId\u0022:\u00227af0c69a-a548-47d6-aea3-d00e69bd83aa\u0022,\u0022principalId\u0022:\u00223e537dfe-8cfd-4b17-b9e3-ae366f099311\u0022},{\u0022id\u0022:\u00227af0c69a-a548-47d6-aea3-d00e69bd83aa-1424271a-af44-4fb2-9c34-4da0cd9e2055\u0022,\u0022roleId\u0022:\u00227af0c69a-a548-47d6-aea3-d00e69bd83aa\u0022,\u0022principalId\u0022:\u00221424271a-af44-4fb2-9c34-4da0cd9e2055\u0022}]" + } + ], + "Variables": { + "AZURE_SYNAPSE_WORKSPACE_URL": "https://testsynapseworkspace.dev.azuresynapse.net", + "RandomSeed": "929018846" + } +} \ No newline at end of file diff --git a/sdk/synapse/Azure.Analytics.Synapse.AccessControl/tests/SessionRecords/AccessControlClientLiveTests/TestCreateAndDeleteRoleAssignmentAsync.json b/sdk/synapse/Azure.Analytics.Synapse.AccessControl/tests/SessionRecords/AccessControlClientLiveTests/TestCreateAndDeleteRoleAssignmentAsync.json new file mode 100644 index 000000000000..f46d90a6ddff --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.AccessControl/tests/SessionRecords/AccessControlClientLiveTests/TestCreateAndDeleteRoleAssignmentAsync.json @@ -0,0 +1,95 @@ +{ + "Entries": [ + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/rbac/roleAssignments?api-version=2020-02-01-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Authorization": "Sanitized", + "Content-Length": "102", + "Content-Type": "application/json", + "traceparent": "00-0af16b27dbef97428ed3165cbc226742-88b75863aa5eec4c-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.AccessControl/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "02ed50e4d1b31e3e286e52763c7ed103", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "roleId": "7af0c69a-a548-47d6-aea3-d00e69bd83aa", + "principalId": "da9bb1e9-c06f-4017-80da-7e1c352f6e03" + }, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Length": "183", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:53:35 GMT", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "x-ms-client-request-id": "02ed50e4d1b31e3e286e52763c7ed103", + "x-ms-request-id": "47baf86d-e495-4810-9102-82d834fbe162" + }, + "ResponseBody": { + "id": "7af0c69a-a548-47d6-aea3-d00e69bd83aa-da9bb1e9-c06f-4017-80da-7e1c352f6e03", + "roleId": "7af0c69a-a548-47d6-aea3-d00e69bd83aa", + "principalId": "da9bb1e9-c06f-4017-80da-7e1c352f6e03" + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/rbac/roleAssignments/7af0c69a-a548-47d6-aea3-d00e69bd83aa-da9bb1e9-c06f-4017-80da-7e1c352f6e03?api-version=2020-02-01-preview", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-6bdb9dff4d506a45879f8806bbef3f9c-40033d98f1580a49-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.AccessControl/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "8c8430fdda9285d522dd5c4867bb7865", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Mon, 25 May 2020 09:53:35 GMT", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "x-ms-client-request-id": "8c8430fdda9285d522dd5c4867bb7865", + "x-ms-request-id": "4071f954-951a-40c7-a32f-c496969ea5dc" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/rbac/roleAssignments?api-version=2020-02-01-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-b1b824cbdaaf354c89506513d9f42703-35361ce5c3485544-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.AccessControl/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "1acf3e4ce5541304c5cf300b3d286947", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Length": "2761", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:53:36 GMT", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "x-ms-client-request-id": "1acf3e4ce5541304c5cf300b3d286947", + "x-ms-continuation": "", + "x-ms-request-id": "0afc60a8-5519-43e7-a13b-cb5f838e5def" + }, + "ResponseBody": "[{\u0022id\u0022:\u00226e4bf58a-b8e1-4cc3-bbf9-d73143322b78-8f51e348-1fa6-4194-8d13-8e0368e3298a\u0022,\u0022roleId\u0022:\u00226e4bf58a-b8e1-4cc3-bbf9-d73143322b78\u0022,\u0022principalId\u0022:\u00228f51e348-1fa6-4194-8d13-8e0368e3298a\u0022},{\u0022id\u0022:\u00226e4bf58a-b8e1-4cc3-bbf9-d73143322b78-f63e7747-5fce-43a9-bd12-fb382caa5b7e\u0022,\u0022roleId\u0022:\u00226e4bf58a-b8e1-4cc3-bbf9-d73143322b78\u0022,\u0022principalId\u0022:\u0022f63e7747-5fce-43a9-bd12-fb382caa5b7e\u0022},{\u0022id\u0022:\u00226e4bf58a-b8e1-4cc3-bbf9-d73143322b78-6ece8f98-43d0-41c6-bb9a-7a0172e5a645\u0022,\u0022roleId\u0022:\u00226e4bf58a-b8e1-4cc3-bbf9-d73143322b78\u0022,\u0022principalId\u0022:\u00226ece8f98-43d0-41c6-bb9a-7a0172e5a645\u0022},{\u0022id\u0022:\u00226e4bf58a-b8e1-4cc3-bbf9-d73143322b78-ca728363-7297-4e35-a9c3-c6400837883e\u0022,\u0022roleId\u0022:\u00226e4bf58a-b8e1-4cc3-bbf9-d73143322b78\u0022,\u0022principalId\u0022:\u0022ca728363-7297-4e35-a9c3-c6400837883e\u0022},{\u0022id\u0022:\u00226e4bf58a-b8e1-4cc3-bbf9-d73143322b78-ed3c5c21-4f5d-4476-b9f6-f0c4bb404e1a\u0022,\u0022roleId\u0022:\u00226e4bf58a-b8e1-4cc3-bbf9-d73143322b78\u0022,\u0022principalId\u0022:\u0022ed3c5c21-4f5d-4476-b9f6-f0c4bb404e1a\u0022},{\u0022id\u0022:\u00226e4bf58a-b8e1-4cc3-bbf9-d73143322b78-b71a874a-f1a8-4811-b06d-6748316e45a7\u0022,\u0022roleId\u0022:\u00226e4bf58a-b8e1-4cc3-bbf9-d73143322b78\u0022,\u0022principalId\u0022:\u0022b71a874a-f1a8-4811-b06d-6748316e45a7\u0022},{\u0022id\u0022:\u0022c3a6d2f1-a26f-4810-9b0f-591308d5cbf1-b71a874a-f1a8-4811-b06d-6748316e45a7\u0022,\u0022roleId\u0022:\u0022c3a6d2f1-a26f-4810-9b0f-591308d5cbf1\u0022,\u0022principalId\u0022:\u0022b71a874a-f1a8-4811-b06d-6748316e45a7\u0022},{\u0022id\u0022:\u00227af0c69a-a548-47d6-aea3-d00e69bd83aa-b71a874a-f1a8-4811-b06d-6748316e45a7\u0022,\u0022roleId\u0022:\u00227af0c69a-a548-47d6-aea3-d00e69bd83aa\u0022,\u0022principalId\u0022:\u0022b71a874a-f1a8-4811-b06d-6748316e45a7\u0022},{\u0022id\u0022:\u0022c3a6d2f1-a26f-4810-9b0f-591308d5cbf1-e3688378-4440-43dc-9c10-8b8250fbd549\u0022,\u0022roleId\u0022:\u0022c3a6d2f1-a26f-4810-9b0f-591308d5cbf1\u0022,\u0022principalId\u0022:\u0022e3688378-4440-43dc-9c10-8b8250fbd549\u0022},{\u0022id\u0022:\u0022c3a6d2f1-a26f-4810-9b0f-591308d5cbf1-ca728363-7297-4e35-a9c3-c6400837883e\u0022,\u0022roleId\u0022:\u0022c3a6d2f1-a26f-4810-9b0f-591308d5cbf1\u0022,\u0022principalId\u0022:\u0022ca728363-7297-4e35-a9c3-c6400837883e\u0022},{\u0022id\u0022:\u00227af0c69a-a548-47d6-aea3-d00e69bd83aa-ca728363-7297-4e35-a9c3-c6400837883e\u0022,\u0022roleId\u0022:\u00227af0c69a-a548-47d6-aea3-d00e69bd83aa\u0022,\u0022principalId\u0022:\u0022ca728363-7297-4e35-a9c3-c6400837883e\u0022},{\u0022id\u0022:\u00227af0c69a-a548-47d6-aea3-d00e69bd83aa-e3688378-4440-43dc-9c10-8b8250fbd549\u0022,\u0022roleId\u0022:\u00227af0c69a-a548-47d6-aea3-d00e69bd83aa\u0022,\u0022principalId\u0022:\u0022e3688378-4440-43dc-9c10-8b8250fbd549\u0022},{\u0022id\u0022:\u00226e4bf58a-b8e1-4cc3-bbf9-d73143322b78-e3688378-4440-43dc-9c10-8b8250fbd549\u0022,\u0022roleId\u0022:\u00226e4bf58a-b8e1-4cc3-bbf9-d73143322b78\u0022,\u0022principalId\u0022:\u0022e3688378-4440-43dc-9c10-8b8250fbd549\u0022},{\u0022id\u0022:\u00227af0c69a-a548-47d6-aea3-d00e69bd83aa-3e537dfe-8cfd-4b17-b9e3-ae366f099311\u0022,\u0022roleId\u0022:\u00227af0c69a-a548-47d6-aea3-d00e69bd83aa\u0022,\u0022principalId\u0022:\u00223e537dfe-8cfd-4b17-b9e3-ae366f099311\u0022},{\u0022id\u0022:\u00227af0c69a-a548-47d6-aea3-d00e69bd83aa-1424271a-af44-4fb2-9c34-4da0cd9e2055\u0022,\u0022roleId\u0022:\u00227af0c69a-a548-47d6-aea3-d00e69bd83aa\u0022,\u0022principalId\u0022:\u00221424271a-af44-4fb2-9c34-4da0cd9e2055\u0022}]" + } + ], + "Variables": { + "AZURE_SYNAPSE_WORKSPACE_URL": "https://testsynapseworkspace.dev.azuresynapse.net", + "RandomSeed": "1514913004" + } +} \ No newline at end of file diff --git a/sdk/synapse/Azure.Analytics.Synapse.AccessControl/tests/SessionRecords/AccessControlClientLiveTests/TestGetRoleAssignment.json b/sdk/synapse/Azure.Analytics.Synapse.AccessControl/tests/SessionRecords/AccessControlClientLiveTests/TestGetRoleAssignment.json new file mode 100644 index 000000000000..844146165bd7 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.AccessControl/tests/SessionRecords/AccessControlClientLiveTests/TestGetRoleAssignment.json @@ -0,0 +1,485 @@ +{ + "Entries": [ + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/rbac/roleAssignments?api-version=2020-02-01-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-424aa816363df744a621af69f7295f99-c472d22bba820d42-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.AccessControl/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "1becccee8c3a69bb246e33a04c5e0308", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Length": "2761", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:53:33 GMT", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "x-ms-client-request-id": "1becccee8c3a69bb246e33a04c5e0308", + "x-ms-continuation": "", + "x-ms-request-id": "0b04efb3-45cd-4777-9b50-0b0ac931c798" + }, + "ResponseBody": "[{\u0022id\u0022:\u00226e4bf58a-b8e1-4cc3-bbf9-d73143322b78-8f51e348-1fa6-4194-8d13-8e0368e3298a\u0022,\u0022roleId\u0022:\u00226e4bf58a-b8e1-4cc3-bbf9-d73143322b78\u0022,\u0022principalId\u0022:\u00228f51e348-1fa6-4194-8d13-8e0368e3298a\u0022},{\u0022id\u0022:\u00226e4bf58a-b8e1-4cc3-bbf9-d73143322b78-f63e7747-5fce-43a9-bd12-fb382caa5b7e\u0022,\u0022roleId\u0022:\u00226e4bf58a-b8e1-4cc3-bbf9-d73143322b78\u0022,\u0022principalId\u0022:\u0022f63e7747-5fce-43a9-bd12-fb382caa5b7e\u0022},{\u0022id\u0022:\u00226e4bf58a-b8e1-4cc3-bbf9-d73143322b78-6ece8f98-43d0-41c6-bb9a-7a0172e5a645\u0022,\u0022roleId\u0022:\u00226e4bf58a-b8e1-4cc3-bbf9-d73143322b78\u0022,\u0022principalId\u0022:\u00226ece8f98-43d0-41c6-bb9a-7a0172e5a645\u0022},{\u0022id\u0022:\u00226e4bf58a-b8e1-4cc3-bbf9-d73143322b78-ca728363-7297-4e35-a9c3-c6400837883e\u0022,\u0022roleId\u0022:\u00226e4bf58a-b8e1-4cc3-bbf9-d73143322b78\u0022,\u0022principalId\u0022:\u0022ca728363-7297-4e35-a9c3-c6400837883e\u0022},{\u0022id\u0022:\u00226e4bf58a-b8e1-4cc3-bbf9-d73143322b78-ed3c5c21-4f5d-4476-b9f6-f0c4bb404e1a\u0022,\u0022roleId\u0022:\u00226e4bf58a-b8e1-4cc3-bbf9-d73143322b78\u0022,\u0022principalId\u0022:\u0022ed3c5c21-4f5d-4476-b9f6-f0c4bb404e1a\u0022},{\u0022id\u0022:\u00226e4bf58a-b8e1-4cc3-bbf9-d73143322b78-b71a874a-f1a8-4811-b06d-6748316e45a7\u0022,\u0022roleId\u0022:\u00226e4bf58a-b8e1-4cc3-bbf9-d73143322b78\u0022,\u0022principalId\u0022:\u0022b71a874a-f1a8-4811-b06d-6748316e45a7\u0022},{\u0022id\u0022:\u0022c3a6d2f1-a26f-4810-9b0f-591308d5cbf1-b71a874a-f1a8-4811-b06d-6748316e45a7\u0022,\u0022roleId\u0022:\u0022c3a6d2f1-a26f-4810-9b0f-591308d5cbf1\u0022,\u0022principalId\u0022:\u0022b71a874a-f1a8-4811-b06d-6748316e45a7\u0022},{\u0022id\u0022:\u00227af0c69a-a548-47d6-aea3-d00e69bd83aa-b71a874a-f1a8-4811-b06d-6748316e45a7\u0022,\u0022roleId\u0022:\u00227af0c69a-a548-47d6-aea3-d00e69bd83aa\u0022,\u0022principalId\u0022:\u0022b71a874a-f1a8-4811-b06d-6748316e45a7\u0022},{\u0022id\u0022:\u0022c3a6d2f1-a26f-4810-9b0f-591308d5cbf1-e3688378-4440-43dc-9c10-8b8250fbd549\u0022,\u0022roleId\u0022:\u0022c3a6d2f1-a26f-4810-9b0f-591308d5cbf1\u0022,\u0022principalId\u0022:\u0022e3688378-4440-43dc-9c10-8b8250fbd549\u0022},{\u0022id\u0022:\u0022c3a6d2f1-a26f-4810-9b0f-591308d5cbf1-ca728363-7297-4e35-a9c3-c6400837883e\u0022,\u0022roleId\u0022:\u0022c3a6d2f1-a26f-4810-9b0f-591308d5cbf1\u0022,\u0022principalId\u0022:\u0022ca728363-7297-4e35-a9c3-c6400837883e\u0022},{\u0022id\u0022:\u00227af0c69a-a548-47d6-aea3-d00e69bd83aa-ca728363-7297-4e35-a9c3-c6400837883e\u0022,\u0022roleId\u0022:\u00227af0c69a-a548-47d6-aea3-d00e69bd83aa\u0022,\u0022principalId\u0022:\u0022ca728363-7297-4e35-a9c3-c6400837883e\u0022},{\u0022id\u0022:\u00227af0c69a-a548-47d6-aea3-d00e69bd83aa-e3688378-4440-43dc-9c10-8b8250fbd549\u0022,\u0022roleId\u0022:\u00227af0c69a-a548-47d6-aea3-d00e69bd83aa\u0022,\u0022principalId\u0022:\u0022e3688378-4440-43dc-9c10-8b8250fbd549\u0022},{\u0022id\u0022:\u00226e4bf58a-b8e1-4cc3-bbf9-d73143322b78-e3688378-4440-43dc-9c10-8b8250fbd549\u0022,\u0022roleId\u0022:\u00226e4bf58a-b8e1-4cc3-bbf9-d73143322b78\u0022,\u0022principalId\u0022:\u0022e3688378-4440-43dc-9c10-8b8250fbd549\u0022},{\u0022id\u0022:\u00227af0c69a-a548-47d6-aea3-d00e69bd83aa-3e537dfe-8cfd-4b17-b9e3-ae366f099311\u0022,\u0022roleId\u0022:\u00227af0c69a-a548-47d6-aea3-d00e69bd83aa\u0022,\u0022principalId\u0022:\u00223e537dfe-8cfd-4b17-b9e3-ae366f099311\u0022},{\u0022id\u0022:\u00227af0c69a-a548-47d6-aea3-d00e69bd83aa-1424271a-af44-4fb2-9c34-4da0cd9e2055\u0022,\u0022roleId\u0022:\u00227af0c69a-a548-47d6-aea3-d00e69bd83aa\u0022,\u0022principalId\u0022:\u00221424271a-af44-4fb2-9c34-4da0cd9e2055\u0022}]" + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/rbac/roleAssignments/6e4bf58a-b8e1-4cc3-bbf9-d73143322b78-8f51e348-1fa6-4194-8d13-8e0368e3298a?api-version=2020-02-01-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-48f18ef8d56107418f2ede969720d3ba-177db142f05cec46-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.AccessControl/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "8ff3a533bfc98a870e11b89e0a79614c", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Length": "183", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:53:33 GMT", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "x-ms-client-request-id": "8ff3a533bfc98a870e11b89e0a79614c", + "x-ms-request-id": "66f11d07-c807-4ff4-8eeb-741209ddfa76" + }, + "ResponseBody": { + "id": "6e4bf58a-b8e1-4cc3-bbf9-d73143322b78-8f51e348-1fa6-4194-8d13-8e0368e3298a", + "roleId": "6e4bf58a-b8e1-4cc3-bbf9-d73143322b78", + "principalId": "8f51e348-1fa6-4194-8d13-8e0368e3298a" + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/rbac/roleAssignments/6e4bf58a-b8e1-4cc3-bbf9-d73143322b78-f63e7747-5fce-43a9-bd12-fb382caa5b7e?api-version=2020-02-01-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-0473b2a682d43d4e8bcd7f0dc9bc62e9-89b1fd9fb0b0e645-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.AccessControl/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "36156f365e1678d051e664f60e9f09d1", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Length": "183", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:53:33 GMT", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "x-ms-client-request-id": "36156f365e1678d051e664f60e9f09d1", + "x-ms-request-id": "5a633e79-dd98-4f02-983d-511aedee5603" + }, + "ResponseBody": { + "id": "6e4bf58a-b8e1-4cc3-bbf9-d73143322b78-f63e7747-5fce-43a9-bd12-fb382caa5b7e", + "roleId": "6e4bf58a-b8e1-4cc3-bbf9-d73143322b78", + "principalId": "f63e7747-5fce-43a9-bd12-fb382caa5b7e" + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/rbac/roleAssignments/6e4bf58a-b8e1-4cc3-bbf9-d73143322b78-6ece8f98-43d0-41c6-bb9a-7a0172e5a645?api-version=2020-02-01-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-683da92a2d5ef74ca319a2ce657e7955-f393d79a58398b41-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.AccessControl/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "e57bbd2e301c2e0a44610c29d31c5eaa", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Length": "183", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:53:33 GMT", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "x-ms-client-request-id": "e57bbd2e301c2e0a44610c29d31c5eaa", + "x-ms-request-id": "a5ec2b1d-5eb9-43ef-abda-f2efe5d8b263" + }, + "ResponseBody": { + "id": "6e4bf58a-b8e1-4cc3-bbf9-d73143322b78-6ece8f98-43d0-41c6-bb9a-7a0172e5a645", + "roleId": "6e4bf58a-b8e1-4cc3-bbf9-d73143322b78", + "principalId": "6ece8f98-43d0-41c6-bb9a-7a0172e5a645" + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/rbac/roleAssignments/6e4bf58a-b8e1-4cc3-bbf9-d73143322b78-ca728363-7297-4e35-a9c3-c6400837883e?api-version=2020-02-01-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-b369c5f199fa4b43966e93d96c6706d9-e28546ea81b47646-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.AccessControl/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "dc6ae70ccd49d4f2d47b3de25b907b6f", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Length": "183", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:53:33 GMT", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "x-ms-client-request-id": "dc6ae70ccd49d4f2d47b3de25b907b6f", + "x-ms-request-id": "f1cd8fc5-e34c-45be-8d1f-ef305232fadd" + }, + "ResponseBody": { + "id": "6e4bf58a-b8e1-4cc3-bbf9-d73143322b78-ca728363-7297-4e35-a9c3-c6400837883e", + "roleId": "6e4bf58a-b8e1-4cc3-bbf9-d73143322b78", + "principalId": "ca728363-7297-4e35-a9c3-c6400837883e" + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/rbac/roleAssignments/6e4bf58a-b8e1-4cc3-bbf9-d73143322b78-ed3c5c21-4f5d-4476-b9f6-f0c4bb404e1a?api-version=2020-02-01-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-5bedfa7e76c65f49bf1d9ce2e0f2c44d-e9c8148997b7b44b-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.AccessControl/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "4d6fe7077cfe053064e6f1b451a7a534", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Length": "183", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:53:33 GMT", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "x-ms-client-request-id": "4d6fe7077cfe053064e6f1b451a7a534", + "x-ms-request-id": "b7f5c332-9c9b-4454-925e-d54e487f1f9e" + }, + "ResponseBody": { + "id": "6e4bf58a-b8e1-4cc3-bbf9-d73143322b78-ed3c5c21-4f5d-4476-b9f6-f0c4bb404e1a", + "roleId": "6e4bf58a-b8e1-4cc3-bbf9-d73143322b78", + "principalId": "ed3c5c21-4f5d-4476-b9f6-f0c4bb404e1a" + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/rbac/roleAssignments/6e4bf58a-b8e1-4cc3-bbf9-d73143322b78-b71a874a-f1a8-4811-b06d-6748316e45a7?api-version=2020-02-01-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-0f1e65b27d5990489a83dbdcebbc5bbb-41de23c2db7ef84e-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.AccessControl/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "27eab9872d356188cba610a1f227d3b3", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Length": "183", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:53:33 GMT", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "x-ms-client-request-id": "27eab9872d356188cba610a1f227d3b3", + "x-ms-request-id": "25a0aaf8-a64b-4557-8a4b-5d6b10cafe90" + }, + "ResponseBody": { + "id": "6e4bf58a-b8e1-4cc3-bbf9-d73143322b78-b71a874a-f1a8-4811-b06d-6748316e45a7", + "roleId": "6e4bf58a-b8e1-4cc3-bbf9-d73143322b78", + "principalId": "b71a874a-f1a8-4811-b06d-6748316e45a7" + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/rbac/roleAssignments/c3a6d2f1-a26f-4810-9b0f-591308d5cbf1-b71a874a-f1a8-4811-b06d-6748316e45a7?api-version=2020-02-01-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-fa1f26a6da32ac49826707ac20ff7ac3-3e4ff6c08623084c-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.AccessControl/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "ec229de611ad90acb7647862db3e822d", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Length": "183", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:53:33 GMT", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "x-ms-client-request-id": "ec229de611ad90acb7647862db3e822d", + "x-ms-request-id": "6121d0a6-890f-497f-b744-5173e529d334" + }, + "ResponseBody": { + "id": "c3a6d2f1-a26f-4810-9b0f-591308d5cbf1-b71a874a-f1a8-4811-b06d-6748316e45a7", + "roleId": "c3a6d2f1-a26f-4810-9b0f-591308d5cbf1", + "principalId": "b71a874a-f1a8-4811-b06d-6748316e45a7" + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/rbac/roleAssignments/7af0c69a-a548-47d6-aea3-d00e69bd83aa-b71a874a-f1a8-4811-b06d-6748316e45a7?api-version=2020-02-01-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-b979d26fbbeb9549a9cd63fa34b13868-6d5c651914bc3a4b-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.AccessControl/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "a25b09d554a6da395e0e81586b8f133c", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Length": "183", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:53:33 GMT", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "x-ms-client-request-id": "a25b09d554a6da395e0e81586b8f133c", + "x-ms-request-id": "2d301d99-b2c2-4c71-92b0-7ab7a309ae7b" + }, + "ResponseBody": { + "id": "7af0c69a-a548-47d6-aea3-d00e69bd83aa-b71a874a-f1a8-4811-b06d-6748316e45a7", + "roleId": "7af0c69a-a548-47d6-aea3-d00e69bd83aa", + "principalId": "b71a874a-f1a8-4811-b06d-6748316e45a7" + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/rbac/roleAssignments/c3a6d2f1-a26f-4810-9b0f-591308d5cbf1-e3688378-4440-43dc-9c10-8b8250fbd549?api-version=2020-02-01-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-006120d5ba8f53439d2aac0d38869a31-969627840cd4f54e-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.AccessControl/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "b4cd3e13b98575870c5970d0b526868d", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Length": "183", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:53:34 GMT", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "x-ms-client-request-id": "b4cd3e13b98575870c5970d0b526868d", + "x-ms-request-id": "856978a8-36ad-4346-8430-fe8d9cf94457" + }, + "ResponseBody": { + "id": "c3a6d2f1-a26f-4810-9b0f-591308d5cbf1-e3688378-4440-43dc-9c10-8b8250fbd549", + "roleId": "c3a6d2f1-a26f-4810-9b0f-591308d5cbf1", + "principalId": "e3688378-4440-43dc-9c10-8b8250fbd549" + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/rbac/roleAssignments/c3a6d2f1-a26f-4810-9b0f-591308d5cbf1-ca728363-7297-4e35-a9c3-c6400837883e?api-version=2020-02-01-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-c7f4386c3bee554780a84977ab1ab1af-9a5d571c4b6c344d-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.AccessControl/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "e9cbe32330cc910c64488d9e8f542427", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Length": "183", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:53:34 GMT", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "x-ms-client-request-id": "e9cbe32330cc910c64488d9e8f542427", + "x-ms-request-id": "4da8d55d-b72f-49c4-821b-b6f95d363167" + }, + "ResponseBody": { + "id": "c3a6d2f1-a26f-4810-9b0f-591308d5cbf1-ca728363-7297-4e35-a9c3-c6400837883e", + "roleId": "c3a6d2f1-a26f-4810-9b0f-591308d5cbf1", + "principalId": "ca728363-7297-4e35-a9c3-c6400837883e" + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/rbac/roleAssignments/7af0c69a-a548-47d6-aea3-d00e69bd83aa-ca728363-7297-4e35-a9c3-c6400837883e?api-version=2020-02-01-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-ca9f1c019e5db34993ca158d3466ea71-8c86e769a9316b48-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.AccessControl/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "9d4e3b51ce701ca881e5954ce4682438", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Length": "183", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:53:34 GMT", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "x-ms-client-request-id": "9d4e3b51ce701ca881e5954ce4682438", + "x-ms-request-id": "65b86684-7fbf-45f5-a73b-bdc440b28eb7" + }, + "ResponseBody": { + "id": "7af0c69a-a548-47d6-aea3-d00e69bd83aa-ca728363-7297-4e35-a9c3-c6400837883e", + "roleId": "7af0c69a-a548-47d6-aea3-d00e69bd83aa", + "principalId": "ca728363-7297-4e35-a9c3-c6400837883e" + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/rbac/roleAssignments/7af0c69a-a548-47d6-aea3-d00e69bd83aa-e3688378-4440-43dc-9c10-8b8250fbd549?api-version=2020-02-01-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-aadffdb92bf10440805c56aeb0a50926-59e525c46c5d1b40-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.AccessControl/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "8835f4882ac3e270313c4f3c2be8e5b8", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Length": "183", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:53:34 GMT", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "x-ms-client-request-id": "8835f4882ac3e270313c4f3c2be8e5b8", + "x-ms-request-id": "dcfbcd32-f634-48f5-89bc-c546e57a1dd6" + }, + "ResponseBody": { + "id": "7af0c69a-a548-47d6-aea3-d00e69bd83aa-e3688378-4440-43dc-9c10-8b8250fbd549", + "roleId": "7af0c69a-a548-47d6-aea3-d00e69bd83aa", + "principalId": "e3688378-4440-43dc-9c10-8b8250fbd549" + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/rbac/roleAssignments/6e4bf58a-b8e1-4cc3-bbf9-d73143322b78-e3688378-4440-43dc-9c10-8b8250fbd549?api-version=2020-02-01-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-2a10fa73cca3114ab07440a60840beb4-33b0ec1d4f13af49-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.AccessControl/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "7a7f4835e8d7541d3baf67e79bc0adfb", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Length": "183", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:53:34 GMT", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "x-ms-client-request-id": "7a7f4835e8d7541d3baf67e79bc0adfb", + "x-ms-request-id": "c71ef781-a929-4f19-950d-3b4c8fe100f7" + }, + "ResponseBody": { + "id": "6e4bf58a-b8e1-4cc3-bbf9-d73143322b78-e3688378-4440-43dc-9c10-8b8250fbd549", + "roleId": "6e4bf58a-b8e1-4cc3-bbf9-d73143322b78", + "principalId": "e3688378-4440-43dc-9c10-8b8250fbd549" + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/rbac/roleAssignments/7af0c69a-a548-47d6-aea3-d00e69bd83aa-3e537dfe-8cfd-4b17-b9e3-ae366f099311?api-version=2020-02-01-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-df9e5959a85cf34f9168387291ff8e1f-3615b0f5182ceb49-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.AccessControl/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "9b1654239c1f2764ca6b6b337e6bf098", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Length": "183", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:53:34 GMT", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "x-ms-client-request-id": "9b1654239c1f2764ca6b6b337e6bf098", + "x-ms-request-id": "37b11d74-55ee-493a-bc75-f688958b3da5" + }, + "ResponseBody": { + "id": "7af0c69a-a548-47d6-aea3-d00e69bd83aa-3e537dfe-8cfd-4b17-b9e3-ae366f099311", + "roleId": "7af0c69a-a548-47d6-aea3-d00e69bd83aa", + "principalId": "3e537dfe-8cfd-4b17-b9e3-ae366f099311" + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/rbac/roleAssignments/7af0c69a-a548-47d6-aea3-d00e69bd83aa-1424271a-af44-4fb2-9c34-4da0cd9e2055?api-version=2020-02-01-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-3cd6e0fc27bd9241b988e7b0c15da866-7c1001bb61acb741-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.AccessControl/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "9c17dcffaae99f61d7e04c14c2894771", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Length": "183", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:53:34 GMT", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "x-ms-client-request-id": "9c17dcffaae99f61d7e04c14c2894771", + "x-ms-request-id": "2423d76e-e259-477b-a781-61ace46253ad" + }, + "ResponseBody": { + "id": "7af0c69a-a548-47d6-aea3-d00e69bd83aa-1424271a-af44-4fb2-9c34-4da0cd9e2055", + "roleId": "7af0c69a-a548-47d6-aea3-d00e69bd83aa", + "principalId": "1424271a-af44-4fb2-9c34-4da0cd9e2055" + } + } + ], + "Variables": { + "AZURE_SYNAPSE_WORKSPACE_URL": "https://testsynapseworkspace.dev.azuresynapse.net", + "RandomSeed": "799761294" + } +} \ No newline at end of file diff --git a/sdk/synapse/Azure.Analytics.Synapse.AccessControl/tests/SessionRecords/AccessControlClientLiveTests/TestGetRoleAssignmentAsync.json b/sdk/synapse/Azure.Analytics.Synapse.AccessControl/tests/SessionRecords/AccessControlClientLiveTests/TestGetRoleAssignmentAsync.json new file mode 100644 index 000000000000..59afbf64ce39 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.AccessControl/tests/SessionRecords/AccessControlClientLiveTests/TestGetRoleAssignmentAsync.json @@ -0,0 +1,485 @@ +{ + "Entries": [ + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/rbac/roleAssignments?api-version=2020-02-01-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-cb3d6e586f8fc54d868a3c2d5c64f398-b980eb4a23cadb4c-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.AccessControl/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "abc7b72b7f1159665dfd31a0862c31eb", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Length": "2761", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:53:36 GMT", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "x-ms-client-request-id": "abc7b72b7f1159665dfd31a0862c31eb", + "x-ms-continuation": "", + "x-ms-request-id": "a1007dab-b32b-46dd-bf41-4bc95934caab" + }, + "ResponseBody": "[{\u0022id\u0022:\u00226e4bf58a-b8e1-4cc3-bbf9-d73143322b78-8f51e348-1fa6-4194-8d13-8e0368e3298a\u0022,\u0022roleId\u0022:\u00226e4bf58a-b8e1-4cc3-bbf9-d73143322b78\u0022,\u0022principalId\u0022:\u00228f51e348-1fa6-4194-8d13-8e0368e3298a\u0022},{\u0022id\u0022:\u00226e4bf58a-b8e1-4cc3-bbf9-d73143322b78-f63e7747-5fce-43a9-bd12-fb382caa5b7e\u0022,\u0022roleId\u0022:\u00226e4bf58a-b8e1-4cc3-bbf9-d73143322b78\u0022,\u0022principalId\u0022:\u0022f63e7747-5fce-43a9-bd12-fb382caa5b7e\u0022},{\u0022id\u0022:\u00226e4bf58a-b8e1-4cc3-bbf9-d73143322b78-6ece8f98-43d0-41c6-bb9a-7a0172e5a645\u0022,\u0022roleId\u0022:\u00226e4bf58a-b8e1-4cc3-bbf9-d73143322b78\u0022,\u0022principalId\u0022:\u00226ece8f98-43d0-41c6-bb9a-7a0172e5a645\u0022},{\u0022id\u0022:\u00226e4bf58a-b8e1-4cc3-bbf9-d73143322b78-ca728363-7297-4e35-a9c3-c6400837883e\u0022,\u0022roleId\u0022:\u00226e4bf58a-b8e1-4cc3-bbf9-d73143322b78\u0022,\u0022principalId\u0022:\u0022ca728363-7297-4e35-a9c3-c6400837883e\u0022},{\u0022id\u0022:\u00226e4bf58a-b8e1-4cc3-bbf9-d73143322b78-ed3c5c21-4f5d-4476-b9f6-f0c4bb404e1a\u0022,\u0022roleId\u0022:\u00226e4bf58a-b8e1-4cc3-bbf9-d73143322b78\u0022,\u0022principalId\u0022:\u0022ed3c5c21-4f5d-4476-b9f6-f0c4bb404e1a\u0022},{\u0022id\u0022:\u00226e4bf58a-b8e1-4cc3-bbf9-d73143322b78-b71a874a-f1a8-4811-b06d-6748316e45a7\u0022,\u0022roleId\u0022:\u00226e4bf58a-b8e1-4cc3-bbf9-d73143322b78\u0022,\u0022principalId\u0022:\u0022b71a874a-f1a8-4811-b06d-6748316e45a7\u0022},{\u0022id\u0022:\u0022c3a6d2f1-a26f-4810-9b0f-591308d5cbf1-b71a874a-f1a8-4811-b06d-6748316e45a7\u0022,\u0022roleId\u0022:\u0022c3a6d2f1-a26f-4810-9b0f-591308d5cbf1\u0022,\u0022principalId\u0022:\u0022b71a874a-f1a8-4811-b06d-6748316e45a7\u0022},{\u0022id\u0022:\u00227af0c69a-a548-47d6-aea3-d00e69bd83aa-b71a874a-f1a8-4811-b06d-6748316e45a7\u0022,\u0022roleId\u0022:\u00227af0c69a-a548-47d6-aea3-d00e69bd83aa\u0022,\u0022principalId\u0022:\u0022b71a874a-f1a8-4811-b06d-6748316e45a7\u0022},{\u0022id\u0022:\u0022c3a6d2f1-a26f-4810-9b0f-591308d5cbf1-e3688378-4440-43dc-9c10-8b8250fbd549\u0022,\u0022roleId\u0022:\u0022c3a6d2f1-a26f-4810-9b0f-591308d5cbf1\u0022,\u0022principalId\u0022:\u0022e3688378-4440-43dc-9c10-8b8250fbd549\u0022},{\u0022id\u0022:\u0022c3a6d2f1-a26f-4810-9b0f-591308d5cbf1-ca728363-7297-4e35-a9c3-c6400837883e\u0022,\u0022roleId\u0022:\u0022c3a6d2f1-a26f-4810-9b0f-591308d5cbf1\u0022,\u0022principalId\u0022:\u0022ca728363-7297-4e35-a9c3-c6400837883e\u0022},{\u0022id\u0022:\u00227af0c69a-a548-47d6-aea3-d00e69bd83aa-ca728363-7297-4e35-a9c3-c6400837883e\u0022,\u0022roleId\u0022:\u00227af0c69a-a548-47d6-aea3-d00e69bd83aa\u0022,\u0022principalId\u0022:\u0022ca728363-7297-4e35-a9c3-c6400837883e\u0022},{\u0022id\u0022:\u00227af0c69a-a548-47d6-aea3-d00e69bd83aa-e3688378-4440-43dc-9c10-8b8250fbd549\u0022,\u0022roleId\u0022:\u00227af0c69a-a548-47d6-aea3-d00e69bd83aa\u0022,\u0022principalId\u0022:\u0022e3688378-4440-43dc-9c10-8b8250fbd549\u0022},{\u0022id\u0022:\u00226e4bf58a-b8e1-4cc3-bbf9-d73143322b78-e3688378-4440-43dc-9c10-8b8250fbd549\u0022,\u0022roleId\u0022:\u00226e4bf58a-b8e1-4cc3-bbf9-d73143322b78\u0022,\u0022principalId\u0022:\u0022e3688378-4440-43dc-9c10-8b8250fbd549\u0022},{\u0022id\u0022:\u00227af0c69a-a548-47d6-aea3-d00e69bd83aa-3e537dfe-8cfd-4b17-b9e3-ae366f099311\u0022,\u0022roleId\u0022:\u00227af0c69a-a548-47d6-aea3-d00e69bd83aa\u0022,\u0022principalId\u0022:\u00223e537dfe-8cfd-4b17-b9e3-ae366f099311\u0022},{\u0022id\u0022:\u00227af0c69a-a548-47d6-aea3-d00e69bd83aa-1424271a-af44-4fb2-9c34-4da0cd9e2055\u0022,\u0022roleId\u0022:\u00227af0c69a-a548-47d6-aea3-d00e69bd83aa\u0022,\u0022principalId\u0022:\u00221424271a-af44-4fb2-9c34-4da0cd9e2055\u0022}]" + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/rbac/roleAssignments/6e4bf58a-b8e1-4cc3-bbf9-d73143322b78-8f51e348-1fa6-4194-8d13-8e0368e3298a?api-version=2020-02-01-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-90d85f5168fb124dbd2f545fc6c59868-eb79b4d26394a041-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.AccessControl/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "4097d8b47c7292412ac801ffbab07c83", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Length": "183", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:53:36 GMT", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "x-ms-client-request-id": "4097d8b47c7292412ac801ffbab07c83", + "x-ms-request-id": "de2b8a05-dc57-4be2-89ec-db46aa27e273" + }, + "ResponseBody": { + "id": "6e4bf58a-b8e1-4cc3-bbf9-d73143322b78-8f51e348-1fa6-4194-8d13-8e0368e3298a", + "roleId": "6e4bf58a-b8e1-4cc3-bbf9-d73143322b78", + "principalId": "8f51e348-1fa6-4194-8d13-8e0368e3298a" + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/rbac/roleAssignments/6e4bf58a-b8e1-4cc3-bbf9-d73143322b78-f63e7747-5fce-43a9-bd12-fb382caa5b7e?api-version=2020-02-01-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-925f292ae1db074c91a108841f8ca8db-03ec7990fdf63043-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.AccessControl/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "c3181ab98ed96ef2eb008a6961c81fe5", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Length": "183", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:53:36 GMT", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "x-ms-client-request-id": "c3181ab98ed96ef2eb008a6961c81fe5", + "x-ms-request-id": "23efb0cb-c1a4-41b5-bb16-5054c2d46a0d" + }, + "ResponseBody": { + "id": "6e4bf58a-b8e1-4cc3-bbf9-d73143322b78-f63e7747-5fce-43a9-bd12-fb382caa5b7e", + "roleId": "6e4bf58a-b8e1-4cc3-bbf9-d73143322b78", + "principalId": "f63e7747-5fce-43a9-bd12-fb382caa5b7e" + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/rbac/roleAssignments/6e4bf58a-b8e1-4cc3-bbf9-d73143322b78-6ece8f98-43d0-41c6-bb9a-7a0172e5a645?api-version=2020-02-01-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-6ed08a209ea413428699e1095f16b433-075d414e7a2af342-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.AccessControl/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "775afa537d2cae1b753481487e679ead", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Length": "183", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:53:36 GMT", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "x-ms-client-request-id": "775afa537d2cae1b753481487e679ead", + "x-ms-request-id": "5e7d78a7-7cc1-4f36-8301-5dd8a1c56379" + }, + "ResponseBody": { + "id": "6e4bf58a-b8e1-4cc3-bbf9-d73143322b78-6ece8f98-43d0-41c6-bb9a-7a0172e5a645", + "roleId": "6e4bf58a-b8e1-4cc3-bbf9-d73143322b78", + "principalId": "6ece8f98-43d0-41c6-bb9a-7a0172e5a645" + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/rbac/roleAssignments/6e4bf58a-b8e1-4cc3-bbf9-d73143322b78-ca728363-7297-4e35-a9c3-c6400837883e?api-version=2020-02-01-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-35770d3f0e0227459cd34b3d7669a973-7542ce80317c5c4f-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.AccessControl/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "6be6ae806e132512e6295571f2d83162", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Length": "183", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:53:36 GMT", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "x-ms-client-request-id": "6be6ae806e132512e6295571f2d83162", + "x-ms-request-id": "33a77662-aca5-44af-b82e-5aff28186d3a" + }, + "ResponseBody": { + "id": "6e4bf58a-b8e1-4cc3-bbf9-d73143322b78-ca728363-7297-4e35-a9c3-c6400837883e", + "roleId": "6e4bf58a-b8e1-4cc3-bbf9-d73143322b78", + "principalId": "ca728363-7297-4e35-a9c3-c6400837883e" + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/rbac/roleAssignments/6e4bf58a-b8e1-4cc3-bbf9-d73143322b78-ed3c5c21-4f5d-4476-b9f6-f0c4bb404e1a?api-version=2020-02-01-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-3cad611c5dc2b049893b188226876339-67ee61c0b1642f43-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.AccessControl/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "bfab1ba804553b56fe694da50da9ef83", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Length": "183", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:53:36 GMT", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "x-ms-client-request-id": "bfab1ba804553b56fe694da50da9ef83", + "x-ms-request-id": "8087b835-c0a6-4b4e-986a-03a11c902da0" + }, + "ResponseBody": { + "id": "6e4bf58a-b8e1-4cc3-bbf9-d73143322b78-ed3c5c21-4f5d-4476-b9f6-f0c4bb404e1a", + "roleId": "6e4bf58a-b8e1-4cc3-bbf9-d73143322b78", + "principalId": "ed3c5c21-4f5d-4476-b9f6-f0c4bb404e1a" + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/rbac/roleAssignments/6e4bf58a-b8e1-4cc3-bbf9-d73143322b78-b71a874a-f1a8-4811-b06d-6748316e45a7?api-version=2020-02-01-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-d482eb3cddd08e449772e9c4e440f0f3-3f54dbf60ef06d4e-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.AccessControl/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "b3e8dc61b3e1e5d1e835910328a9bc9d", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Length": "183", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:53:36 GMT", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "x-ms-client-request-id": "b3e8dc61b3e1e5d1e835910328a9bc9d", + "x-ms-request-id": "388bdd07-0b98-47b2-b5fd-ae31cb1c369b" + }, + "ResponseBody": { + "id": "6e4bf58a-b8e1-4cc3-bbf9-d73143322b78-b71a874a-f1a8-4811-b06d-6748316e45a7", + "roleId": "6e4bf58a-b8e1-4cc3-bbf9-d73143322b78", + "principalId": "b71a874a-f1a8-4811-b06d-6748316e45a7" + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/rbac/roleAssignments/c3a6d2f1-a26f-4810-9b0f-591308d5cbf1-b71a874a-f1a8-4811-b06d-6748316e45a7?api-version=2020-02-01-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-23a5882195b65e48b3cbbe16a9242d6c-1475ad1096e13e46-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.AccessControl/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "629f1f03dfbb7c5757aa6ca9206c183c", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Length": "183", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:53:36 GMT", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "x-ms-client-request-id": "629f1f03dfbb7c5757aa6ca9206c183c", + "x-ms-request-id": "5a36ce81-7621-4a54-86ca-08289515b39d" + }, + "ResponseBody": { + "id": "c3a6d2f1-a26f-4810-9b0f-591308d5cbf1-b71a874a-f1a8-4811-b06d-6748316e45a7", + "roleId": "c3a6d2f1-a26f-4810-9b0f-591308d5cbf1", + "principalId": "b71a874a-f1a8-4811-b06d-6748316e45a7" + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/rbac/roleAssignments/7af0c69a-a548-47d6-aea3-d00e69bd83aa-b71a874a-f1a8-4811-b06d-6748316e45a7?api-version=2020-02-01-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-07f6d777638fb7449a618d0fa580e236-80eb77a41c07cb4e-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.AccessControl/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "1510d1397df0f58049c6d62072531355", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Length": "183", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:53:36 GMT", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "x-ms-client-request-id": "1510d1397df0f58049c6d62072531355", + "x-ms-request-id": "2348eab4-e29f-45bf-9a55-cb674c34a03f" + }, + "ResponseBody": { + "id": "7af0c69a-a548-47d6-aea3-d00e69bd83aa-b71a874a-f1a8-4811-b06d-6748316e45a7", + "roleId": "7af0c69a-a548-47d6-aea3-d00e69bd83aa", + "principalId": "b71a874a-f1a8-4811-b06d-6748316e45a7" + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/rbac/roleAssignments/c3a6d2f1-a26f-4810-9b0f-591308d5cbf1-e3688378-4440-43dc-9c10-8b8250fbd549?api-version=2020-02-01-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-d99a1de4b32cbc49b1d394af6b511683-a4db1316beee4d48-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.AccessControl/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "eea2b0ad8c0981c7846c5c374627c57b", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Length": "183", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:53:37 GMT", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "x-ms-client-request-id": "eea2b0ad8c0981c7846c5c374627c57b", + "x-ms-request-id": "ef6a1a4b-d988-4dd6-9520-e93c755a8f9d" + }, + "ResponseBody": { + "id": "c3a6d2f1-a26f-4810-9b0f-591308d5cbf1-e3688378-4440-43dc-9c10-8b8250fbd549", + "roleId": "c3a6d2f1-a26f-4810-9b0f-591308d5cbf1", + "principalId": "e3688378-4440-43dc-9c10-8b8250fbd549" + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/rbac/roleAssignments/c3a6d2f1-a26f-4810-9b0f-591308d5cbf1-ca728363-7297-4e35-a9c3-c6400837883e?api-version=2020-02-01-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-46c962ff426b92448e038940313f0497-4d714d8db4214946-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.AccessControl/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "57c9551ca69885ad9faa19f509370903", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Length": "183", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:53:37 GMT", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "x-ms-client-request-id": "57c9551ca69885ad9faa19f509370903", + "x-ms-request-id": "0c59d625-36be-47ac-91e8-7ca23b777c1f" + }, + "ResponseBody": { + "id": "c3a6d2f1-a26f-4810-9b0f-591308d5cbf1-ca728363-7297-4e35-a9c3-c6400837883e", + "roleId": "c3a6d2f1-a26f-4810-9b0f-591308d5cbf1", + "principalId": "ca728363-7297-4e35-a9c3-c6400837883e" + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/rbac/roleAssignments/7af0c69a-a548-47d6-aea3-d00e69bd83aa-ca728363-7297-4e35-a9c3-c6400837883e?api-version=2020-02-01-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-562552116a083e43a635474324d81a3f-8b4e9741270ad948-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.AccessControl/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "6ffc17972acaac32098e90832048ae21", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Length": "183", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:53:37 GMT", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "x-ms-client-request-id": "6ffc17972acaac32098e90832048ae21", + "x-ms-request-id": "c71d481c-841a-455e-82b2-d64e53bcb456" + }, + "ResponseBody": { + "id": "7af0c69a-a548-47d6-aea3-d00e69bd83aa-ca728363-7297-4e35-a9c3-c6400837883e", + "roleId": "7af0c69a-a548-47d6-aea3-d00e69bd83aa", + "principalId": "ca728363-7297-4e35-a9c3-c6400837883e" + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/rbac/roleAssignments/7af0c69a-a548-47d6-aea3-d00e69bd83aa-e3688378-4440-43dc-9c10-8b8250fbd549?api-version=2020-02-01-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-0c93bacf0b92a04f879523547d853efc-43219264fb0a994c-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.AccessControl/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "1d035a01bb8a06bc031c4e5f73d2784d", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Length": "183", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:53:37 GMT", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "x-ms-client-request-id": "1d035a01bb8a06bc031c4e5f73d2784d", + "x-ms-request-id": "7438fa9f-3131-4b50-b547-8c06d6b19f7b" + }, + "ResponseBody": { + "id": "7af0c69a-a548-47d6-aea3-d00e69bd83aa-e3688378-4440-43dc-9c10-8b8250fbd549", + "roleId": "7af0c69a-a548-47d6-aea3-d00e69bd83aa", + "principalId": "e3688378-4440-43dc-9c10-8b8250fbd549" + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/rbac/roleAssignments/6e4bf58a-b8e1-4cc3-bbf9-d73143322b78-e3688378-4440-43dc-9c10-8b8250fbd549?api-version=2020-02-01-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-4aab3cfc2faddf45b13e99c634a822f9-870885f2f3d2904e-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.AccessControl/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "2f9f5863552bf2b1231c4d0915296456", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Length": "183", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:53:37 GMT", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "x-ms-client-request-id": "2f9f5863552bf2b1231c4d0915296456", + "x-ms-request-id": "ac758ae9-0715-49dc-aed4-98f84e64cce3" + }, + "ResponseBody": { + "id": "6e4bf58a-b8e1-4cc3-bbf9-d73143322b78-e3688378-4440-43dc-9c10-8b8250fbd549", + "roleId": "6e4bf58a-b8e1-4cc3-bbf9-d73143322b78", + "principalId": "e3688378-4440-43dc-9c10-8b8250fbd549" + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/rbac/roleAssignments/7af0c69a-a548-47d6-aea3-d00e69bd83aa-3e537dfe-8cfd-4b17-b9e3-ae366f099311?api-version=2020-02-01-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-d33ea99840b5a543822d1a8958a70f6b-1e966681a9a15341-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.AccessControl/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "aef4f7fceb33db795af56baedbd33837", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Length": "183", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:53:37 GMT", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "x-ms-client-request-id": "aef4f7fceb33db795af56baedbd33837", + "x-ms-request-id": "f42968be-e510-47ee-8533-20575912dcea" + }, + "ResponseBody": { + "id": "7af0c69a-a548-47d6-aea3-d00e69bd83aa-3e537dfe-8cfd-4b17-b9e3-ae366f099311", + "roleId": "7af0c69a-a548-47d6-aea3-d00e69bd83aa", + "principalId": "3e537dfe-8cfd-4b17-b9e3-ae366f099311" + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/rbac/roleAssignments/7af0c69a-a548-47d6-aea3-d00e69bd83aa-1424271a-af44-4fb2-9c34-4da0cd9e2055?api-version=2020-02-01-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-afff6d21d539d8408f44fbde7be695be-86d65dff24fe5440-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.AccessControl/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "c72043167ea8abf6a811fa6d6eb2f0da", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Length": "183", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:53:37 GMT", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "x-ms-client-request-id": "c72043167ea8abf6a811fa6d6eb2f0da", + "x-ms-request-id": "8d450f8e-bc2a-4d7d-977a-64d6c222ce73" + }, + "ResponseBody": { + "id": "7af0c69a-a548-47d6-aea3-d00e69bd83aa-1424271a-af44-4fb2-9c34-4da0cd9e2055", + "roleId": "7af0c69a-a548-47d6-aea3-d00e69bd83aa", + "principalId": "1424271a-af44-4fb2-9c34-4da0cd9e2055" + } + } + ], + "Variables": { + "AZURE_SYNAPSE_WORKSPACE_URL": "https://testsynapseworkspace.dev.azuresynapse.net", + "RandomSeed": "2115328457" + } +} \ No newline at end of file diff --git a/sdk/synapse/Azure.Analytics.Synapse.AccessControl/tests/SessionRecords/AccessControlClientLiveTests/TestGetRoleDefinition.json b/sdk/synapse/Azure.Analytics.Synapse.AccessControl/tests/SessionRecords/AccessControlClientLiveTests/TestGetRoleDefinition.json new file mode 100644 index 000000000000..c9bf0af792d9 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.AccessControl/tests/SessionRecords/AccessControlClientLiveTests/TestGetRoleDefinition.json @@ -0,0 +1,165 @@ +{ + "Entries": [ + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/rbac/roles?api-version=2020-02-01-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.AccessControl/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "8f88c26ee61806225a35fe3b5a364eb0", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Length": "272", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:53:34 GMT", + "Server": [ + "Microsoft-HTTPAPI/2.0", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "x-ms-client-request-id": "8f88c26ee61806225a35fe3b5a364eb0", + "x-ms-request-id": [ + "7ebf2237-a9ff-45d6-9298-baa31b24bb5a", + "7ebf2237-a9ff-45d6-9298-baa31b24bb5a" + ] + }, + "ResponseBody": { + "value": [ + { + "id": "6e4bf58a-b8e1-4cc3-bbf9-d73143322b78", + "name": "Workspace Admin", + "isBuiltIn": true + }, + { + "id": "c3a6d2f1-a26f-4810-9b0f-591308d5cbf1", + "name": "Apache Spark Admin", + "isBuiltIn": true + }, + { + "id": "7af0c69a-a548-47d6-aea3-d00e69bd83aa", + "name": "Sql Admin", + "isBuiltIn": true + } + ] + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/rbac/roles/6e4bf58a-b8e1-4cc3-bbf9-d73143322b78?api-version=2020-02-01-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-9470ca7f91961c48854b07760d8a37cd-f83b351f1679b448-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.AccessControl/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "49019b07a50e04483777cee9802600f4", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Length": "87", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:53:34 GMT", + "Server": [ + "Microsoft-HTTPAPI/2.0", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "x-ms-client-request-id": "49019b07a50e04483777cee9802600f4", + "x-ms-request-id": [ + "9a3bcca4-b149-42c0-b474-7c2f3c609943", + "9a3bcca4-b149-42c0-b474-7c2f3c609943" + ] + }, + "ResponseBody": { + "id": "6e4bf58a-b8e1-4cc3-bbf9-d73143322b78", + "name": "Workspace Admin", + "isBuiltIn": true + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/rbac/roles/c3a6d2f1-a26f-4810-9b0f-591308d5cbf1?api-version=2020-02-01-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-bd8702a4e2cf964594be282d8d45a55e-c8326ed5dbc31344-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.AccessControl/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "2d13906b7980ff470efa84d09d2e4a2c", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Length": "90", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:53:35 GMT", + "Server": [ + "Microsoft-HTTPAPI/2.0", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "x-ms-client-request-id": "2d13906b7980ff470efa84d09d2e4a2c", + "x-ms-request-id": [ + "22ea4671-6a44-4b15-bfff-142423847029", + "22ea4671-6a44-4b15-bfff-142423847029" + ] + }, + "ResponseBody": { + "id": "c3a6d2f1-a26f-4810-9b0f-591308d5cbf1", + "name": "Apache Spark Admin", + "isBuiltIn": true + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/rbac/roles/7af0c69a-a548-47d6-aea3-d00e69bd83aa?api-version=2020-02-01-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-dce74ce3eaac5c47af5bb063e85c1cbe-13091ea6f80fb240-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.AccessControl/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "a415bc2966d3c8fb7a8457a017388533", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Length": "81", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:53:35 GMT", + "Server": [ + "Microsoft-HTTPAPI/2.0", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "x-ms-client-request-id": "a415bc2966d3c8fb7a8457a017388533", + "x-ms-request-id": [ + "b9465d1f-b603-4230-af65-c3bcd10cd345", + "b9465d1f-b603-4230-af65-c3bcd10cd345" + ] + }, + "ResponseBody": { + "id": "7af0c69a-a548-47d6-aea3-d00e69bd83aa", + "name": "Sql Admin", + "isBuiltIn": true + } + } + ], + "Variables": { + "AZURE_SYNAPSE_WORKSPACE_URL": "https://testsynapseworkspace.dev.azuresynapse.net", + "RandomSeed": "1717972985" + } +} \ No newline at end of file diff --git a/sdk/synapse/Azure.Analytics.Synapse.AccessControl/tests/SessionRecords/AccessControlClientLiveTests/TestGetRoleDefinitionAsync.json b/sdk/synapse/Azure.Analytics.Synapse.AccessControl/tests/SessionRecords/AccessControlClientLiveTests/TestGetRoleDefinitionAsync.json new file mode 100644 index 000000000000..7f60d0bc1b31 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.AccessControl/tests/SessionRecords/AccessControlClientLiveTests/TestGetRoleDefinitionAsync.json @@ -0,0 +1,165 @@ +{ + "Entries": [ + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/rbac/roles?api-version=2020-02-01-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.AccessControl/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "e35a3d49af69d045432ec763c800e2b5", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Length": "272", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:53:37 GMT", + "Server": [ + "Microsoft-HTTPAPI/2.0", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "x-ms-client-request-id": "e35a3d49af69d045432ec763c800e2b5", + "x-ms-request-id": [ + "d17e4081-462b-46d5-868f-d37f1a88b76f", + "d17e4081-462b-46d5-868f-d37f1a88b76f" + ] + }, + "ResponseBody": { + "value": [ + { + "id": "6e4bf58a-b8e1-4cc3-bbf9-d73143322b78", + "name": "Workspace Admin", + "isBuiltIn": true + }, + { + "id": "c3a6d2f1-a26f-4810-9b0f-591308d5cbf1", + "name": "Apache Spark Admin", + "isBuiltIn": true + }, + { + "id": "7af0c69a-a548-47d6-aea3-d00e69bd83aa", + "name": "Sql Admin", + "isBuiltIn": true + } + ] + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/rbac/roles/6e4bf58a-b8e1-4cc3-bbf9-d73143322b78?api-version=2020-02-01-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-88298788dc2ca249b6d408e2875727e0-1afab985b023d843-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.AccessControl/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "70a97fc50dd05a4ffceacb3aad23af51", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Length": "87", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:53:37 GMT", + "Server": [ + "Microsoft-HTTPAPI/2.0", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "x-ms-client-request-id": "70a97fc50dd05a4ffceacb3aad23af51", + "x-ms-request-id": [ + "9a6224be-86be-41d4-98c8-75ff1c33a58c", + "9a6224be-86be-41d4-98c8-75ff1c33a58c" + ] + }, + "ResponseBody": { + "id": "6e4bf58a-b8e1-4cc3-bbf9-d73143322b78", + "name": "Workspace Admin", + "isBuiltIn": true + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/rbac/roles/c3a6d2f1-a26f-4810-9b0f-591308d5cbf1?api-version=2020-02-01-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-405ef6ed1defe04ea9a0d18ac197fda1-4696f3f061362142-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.AccessControl/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "88de35ed1e70c9c8c05e0764ea890bd5", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Length": "90", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:53:37 GMT", + "Server": [ + "Microsoft-HTTPAPI/2.0", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "x-ms-client-request-id": "88de35ed1e70c9c8c05e0764ea890bd5", + "x-ms-request-id": [ + "6f64fad1-8a51-424d-b23a-b501a1574c1b", + "6f64fad1-8a51-424d-b23a-b501a1574c1b" + ] + }, + "ResponseBody": { + "id": "c3a6d2f1-a26f-4810-9b0f-591308d5cbf1", + "name": "Apache Spark Admin", + "isBuiltIn": true + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/rbac/roles/7af0c69a-a548-47d6-aea3-d00e69bd83aa?api-version=2020-02-01-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-28dcd453d7a62643a9d654d0211ca06c-d006277cd756ce40-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.AccessControl/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "dd928f27b3c63c3bed00e67ee30b231f", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Length": "81", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:53:37 GMT", + "Server": [ + "Microsoft-HTTPAPI/2.0", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "x-ms-client-request-id": "dd928f27b3c63c3bed00e67ee30b231f", + "x-ms-request-id": [ + "65354f1d-ff01-4874-b2e0-383ad4821b2a", + "65354f1d-ff01-4874-b2e0-383ad4821b2a" + ] + }, + "ResponseBody": { + "id": "7af0c69a-a548-47d6-aea3-d00e69bd83aa", + "name": "Sql Admin", + "isBuiltIn": true + } + } + ], + "Variables": { + "AZURE_SYNAPSE_WORKSPACE_URL": "https://testsynapseworkspace.dev.azuresynapse.net", + "RandomSeed": "1252128898" + } +} \ No newline at end of file diff --git a/sdk/synapse/Azure.Analytics.Synapse.AccessControl/tests/samples/Sample1_AddAndRemoveRoleAssignment.cs b/sdk/synapse/Azure.Analytics.Synapse.AccessControl/tests/samples/Sample1_AddAndRemoveRoleAssignment.cs new file mode 100644 index 000000000000..f17818078f53 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.AccessControl/tests/samples/Sample1_AddAndRemoveRoleAssignment.cs @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; +using Azure.Analytics.Synapse.AccessControl; +using Azure.Analytics.Synapse.AccessControl.Models; +using Azure.Identity; +using NUnit.Framework; + +namespace Azure.Analytics.Synapse.Samples +{ + /// + /// This sample demonstrates how to submit Spark job in Azure Synapse Analytics using synchronous methods of . + /// + public partial class AddAndRemoveRoleAssignment + { + [Test] + public void SubmitSparkJobSync() + { + // Environment variable with the Synapse workspace endpoint. + string workspaceUrl = TestEnvironment.WorkspaceUrl; + + #region Snippet:AccessControlSample1AccessControlClient + AccessControlClient client = new AccessControlClient(new Uri(workspaceUrl), new DefaultAzureCredential()); + #endregion + + #region Snippet:AccessControlSample1GetWorkspaceAdminRole + SynapseRole role = client.GetRoleDefinitions().Single(role => role.Name == "Workspace Admin"); + #endregion + + #region Snippet:AccessControlSample1AddRoleAssignment + string principalId = Guid.NewGuid().ToString(); + RoleAssignmentOptions request = new RoleAssignmentOptions(roleId:role.Id, principalId:principalId); + RoleAssignmentDetails roleAssignmentAdded = client.CreateRoleAssignment(request); + #endregion + + #region Snippet:AccessControlSample1GetRoleAssignment + RoleAssignmentDetails roleAssignment = client.GetRoleAssignmentById(principalId); + Debug.WriteLine($"Role {roleAssignment.RoleId} is assigned to {roleAssignment.PrincipalId}. Role assignment id: {roleAssignment.Id}"); + #endregion + + #region Snippet:AccessControlSample1ListRoleAssignments + IReadOnlyList roleAssignments = client.GetRoleAssignments().Value; + foreach (RoleAssignmentDetails assignment in roleAssignments) + { + Console.WriteLine(assignment.Id); + } + #endregion + + #region Snippet:AccessControlSample1RemoveRoleAssignment + client.DeleteRoleAssignmentById(roleAssignment.Id); + #endregion + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.AccessControl/tests/samples/SampleSnippets.cs b/sdk/synapse/Azure.Analytics.Synapse.AccessControl/tests/samples/SampleSnippets.cs new file mode 100644 index 000000000000..4ab7df0bfb42 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.AccessControl/tests/samples/SampleSnippets.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.Linq; +using Azure.Analytics.Synapse.AccessControl.Models; +using Azure.Analytics.Synapse.Samples; +using Azure.Identity; +using NUnit.Framework; + +namespace Azure.Analytics.Synapse.AccessControl.Samples +{ + public partial class Snippets : SampleFixture + { +#pragma warning disable IDE1006 // Naming Styles + private AccessControlClient client; +#pragma warning restore IDE1006 // Naming Styles + + [OneTimeSetUp] + public void CreateClient() + { + // Environment variable with the Synapse workspace endpoint. + string workspaceUrl = TestEnvironment.WorkspaceUrl; + + #region Snippet:CreateAccessControlClient + // Create a new access control client using the default credential from Azure.Identity using environment variables previously set, + // including AZURE_CLIENT_ID, AZURE_CLIENT_SECRET, and AZURE_TENANT_ID. + AccessControlClient client = new AccessControlClient(endpoint: new Uri(workspaceUrl), credential: new DefaultAzureCredential()); + #endregion + + this.client = client; + } + + [Test] + public void CreateRoleAssignment() + { + string principalId = TestEnvironment.PrincipalId; + string sqlAdminRoleId = client.GetRoleDefinitions().AsEnumerable().Single(role => role.Name == "Sql Admin").Id; + + #region Snippet:CreateRoleAssignment + RoleAssignmentOptions options = new RoleAssignmentOptions(sqlAdminRoleId, principalId); + RoleAssignmentDetails roleAssignment = client.CreateRoleAssignment(options); + #endregion + } + + [Test] + public void RetrieveRoleAssignment() + { + string principalId = TestEnvironment.PrincipalId; + + #region Snippet:RetrieveRoleAssignment + RoleAssignmentDetails roleAssignment = client.GetRoleAssignmentById(principalId); + #endregion + } + + [Test] + public void ListRoleAssignments() + { + #region Snippet:ListRoleAssignments + IReadOnlyList roleAssignments = client.GetRoleAssignments().Value; + foreach (RoleAssignmentDetails assignment in roleAssignments) + { + Console.WriteLine(assignment.Id); + } + #endregion + } + + [Test] + public void DeleteRoleAssignment() + { + string principalId = TestEnvironment.PrincipalId; + RoleAssignmentDetails roleAssignment = client.GetRoleAssignmentById(principalId); + + #region Snippet:DeleteRoleAssignment + client.DeleteRoleAssignmentById(roleAssignment.Id); + #endregion + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/CHANGELOG.md b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/CHANGELOG.md new file mode 100644 index 000000000000..6bb129c6bb9a --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/CHANGELOG.md @@ -0,0 +1,4 @@ +# Release History + +## 1.0.0-preview.1 (Unreleased) +- Initial release diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/Directory.Build.props b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/Directory.Build.props new file mode 100644 index 000000000000..1a9611bd4924 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/Directory.Build.props @@ -0,0 +1,6 @@ + + + + diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/README.md b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/README.md new file mode 100644 index 000000000000..e4078f796d0e --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/README.md @@ -0,0 +1,126 @@ +# Azure Synapse Analytics Artifacts client library for .NET + +This directory contains the open source subset of the .NET SDK. For documentation of the complete Azure SDK, please see the [Microsoft Azure .NET Developer Center](http://azure.microsoft.com/en-us/develop/net/). + +The Azure Synapse Analytics development client library enables programmatically managing artifacts, offering methods to create, update, list, and delete pipelines, datasets, data flows, notebooks, Spark job definitions, SQL scripts, linked services and triggers. + +Azure Synapse is a limitless analytics service that brings together enterprise data warehousing and Big Data analytics. It gives you the freedom to query data on your terms, using either serverless on-demand or provisioned resources—at scale. Azure Synapse brings these two worlds together with a unified experience to ingest, prepare, manage, and serve data for immediate BI and machine learning needs. + +## Getting started + +The complete Microsoft Azure SDK can be downloaded from the [Microsoft Azure Downloads Page](http://azure.microsoft.com/en-us/downloads/?sdk=net) and ships with support for building deployment packages, integrating with tooling, rich command line tooling, and more. + +For the best development experience, developers should use the official Microsoft NuGet packages for libraries. NuGet packages are regularly updated with new functionality and hotfixes. + +### Install the package +Install the Azure Synapse Analytics development client library for .NET with [NuGet][nuget]: + +```PowerShell +dotnet add package Azure.Analytics.Synapse.Artifacts --version 0.1.0-preview.1 +``` + +### Prerequisites +* An [Azure subscription][azure_sub]. +* An existing Azure Synapse workspace. If you need to create an Azure Synapse workspace, you can use the Azure Portal or [Azure CLI][azure_cli]. + +If you use the Azure CLI, the command looks like below: + +```PowerShell +az synapse workspace create \ + --name \ + --resource-group \ + --storage-account \ + --file-system \ + --sql-admin-login-user \ + --sql-admin-login-password \ + --location +``` + +### Authenticate the client +In order to interact with the Azure Synapse Analytics service, you'll need to create an instance of the [ArtifactsClient][development_client_class] class. You need a **workspace endpoint**, which you may see as "Development endpoint" in the portal, + and **client secret credentials (client id, client secret, tenant id)** to instantiate a client object. + +Client secret credential authentication is being used in this getting started section but you can find more ways to authenticate with [Azure identity][azure_identity]. To use the [DefaultAzureCredential][DefaultAzureCredential] provider shown below, +or other credential providers provided with the Azure SDK, you should install the Azure.Identity package: + +```PowerShell +Install-Package Azure.Identity +``` + +## Examples +The Azure.Analytics.Synapse.Artifacts package supports synchronous and asynchronous APIs. The following section covers some of the most common Azure Synapse Analytics development related tasks: + +### Notebook examples +* [Create a notebook](#create-a-notebook) +* [Retrieve a notebook](#retrieve-a-notebook) +* [List notebooks](#list-notebooks) +* [Delete a notebook](#delete-a-notebook) + +### Create a notebook + +`CreateOrUpdateNotebook` creates a notebook. + +```C# Snippet:CreateNotebook +Notebook notebook = new Notebook( + new NotebookMetadata + { + LanguageInfo = new NotebookLanguageInfo(name: "Python") + }, + nbformat: 4, + nbformatMinor: 2, + new List() +); +NotebookResource createdNotebook = notebookClient.CreateOrUpdateNotebook("MyNotebook", new NotebookResource(notebook)); +``` + +### Retrieve a notebook + +`GetNoteBook` retrieves a notebook. + +```C# Snippet:RetrieveNotebook +NotebookResource notebook = notebookClient.GetNotebook("MyNotebook"); +``` + +### List notebooks +`GetNotebooksByWorkspace` enumerates the notebooks in the Synapse workspace. + +```C# Snippet:ListNotebooks +Pageable notebooks = notebookClient.GetNotebooksByWorkspace(); +foreach (NotebookResource notebook in notebooks) +{ + System.Console.WriteLine(notebook.Name); +} +``` + +### Delete a notebook + +`DeleteNotebook` deletes a notebook. + +```C# Snippet:DeleteNotebook +notebookClient.DeleteNotebook("MyNotebook"); +``` + +## To build + +For information on building the Azure Synapse client library, please see [Building the Microsoft Azure SDK for .NET](https://github.com/azure/azure-sdk-for-net#to-build) + +## Target frameworks + +For information about the target frameworks of the Azure Synapse client library, please refer to the [Target Frameworks](https://github.com/azure/azure-sdk-for-net#target-frameworks) of the Microsoft Azure SDK for .NET. + +## Key concepts + +### NotebookControlClient +With a notebook client you can create, update, list, and delete pipelines, datasets, data flows, notebooks, Spark job definitions, SQL scripts, linked services and triggers. + +## Troubleshooting + +Please open issue in github. + +## Next steps + +The next step is adding more examples + +## Contributing + +This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Azure.Analytics.Synapse.Artifacts.csproj b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Azure.Analytics.Synapse.Artifacts.csproj new file mode 100644 index 000000000000..de503121e2ff --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Azure.Analytics.Synapse.Artifacts.csproj @@ -0,0 +1,43 @@ + + + This is the Microsoft Azure Synapse Analytics Artifacts client library + Azure.Analytics.Synapse.Artifacts + 1.0.0-preview.1 + Microsoft Azure Synapse Artifacts;$(PackageCommonTags) + $(RequiredTargetFrameworks) + false + + + $(NoWarn); + SA1649; + CA1812; + + CS1591; + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Customization/ArtifactsClientOptions.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Customization/ArtifactsClientOptions.cs new file mode 100644 index 000000000000..bb3b9ac8def2 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Customization/ArtifactsClientOptions.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure.Core; +using System; + +namespace Azure.Analytics.Synapse.Artifacts +{ + /// + /// The options for Azure Synapse Artifacts. + /// + public class ArtifactsClientOptions : ClientOptions + { + private const ServiceVersion Latest = ServiceVersion.V2019_06_01_preview; + + internal static ArtifactsClientOptions Default { get; } = new ArtifactsClientOptions(); + + /// + /// Initializes a new instance of the . + /// + public ArtifactsClientOptions(ServiceVersion serviceVersion = Latest) + { + VersionString = serviceVersion switch + { + ServiceVersion.V2019_06_01_preview => "2019-06-01-preview", + _ => throw new ArgumentOutOfRangeException(nameof(serviceVersion)) + }; + } + + /// + /// API version for Azuer Synapse Artifacts. + /// + internal string VersionString { get; } + + /// + /// The Synapse service version. + /// + public enum ServiceVersion + { + /// + /// The 2019-06-01-preview of the template service. + /// +#pragma warning disable CA1707 + V2019_06_01_preview = 1 +#pragma warning restore CA1707 + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Customization/DataFlowClient.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Customization/DataFlowClient.cs new file mode 100644 index 000000000000..ff3006a103c0 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Customization/DataFlowClient.cs @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.Analytics.Synapse.Artifacts +{ + public partial class DataFlowClient + { + /// + /// Initializes a new instance of the . + /// + public DataFlowClient(Uri endpoint, TokenCredential credential) + : this(endpoint, credential, ArtifactsClientOptions.Default) + { + } + + /// + /// Initializes a new instance of the . + /// + public DataFlowClient(Uri endpoint, TokenCredential credential, ArtifactsClientOptions options) + : this(new ClientDiagnostics(options), + SynapseClientPipeline.Build(options, credential), + endpoint.ToString(), + options.VersionString) + { + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Customization/DataFlowDebugSessionClient.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Customization/DataFlowDebugSessionClient.cs new file mode 100644 index 000000000000..7a9e152195ca --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Customization/DataFlowDebugSessionClient.cs @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.Analytics.Synapse.Artifacts +{ + public partial class DataFlowDebugSessionClient + { + /// + /// Initializes a new instance of the . + /// + public DataFlowDebugSessionClient(Uri endpoint, TokenCredential credential) + : this(endpoint, credential, ArtifactsClientOptions.Default) + { + } + + /// + /// Initializes a new instance of the . + /// + public DataFlowDebugSessionClient(Uri endpoint, TokenCredential credential, ArtifactsClientOptions options) + : this(new ClientDiagnostics(options), + SynapseClientPipeline.Build(options, credential), + endpoint.ToString(), + options.VersionString) + { + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Customization/DatasetClient.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Customization/DatasetClient.cs new file mode 100644 index 000000000000..027867b3856d --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Customization/DatasetClient.cs @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.Analytics.Synapse.Artifacts +{ + public partial class DatasetClient + { + /// + /// Initializes a new instance of the . + /// + public DatasetClient(Uri endpoint, TokenCredential credential) + : this(endpoint, credential, ArtifactsClientOptions.Default) + { + } + + /// + /// Initializes a new instance of the . + /// + public DatasetClient(Uri endpoint, TokenCredential credential, ArtifactsClientOptions options) + : this(new ClientDiagnostics(options), + SynapseClientPipeline.Build(options, credential), + endpoint.ToString(), + options.VersionString) + { + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Customization/LinkedServiceClient.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Customization/LinkedServiceClient.cs new file mode 100644 index 000000000000..854c0da770f6 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Customization/LinkedServiceClient.cs @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.Analytics.Synapse.Artifacts +{ + public partial class LinkedServiceClient + { + /// + /// Initializes a new instance of the . + /// + public LinkedServiceClient(Uri endpoint, TokenCredential credential) + : this(endpoint, credential, ArtifactsClientOptions.Default) + { + } + + /// + /// Initializes a new instance of the . + /// + public LinkedServiceClient(Uri endpoint, TokenCredential credential, ArtifactsClientOptions options) + : this(new ClientDiagnostics(options), + SynapseClientPipeline.Build(options, credential), + endpoint.ToString(), + options.VersionString) + { + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Customization/NotebookClient.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Customization/NotebookClient.cs new file mode 100644 index 000000000000..ee3a04ee8541 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Customization/NotebookClient.cs @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.Analytics.Synapse.Artifacts +{ + public partial class NotebookClient + { + /// + /// Initializes a new instance of the . + /// + public NotebookClient(Uri endpoint, TokenCredential credential) + : this(endpoint, credential, ArtifactsClientOptions.Default) + { + } + + /// + /// Initializes a new instance of the . + /// + public NotebookClient(Uri endpoint, TokenCredential credential, ArtifactsClientOptions options) + : this(new ClientDiagnostics(options), + SynapseClientPipeline.Build(options, credential), + endpoint.ToString(), + options.VersionString) + { + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Customization/PipelineClient.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Customization/PipelineClient.cs new file mode 100644 index 000000000000..73ab482b1c43 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Customization/PipelineClient.cs @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.Analytics.Synapse.Artifacts +{ + public partial class PipelineClient + { + /// + /// Initializes a new instance of the . + /// + public PipelineClient(Uri endpoint, TokenCredential credential) + : this(endpoint, credential, ArtifactsClientOptions.Default) + { + } + + /// + /// Initializes a new instance of the . + /// + public PipelineClient(Uri endpoint, TokenCredential credential, ArtifactsClientOptions options) + : this(new ClientDiagnostics(options), + SynapseClientPipeline.Build(options, credential), + endpoint.ToString(), + options.VersionString) + { + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Customization/PipelineRunClient.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Customization/PipelineRunClient.cs new file mode 100644 index 000000000000..7801cf8d0d81 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Customization/PipelineRunClient.cs @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.Analytics.Synapse.Artifacts +{ + public partial class PipelineRunClient + { + /// + /// Initializes a new instance of the . + /// + public PipelineRunClient(Uri endpoint, TokenCredential credential) + : this(endpoint, credential, ArtifactsClientOptions.Default) + { + } + + /// + /// Initializes a new instance of the . + /// + public PipelineRunClient(Uri endpoint, TokenCredential credential, ArtifactsClientOptions options) + : this(new ClientDiagnostics(options), + SynapseClientPipeline.Build(options, credential), + endpoint.ToString(), + options.VersionString) + { + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Customization/SparkJobDefinitionClient.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Customization/SparkJobDefinitionClient.cs new file mode 100644 index 000000000000..772fc28e85af --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Customization/SparkJobDefinitionClient.cs @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.Analytics.Synapse.Artifacts +{ + public partial class SparkJobDefinitionClient + { + /// + /// Initializes a new instance of the . + /// + public SparkJobDefinitionClient(Uri endpoint, TokenCredential credential) + : this(endpoint, credential, ArtifactsClientOptions.Default) + { + } + + /// + /// Initializes a new instance of the . + /// + public SparkJobDefinitionClient(Uri endpoint, TokenCredential credential, ArtifactsClientOptions options) + : this(new ClientDiagnostics(options), + SynapseClientPipeline.Build(options, credential), + endpoint.ToString(), + options.VersionString) + { + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Customization/SqlScriptClient.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Customization/SqlScriptClient.cs new file mode 100644 index 000000000000..8629a715c3ae --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Customization/SqlScriptClient.cs @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.Analytics.Synapse.Artifacts +{ + public partial class SqlScriptClient + { + /// + /// Initializes a new instance of the . + /// + public SqlScriptClient(Uri endpoint, TokenCredential credential) + : this(endpoint, credential, ArtifactsClientOptions.Default) + { + } + + /// + /// Initializes a new instance of the . + /// + public SqlScriptClient(Uri endpoint, TokenCredential credential, ArtifactsClientOptions options) + : this(new ClientDiagnostics(options), + SynapseClientPipeline.Build(options, credential), + endpoint.ToString(), + options.VersionString) + { + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Customization/TriggerClient.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Customization/TriggerClient.cs new file mode 100644 index 000000000000..7e32c6b41110 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Customization/TriggerClient.cs @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.Analytics.Synapse.Artifacts +{ + public partial class TriggerClient + { + /// + /// Initializes a new instance of the . + /// + public TriggerClient(Uri endpoint, TokenCredential credential) + : this(endpoint, credential, ArtifactsClientOptions.Default) + { + } + + /// + /// Initializes a new instance of the . + /// + public TriggerClient(Uri endpoint, TokenCredential credential, ArtifactsClientOptions options) + : this(new ClientDiagnostics(options), + SynapseClientPipeline.Build(options, credential), + endpoint.ToString(), + options.VersionString) + { + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Customization/TriggerRunClient.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Customization/TriggerRunClient.cs new file mode 100644 index 000000000000..a7d42a3d1803 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Customization/TriggerRunClient.cs @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.Analytics.Synapse.Artifacts +{ + public partial class TriggerRunClient + { + /// + /// Initializes a new instance of the . + /// + public TriggerRunClient(Uri endpoint, TokenCredential credential) + : this(endpoint, credential, ArtifactsClientOptions.Default) + { + } + + /// + /// Initializes a new instance of the . + /// + public TriggerRunClient(Uri endpoint, TokenCredential credential, ArtifactsClientOptions options) + : this(new ClientDiagnostics(options), + SynapseClientPipeline.Build(options, credential), + endpoint.ToString(), + options.VersionString) + { + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/DataFlowClient.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/DataFlowClient.cs new file mode 100644 index 000000000000..62c494014476 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/DataFlowClient.cs @@ -0,0 +1,228 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Analytics.Synapse.Artifacts.Models; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.Analytics.Synapse.Artifacts +{ + /// The DataFlow service client. + public partial class DataFlowClient + { + private readonly ClientDiagnostics _clientDiagnostics; + private readonly HttpPipeline _pipeline; + internal DataFlowRestClient RestClient { get; } + /// Initializes a new instance of DataFlowClient for mocking. + protected DataFlowClient() + { + } + /// Initializes a new instance of DataFlowClient. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The workspace development endpoint, for example https://myworkspace.dev.azuresynapse.net. + /// Api Version. + internal DataFlowClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string endpoint, string apiVersion = "2019-06-01-preview") + { + RestClient = new DataFlowRestClient(clientDiagnostics, pipeline, endpoint, apiVersion); + _clientDiagnostics = clientDiagnostics; + _pipeline = pipeline; + } + + /// Creates or updates a data flow. + /// The data flow name. + /// Data flow resource definition. + /// ETag of the data flow entity. Should only be specified for update, for which it should match existing entity or can be * for unconditional update. + /// The cancellation token to use. + public virtual async Task> CreateOrUpdateDataFlowAsync(string dataFlowName, DataFlowResource dataFlow, string ifMatch = null, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("DataFlowClient.CreateOrUpdateDataFlow"); + scope.Start(); + try + { + return await RestClient.CreateOrUpdateDataFlowAsync(dataFlowName, dataFlow, ifMatch, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Creates or updates a data flow. + /// The data flow name. + /// Data flow resource definition. + /// ETag of the data flow entity. Should only be specified for update, for which it should match existing entity or can be * for unconditional update. + /// The cancellation token to use. + public virtual Response CreateOrUpdateDataFlow(string dataFlowName, DataFlowResource dataFlow, string ifMatch = null, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("DataFlowClient.CreateOrUpdateDataFlow"); + scope.Start(); + try + { + return RestClient.CreateOrUpdateDataFlow(dataFlowName, dataFlow, ifMatch, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets a data flow. + /// The data flow name. + /// ETag of the data flow 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 to use. + public virtual async Task> GetDataFlowAsync(string dataFlowName, string ifNoneMatch = null, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("DataFlowClient.GetDataFlow"); + scope.Start(); + try + { + return await RestClient.GetDataFlowAsync(dataFlowName, ifNoneMatch, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets a data flow. + /// The data flow name. + /// ETag of the data flow 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 to use. + public virtual Response GetDataFlow(string dataFlowName, string ifNoneMatch = null, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("DataFlowClient.GetDataFlow"); + scope.Start(); + try + { + return RestClient.GetDataFlow(dataFlowName, ifNoneMatch, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Deletes a data flow. + /// The data flow name. + /// The cancellation token to use. + public virtual async Task DeleteDataFlowAsync(string dataFlowName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("DataFlowClient.DeleteDataFlow"); + scope.Start(); + try + { + return await RestClient.DeleteDataFlowAsync(dataFlowName, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Deletes a data flow. + /// The data flow name. + /// The cancellation token to use. + public virtual Response DeleteDataFlow(string dataFlowName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("DataFlowClient.DeleteDataFlow"); + scope.Start(); + try + { + return RestClient.DeleteDataFlow(dataFlowName, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Lists data flows. + /// The cancellation token to use. + public virtual AsyncPageable GetDataFlowsByWorkspaceAsync(CancellationToken cancellationToken = default) + { + async Task> FirstPageFunc(int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("DataFlowClient.GetDataFlowsByWorkspace"); + scope.Start(); + try + { + var response = await RestClient.GetDataFlowsByWorkspaceAsync(cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + async Task> NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("DataFlowClient.GetDataFlowsByWorkspace"); + scope.Start(); + try + { + var response = await RestClient.GetDataFlowsByWorkspaceNextPageAsync(nextLink, cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); + } + + /// Lists data flows. + /// The cancellation token to use. + public virtual Pageable GetDataFlowsByWorkspace(CancellationToken cancellationToken = default) + { + Page FirstPageFunc(int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("DataFlowClient.GetDataFlowsByWorkspace"); + scope.Start(); + try + { + var response = RestClient.GetDataFlowsByWorkspace(cancellationToken); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + Page NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("DataFlowClient.GetDataFlowsByWorkspace"); + scope.Start(); + try + { + var response = RestClient.GetDataFlowsByWorkspaceNextPage(nextLink, cancellationToken); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/DataFlowDebugSessionClient.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/DataFlowDebugSessionClient.cs new file mode 100644 index 000000000000..0cd1550ee549 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/DataFlowDebugSessionClient.cs @@ -0,0 +1,282 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Analytics.Synapse.Artifacts.Models; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.Analytics.Synapse.Artifacts +{ + /// The DataFlowDebugSession service client. + public partial class DataFlowDebugSessionClient + { + private readonly ClientDiagnostics _clientDiagnostics; + private readonly HttpPipeline _pipeline; + internal DataFlowDebugSessionRestClient RestClient { get; } + /// Initializes a new instance of DataFlowDebugSessionClient for mocking. + protected DataFlowDebugSessionClient() + { + } + /// Initializes a new instance of DataFlowDebugSessionClient. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The workspace development endpoint, for example https://myworkspace.dev.azuresynapse.net. + /// Api Version. + internal DataFlowDebugSessionClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string endpoint, string apiVersion = "2019-06-01-preview") + { + RestClient = new DataFlowDebugSessionRestClient(clientDiagnostics, pipeline, endpoint, apiVersion); + _clientDiagnostics = clientDiagnostics; + _pipeline = pipeline; + } + + /// Add a data flow into debug session. + /// Data flow debug session definition with debug content. + /// The cancellation token to use. + public virtual async Task> AddDataFlowAsync(DataFlowDebugPackage request, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("DataFlowDebugSessionClient.AddDataFlow"); + scope.Start(); + try + { + return await RestClient.AddDataFlowAsync(request, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Add a data flow into debug session. + /// Data flow debug session definition with debug content. + /// The cancellation token to use. + public virtual Response AddDataFlow(DataFlowDebugPackage request, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("DataFlowDebugSessionClient.AddDataFlow"); + scope.Start(); + try + { + return RestClient.AddDataFlow(request, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Deletes a data flow debug session. + /// Data flow debug session definition for deletion. + /// The cancellation token to use. + public virtual async Task DeleteDataFlowDebugSessionAsync(DeleteDataFlowDebugSessionRequest request, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("DataFlowDebugSessionClient.DeleteDataFlowDebugSession"); + scope.Start(); + try + { + return await RestClient.DeleteDataFlowDebugSessionAsync(request, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Deletes a data flow debug session. + /// Data flow debug session definition for deletion. + /// The cancellation token to use. + public virtual Response DeleteDataFlowDebugSession(DeleteDataFlowDebugSessionRequest request, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("DataFlowDebugSessionClient.DeleteDataFlowDebugSession"); + scope.Start(); + try + { + return RestClient.DeleteDataFlowDebugSession(request, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Query all active data flow debug sessions. + /// The cancellation token to use. + public virtual AsyncPageable QueryDataFlowDebugSessionsByWorkspaceAsync(CancellationToken cancellationToken = default) + { + async Task> FirstPageFunc(int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("DataFlowDebugSessionClient.QueryDataFlowDebugSessionsByWorkspace"); + scope.Start(); + try + { + var response = await RestClient.QueryDataFlowDebugSessionsByWorkspaceAsync(cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + async Task> NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("DataFlowDebugSessionClient.QueryDataFlowDebugSessionsByWorkspace"); + scope.Start(); + try + { + var response = await RestClient.QueryDataFlowDebugSessionsByWorkspaceNextPageAsync(nextLink, cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); + } + + /// Query all active data flow debug sessions. + /// The cancellation token to use. + public virtual Pageable QueryDataFlowDebugSessionsByWorkspace(CancellationToken cancellationToken = default) + { + Page FirstPageFunc(int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("DataFlowDebugSessionClient.QueryDataFlowDebugSessionsByWorkspace"); + scope.Start(); + try + { + var response = RestClient.QueryDataFlowDebugSessionsByWorkspace(cancellationToken); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + Page NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("DataFlowDebugSessionClient.QueryDataFlowDebugSessionsByWorkspace"); + scope.Start(); + try + { + var response = RestClient.QueryDataFlowDebugSessionsByWorkspaceNextPage(nextLink, cancellationToken); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); + } + + /// Creates a data flow debug session. + /// Data flow debug session definition. + /// The cancellation token to use. + public virtual async Task StartCreateDataFlowDebugSessionAsync(CreateDataFlowDebugSessionRequest request, CancellationToken cancellationToken = default) + { + if (request == null) + { + throw new ArgumentNullException(nameof(request)); + } + + using var scope = _clientDiagnostics.CreateScope("DataFlowDebugSessionClient.StartCreateDataFlowDebugSession"); + scope.Start(); + try + { + var originalResponse = await RestClient.CreateDataFlowDebugSessionAsync(request, cancellationToken).ConfigureAwait(false); + return new DataFlowDebugSessionCreateDataFlowDebugSessionOperation(_clientDiagnostics, _pipeline, RestClient.CreateCreateDataFlowDebugSessionRequest(request).Request, originalResponse); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Creates a data flow debug session. + /// Data flow debug session definition. + /// The cancellation token to use. + public virtual DataFlowDebugSessionCreateDataFlowDebugSessionOperation StartCreateDataFlowDebugSession(CreateDataFlowDebugSessionRequest request, CancellationToken cancellationToken = default) + { + if (request == null) + { + throw new ArgumentNullException(nameof(request)); + } + + using var scope = _clientDiagnostics.CreateScope("DataFlowDebugSessionClient.StartCreateDataFlowDebugSession"); + scope.Start(); + try + { + var originalResponse = RestClient.CreateDataFlowDebugSession(request, cancellationToken); + return new DataFlowDebugSessionCreateDataFlowDebugSessionOperation(_clientDiagnostics, _pipeline, RestClient.CreateCreateDataFlowDebugSessionRequest(request).Request, originalResponse); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Execute a data flow debug command. + /// Data flow debug command definition. + /// The cancellation token to use. + public virtual async Task StartExecuteCommandAsync(DataFlowDebugCommandRequest request, CancellationToken cancellationToken = default) + { + if (request == null) + { + throw new ArgumentNullException(nameof(request)); + } + + using var scope = _clientDiagnostics.CreateScope("DataFlowDebugSessionClient.StartExecuteCommand"); + scope.Start(); + try + { + var originalResponse = await RestClient.ExecuteCommandAsync(request, cancellationToken).ConfigureAwait(false); + return new DataFlowDebugSessionExecuteCommandOperation(_clientDiagnostics, _pipeline, RestClient.CreateExecuteCommandRequest(request).Request, originalResponse); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Execute a data flow debug command. + /// Data flow debug command definition. + /// The cancellation token to use. + public virtual DataFlowDebugSessionExecuteCommandOperation StartExecuteCommand(DataFlowDebugCommandRequest request, CancellationToken cancellationToken = default) + { + if (request == null) + { + throw new ArgumentNullException(nameof(request)); + } + + using var scope = _clientDiagnostics.CreateScope("DataFlowDebugSessionClient.StartExecuteCommand"); + scope.Start(); + try + { + var originalResponse = RestClient.ExecuteCommand(request, cancellationToken); + return new DataFlowDebugSessionExecuteCommandOperation(_clientDiagnostics, _pipeline, RestClient.CreateExecuteCommandRequest(request).Request, originalResponse); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/DataFlowDebugSessionCreateDataFlowDebugSessionOperation.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/DataFlowDebugSessionCreateDataFlowDebugSessionOperation.cs new file mode 100644 index 000000000000..308208b988ae --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/DataFlowDebugSessionCreateDataFlowDebugSessionOperation.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Analytics.Synapse.Artifacts.Models; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.Analytics.Synapse.Artifacts +{ + /// Creates a data flow debug session. + public partial class DataFlowDebugSessionCreateDataFlowDebugSessionOperation : Operation, IOperationSource + { + private readonly ArmOperationHelpers _operation; + internal DataFlowDebugSessionCreateDataFlowDebugSessionOperation(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Request request, Response response) + { + _operation = new ArmOperationHelpers(this, clientDiagnostics, pipeline, request, response, OperationFinalStateVia.Location, "DataFlowDebugSessionCreateDataFlowDebugSessionOperation"); + } + /// + public override string Id => _operation.Id; + + /// + public override CreateDataFlowDebugSessionResponse Value => _operation.Value; + + /// + public override bool HasCompleted => _operation.HasCompleted; + + /// + public override bool HasValue => _operation.HasValue; + + /// + public override Response GetRawResponse() => _operation.GetRawResponse(); + + /// + public override Response UpdateStatus(CancellationToken cancellationToken = default) => _operation.UpdateStatus(cancellationToken); + + /// + public override ValueTask UpdateStatusAsync(CancellationToken cancellationToken = default) => _operation.UpdateStatusAsync(cancellationToken); + + /// + public override ValueTask> WaitForCompletionAsync(CancellationToken cancellationToken = default) => _operation.WaitForCompletionAsync(cancellationToken); + + /// + public override ValueTask> WaitForCompletionAsync(TimeSpan pollingInterval, CancellationToken cancellationToken = default) => _operation.WaitForCompletionAsync(pollingInterval, cancellationToken); + + CreateDataFlowDebugSessionResponse IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + return null; + } + else + { + return CreateDataFlowDebugSessionResponse.DeserializeCreateDataFlowDebugSessionResponse(document.RootElement); + } + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + return null; + } + else + { + return CreateDataFlowDebugSessionResponse.DeserializeCreateDataFlowDebugSessionResponse(document.RootElement); + } + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/DataFlowDebugSessionExecuteCommandOperation.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/DataFlowDebugSessionExecuteCommandOperation.cs new file mode 100644 index 000000000000..d2a5657f22e4 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/DataFlowDebugSessionExecuteCommandOperation.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Analytics.Synapse.Artifacts.Models; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.Analytics.Synapse.Artifacts +{ + /// Execute a data flow debug command. + public partial class DataFlowDebugSessionExecuteCommandOperation : Operation, IOperationSource + { + private readonly ArmOperationHelpers _operation; + internal DataFlowDebugSessionExecuteCommandOperation(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Request request, Response response) + { + _operation = new ArmOperationHelpers(this, clientDiagnostics, pipeline, request, response, OperationFinalStateVia.Location, "DataFlowDebugSessionExecuteCommandOperation"); + } + /// + public override string Id => _operation.Id; + + /// + public override DataFlowDebugCommandResponse Value => _operation.Value; + + /// + public override bool HasCompleted => _operation.HasCompleted; + + /// + public override bool HasValue => _operation.HasValue; + + /// + public override Response GetRawResponse() => _operation.GetRawResponse(); + + /// + public override Response UpdateStatus(CancellationToken cancellationToken = default) => _operation.UpdateStatus(cancellationToken); + + /// + public override ValueTask UpdateStatusAsync(CancellationToken cancellationToken = default) => _operation.UpdateStatusAsync(cancellationToken); + + /// + public override ValueTask> WaitForCompletionAsync(CancellationToken cancellationToken = default) => _operation.WaitForCompletionAsync(cancellationToken); + + /// + public override ValueTask> WaitForCompletionAsync(TimeSpan pollingInterval, CancellationToken cancellationToken = default) => _operation.WaitForCompletionAsync(pollingInterval, cancellationToken); + + DataFlowDebugCommandResponse IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + return null; + } + else + { + return DataFlowDebugCommandResponse.DeserializeDataFlowDebugCommandResponse(document.RootElement); + } + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + return null; + } + else + { + return DataFlowDebugCommandResponse.DeserializeDataFlowDebugCommandResponse(document.RootElement); + } + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/DataFlowDebugSessionRestClient.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/DataFlowDebugSessionRestClient.cs new file mode 100644 index 000000000000..051c8298c49a --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/DataFlowDebugSessionRestClient.cs @@ -0,0 +1,458 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Analytics.Synapse.Artifacts.Models; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.Analytics.Synapse.Artifacts +{ + internal partial class DataFlowDebugSessionRestClient + { + private string endpoint; + private string apiVersion; + private ClientDiagnostics _clientDiagnostics; + private HttpPipeline _pipeline; + + /// Initializes a new instance of DataFlowDebugSessionRestClient. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The workspace development endpoint, for example https://myworkspace.dev.azuresynapse.net. + /// Api Version. + /// This occurs when one of the required arguments is null. + public DataFlowDebugSessionRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string endpoint, string apiVersion = "2019-06-01-preview") + { + if (endpoint == null) + { + throw new ArgumentNullException(nameof(endpoint)); + } + if (apiVersion == null) + { + throw new ArgumentNullException(nameof(apiVersion)); + } + + this.endpoint = endpoint; + this.apiVersion = apiVersion; + _clientDiagnostics = clientDiagnostics; + _pipeline = pipeline; + } + + internal HttpMessage CreateCreateDataFlowDebugSessionRequest(CreateDataFlowDebugSessionRequest request) + { + var message = _pipeline.CreateMessage(); + var request0 = message.Request; + request0.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.AppendRaw(endpoint, false); + uri.AppendPath("/createDataFlowDebugSession", false); + uri.AppendQuery("api-version", apiVersion, true); + request0.Uri = uri; + request0.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(request); + request0.Content = content; + return message; + } + + /// Creates a data flow debug session. + /// Data flow debug session definition. + /// The cancellation token to use. + public async Task CreateDataFlowDebugSessionAsync(CreateDataFlowDebugSessionRequest request, CancellationToken cancellationToken = default) + { + if (request == null) + { + throw new ArgumentNullException(nameof(request)); + } + + using var message = CreateCreateDataFlowDebugSessionRequest(request); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Creates a data flow debug session. + /// Data flow debug session definition. + /// The cancellation token to use. + public Response CreateDataFlowDebugSession(CreateDataFlowDebugSessionRequest request, CancellationToken cancellationToken = default) + { + if (request == null) + { + throw new ArgumentNullException(nameof(request)); + } + + using var message = CreateCreateDataFlowDebugSessionRequest(request); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateQueryDataFlowDebugSessionsByWorkspaceRequest() + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.AppendRaw(endpoint, false); + uri.AppendPath("/queryDataFlowDebugSessions", false); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + return message; + } + + /// Query all active data flow debug sessions. + /// The cancellation token to use. + public async Task> QueryDataFlowDebugSessionsByWorkspaceAsync(CancellationToken cancellationToken = default) + { + using var message = CreateQueryDataFlowDebugSessionsByWorkspaceRequest(); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + QueryDataFlowDebugSessionsResponse value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + value = QueryDataFlowDebugSessionsResponse.DeserializeQueryDataFlowDebugSessionsResponse(document.RootElement); + } + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Query all active data flow debug sessions. + /// The cancellation token to use. + public Response QueryDataFlowDebugSessionsByWorkspace(CancellationToken cancellationToken = default) + { + using var message = CreateQueryDataFlowDebugSessionsByWorkspaceRequest(); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + QueryDataFlowDebugSessionsResponse value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + value = QueryDataFlowDebugSessionsResponse.DeserializeQueryDataFlowDebugSessionsResponse(document.RootElement); + } + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateAddDataFlowRequest(DataFlowDebugPackage request) + { + var message = _pipeline.CreateMessage(); + var request0 = message.Request; + request0.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.AppendRaw(endpoint, false); + uri.AppendPath("/addDataFlowToDebugSession", false); + uri.AppendQuery("api-version", apiVersion, true); + request0.Uri = uri; + request0.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(request); + request0.Content = content; + return message; + } + + /// Add a data flow into debug session. + /// Data flow debug session definition with debug content. + /// The cancellation token to use. + public async Task> AddDataFlowAsync(DataFlowDebugPackage request, CancellationToken cancellationToken = default) + { + if (request == null) + { + throw new ArgumentNullException(nameof(request)); + } + + using var message = CreateAddDataFlowRequest(request); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + AddDataFlowToDebugSessionResponse value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + value = AddDataFlowToDebugSessionResponse.DeserializeAddDataFlowToDebugSessionResponse(document.RootElement); + } + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Add a data flow into debug session. + /// Data flow debug session definition with debug content. + /// The cancellation token to use. + public Response AddDataFlow(DataFlowDebugPackage request, CancellationToken cancellationToken = default) + { + if (request == null) + { + throw new ArgumentNullException(nameof(request)); + } + + using var message = CreateAddDataFlowRequest(request); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + AddDataFlowToDebugSessionResponse value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + value = AddDataFlowToDebugSessionResponse.DeserializeAddDataFlowToDebugSessionResponse(document.RootElement); + } + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateDeleteDataFlowDebugSessionRequest(DeleteDataFlowDebugSessionRequest request) + { + var message = _pipeline.CreateMessage(); + var request0 = message.Request; + request0.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.AppendRaw(endpoint, false); + uri.AppendPath("/deleteDataFlowDebugSession", false); + uri.AppendQuery("api-version", apiVersion, true); + request0.Uri = uri; + request0.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(request); + request0.Content = content; + return message; + } + + /// Deletes a data flow debug session. + /// Data flow debug session definition for deletion. + /// The cancellation token to use. + public async Task DeleteDataFlowDebugSessionAsync(DeleteDataFlowDebugSessionRequest request, CancellationToken cancellationToken = default) + { + if (request == null) + { + throw new ArgumentNullException(nameof(request)); + } + + using var message = CreateDeleteDataFlowDebugSessionRequest(request); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + return message.Response; + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Deletes a data flow debug session. + /// Data flow debug session definition for deletion. + /// The cancellation token to use. + public Response DeleteDataFlowDebugSession(DeleteDataFlowDebugSessionRequest request, CancellationToken cancellationToken = default) + { + if (request == null) + { + throw new ArgumentNullException(nameof(request)); + } + + using var message = CreateDeleteDataFlowDebugSessionRequest(request); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + return message.Response; + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateExecuteCommandRequest(DataFlowDebugCommandRequest request) + { + var message = _pipeline.CreateMessage(); + var request0 = message.Request; + request0.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.AppendRaw(endpoint, false); + uri.AppendPath("/executeDataFlowDebugCommand", false); + uri.AppendQuery("api-version", apiVersion, true); + request0.Uri = uri; + request0.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(request); + request0.Content = content; + return message; + } + + /// Execute a data flow debug command. + /// Data flow debug command definition. + /// The cancellation token to use. + public async Task ExecuteCommandAsync(DataFlowDebugCommandRequest request, CancellationToken cancellationToken = default) + { + if (request == null) + { + throw new ArgumentNullException(nameof(request)); + } + + using var message = CreateExecuteCommandRequest(request); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Execute a data flow debug command. + /// Data flow debug command definition. + /// The cancellation token to use. + public Response ExecuteCommand(DataFlowDebugCommandRequest request, CancellationToken cancellationToken = default) + { + if (request == null) + { + throw new ArgumentNullException(nameof(request)); + } + + using var message = CreateExecuteCommandRequest(request); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateQueryDataFlowDebugSessionsByWorkspaceNextPageRequest(string nextLink) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.AppendRaw(endpoint, false); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + return message; + } + + /// Query all active data flow debug sessions. + /// The URL to the next page of results. + /// The cancellation token to use. + public async Task> QueryDataFlowDebugSessionsByWorkspaceNextPageAsync(string nextLink, CancellationToken cancellationToken = default) + { + if (nextLink == null) + { + throw new ArgumentNullException(nameof(nextLink)); + } + + using var message = CreateQueryDataFlowDebugSessionsByWorkspaceNextPageRequest(nextLink); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + QueryDataFlowDebugSessionsResponse value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + value = QueryDataFlowDebugSessionsResponse.DeserializeQueryDataFlowDebugSessionsResponse(document.RootElement); + } + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Query all active data flow debug sessions. + /// The URL to the next page of results. + /// The cancellation token to use. + public Response QueryDataFlowDebugSessionsByWorkspaceNextPage(string nextLink, CancellationToken cancellationToken = default) + { + if (nextLink == null) + { + throw new ArgumentNullException(nameof(nextLink)); + } + + using var message = CreateQueryDataFlowDebugSessionsByWorkspaceNextPageRequest(nextLink); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + QueryDataFlowDebugSessionsResponse value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + value = QueryDataFlowDebugSessionsResponse.DeserializeQueryDataFlowDebugSessionsResponse(document.RootElement); + } + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/DataFlowRestClient.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/DataFlowRestClient.cs new file mode 100644 index 000000000000..587a91dc610c --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/DataFlowRestClient.cs @@ -0,0 +1,438 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Analytics.Synapse.Artifacts.Models; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.Analytics.Synapse.Artifacts +{ + internal partial class DataFlowRestClient + { + private string endpoint; + private string apiVersion; + private ClientDiagnostics _clientDiagnostics; + private HttpPipeline _pipeline; + + /// Initializes a new instance of DataFlowRestClient. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The workspace development endpoint, for example https://myworkspace.dev.azuresynapse.net. + /// Api Version. + /// This occurs when one of the required arguments is null. + public DataFlowRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string endpoint, string apiVersion = "2019-06-01-preview") + { + if (endpoint == null) + { + throw new ArgumentNullException(nameof(endpoint)); + } + if (apiVersion == null) + { + throw new ArgumentNullException(nameof(apiVersion)); + } + + this.endpoint = endpoint; + this.apiVersion = apiVersion; + _clientDiagnostics = clientDiagnostics; + _pipeline = pipeline; + } + + internal HttpMessage CreateCreateOrUpdateDataFlowRequest(string dataFlowName, DataFlowResource dataFlow, string ifMatch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.AppendRaw(endpoint, false); + uri.AppendPath("/dataflows/", false); + uri.AppendPath(dataFlowName, true); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + if (ifMatch != null) + { + request.Headers.Add("If-Match", ifMatch); + } + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(dataFlow); + request.Content = content; + return message; + } + + /// Creates or updates a data flow. + /// The data flow name. + /// Data flow resource definition. + /// ETag of the data flow entity. Should only be specified for update, for which it should match existing entity or can be * for unconditional update. + /// The cancellation token to use. + public async Task> CreateOrUpdateDataFlowAsync(string dataFlowName, DataFlowResource dataFlow, string ifMatch = null, CancellationToken cancellationToken = default) + { + if (dataFlowName == null) + { + throw new ArgumentNullException(nameof(dataFlowName)); + } + if (dataFlow == null) + { + throw new ArgumentNullException(nameof(dataFlow)); + } + + using var message = CreateCreateOrUpdateDataFlowRequest(dataFlowName, dataFlow, ifMatch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DataFlowResource value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + value = DataFlowResource.DeserializeDataFlowResource(document.RootElement); + } + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Creates or updates a data flow. + /// The data flow name. + /// Data flow resource definition. + /// ETag of the data flow entity. Should only be specified for update, for which it should match existing entity or can be * for unconditional update. + /// The cancellation token to use. + public Response CreateOrUpdateDataFlow(string dataFlowName, DataFlowResource dataFlow, string ifMatch = null, CancellationToken cancellationToken = default) + { + if (dataFlowName == null) + { + throw new ArgumentNullException(nameof(dataFlowName)); + } + if (dataFlow == null) + { + throw new ArgumentNullException(nameof(dataFlow)); + } + + using var message = CreateCreateOrUpdateDataFlowRequest(dataFlowName, dataFlow, ifMatch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DataFlowResource value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + value = DataFlowResource.DeserializeDataFlowResource(document.RootElement); + } + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetDataFlowRequest(string dataFlowName, string ifNoneMatch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.AppendRaw(endpoint, false); + uri.AppendPath("/dataflows/", false); + uri.AppendPath(dataFlowName, true); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + if (ifNoneMatch != null) + { + request.Headers.Add("If-None-Match", ifNoneMatch); + } + return message; + } + + /// Gets a data flow. + /// The data flow name. + /// ETag of the data flow 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 to use. + public async Task> GetDataFlowAsync(string dataFlowName, string ifNoneMatch = null, CancellationToken cancellationToken = default) + { + if (dataFlowName == null) + { + throw new ArgumentNullException(nameof(dataFlowName)); + } + + using var message = CreateGetDataFlowRequest(dataFlowName, ifNoneMatch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DataFlowResource value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + value = DataFlowResource.DeserializeDataFlowResource(document.RootElement); + } + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Gets a data flow. + /// The data flow name. + /// ETag of the data flow 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 to use. + public Response GetDataFlow(string dataFlowName, string ifNoneMatch = null, CancellationToken cancellationToken = default) + { + if (dataFlowName == null) + { + throw new ArgumentNullException(nameof(dataFlowName)); + } + + using var message = CreateGetDataFlowRequest(dataFlowName, ifNoneMatch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DataFlowResource value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + value = DataFlowResource.DeserializeDataFlowResource(document.RootElement); + } + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateDeleteDataFlowRequest(string dataFlowName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.AppendRaw(endpoint, false); + uri.AppendPath("/dataflows/", false); + uri.AppendPath(dataFlowName, true); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + return message; + } + + /// Deletes a data flow. + /// The data flow name. + /// The cancellation token to use. + public async Task DeleteDataFlowAsync(string dataFlowName, CancellationToken cancellationToken = default) + { + if (dataFlowName == null) + { + throw new ArgumentNullException(nameof(dataFlowName)); + } + + using var message = CreateDeleteDataFlowRequest(dataFlowName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Deletes a data flow. + /// The data flow name. + /// The cancellation token to use. + public Response DeleteDataFlow(string dataFlowName, CancellationToken cancellationToken = default) + { + if (dataFlowName == null) + { + throw new ArgumentNullException(nameof(dataFlowName)); + } + + using var message = CreateDeleteDataFlowRequest(dataFlowName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetDataFlowsByWorkspaceRequest() + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.AppendRaw(endpoint, false); + uri.AppendPath("/dataflows", false); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + return message; + } + + /// Lists data flows. + /// The cancellation token to use. + public async Task> GetDataFlowsByWorkspaceAsync(CancellationToken cancellationToken = default) + { + using var message = CreateGetDataFlowsByWorkspaceRequest(); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DataFlowListResponse value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + value = DataFlowListResponse.DeserializeDataFlowListResponse(document.RootElement); + } + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Lists data flows. + /// The cancellation token to use. + public Response GetDataFlowsByWorkspace(CancellationToken cancellationToken = default) + { + using var message = CreateGetDataFlowsByWorkspaceRequest(); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DataFlowListResponse value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + value = DataFlowListResponse.DeserializeDataFlowListResponse(document.RootElement); + } + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetDataFlowsByWorkspaceNextPageRequest(string nextLink) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.AppendRaw(endpoint, false); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + return message; + } + + /// Lists data flows. + /// The URL to the next page of results. + /// The cancellation token to use. + public async Task> GetDataFlowsByWorkspaceNextPageAsync(string nextLink, CancellationToken cancellationToken = default) + { + if (nextLink == null) + { + throw new ArgumentNullException(nameof(nextLink)); + } + + using var message = CreateGetDataFlowsByWorkspaceNextPageRequest(nextLink); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DataFlowListResponse value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + value = DataFlowListResponse.DeserializeDataFlowListResponse(document.RootElement); + } + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Lists data flows. + /// The URL to the next page of results. + /// The cancellation token to use. + public Response GetDataFlowsByWorkspaceNextPage(string nextLink, CancellationToken cancellationToken = default) + { + if (nextLink == null) + { + throw new ArgumentNullException(nameof(nextLink)); + } + + using var message = CreateGetDataFlowsByWorkspaceNextPageRequest(nextLink); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DataFlowListResponse value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + value = DataFlowListResponse.DeserializeDataFlowListResponse(document.RootElement); + } + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/DatasetClient.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/DatasetClient.cs new file mode 100644 index 000000000000..b95014a09a4b --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/DatasetClient.cs @@ -0,0 +1,228 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Analytics.Synapse.Artifacts.Models; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.Analytics.Synapse.Artifacts +{ + /// The Dataset service client. + public partial class DatasetClient + { + private readonly ClientDiagnostics _clientDiagnostics; + private readonly HttpPipeline _pipeline; + internal DatasetRestClient RestClient { get; } + /// Initializes a new instance of DatasetClient for mocking. + protected DatasetClient() + { + } + /// Initializes a new instance of DatasetClient. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The workspace development endpoint, for example https://myworkspace.dev.azuresynapse.net. + /// Api Version. + internal DatasetClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string endpoint, string apiVersion = "2019-06-01-preview") + { + RestClient = new DatasetRestClient(clientDiagnostics, pipeline, endpoint, apiVersion); + _clientDiagnostics = clientDiagnostics; + _pipeline = pipeline; + } + + /// Creates or updates a dataset. + /// The dataset name. + /// Dataset resource definition. + /// ETag of the dataset entity. Should only be specified for update, for which it should match existing entity or can be * for unconditional update. + /// The cancellation token to use. + public virtual async Task> CreateOrUpdateDatasetAsync(string datasetName, DatasetResource dataset, string ifMatch = null, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("DatasetClient.CreateOrUpdateDataset"); + scope.Start(); + try + { + return await RestClient.CreateOrUpdateDatasetAsync(datasetName, dataset, ifMatch, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Creates or updates a dataset. + /// The dataset name. + /// Dataset resource definition. + /// ETag of the dataset entity. Should only be specified for update, for which it should match existing entity or can be * for unconditional update. + /// The cancellation token to use. + public virtual Response CreateOrUpdateDataset(string datasetName, DatasetResource dataset, string ifMatch = null, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("DatasetClient.CreateOrUpdateDataset"); + scope.Start(); + try + { + return RestClient.CreateOrUpdateDataset(datasetName, dataset, ifMatch, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets a dataset. + /// The dataset name. + /// ETag of the dataset 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 to use. + public virtual async Task> GetDatasetAsync(string datasetName, string ifNoneMatch = null, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("DatasetClient.GetDataset"); + scope.Start(); + try + { + return await RestClient.GetDatasetAsync(datasetName, ifNoneMatch, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets a dataset. + /// The dataset name. + /// ETag of the dataset 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 to use. + public virtual Response GetDataset(string datasetName, string ifNoneMatch = null, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("DatasetClient.GetDataset"); + scope.Start(); + try + { + return RestClient.GetDataset(datasetName, ifNoneMatch, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Deletes a dataset. + /// The dataset name. + /// The cancellation token to use. + public virtual async Task DeleteDatasetAsync(string datasetName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("DatasetClient.DeleteDataset"); + scope.Start(); + try + { + return await RestClient.DeleteDatasetAsync(datasetName, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Deletes a dataset. + /// The dataset name. + /// The cancellation token to use. + public virtual Response DeleteDataset(string datasetName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("DatasetClient.DeleteDataset"); + scope.Start(); + try + { + return RestClient.DeleteDataset(datasetName, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Lists datasets. + /// The cancellation token to use. + public virtual AsyncPageable GetDatasetsByWorkspaceAsync(CancellationToken cancellationToken = default) + { + async Task> FirstPageFunc(int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("DatasetClient.GetDatasetsByWorkspace"); + scope.Start(); + try + { + var response = await RestClient.GetDatasetsByWorkspaceAsync(cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + async Task> NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("DatasetClient.GetDatasetsByWorkspace"); + scope.Start(); + try + { + var response = await RestClient.GetDatasetsByWorkspaceNextPageAsync(nextLink, cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); + } + + /// Lists datasets. + /// The cancellation token to use. + public virtual Pageable GetDatasetsByWorkspace(CancellationToken cancellationToken = default) + { + Page FirstPageFunc(int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("DatasetClient.GetDatasetsByWorkspace"); + scope.Start(); + try + { + var response = RestClient.GetDatasetsByWorkspace(cancellationToken); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + Page NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("DatasetClient.GetDatasetsByWorkspace"); + scope.Start(); + try + { + var response = RestClient.GetDatasetsByWorkspaceNextPage(nextLink, cancellationToken); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/DatasetRestClient.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/DatasetRestClient.cs new file mode 100644 index 000000000000..939ec0ec3971 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/DatasetRestClient.cs @@ -0,0 +1,442 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Analytics.Synapse.Artifacts.Models; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.Analytics.Synapse.Artifacts +{ + internal partial class DatasetRestClient + { + private string endpoint; + private string apiVersion; + private ClientDiagnostics _clientDiagnostics; + private HttpPipeline _pipeline; + + /// Initializes a new instance of DatasetRestClient. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The workspace development endpoint, for example https://myworkspace.dev.azuresynapse.net. + /// Api Version. + /// This occurs when one of the required arguments is null. + public DatasetRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string endpoint, string apiVersion = "2019-06-01-preview") + { + if (endpoint == null) + { + throw new ArgumentNullException(nameof(endpoint)); + } + if (apiVersion == null) + { + throw new ArgumentNullException(nameof(apiVersion)); + } + + this.endpoint = endpoint; + this.apiVersion = apiVersion; + _clientDiagnostics = clientDiagnostics; + _pipeline = pipeline; + } + + internal HttpMessage CreateGetDatasetsByWorkspaceRequest() + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.AppendRaw(endpoint, false); + uri.AppendPath("/datasets", false); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + return message; + } + + /// Lists datasets. + /// The cancellation token to use. + public async Task> GetDatasetsByWorkspaceAsync(CancellationToken cancellationToken = default) + { + using var message = CreateGetDatasetsByWorkspaceRequest(); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DatasetListResponse value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + value = DatasetListResponse.DeserializeDatasetListResponse(document.RootElement); + } + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Lists datasets. + /// The cancellation token to use. + public Response GetDatasetsByWorkspace(CancellationToken cancellationToken = default) + { + using var message = CreateGetDatasetsByWorkspaceRequest(); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DatasetListResponse value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + value = DatasetListResponse.DeserializeDatasetListResponse(document.RootElement); + } + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateCreateOrUpdateDatasetRequest(string datasetName, DatasetResource dataset, string ifMatch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.AppendRaw(endpoint, false); + uri.AppendPath("/datasets/", false); + uri.AppendPath(datasetName, true); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + if (ifMatch != null) + { + request.Headers.Add("If-Match", ifMatch); + } + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(dataset); + request.Content = content; + return message; + } + + /// Creates or updates a dataset. + /// The dataset name. + /// Dataset resource definition. + /// ETag of the dataset entity. Should only be specified for update, for which it should match existing entity or can be * for unconditional update. + /// The cancellation token to use. + public async Task> CreateOrUpdateDatasetAsync(string datasetName, DatasetResource dataset, string ifMatch = null, CancellationToken cancellationToken = default) + { + if (datasetName == null) + { + throw new ArgumentNullException(nameof(datasetName)); + } + if (dataset == null) + { + throw new ArgumentNullException(nameof(dataset)); + } + + using var message = CreateCreateOrUpdateDatasetRequest(datasetName, dataset, ifMatch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DatasetResource value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + value = DatasetResource.DeserializeDatasetResource(document.RootElement); + } + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Creates or updates a dataset. + /// The dataset name. + /// Dataset resource definition. + /// ETag of the dataset entity. Should only be specified for update, for which it should match existing entity or can be * for unconditional update. + /// The cancellation token to use. + public Response CreateOrUpdateDataset(string datasetName, DatasetResource dataset, string ifMatch = null, CancellationToken cancellationToken = default) + { + if (datasetName == null) + { + throw new ArgumentNullException(nameof(datasetName)); + } + if (dataset == null) + { + throw new ArgumentNullException(nameof(dataset)); + } + + using var message = CreateCreateOrUpdateDatasetRequest(datasetName, dataset, ifMatch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DatasetResource value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + value = DatasetResource.DeserializeDatasetResource(document.RootElement); + } + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetDatasetRequest(string datasetName, string ifNoneMatch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.AppendRaw(endpoint, false); + uri.AppendPath("/datasets/", false); + uri.AppendPath(datasetName, true); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + if (ifNoneMatch != null) + { + request.Headers.Add("If-None-Match", ifNoneMatch); + } + return message; + } + + /// Gets a dataset. + /// The dataset name. + /// ETag of the dataset 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 to use. + public async Task> GetDatasetAsync(string datasetName, string ifNoneMatch = null, CancellationToken cancellationToken = default) + { + if (datasetName == null) + { + throw new ArgumentNullException(nameof(datasetName)); + } + + using var message = CreateGetDatasetRequest(datasetName, ifNoneMatch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DatasetResource value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + value = DatasetResource.DeserializeDatasetResource(document.RootElement); + } + return Response.FromValue(value, message.Response); + } + case 304: + return Response.FromValue(null, message.Response); + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Gets a dataset. + /// The dataset name. + /// ETag of the dataset 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 to use. + public Response GetDataset(string datasetName, string ifNoneMatch = null, CancellationToken cancellationToken = default) + { + if (datasetName == null) + { + throw new ArgumentNullException(nameof(datasetName)); + } + + using var message = CreateGetDatasetRequest(datasetName, ifNoneMatch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DatasetResource value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + value = DatasetResource.DeserializeDatasetResource(document.RootElement); + } + return Response.FromValue(value, message.Response); + } + case 304: + return Response.FromValue(null, message.Response); + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateDeleteDatasetRequest(string datasetName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.AppendRaw(endpoint, false); + uri.AppendPath("/datasets/", false); + uri.AppendPath(datasetName, true); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + return message; + } + + /// Deletes a dataset. + /// The dataset name. + /// The cancellation token to use. + public async Task DeleteDatasetAsync(string datasetName, CancellationToken cancellationToken = default) + { + if (datasetName == null) + { + throw new ArgumentNullException(nameof(datasetName)); + } + + using var message = CreateDeleteDatasetRequest(datasetName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Deletes a dataset. + /// The dataset name. + /// The cancellation token to use. + public Response DeleteDataset(string datasetName, CancellationToken cancellationToken = default) + { + if (datasetName == null) + { + throw new ArgumentNullException(nameof(datasetName)); + } + + using var message = CreateDeleteDatasetRequest(datasetName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetDatasetsByWorkspaceNextPageRequest(string nextLink) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.AppendRaw(endpoint, false); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + return message; + } + + /// Lists datasets. + /// The URL to the next page of results. + /// The cancellation token to use. + public async Task> GetDatasetsByWorkspaceNextPageAsync(string nextLink, CancellationToken cancellationToken = default) + { + if (nextLink == null) + { + throw new ArgumentNullException(nameof(nextLink)); + } + + using var message = CreateGetDatasetsByWorkspaceNextPageRequest(nextLink); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DatasetListResponse value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + value = DatasetListResponse.DeserializeDatasetListResponse(document.RootElement); + } + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Lists datasets. + /// The URL to the next page of results. + /// The cancellation token to use. + public Response GetDatasetsByWorkspaceNextPage(string nextLink, CancellationToken cancellationToken = default) + { + if (nextLink == null) + { + throw new ArgumentNullException(nameof(nextLink)); + } + + using var message = CreateGetDatasetsByWorkspaceNextPageRequest(nextLink); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DatasetListResponse value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + value = DatasetListResponse.DeserializeDatasetListResponse(document.RootElement); + } + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/LinkedServiceClient.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/LinkedServiceClient.cs new file mode 100644 index 000000000000..6d1099fa2193 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/LinkedServiceClient.cs @@ -0,0 +1,228 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Analytics.Synapse.Artifacts.Models; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.Analytics.Synapse.Artifacts +{ + /// The LinkedService service client. + public partial class LinkedServiceClient + { + private readonly ClientDiagnostics _clientDiagnostics; + private readonly HttpPipeline _pipeline; + internal LinkedServiceRestClient RestClient { get; } + /// Initializes a new instance of LinkedServiceClient for mocking. + protected LinkedServiceClient() + { + } + /// Initializes a new instance of LinkedServiceClient. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The workspace development endpoint, for example https://myworkspace.dev.azuresynapse.net. + /// Api Version. + internal LinkedServiceClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string endpoint, string apiVersion = "2019-06-01-preview") + { + RestClient = new LinkedServiceRestClient(clientDiagnostics, pipeline, endpoint, apiVersion); + _clientDiagnostics = clientDiagnostics; + _pipeline = pipeline; + } + + /// Creates or updates a linked service. + /// The linked service name. + /// Linked service resource definition. + /// ETag of the linkedService entity. Should only be specified for update, for which it should match existing entity or can be * for unconditional update. + /// The cancellation token to use. + public virtual async Task> CreateOrUpdateLinkedServiceAsync(string linkedServiceName, LinkedServiceResource linkedService, string ifMatch = null, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("LinkedServiceClient.CreateOrUpdateLinkedService"); + scope.Start(); + try + { + return await RestClient.CreateOrUpdateLinkedServiceAsync(linkedServiceName, linkedService, ifMatch, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Creates or updates a linked service. + /// The linked service name. + /// Linked service resource definition. + /// ETag of the linkedService entity. Should only be specified for update, for which it should match existing entity or can be * for unconditional update. + /// The cancellation token to use. + public virtual Response CreateOrUpdateLinkedService(string linkedServiceName, LinkedServiceResource linkedService, string ifMatch = null, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("LinkedServiceClient.CreateOrUpdateLinkedService"); + scope.Start(); + try + { + return RestClient.CreateOrUpdateLinkedService(linkedServiceName, linkedService, ifMatch, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets a linked service. + /// The linked service name. + /// ETag of the linked service 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 to use. + public virtual async Task> GetLinkedServiceAsync(string linkedServiceName, string ifNoneMatch = null, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("LinkedServiceClient.GetLinkedService"); + scope.Start(); + try + { + return await RestClient.GetLinkedServiceAsync(linkedServiceName, ifNoneMatch, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets a linked service. + /// The linked service name. + /// ETag of the linked service 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 to use. + public virtual Response GetLinkedService(string linkedServiceName, string ifNoneMatch = null, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("LinkedServiceClient.GetLinkedService"); + scope.Start(); + try + { + return RestClient.GetLinkedService(linkedServiceName, ifNoneMatch, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Deletes a linked service. + /// The linked service name. + /// The cancellation token to use. + public virtual async Task DeleteLinkedServiceAsync(string linkedServiceName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("LinkedServiceClient.DeleteLinkedService"); + scope.Start(); + try + { + return await RestClient.DeleteLinkedServiceAsync(linkedServiceName, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Deletes a linked service. + /// The linked service name. + /// The cancellation token to use. + public virtual Response DeleteLinkedService(string linkedServiceName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("LinkedServiceClient.DeleteLinkedService"); + scope.Start(); + try + { + return RestClient.DeleteLinkedService(linkedServiceName, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Lists linked services. + /// The cancellation token to use. + public virtual AsyncPageable GetLinkedServicesByWorkspaceAsync(CancellationToken cancellationToken = default) + { + async Task> FirstPageFunc(int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("LinkedServiceClient.GetLinkedServicesByWorkspace"); + scope.Start(); + try + { + var response = await RestClient.GetLinkedServicesByWorkspaceAsync(cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + async Task> NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("LinkedServiceClient.GetLinkedServicesByWorkspace"); + scope.Start(); + try + { + var response = await RestClient.GetLinkedServicesByWorkspaceNextPageAsync(nextLink, cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); + } + + /// Lists linked services. + /// The cancellation token to use. + public virtual Pageable GetLinkedServicesByWorkspace(CancellationToken cancellationToken = default) + { + Page FirstPageFunc(int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("LinkedServiceClient.GetLinkedServicesByWorkspace"); + scope.Start(); + try + { + var response = RestClient.GetLinkedServicesByWorkspace(cancellationToken); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + Page NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("LinkedServiceClient.GetLinkedServicesByWorkspace"); + scope.Start(); + try + { + var response = RestClient.GetLinkedServicesByWorkspaceNextPage(nextLink, cancellationToken); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/LinkedServiceRestClient.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/LinkedServiceRestClient.cs new file mode 100644 index 000000000000..85dbfedb1896 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/LinkedServiceRestClient.cs @@ -0,0 +1,442 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Analytics.Synapse.Artifacts.Models; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.Analytics.Synapse.Artifacts +{ + internal partial class LinkedServiceRestClient + { + private string endpoint; + private string apiVersion; + private ClientDiagnostics _clientDiagnostics; + private HttpPipeline _pipeline; + + /// Initializes a new instance of LinkedServiceRestClient. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The workspace development endpoint, for example https://myworkspace.dev.azuresynapse.net. + /// Api Version. + /// This occurs when one of the required arguments is null. + public LinkedServiceRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string endpoint, string apiVersion = "2019-06-01-preview") + { + if (endpoint == null) + { + throw new ArgumentNullException(nameof(endpoint)); + } + if (apiVersion == null) + { + throw new ArgumentNullException(nameof(apiVersion)); + } + + this.endpoint = endpoint; + this.apiVersion = apiVersion; + _clientDiagnostics = clientDiagnostics; + _pipeline = pipeline; + } + + internal HttpMessage CreateGetLinkedServicesByWorkspaceRequest() + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.AppendRaw(endpoint, false); + uri.AppendPath("/linkedservices", false); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + return message; + } + + /// Lists linked services. + /// The cancellation token to use. + public async Task> GetLinkedServicesByWorkspaceAsync(CancellationToken cancellationToken = default) + { + using var message = CreateGetLinkedServicesByWorkspaceRequest(); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + LinkedServiceListResponse value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + value = LinkedServiceListResponse.DeserializeLinkedServiceListResponse(document.RootElement); + } + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Lists linked services. + /// The cancellation token to use. + public Response GetLinkedServicesByWorkspace(CancellationToken cancellationToken = default) + { + using var message = CreateGetLinkedServicesByWorkspaceRequest(); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + LinkedServiceListResponse value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + value = LinkedServiceListResponse.DeserializeLinkedServiceListResponse(document.RootElement); + } + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateCreateOrUpdateLinkedServiceRequest(string linkedServiceName, LinkedServiceResource linkedService, string ifMatch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.AppendRaw(endpoint, false); + uri.AppendPath("/linkedservices/", false); + uri.AppendPath(linkedServiceName, true); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + if (ifMatch != null) + { + request.Headers.Add("If-Match", ifMatch); + } + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(linkedService); + request.Content = content; + return message; + } + + /// Creates or updates a linked service. + /// The linked service name. + /// Linked service resource definition. + /// ETag of the linkedService entity. Should only be specified for update, for which it should match existing entity or can be * for unconditional update. + /// The cancellation token to use. + public async Task> CreateOrUpdateLinkedServiceAsync(string linkedServiceName, LinkedServiceResource linkedService, string ifMatch = null, CancellationToken cancellationToken = default) + { + if (linkedServiceName == null) + { + throw new ArgumentNullException(nameof(linkedServiceName)); + } + if (linkedService == null) + { + throw new ArgumentNullException(nameof(linkedService)); + } + + using var message = CreateCreateOrUpdateLinkedServiceRequest(linkedServiceName, linkedService, ifMatch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + LinkedServiceResource value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + value = LinkedServiceResource.DeserializeLinkedServiceResource(document.RootElement); + } + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Creates or updates a linked service. + /// The linked service name. + /// Linked service resource definition. + /// ETag of the linkedService entity. Should only be specified for update, for which it should match existing entity or can be * for unconditional update. + /// The cancellation token to use. + public Response CreateOrUpdateLinkedService(string linkedServiceName, LinkedServiceResource linkedService, string ifMatch = null, CancellationToken cancellationToken = default) + { + if (linkedServiceName == null) + { + throw new ArgumentNullException(nameof(linkedServiceName)); + } + if (linkedService == null) + { + throw new ArgumentNullException(nameof(linkedService)); + } + + using var message = CreateCreateOrUpdateLinkedServiceRequest(linkedServiceName, linkedService, ifMatch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + LinkedServiceResource value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + value = LinkedServiceResource.DeserializeLinkedServiceResource(document.RootElement); + } + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetLinkedServiceRequest(string linkedServiceName, string ifNoneMatch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.AppendRaw(endpoint, false); + uri.AppendPath("/linkedservices/", false); + uri.AppendPath(linkedServiceName, true); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + if (ifNoneMatch != null) + { + request.Headers.Add("If-None-Match", ifNoneMatch); + } + return message; + } + + /// Gets a linked service. + /// The linked service name. + /// ETag of the linked service 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 to use. + public async Task> GetLinkedServiceAsync(string linkedServiceName, string ifNoneMatch = null, CancellationToken cancellationToken = default) + { + if (linkedServiceName == null) + { + throw new ArgumentNullException(nameof(linkedServiceName)); + } + + using var message = CreateGetLinkedServiceRequest(linkedServiceName, ifNoneMatch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + LinkedServiceResource value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + value = LinkedServiceResource.DeserializeLinkedServiceResource(document.RootElement); + } + return Response.FromValue(value, message.Response); + } + case 304: + return Response.FromValue(null, message.Response); + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Gets a linked service. + /// The linked service name. + /// ETag of the linked service 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 to use. + public Response GetLinkedService(string linkedServiceName, string ifNoneMatch = null, CancellationToken cancellationToken = default) + { + if (linkedServiceName == null) + { + throw new ArgumentNullException(nameof(linkedServiceName)); + } + + using var message = CreateGetLinkedServiceRequest(linkedServiceName, ifNoneMatch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + LinkedServiceResource value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + value = LinkedServiceResource.DeserializeLinkedServiceResource(document.RootElement); + } + return Response.FromValue(value, message.Response); + } + case 304: + return Response.FromValue(null, message.Response); + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateDeleteLinkedServiceRequest(string linkedServiceName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.AppendRaw(endpoint, false); + uri.AppendPath("/linkedservices/", false); + uri.AppendPath(linkedServiceName, true); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + return message; + } + + /// Deletes a linked service. + /// The linked service name. + /// The cancellation token to use. + public async Task DeleteLinkedServiceAsync(string linkedServiceName, CancellationToken cancellationToken = default) + { + if (linkedServiceName == null) + { + throw new ArgumentNullException(nameof(linkedServiceName)); + } + + using var message = CreateDeleteLinkedServiceRequest(linkedServiceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Deletes a linked service. + /// The linked service name. + /// The cancellation token to use. + public Response DeleteLinkedService(string linkedServiceName, CancellationToken cancellationToken = default) + { + if (linkedServiceName == null) + { + throw new ArgumentNullException(nameof(linkedServiceName)); + } + + using var message = CreateDeleteLinkedServiceRequest(linkedServiceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetLinkedServicesByWorkspaceNextPageRequest(string nextLink) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.AppendRaw(endpoint, false); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + return message; + } + + /// Lists linked services. + /// The URL to the next page of results. + /// The cancellation token to use. + public async Task> GetLinkedServicesByWorkspaceNextPageAsync(string nextLink, CancellationToken cancellationToken = default) + { + if (nextLink == null) + { + throw new ArgumentNullException(nameof(nextLink)); + } + + using var message = CreateGetLinkedServicesByWorkspaceNextPageRequest(nextLink); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + LinkedServiceListResponse value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + value = LinkedServiceListResponse.DeserializeLinkedServiceListResponse(document.RootElement); + } + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Lists linked services. + /// The URL to the next page of results. + /// The cancellation token to use. + public Response GetLinkedServicesByWorkspaceNextPage(string nextLink, CancellationToken cancellationToken = default) + { + if (nextLink == null) + { + throw new ArgumentNullException(nameof(nextLink)); + } + + using var message = CreateGetLinkedServicesByWorkspaceNextPageRequest(nextLink); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + LinkedServiceListResponse value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + value = LinkedServiceListResponse.DeserializeLinkedServiceListResponse(document.RootElement); + } + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/Activity.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/Activity.Serialization.cs new file mode 100644 index 000000000000..7dfcd8e9bedb --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/Activity.Serialization.cs @@ -0,0 +1,184 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class Activity : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("name"); + writer.WriteStringValue(Name); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (DependsOn != null) + { + writer.WritePropertyName("dependsOn"); + writer.WriteStartArray(); + foreach (var item in DependsOn) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (UserProperties != null) + { + writer.WritePropertyName("userProperties"); + writer.WriteStartArray(); + foreach (var item in UserProperties) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static Activity DeserializeActivity(JsonElement element) + { + if (element.TryGetProperty("type", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "AppendVariable": return AppendVariableActivity.DeserializeAppendVariableActivity(element); + case "AzureDataExplorerCommand": return AzureDataExplorerCommandActivity.DeserializeAzureDataExplorerCommandActivity(element); + case "AzureFunctionActivity": return AzureFunctionActivity.DeserializeAzureFunctionActivity(element); + case "AzureMLBatchExecution": return AzureMLBatchExecutionActivity.DeserializeAzureMLBatchExecutionActivity(element); + case "AzureMLExecutePipeline": return AzureMLExecutePipelineActivity.DeserializeAzureMLExecutePipelineActivity(element); + case "AzureMLUpdateResource": return AzureMLUpdateResourceActivity.DeserializeAzureMLUpdateResourceActivity(element); + case "Container": return ControlActivity.DeserializeControlActivity(element); + case "Copy": return CopyActivity.DeserializeCopyActivity(element); + case "Custom": return CustomActivity.DeserializeCustomActivity(element); + case "DataLakeAnalyticsU-SQL": return DataLakeAnalyticsUsqlActivity.DeserializeDataLakeAnalyticsUsqlActivity(element); + case "DatabricksNotebook": return DatabricksNotebookActivity.DeserializeDatabricksNotebookActivity(element); + case "DatabricksSparkJar": return DatabricksSparkJarActivity.DeserializeDatabricksSparkJarActivity(element); + case "DatabricksSparkPython": return DatabricksSparkPythonActivity.DeserializeDatabricksSparkPythonActivity(element); + case "Delete": return DeleteActivity.DeserializeDeleteActivity(element); + case "ExecuteDataFlow": return ExecuteDataFlowActivity.DeserializeExecuteDataFlowActivity(element); + case "ExecutePipeline": return ExecutePipelineActivity.DeserializeExecutePipelineActivity(element); + case "ExecuteSSISPackage": return ExecuteSsisPackageActivity.DeserializeExecuteSsisPackageActivity(element); + case "Execution": return ExecutionActivity.DeserializeExecutionActivity(element); + case "Filter": return FilterActivity.DeserializeFilterActivity(element); + case "ForEach": return ForEachActivity.DeserializeForEachActivity(element); + case "GetMetadata": return GetMetadataActivity.DeserializeGetMetadataActivity(element); + case "HDInsightHive": return HDInsightHiveActivity.DeserializeHDInsightHiveActivity(element); + case "HDInsightMapReduce": return HDInsightMapReduceActivity.DeserializeHDInsightMapReduceActivity(element); + case "HDInsightPig": return HDInsightPigActivity.DeserializeHDInsightPigActivity(element); + case "HDInsightSpark": return HDInsightSparkActivity.DeserializeHDInsightSparkActivity(element); + case "HDInsightStreaming": return HDInsightStreamingActivity.DeserializeHDInsightStreamingActivity(element); + case "IfCondition": return IfConditionActivity.DeserializeIfConditionActivity(element); + case "Lookup": return LookupActivity.DeserializeLookupActivity(element); + case "SetVariable": return SetVariableActivity.DeserializeSetVariableActivity(element); + case "SqlServerStoredProcedure": return SqlServerStoredProcedureActivity.DeserializeSqlServerStoredProcedureActivity(element); + case "Switch": return SwitchActivity.DeserializeSwitchActivity(element); + case "Until": return UntilActivity.DeserializeUntilActivity(element); + case "Validation": return ValidationActivity.DeserializeValidationActivity(element); + case "Wait": return WaitActivity.DeserializeWaitActivity(element); + case "WebActivity": return WebActivity.DeserializeWebActivity(element); + case "WebHook": return WebHookActivity.DeserializeWebHookActivity(element); + } + } + string name = default; + string type = default; + string description = default; + IList dependsOn = default; + IList userProperties = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("dependsOn")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(ActivityDependency.DeserializeActivityDependency(item)); + } + } + dependsOn = array; + continue; + } + if (property.NameEquals("userProperties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(UserProperty.DeserializeUserProperty(item)); + } + } + userProperties = array; + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new Activity(name, type, description, dependsOn, userProperties, additionalProperties); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/Activity.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/Activity.cs new file mode 100644 index 000000000000..097f800754d0 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/Activity.cs @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// A pipeline activity. + public partial class Activity : IDictionary + { + /// Initializes a new instance of Activity. + /// Activity name. + public Activity(string name) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + + Name = name; + AdditionalProperties = new Dictionary(); + Type = "Activity"; + } + + /// Initializes a new instance of Activity. + /// Activity name. + /// Type of activity. + /// Activity description. + /// Activity depends on condition. + /// Activity user properties. + /// . + internal Activity(string name, string type, string description, IList dependsOn, IList userProperties, IDictionary additionalProperties) + { + Name = name; + Type = type ?? "Activity"; + Description = description; + DependsOn = dependsOn; + UserProperties = userProperties; + AdditionalProperties = additionalProperties ?? new Dictionary(); + } + + /// Activity name. + public string Name { get; set; } + /// Type of activity. + internal string Type { get; set; } + /// Activity description. + public string Description { get; set; } + /// Activity depends on condition. + public IList DependsOn { get; set; } + /// Activity user properties. + public IList UserProperties { get; set; } + internal IDictionary AdditionalProperties { get; } + /// + public IEnumerator> GetEnumerator() => AdditionalProperties.GetEnumerator(); + /// + IEnumerator IEnumerable.GetEnumerator() => AdditionalProperties.GetEnumerator(); + /// + public bool TryGetValue(string key, out object value) => AdditionalProperties.TryGetValue(key, out value); + /// + public bool ContainsKey(string key) => AdditionalProperties.ContainsKey(key); + /// + public ICollection Keys => AdditionalProperties.Keys; + /// + public ICollection Values => AdditionalProperties.Values; + /// + int ICollection>.Count => AdditionalProperties.Count; + /// + public void Add(string key, object value) => AdditionalProperties.Add(key, value); + /// + public bool Remove(string key) => AdditionalProperties.Remove(key); + /// + bool ICollection>.IsReadOnly => AdditionalProperties.IsReadOnly; + /// + void ICollection>.Add(KeyValuePair value) => AdditionalProperties.Add(value); + /// + bool ICollection>.Remove(KeyValuePair value) => AdditionalProperties.Remove(value); + /// + bool ICollection>.Contains(KeyValuePair value) => AdditionalProperties.Contains(value); + /// + void ICollection>.CopyTo(KeyValuePair[] destination, int offset) => AdditionalProperties.CopyTo(destination, offset); + /// + void ICollection>.Clear() => AdditionalProperties.Clear(); + /// + public object this[string key] + { + get => AdditionalProperties[key]; + set => AdditionalProperties[key] = value; + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ActivityDependency.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ActivityDependency.Serialization.cs new file mode 100644 index 000000000000..4a46182ffcc5 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ActivityDependency.Serialization.cs @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class ActivityDependency : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("activity"); + writer.WriteStringValue(Activity); + writer.WritePropertyName("dependencyConditions"); + writer.WriteStartArray(); + foreach (var item in DependencyConditions) + { + writer.WriteStringValue(item.ToString()); + } + writer.WriteEndArray(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static ActivityDependency DeserializeActivityDependency(JsonElement element) + { + string activity = default; + IList dependencyConditions = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("activity")) + { + activity = property.Value.GetString(); + continue; + } + if (property.NameEquals("dependencyConditions")) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(new DependencyCondition(item.GetString())); + } + dependencyConditions = array; + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new ActivityDependency(activity, dependencyConditions, additionalProperties); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ActivityDependency.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ActivityDependency.cs new file mode 100644 index 000000000000..ae9f945933d3 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ActivityDependency.cs @@ -0,0 +1,90 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Activity dependency information. + public partial class ActivityDependency : IDictionary + { + /// Initializes a new instance of ActivityDependency. + /// Activity name. + /// Match-Condition for the dependency. + public ActivityDependency(string activity, IEnumerable dependencyConditions) + { + if (activity == null) + { + throw new ArgumentNullException(nameof(activity)); + } + if (dependencyConditions == null) + { + throw new ArgumentNullException(nameof(dependencyConditions)); + } + + Activity = activity; + DependencyConditions = dependencyConditions.ToArray(); + AdditionalProperties = new Dictionary(); + } + + /// Initializes a new instance of ActivityDependency. + /// Activity name. + /// Match-Condition for the dependency. + /// . + internal ActivityDependency(string activity, IList dependencyConditions, IDictionary additionalProperties) + { + Activity = activity; + DependencyConditions = dependencyConditions; + AdditionalProperties = additionalProperties ?? new Dictionary(); + } + + /// Activity name. + public string Activity { get; set; } + /// Match-Condition for the dependency. + public IList DependencyConditions { get; set; } + internal IDictionary AdditionalProperties { get; } + /// + public IEnumerator> GetEnumerator() => AdditionalProperties.GetEnumerator(); + /// + IEnumerator IEnumerable.GetEnumerator() => AdditionalProperties.GetEnumerator(); + /// + public bool TryGetValue(string key, out object value) => AdditionalProperties.TryGetValue(key, out value); + /// + public bool ContainsKey(string key) => AdditionalProperties.ContainsKey(key); + /// + public ICollection Keys => AdditionalProperties.Keys; + /// + public ICollection Values => AdditionalProperties.Values; + /// + int ICollection>.Count => AdditionalProperties.Count; + /// + public void Add(string key, object value) => AdditionalProperties.Add(key, value); + /// + public bool Remove(string key) => AdditionalProperties.Remove(key); + /// + bool ICollection>.IsReadOnly => AdditionalProperties.IsReadOnly; + /// + void ICollection>.Add(KeyValuePair value) => AdditionalProperties.Add(value); + /// + bool ICollection>.Remove(KeyValuePair value) => AdditionalProperties.Remove(value); + /// + bool ICollection>.Contains(KeyValuePair value) => AdditionalProperties.Contains(value); + /// + void ICollection>.CopyTo(KeyValuePair[] destination, int offset) => AdditionalProperties.CopyTo(destination, offset); + /// + void ICollection>.Clear() => AdditionalProperties.Clear(); + /// + public object this[string key] + { + get => AdditionalProperties[key]; + set => AdditionalProperties[key] = value; + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ActivityPolicy.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ActivityPolicy.Serialization.cs new file mode 100644 index 000000000000..1e43422afab1 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ActivityPolicy.Serialization.cs @@ -0,0 +1,122 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class ActivityPolicy : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Timeout != null) + { + writer.WritePropertyName("timeout"); + writer.WriteObjectValue(Timeout); + } + if (Retry != null) + { + writer.WritePropertyName("retry"); + writer.WriteObjectValue(Retry); + } + if (RetryIntervalInSeconds != null) + { + writer.WritePropertyName("retryIntervalInSeconds"); + writer.WriteNumberValue(RetryIntervalInSeconds.Value); + } + if (SecureInput != null) + { + writer.WritePropertyName("secureInput"); + writer.WriteBooleanValue(SecureInput.Value); + } + if (SecureOutput != null) + { + writer.WritePropertyName("secureOutput"); + writer.WriteBooleanValue(SecureOutput.Value); + } + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static ActivityPolicy DeserializeActivityPolicy(JsonElement element) + { + object timeout = default; + object retry = default; + int? retryIntervalInSeconds = default; + bool? secureInput = default; + bool? secureOutput = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("timeout")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + timeout = property.Value.GetObject(); + continue; + } + if (property.NameEquals("retry")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + retry = property.Value.GetObject(); + continue; + } + if (property.NameEquals("retryIntervalInSeconds")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + retryIntervalInSeconds = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("secureInput")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + secureInput = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("secureOutput")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + secureOutput = property.Value.GetBoolean(); + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new ActivityPolicy(timeout, retry, retryIntervalInSeconds, secureInput, secureOutput, additionalProperties); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ActivityPolicy.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ActivityPolicy.cs new file mode 100644 index 000000000000..d8608a0c5956 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ActivityPolicy.cs @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Execution policy for an activity. + public partial class ActivityPolicy : IDictionary + { + /// Initializes a new instance of ActivityPolicy. + public ActivityPolicy() + { + AdditionalProperties = new Dictionary(); + } + + /// Initializes a new instance of ActivityPolicy. + /// Specifies the timeout for the activity to run. The default timeout is 7 days. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Maximum ordinary retry attempts. Default is 0. Type: integer (or Expression with resultType integer), minimum: 0. + /// Interval between each retry attempt (in seconds). The default is 30 sec. + /// When set to true, Input from activity is considered as secure and will not be logged to monitoring. + /// When set to true, Output from activity is considered as secure and will not be logged to monitoring. + /// . + internal ActivityPolicy(object timeout, object retry, int? retryIntervalInSeconds, bool? secureInput, bool? secureOutput, IDictionary additionalProperties) + { + Timeout = timeout; + Retry = retry; + RetryIntervalInSeconds = retryIntervalInSeconds; + SecureInput = secureInput; + SecureOutput = secureOutput; + AdditionalProperties = additionalProperties ?? new Dictionary(); + } + + /// Specifies the timeout for the activity to run. The default timeout is 7 days. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + public object Timeout { get; set; } + /// Maximum ordinary retry attempts. Default is 0. Type: integer (or Expression with resultType integer), minimum: 0. + public object Retry { get; set; } + /// Interval between each retry attempt (in seconds). The default is 30 sec. + public int? RetryIntervalInSeconds { get; set; } + /// When set to true, Input from activity is considered as secure and will not be logged to monitoring. + public bool? SecureInput { get; set; } + /// When set to true, Output from activity is considered as secure and will not be logged to monitoring. + public bool? SecureOutput { get; set; } + internal IDictionary AdditionalProperties { get; } + /// + public IEnumerator> GetEnumerator() => AdditionalProperties.GetEnumerator(); + /// + IEnumerator IEnumerable.GetEnumerator() => AdditionalProperties.GetEnumerator(); + /// + public bool TryGetValue(string key, out object value) => AdditionalProperties.TryGetValue(key, out value); + /// + public bool ContainsKey(string key) => AdditionalProperties.ContainsKey(key); + /// + public ICollection Keys => AdditionalProperties.Keys; + /// + public ICollection Values => AdditionalProperties.Values; + /// + int ICollection>.Count => AdditionalProperties.Count; + /// + public void Add(string key, object value) => AdditionalProperties.Add(key, value); + /// + public bool Remove(string key) => AdditionalProperties.Remove(key); + /// + bool ICollection>.IsReadOnly => AdditionalProperties.IsReadOnly; + /// + void ICollection>.Add(KeyValuePair value) => AdditionalProperties.Add(value); + /// + bool ICollection>.Remove(KeyValuePair value) => AdditionalProperties.Remove(value); + /// + bool ICollection>.Contains(KeyValuePair value) => AdditionalProperties.Contains(value); + /// + void ICollection>.CopyTo(KeyValuePair[] destination, int offset) => AdditionalProperties.CopyTo(destination, offset); + /// + void ICollection>.Clear() => AdditionalProperties.Clear(); + /// + public object this[string key] + { + get => AdditionalProperties[key]; + set => AdditionalProperties[key] = value; + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ActivityRun.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ActivityRun.Serialization.cs new file mode 100644 index 000000000000..8dd09e90d67f --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ActivityRun.Serialization.cs @@ -0,0 +1,167 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class ActivityRun + { + internal static ActivityRun DeserializeActivityRun(JsonElement element) + { + string pipelineName = default; + string pipelineRunId = default; + string activityName = default; + string activityType = default; + string activityRunId = default; + string linkedServiceName = default; + string status = default; + DateTimeOffset? activityRunStart = default; + DateTimeOffset? activityRunEnd = default; + int? durationInMs = default; + object input = default; + object output = default; + object error = default; + IReadOnlyDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("pipelineName")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + pipelineName = property.Value.GetString(); + continue; + } + if (property.NameEquals("pipelineRunId")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + pipelineRunId = property.Value.GetString(); + continue; + } + if (property.NameEquals("activityName")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + activityName = property.Value.GetString(); + continue; + } + if (property.NameEquals("activityType")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + activityType = property.Value.GetString(); + continue; + } + if (property.NameEquals("activityRunId")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + activityRunId = property.Value.GetString(); + continue; + } + if (property.NameEquals("linkedServiceName")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + linkedServiceName = property.Value.GetString(); + continue; + } + if (property.NameEquals("status")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + status = property.Value.GetString(); + continue; + } + if (property.NameEquals("activityRunStart")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + activityRunStart = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("activityRunEnd")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + activityRunEnd = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("durationInMs")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + durationInMs = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("input")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + input = property.Value.GetObject(); + continue; + } + if (property.NameEquals("output")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + output = property.Value.GetObject(); + continue; + } + if (property.NameEquals("error")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + error = property.Value.GetObject(); + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new ActivityRun(pipelineName, pipelineRunId, activityName, activityType, activityRunId, linkedServiceName, status, activityRunStart, activityRunEnd, durationInMs, input, output, error, additionalProperties); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ActivityRun.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ActivityRun.cs new file mode 100644 index 000000000000..54ef9f5f33b1 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ActivityRun.cs @@ -0,0 +1,103 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Information about an activity run in a pipeline. + public partial class ActivityRun : IReadOnlyDictionary + { + /// Initializes a new instance of ActivityRun. + internal ActivityRun() + { + AdditionalProperties = new Dictionary(); + } + + /// Initializes a new instance of ActivityRun. + /// The name of the pipeline. + /// The id of the pipeline run. + /// The name of the activity. + /// The type of the activity. + /// The id of the activity run. + /// The name of the compute linked service. + /// The status of the activity run. + /// The start time of the activity run in 'ISO 8601' format. + /// The end time of the activity run in 'ISO 8601' format. + /// The duration of the activity run. + /// The input for the activity. + /// The output for the activity. + /// The error if any from the activity run. + /// . + internal ActivityRun(string pipelineName, string pipelineRunId, string activityName, string activityType, string activityRunId, string linkedServiceName, string status, DateTimeOffset? activityRunStart, DateTimeOffset? activityRunEnd, int? durationInMs, object input, object output, object error, IReadOnlyDictionary additionalProperties) + { + PipelineName = pipelineName; + PipelineRunId = pipelineRunId; + ActivityName = activityName; + ActivityType = activityType; + ActivityRunId = activityRunId; + LinkedServiceName = linkedServiceName; + Status = status; + ActivityRunStart = activityRunStart; + ActivityRunEnd = activityRunEnd; + DurationInMs = durationInMs; + Input = input; + Output = output; + Error = error; + AdditionalProperties = additionalProperties ?? new Dictionary(); + } + + /// The name of the pipeline. + public string PipelineName { get; } + /// The id of the pipeline run. + public string PipelineRunId { get; } + /// The name of the activity. + public string ActivityName { get; } + /// The type of the activity. + public string ActivityType { get; } + /// The id of the activity run. + public string ActivityRunId { get; } + /// The name of the compute linked service. + public string LinkedServiceName { get; } + /// The status of the activity run. + public string Status { get; } + /// The start time of the activity run in 'ISO 8601' format. + public DateTimeOffset? ActivityRunStart { get; } + /// The end time of the activity run in 'ISO 8601' format. + public DateTimeOffset? ActivityRunEnd { get; } + /// The duration of the activity run. + public int? DurationInMs { get; } + /// The input for the activity. + public object Input { get; } + /// The output for the activity. + public object Output { get; } + /// The error if any from the activity run. + public object Error { get; } + internal IReadOnlyDictionary AdditionalProperties { get; } + /// + public IEnumerator> GetEnumerator() => AdditionalProperties.GetEnumerator(); + /// + IEnumerator IEnumerable.GetEnumerator() => AdditionalProperties.GetEnumerator(); + /// + public bool TryGetValue(string key, out object value) => AdditionalProperties.TryGetValue(key, out value); + /// + public bool ContainsKey(string key) => AdditionalProperties.ContainsKey(key); + /// + public IEnumerable Keys => AdditionalProperties.Keys; + /// + public IEnumerable Values => AdditionalProperties.Values; + /// + int IReadOnlyCollection>.Count => AdditionalProperties.Count; + /// + public object this[string key] + { + get => AdditionalProperties[key]; + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ActivityRunsQueryResponse.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ActivityRunsQueryResponse.Serialization.cs new file mode 100644 index 000000000000..9544ccad96ff --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ActivityRunsQueryResponse.Serialization.cs @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class ActivityRunsQueryResponse + { + internal static ActivityRunsQueryResponse DeserializeActivityRunsQueryResponse(JsonElement element) + { + IReadOnlyList value = default; + string continuationToken = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value")) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(ActivityRun.DeserializeActivityRun(item)); + } + } + value = array; + continue; + } + if (property.NameEquals("continuationToken")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + continuationToken = property.Value.GetString(); + continue; + } + } + return new ActivityRunsQueryResponse(value, continuationToken); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ActivityRunsQueryResponse.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ActivityRunsQueryResponse.cs new file mode 100644 index 000000000000..15b0e9dbff6c --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ActivityRunsQueryResponse.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// A list activity runs. + public partial class ActivityRunsQueryResponse + { + /// Initializes a new instance of ActivityRunsQueryResponse. + /// List of activity runs. + internal ActivityRunsQueryResponse(IEnumerable value) + { + if (value == null) + { + throw new ArgumentNullException(nameof(value)); + } + + Value = value.ToArray(); + } + + /// Initializes a new instance of ActivityRunsQueryResponse. + /// List of activity runs. + /// The continuation token for getting the next page of results, if any remaining results exist, null otherwise. + internal ActivityRunsQueryResponse(IReadOnlyList value, string continuationToken) + { + Value = value; + ContinuationToken = continuationToken; + } + + /// List of activity runs. + public IReadOnlyList Value { get; } + /// The continuation token for getting the next page of results, if any remaining results exist, null otherwise. + public string ContinuationToken { get; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AddDataFlowToDebugSessionResponse.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AddDataFlowToDebugSessionResponse.Serialization.cs new file mode 100644 index 000000000000..e2241da5663d --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AddDataFlowToDebugSessionResponse.Serialization.cs @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class AddDataFlowToDebugSessionResponse + { + internal static AddDataFlowToDebugSessionResponse DeserializeAddDataFlowToDebugSessionResponse(JsonElement element) + { + string jobVersion = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("jobVersion")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + jobVersion = property.Value.GetString(); + continue; + } + } + return new AddDataFlowToDebugSessionResponse(jobVersion); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AddDataFlowToDebugSessionResponse.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AddDataFlowToDebugSessionResponse.cs new file mode 100644 index 000000000000..d641173a7b22 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AddDataFlowToDebugSessionResponse.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Response body structure for starting data flow debug session. + public partial class AddDataFlowToDebugSessionResponse + { + /// Initializes a new instance of AddDataFlowToDebugSessionResponse. + internal AddDataFlowToDebugSessionResponse() + { + } + + /// Initializes a new instance of AddDataFlowToDebugSessionResponse. + /// The ID of data flow debug job version. + internal AddDataFlowToDebugSessionResponse(string jobVersion) + { + JobVersion = jobVersion; + } + + /// The ID of data flow debug job version. + public string JobVersion { get; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AmazonMWSLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AmazonMWSLinkedService.Serialization.cs new file mode 100644 index 000000000000..6b8c911b07a0 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AmazonMWSLinkedService.Serialization.cs @@ -0,0 +1,282 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class AmazonMWSLinkedService : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (ConnectVia != null) + { + writer.WritePropertyName("connectVia"); + writer.WriteObjectValue(ConnectVia); + } + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + writer.WritePropertyName("endpoint"); + writer.WriteObjectValue(Endpoint); + writer.WritePropertyName("marketplaceID"); + writer.WriteObjectValue(MarketplaceID); + writer.WritePropertyName("sellerID"); + writer.WriteObjectValue(SellerID); + if (MwsAuthToken != null) + { + writer.WritePropertyName("mwsAuthToken"); + writer.WriteObjectValue(MwsAuthToken); + } + writer.WritePropertyName("accessKeyId"); + writer.WriteObjectValue(AccessKeyId); + if (SecretKey != null) + { + writer.WritePropertyName("secretKey"); + writer.WriteObjectValue(SecretKey); + } + if (UseEncryptedEndpoints != null) + { + writer.WritePropertyName("useEncryptedEndpoints"); + writer.WriteObjectValue(UseEncryptedEndpoints); + } + if (UseHostVerification != null) + { + writer.WritePropertyName("useHostVerification"); + writer.WriteObjectValue(UseHostVerification); + } + if (UsePeerVerification != null) + { + writer.WritePropertyName("usePeerVerification"); + writer.WriteObjectValue(UsePeerVerification); + } + if (EncryptedCredential != null) + { + writer.WritePropertyName("encryptedCredential"); + writer.WriteObjectValue(EncryptedCredential); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static AmazonMWSLinkedService DeserializeAmazonMWSLinkedService(JsonElement element) + { + string type = default; + IntegrationRuntimeReference connectVia = default; + string description = default; + IDictionary parameters = default; + IList annotations = default; + object endpoint = default; + object marketplaceID = default; + object sellerID = default; + SecretBase mwsAuthToken = default; + object accessKeyId = default; + SecretBase secretKey = default; + object useEncryptedEndpoints = default; + object useHostVerification = default; + object usePeerVerification = default; + object encryptedCredential = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("connectVia")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("endpoint")) + { + endpoint = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("marketplaceID")) + { + marketplaceID = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("sellerID")) + { + sellerID = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("mwsAuthToken")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + mwsAuthToken = SecretBase.DeserializeSecretBase(property0.Value); + continue; + } + if (property0.NameEquals("accessKeyId")) + { + accessKeyId = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("secretKey")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + secretKey = SecretBase.DeserializeSecretBase(property0.Value); + continue; + } + if (property0.NameEquals("useEncryptedEndpoints")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + useEncryptedEndpoints = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("useHostVerification")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + useHostVerification = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("usePeerVerification")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + usePeerVerification = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("encryptedCredential")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + encryptedCredential = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new AmazonMWSLinkedService(type, connectVia, description, parameters, annotations, additionalProperties, endpoint, marketplaceID, sellerID, mwsAuthToken, accessKeyId, secretKey, useEncryptedEndpoints, useHostVerification, usePeerVerification, encryptedCredential); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AmazonMWSLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AmazonMWSLinkedService.cs new file mode 100644 index 000000000000..3579b9a613ef --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AmazonMWSLinkedService.cs @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Amazon Marketplace Web Service linked service. + public partial class AmazonMWSLinkedService : LinkedService + { + /// Initializes a new instance of AmazonMWSLinkedService. + /// The endpoint of the Amazon MWS server, (i.e. mws.amazonservices.com). + /// The Amazon Marketplace ID you want to retrieve data from. To retrieve data from multiple Marketplace IDs, separate them with a comma (,). (i.e. A2EUQ1WTGCTBG2). + /// The Amazon seller ID. + /// The access key id used to access data. + public AmazonMWSLinkedService(object endpoint, object marketplaceID, object sellerID, object accessKeyId) + { + if (endpoint == null) + { + throw new ArgumentNullException(nameof(endpoint)); + } + if (marketplaceID == null) + { + throw new ArgumentNullException(nameof(marketplaceID)); + } + if (sellerID == null) + { + throw new ArgumentNullException(nameof(sellerID)); + } + if (accessKeyId == null) + { + throw new ArgumentNullException(nameof(accessKeyId)); + } + + Endpoint = endpoint; + MarketplaceID = marketplaceID; + SellerID = sellerID; + AccessKeyId = accessKeyId; + Type = "AmazonMWS"; + } + + /// Initializes a new instance of AmazonMWSLinkedService. + /// Type of linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for describing the linked service. + /// . + /// The endpoint of the Amazon MWS server, (i.e. mws.amazonservices.com). + /// The Amazon Marketplace ID you want to retrieve data from. To retrieve data from multiple Marketplace IDs, separate them with a comma (,). (i.e. A2EUQ1WTGCTBG2). + /// The Amazon seller ID. + /// The Amazon MWS authentication token. + /// The access key id used to access data. + /// The secret key used to access data. + /// Specifies whether the data source endpoints are encrypted using HTTPS. The default value is true. + /// Specifies whether to require the host name in the server's certificate to match the host name of the server when connecting over SSL. The default value is true. + /// Specifies whether to verify the identity of the server when connecting over SSL. The default value is true. + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + internal AmazonMWSLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object endpoint, object marketplaceID, object sellerID, SecretBase mwsAuthToken, object accessKeyId, SecretBase secretKey, object useEncryptedEndpoints, object useHostVerification, object usePeerVerification, object encryptedCredential) : base(type, connectVia, description, parameters, annotations, additionalProperties) + { + Endpoint = endpoint; + MarketplaceID = marketplaceID; + SellerID = sellerID; + MwsAuthToken = mwsAuthToken; + AccessKeyId = accessKeyId; + SecretKey = secretKey; + UseEncryptedEndpoints = useEncryptedEndpoints; + UseHostVerification = useHostVerification; + UsePeerVerification = usePeerVerification; + EncryptedCredential = encryptedCredential; + Type = type ?? "AmazonMWS"; + } + + /// The endpoint of the Amazon MWS server, (i.e. mws.amazonservices.com). + public object Endpoint { get; set; } + /// The Amazon Marketplace ID you want to retrieve data from. To retrieve data from multiple Marketplace IDs, separate them with a comma (,). (i.e. A2EUQ1WTGCTBG2). + public object MarketplaceID { get; set; } + /// The Amazon seller ID. + public object SellerID { get; set; } + /// The Amazon MWS authentication token. + public SecretBase MwsAuthToken { get; set; } + /// The access key id used to access data. + public object AccessKeyId { get; set; } + /// The secret key used to access data. + public SecretBase SecretKey { get; set; } + /// Specifies whether the data source endpoints are encrypted using HTTPS. The default value is true. + public object UseEncryptedEndpoints { get; set; } + /// Specifies whether to require the host name in the server's certificate to match the host name of the server when connecting over SSL. The default value is true. + public object UseHostVerification { get; set; } + /// Specifies whether to verify the identity of the server when connecting over SSL. The default value is true. + public object UsePeerVerification { get; set; } + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + public object EncryptedCredential { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AmazonMWSObjectDataset.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AmazonMWSObjectDataset.Serialization.cs new file mode 100644 index 000000000000..92e17dccd0f4 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AmazonMWSObjectDataset.Serialization.cs @@ -0,0 +1,213 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class AmazonMWSObjectDataset : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Structure != null) + { + writer.WritePropertyName("structure"); + writer.WriteObjectValue(Structure); + } + if (Schema != null) + { + writer.WritePropertyName("schema"); + writer.WriteObjectValue(Schema); + } + writer.WritePropertyName("linkedServiceName"); + writer.WriteObjectValue(LinkedServiceName); + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Folder != null) + { + writer.WritePropertyName("folder"); + writer.WriteObjectValue(Folder); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + if (TableName != null) + { + writer.WritePropertyName("tableName"); + writer.WriteObjectValue(TableName); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static AmazonMWSObjectDataset DeserializeAmazonMWSObjectDataset(JsonElement element) + { + string type = default; + string description = default; + object structure = default; + object schema = default; + LinkedServiceReference linkedServiceName = default; + IDictionary parameters = default; + IList annotations = default; + DatasetFolder folder = default; + object tableName = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("structure")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + structure = property.Value.GetObject(); + continue; + } + if (property.NameEquals("schema")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + schema = property.Value.GetObject(); + continue; + } + if (property.NameEquals("linkedServiceName")) + { + linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("folder")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + folder = DatasetFolder.DeserializeDatasetFolder(property.Value); + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("tableName")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + tableName = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new AmazonMWSObjectDataset(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties, tableName); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AmazonMWSObjectDataset.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AmazonMWSObjectDataset.cs new file mode 100644 index 000000000000..6c4efbf8a31a --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AmazonMWSObjectDataset.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Amazon Marketplace Web Service dataset. + public partial class AmazonMWSObjectDataset : Dataset + { + /// Initializes a new instance of AmazonMWSObjectDataset. + /// Linked service reference. + public AmazonMWSObjectDataset(LinkedServiceReference linkedServiceName) : base(linkedServiceName) + { + if (linkedServiceName == null) + { + throw new ArgumentNullException(nameof(linkedServiceName)); + } + + Type = "AmazonMWSObject"; + } + + /// Initializes a new instance of AmazonMWSObjectDataset. + /// Type of dataset. + /// Dataset description. + /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. + /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. + /// Linked service reference. + /// Parameters for dataset. + /// List of tags that can be used for describing the Dataset. + /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. + /// . + /// The table name. Type: string (or Expression with resultType string). + internal AmazonMWSObjectDataset(string type, string description, object structure, object schema, LinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary additionalProperties, object tableName) : base(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) + { + TableName = tableName; + Type = type ?? "AmazonMWSObject"; + } + + /// The table name. Type: string (or Expression with resultType string). + public object TableName { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AmazonRedshiftLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AmazonRedshiftLinkedService.Serialization.cs new file mode 100644 index 000000000000..0cf2eb573d97 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AmazonRedshiftLinkedService.Serialization.cs @@ -0,0 +1,236 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class AmazonRedshiftLinkedService : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (ConnectVia != null) + { + writer.WritePropertyName("connectVia"); + writer.WriteObjectValue(ConnectVia); + } + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + writer.WritePropertyName("server"); + writer.WriteObjectValue(Server); + if (Username != null) + { + writer.WritePropertyName("username"); + writer.WriteObjectValue(Username); + } + if (Password != null) + { + writer.WritePropertyName("password"); + writer.WriteObjectValue(Password); + } + writer.WritePropertyName("database"); + writer.WriteObjectValue(Database); + if (Port != null) + { + writer.WritePropertyName("port"); + writer.WriteObjectValue(Port); + } + if (EncryptedCredential != null) + { + writer.WritePropertyName("encryptedCredential"); + writer.WriteObjectValue(EncryptedCredential); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static AmazonRedshiftLinkedService DeserializeAmazonRedshiftLinkedService(JsonElement element) + { + string type = default; + IntegrationRuntimeReference connectVia = default; + string description = default; + IDictionary parameters = default; + IList annotations = default; + object server = default; + object username = default; + SecretBase password = default; + object database = default; + object port = default; + object encryptedCredential = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("connectVia")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("server")) + { + server = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("username")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + username = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("password")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + password = SecretBase.DeserializeSecretBase(property0.Value); + continue; + } + if (property0.NameEquals("database")) + { + database = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("port")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + port = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("encryptedCredential")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + encryptedCredential = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new AmazonRedshiftLinkedService(type, connectVia, description, parameters, annotations, additionalProperties, server, username, password, database, port, encryptedCredential); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AmazonRedshiftLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AmazonRedshiftLinkedService.cs new file mode 100644 index 000000000000..ba2fbd5e8031 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AmazonRedshiftLinkedService.cs @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Linked service for Amazon Redshift. + public partial class AmazonRedshiftLinkedService : LinkedService + { + /// Initializes a new instance of AmazonRedshiftLinkedService. + /// The name of the Amazon Redshift server. Type: string (or Expression with resultType string). + /// The database name of the Amazon Redshift source. Type: string (or Expression with resultType string). + public AmazonRedshiftLinkedService(object server, object database) + { + if (server == null) + { + throw new ArgumentNullException(nameof(server)); + } + if (database == null) + { + throw new ArgumentNullException(nameof(database)); + } + + Server = server; + Database = database; + Type = "AmazonRedshift"; + } + + /// Initializes a new instance of AmazonRedshiftLinkedService. + /// Type of linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for describing the linked service. + /// . + /// The name of the Amazon Redshift server. Type: string (or Expression with resultType string). + /// The username of the Amazon Redshift source. Type: string (or Expression with resultType string). + /// The password of the Amazon Redshift source. + /// The database name of the Amazon Redshift source. Type: string (or Expression with resultType string). + /// The TCP port number that the Amazon Redshift server uses to listen for client connections. The default value is 5439. Type: integer (or Expression with resultType integer). + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + internal AmazonRedshiftLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object server, object username, SecretBase password, object database, object port, object encryptedCredential) : base(type, connectVia, description, parameters, annotations, additionalProperties) + { + Server = server; + Username = username; + Password = password; + Database = database; + Port = port; + EncryptedCredential = encryptedCredential; + Type = type ?? "AmazonRedshift"; + } + + /// The name of the Amazon Redshift server. Type: string (or Expression with resultType string). + public object Server { get; set; } + /// The username of the Amazon Redshift source. Type: string (or Expression with resultType string). + public object Username { get; set; } + /// The password of the Amazon Redshift source. + public SecretBase Password { get; set; } + /// The database name of the Amazon Redshift source. Type: string (or Expression with resultType string). + public object Database { get; set; } + /// The TCP port number that the Amazon Redshift server uses to listen for client connections. The default value is 5439. Type: integer (or Expression with resultType integer). + public object Port { get; set; } + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + public object EncryptedCredential { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AmazonRedshiftTableDataset.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AmazonRedshiftTableDataset.Serialization.cs new file mode 100644 index 000000000000..409f5e08bfd9 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AmazonRedshiftTableDataset.Serialization.cs @@ -0,0 +1,243 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class AmazonRedshiftTableDataset : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Structure != null) + { + writer.WritePropertyName("structure"); + writer.WriteObjectValue(Structure); + } + if (Schema != null) + { + writer.WritePropertyName("schema"); + writer.WriteObjectValue(Schema); + } + writer.WritePropertyName("linkedServiceName"); + writer.WriteObjectValue(LinkedServiceName); + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Folder != null) + { + writer.WritePropertyName("folder"); + writer.WriteObjectValue(Folder); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + if (TableName != null) + { + writer.WritePropertyName("tableName"); + writer.WriteObjectValue(TableName); + } + if (Table != null) + { + writer.WritePropertyName("table"); + writer.WriteObjectValue(Table); + } + if (SchemaTypePropertiesSchema != null) + { + writer.WritePropertyName("schema"); + writer.WriteObjectValue(SchemaTypePropertiesSchema); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static AmazonRedshiftTableDataset DeserializeAmazonRedshiftTableDataset(JsonElement element) + { + string type = default; + string description = default; + object structure = default; + object schema = default; + LinkedServiceReference linkedServiceName = default; + IDictionary parameters = default; + IList annotations = default; + DatasetFolder folder = default; + object tableName = default; + object table = default; + object schema0 = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("structure")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + structure = property.Value.GetObject(); + continue; + } + if (property.NameEquals("schema")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + schema = property.Value.GetObject(); + continue; + } + if (property.NameEquals("linkedServiceName")) + { + linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("folder")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + folder = DatasetFolder.DeserializeDatasetFolder(property.Value); + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("tableName")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + tableName = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("table")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + table = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("schema")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + schema0 = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new AmazonRedshiftTableDataset(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties, tableName, table, schema0); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AmazonRedshiftTableDataset.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AmazonRedshiftTableDataset.cs new file mode 100644 index 000000000000..ad973dedc488 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AmazonRedshiftTableDataset.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// The Amazon Redshift table dataset. + public partial class AmazonRedshiftTableDataset : Dataset + { + /// Initializes a new instance of AmazonRedshiftTableDataset. + /// Linked service reference. + public AmazonRedshiftTableDataset(LinkedServiceReference linkedServiceName) : base(linkedServiceName) + { + if (linkedServiceName == null) + { + throw new ArgumentNullException(nameof(linkedServiceName)); + } + + Type = "AmazonRedshiftTable"; + } + + /// Initializes a new instance of AmazonRedshiftTableDataset. + /// Type of dataset. + /// Dataset description. + /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. + /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. + /// Linked service reference. + /// Parameters for dataset. + /// List of tags that can be used for describing the Dataset. + /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. + /// . + /// This property will be retired. Please consider using schema + table properties instead. + /// The Amazon Redshift table name. Type: string (or Expression with resultType string). + /// The Amazon Redshift schema name. Type: string (or Expression with resultType string). + internal AmazonRedshiftTableDataset(string type, string description, object structure, object schema, LinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary additionalProperties, object tableName, object table, object schemaTypePropertiesSchema) : base(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) + { + TableName = tableName; + Table = table; + SchemaTypePropertiesSchema = schemaTypePropertiesSchema; + Type = type ?? "AmazonRedshiftTable"; + } + + /// This property will be retired. Please consider using schema + table properties instead. + public object TableName { get; set; } + /// The Amazon Redshift table name. Type: string (or Expression with resultType string). + public object Table { get; set; } + /// The Amazon Redshift schema name. Type: string (or Expression with resultType string). + public object SchemaTypePropertiesSchema { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AmazonS3LinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AmazonS3LinkedService.Serialization.cs new file mode 100644 index 000000000000..b61c039a2b70 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AmazonS3LinkedService.Serialization.cs @@ -0,0 +1,220 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class AmazonS3LinkedService : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (ConnectVia != null) + { + writer.WritePropertyName("connectVia"); + writer.WriteObjectValue(ConnectVia); + } + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + if (AccessKeyId != null) + { + writer.WritePropertyName("accessKeyId"); + writer.WriteObjectValue(AccessKeyId); + } + if (SecretAccessKey != null) + { + writer.WritePropertyName("secretAccessKey"); + writer.WriteObjectValue(SecretAccessKey); + } + if (ServiceUrl != null) + { + writer.WritePropertyName("serviceUrl"); + writer.WriteObjectValue(ServiceUrl); + } + if (EncryptedCredential != null) + { + writer.WritePropertyName("encryptedCredential"); + writer.WriteObjectValue(EncryptedCredential); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static AmazonS3LinkedService DeserializeAmazonS3LinkedService(JsonElement element) + { + string type = default; + IntegrationRuntimeReference connectVia = default; + string description = default; + IDictionary parameters = default; + IList annotations = default; + object accessKeyId = default; + SecretBase secretAccessKey = default; + object serviceUrl = default; + object encryptedCredential = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("connectVia")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("accessKeyId")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + accessKeyId = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("secretAccessKey")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + secretAccessKey = SecretBase.DeserializeSecretBase(property0.Value); + continue; + } + if (property0.NameEquals("serviceUrl")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + serviceUrl = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("encryptedCredential")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + encryptedCredential = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new AmazonS3LinkedService(type, connectVia, description, parameters, annotations, additionalProperties, accessKeyId, secretAccessKey, serviceUrl, encryptedCredential); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AmazonS3LinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AmazonS3LinkedService.cs new file mode 100644 index 000000000000..4e6b27c70c26 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AmazonS3LinkedService.cs @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Linked service for Amazon S3. + public partial class AmazonS3LinkedService : LinkedService + { + /// Initializes a new instance of AmazonS3LinkedService. + public AmazonS3LinkedService() + { + Type = "AmazonS3"; + } + + /// Initializes a new instance of AmazonS3LinkedService. + /// Type of linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for describing the linked service. + /// . + /// The access key identifier of the Amazon S3 Identity and Access Management (IAM) user. Type: string (or Expression with resultType string). + /// The secret access key of the Amazon S3 Identity and Access Management (IAM) user. + /// This value specifies the endpoint to access with the S3 Connector. This is an optional property; change it only if you want to try a different service endpoint or want to switch between https and http. Type: string (or Expression with resultType string). + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + internal AmazonS3LinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object accessKeyId, SecretBase secretAccessKey, object serviceUrl, object encryptedCredential) : base(type, connectVia, description, parameters, annotations, additionalProperties) + { + AccessKeyId = accessKeyId; + SecretAccessKey = secretAccessKey; + ServiceUrl = serviceUrl; + EncryptedCredential = encryptedCredential; + Type = type ?? "AmazonS3"; + } + + /// The access key identifier of the Amazon S3 Identity and Access Management (IAM) user. Type: string (or Expression with resultType string). + public object AccessKeyId { get; set; } + /// The secret access key of the Amazon S3 Identity and Access Management (IAM) user. + public SecretBase SecretAccessKey { get; set; } + /// This value specifies the endpoint to access with the S3 Connector. This is an optional property; change it only if you want to try a different service endpoint or want to switch between https and http. Type: string (or Expression with resultType string). + public object ServiceUrl { get; set; } + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + public object EncryptedCredential { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AppendVariableActivity.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AppendVariableActivity.Serialization.cs new file mode 100644 index 000000000000..290f431dfb61 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AppendVariableActivity.Serialization.cs @@ -0,0 +1,182 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class AppendVariableActivity : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("name"); + writer.WriteStringValue(Name); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (DependsOn != null) + { + writer.WritePropertyName("dependsOn"); + writer.WriteStartArray(); + foreach (var item in DependsOn) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (UserProperties != null) + { + writer.WritePropertyName("userProperties"); + writer.WriteStartArray(); + foreach (var item in UserProperties) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + if (VariableName != null) + { + writer.WritePropertyName("variableName"); + writer.WriteStringValue(VariableName); + } + if (Value != null) + { + writer.WritePropertyName("value"); + writer.WriteObjectValue(Value); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static AppendVariableActivity DeserializeAppendVariableActivity(JsonElement element) + { + string name = default; + string type = default; + string description = default; + IList dependsOn = default; + IList userProperties = default; + string variableName = default; + object value = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("dependsOn")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(ActivityDependency.DeserializeActivityDependency(item)); + } + } + dependsOn = array; + continue; + } + if (property.NameEquals("userProperties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(UserProperty.DeserializeUserProperty(item)); + } + } + userProperties = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("variableName")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + variableName = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("value")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + value = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new AppendVariableActivity(name, type, description, dependsOn, userProperties, additionalProperties, variableName, value); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AppendVariableActivity.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AppendVariableActivity.cs new file mode 100644 index 000000000000..bfcd9cdfba93 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AppendVariableActivity.cs @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Append value for a Variable of type Array. + public partial class AppendVariableActivity : Activity + { + /// Initializes a new instance of AppendVariableActivity. + /// Activity name. + public AppendVariableActivity(string name) : base(name) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + + Type = "AppendVariable"; + } + + /// Initializes a new instance of AppendVariableActivity. + /// Activity name. + /// Type of activity. + /// Activity description. + /// Activity depends on condition. + /// Activity user properties. + /// . + /// Name of the variable whose value needs to be appended to. + /// Value to be appended. Could be a static value or Expression. + internal AppendVariableActivity(string name, string type, string description, IList dependsOn, IList userProperties, IDictionary additionalProperties, string variableName, object value) : base(name, type, description, dependsOn, userProperties, additionalProperties) + { + VariableName = variableName; + Value = value; + Type = type ?? "AppendVariable"; + } + + /// Name of the variable whose value needs to be appended to. + public string VariableName { get; set; } + /// Value to be appended. Could be a static value or Expression. + public object Value { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AvroCompressionCodec.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AvroCompressionCodec.cs new file mode 100644 index 000000000000..e9d7b0341f34 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AvroCompressionCodec.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// The AvroCompressionCodec. + public readonly partial struct AvroCompressionCodec : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + public AvroCompressionCodec(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NoneValue = "none"; + private const string DeflateValue = "deflate"; + private const string SnappyValue = "snappy"; + private const string XzValue = "xz"; + private const string Bzip2Value = "bzip2"; + + /// none. + public static AvroCompressionCodec None { get; } = new AvroCompressionCodec(NoneValue); + /// deflate. + public static AvroCompressionCodec Deflate { get; } = new AvroCompressionCodec(DeflateValue); + /// snappy. + public static AvroCompressionCodec Snappy { get; } = new AvroCompressionCodec(SnappyValue); + /// xz. + public static AvroCompressionCodec Xz { get; } = new AvroCompressionCodec(XzValue); + /// bzip2. + public static AvroCompressionCodec Bzip2 { get; } = new AvroCompressionCodec(Bzip2Value); + /// Determines if two values are the same. + public static bool operator ==(AvroCompressionCodec left, AvroCompressionCodec right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AvroCompressionCodec left, AvroCompressionCodec right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator AvroCompressionCodec(string value) => new AvroCompressionCodec(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AvroCompressionCodec other && Equals(other); + /// + public bool Equals(AvroCompressionCodec other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AvroDataset.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AvroDataset.Serialization.cs new file mode 100644 index 000000000000..0abe722898b5 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AvroDataset.Serialization.cs @@ -0,0 +1,243 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class AvroDataset : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Structure != null) + { + writer.WritePropertyName("structure"); + writer.WriteObjectValue(Structure); + } + if (Schema != null) + { + writer.WritePropertyName("schema"); + writer.WriteObjectValue(Schema); + } + writer.WritePropertyName("linkedServiceName"); + writer.WriteObjectValue(LinkedServiceName); + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Folder != null) + { + writer.WritePropertyName("folder"); + writer.WriteObjectValue(Folder); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + if (Location != null) + { + writer.WritePropertyName("location"); + writer.WriteObjectValue(Location); + } + if (AvroCompressionCodec != null) + { + writer.WritePropertyName("avroCompressionCodec"); + writer.WriteStringValue(AvroCompressionCodec.Value.ToString()); + } + if (AvroCompressionLevel != null) + { + writer.WritePropertyName("avroCompressionLevel"); + writer.WriteNumberValue(AvroCompressionLevel.Value); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static AvroDataset DeserializeAvroDataset(JsonElement element) + { + string type = default; + string description = default; + object structure = default; + object schema = default; + LinkedServiceReference linkedServiceName = default; + IDictionary parameters = default; + IList annotations = default; + DatasetFolder folder = default; + DatasetLocation location = default; + AvroCompressionCodec? avroCompressionCodec = default; + int? avroCompressionLevel = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("structure")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + structure = property.Value.GetObject(); + continue; + } + if (property.NameEquals("schema")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + schema = property.Value.GetObject(); + continue; + } + if (property.NameEquals("linkedServiceName")) + { + linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("folder")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + folder = DatasetFolder.DeserializeDatasetFolder(property.Value); + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("location")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + location = DatasetLocation.DeserializeDatasetLocation(property0.Value); + continue; + } + if (property0.NameEquals("avroCompressionCodec")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + avroCompressionCodec = new AvroCompressionCodec(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("avroCompressionLevel")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + avroCompressionLevel = property0.Value.GetInt32(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new AvroDataset(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties, location, avroCompressionCodec, avroCompressionLevel); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AvroDataset.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AvroDataset.cs new file mode 100644 index 000000000000..7ad07bcdf861 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AvroDataset.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Avro dataset. + public partial class AvroDataset : Dataset + { + /// Initializes a new instance of AvroDataset. + /// Linked service reference. + public AvroDataset(LinkedServiceReference linkedServiceName) : base(linkedServiceName) + { + if (linkedServiceName == null) + { + throw new ArgumentNullException(nameof(linkedServiceName)); + } + + Type = "Avro"; + } + + /// Initializes a new instance of AvroDataset. + /// Type of dataset. + /// Dataset description. + /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. + /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. + /// Linked service reference. + /// Parameters for dataset. + /// List of tags that can be used for describing the Dataset. + /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. + /// . + /// The location of the avro storage. + /// . + /// . + internal AvroDataset(string type, string description, object structure, object schema, LinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary additionalProperties, DatasetLocation location, AvroCompressionCodec? avroCompressionCodec, int? avroCompressionLevel) : base(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) + { + Location = location; + AvroCompressionCodec = avroCompressionCodec; + AvroCompressionLevel = avroCompressionLevel; + Type = type ?? "Avro"; + } + + /// The location of the avro storage. + public DatasetLocation Location { get; set; } + public AvroCompressionCodec? AvroCompressionCodec { get; set; } + public int? AvroCompressionLevel { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureBatchLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureBatchLinkedService.Serialization.cs new file mode 100644 index 000000000000..21f414c320c3 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureBatchLinkedService.Serialization.cs @@ -0,0 +1,222 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class AzureBatchLinkedService : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (ConnectVia != null) + { + writer.WritePropertyName("connectVia"); + writer.WriteObjectValue(ConnectVia); + } + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + writer.WritePropertyName("accountName"); + writer.WriteObjectValue(AccountName); + if (AccessKey != null) + { + writer.WritePropertyName("accessKey"); + writer.WriteObjectValue(AccessKey); + } + writer.WritePropertyName("batchUri"); + writer.WriteObjectValue(BatchUri); + writer.WritePropertyName("poolName"); + writer.WriteObjectValue(PoolName); + writer.WritePropertyName("linkedServiceName"); + writer.WriteObjectValue(LinkedServiceName); + if (EncryptedCredential != null) + { + writer.WritePropertyName("encryptedCredential"); + writer.WriteObjectValue(EncryptedCredential); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static AzureBatchLinkedService DeserializeAzureBatchLinkedService(JsonElement element) + { + string type = default; + IntegrationRuntimeReference connectVia = default; + string description = default; + IDictionary parameters = default; + IList annotations = default; + object accountName = default; + SecretBase accessKey = default; + object batchUri = default; + object poolName = default; + LinkedServiceReference linkedServiceName = default; + object encryptedCredential = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("connectVia")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("accountName")) + { + accountName = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("accessKey")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + accessKey = SecretBase.DeserializeSecretBase(property0.Value); + continue; + } + if (property0.NameEquals("batchUri")) + { + batchUri = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("poolName")) + { + poolName = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("linkedServiceName")) + { + linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property0.Value); + continue; + } + if (property0.NameEquals("encryptedCredential")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + encryptedCredential = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new AzureBatchLinkedService(type, connectVia, description, parameters, annotations, additionalProperties, accountName, accessKey, batchUri, poolName, linkedServiceName, encryptedCredential); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureBatchLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureBatchLinkedService.cs new file mode 100644 index 000000000000..e896a0986577 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureBatchLinkedService.cs @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Azure Batch linked service. + public partial class AzureBatchLinkedService : LinkedService + { + /// Initializes a new instance of AzureBatchLinkedService. + /// The Azure Batch account name. Type: string (or Expression with resultType string). + /// The Azure Batch URI. Type: string (or Expression with resultType string). + /// The Azure Batch pool name. Type: string (or Expression with resultType string). + /// The Azure Storage linked service reference. + public AzureBatchLinkedService(object accountName, object batchUri, object poolName, LinkedServiceReference linkedServiceName) + { + if (accountName == null) + { + throw new ArgumentNullException(nameof(accountName)); + } + if (batchUri == null) + { + throw new ArgumentNullException(nameof(batchUri)); + } + if (poolName == null) + { + throw new ArgumentNullException(nameof(poolName)); + } + if (linkedServiceName == null) + { + throw new ArgumentNullException(nameof(linkedServiceName)); + } + + AccountName = accountName; + BatchUri = batchUri; + PoolName = poolName; + LinkedServiceName = linkedServiceName; + Type = "AzureBatch"; + } + + /// Initializes a new instance of AzureBatchLinkedService. + /// Type of linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for describing the linked service. + /// . + /// The Azure Batch account name. Type: string (or Expression with resultType string). + /// The Azure Batch account access key. + /// The Azure Batch URI. Type: string (or Expression with resultType string). + /// The Azure Batch pool name. Type: string (or Expression with resultType string). + /// The Azure Storage linked service reference. + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + internal AzureBatchLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object accountName, SecretBase accessKey, object batchUri, object poolName, LinkedServiceReference linkedServiceName, object encryptedCredential) : base(type, connectVia, description, parameters, annotations, additionalProperties) + { + AccountName = accountName; + AccessKey = accessKey; + BatchUri = batchUri; + PoolName = poolName; + LinkedServiceName = linkedServiceName; + EncryptedCredential = encryptedCredential; + Type = type ?? "AzureBatch"; + } + + /// The Azure Batch account name. Type: string (or Expression with resultType string). + public object AccountName { get; set; } + /// The Azure Batch account access key. + public SecretBase AccessKey { get; set; } + /// The Azure Batch URI. Type: string (or Expression with resultType string). + public object BatchUri { get; set; } + /// The Azure Batch pool name. Type: string (or Expression with resultType string). + public object PoolName { get; set; } + /// The Azure Storage linked service reference. + public LinkedServiceReference LinkedServiceName { get; set; } + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + public object EncryptedCredential { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureBlobFSLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureBlobFSLinkedService.Serialization.cs new file mode 100644 index 000000000000..673b26145629 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureBlobFSLinkedService.Serialization.cs @@ -0,0 +1,243 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class AzureBlobFSLinkedService : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (ConnectVia != null) + { + writer.WritePropertyName("connectVia"); + writer.WriteObjectValue(ConnectVia); + } + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + writer.WritePropertyName("url"); + writer.WriteObjectValue(Url); + if (AccountKey != null) + { + writer.WritePropertyName("accountKey"); + writer.WriteObjectValue(AccountKey); + } + if (ServicePrincipalId != null) + { + writer.WritePropertyName("servicePrincipalId"); + writer.WriteObjectValue(ServicePrincipalId); + } + if (ServicePrincipalKey != null) + { + writer.WritePropertyName("servicePrincipalKey"); + writer.WriteObjectValue(ServicePrincipalKey); + } + if (Tenant != null) + { + writer.WritePropertyName("tenant"); + writer.WriteObjectValue(Tenant); + } + if (EncryptedCredential != null) + { + writer.WritePropertyName("encryptedCredential"); + writer.WriteObjectValue(EncryptedCredential); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static AzureBlobFSLinkedService DeserializeAzureBlobFSLinkedService(JsonElement element) + { + string type = default; + IntegrationRuntimeReference connectVia = default; + string description = default; + IDictionary parameters = default; + IList annotations = default; + object url = default; + object accountKey = default; + object servicePrincipalId = default; + SecretBase servicePrincipalKey = default; + object tenant = default; + object encryptedCredential = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("connectVia")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("url")) + { + url = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("accountKey")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + accountKey = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("servicePrincipalId")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + servicePrincipalId = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("servicePrincipalKey")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + servicePrincipalKey = SecretBase.DeserializeSecretBase(property0.Value); + continue; + } + if (property0.NameEquals("tenant")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + tenant = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("encryptedCredential")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + encryptedCredential = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new AzureBlobFSLinkedService(type, connectVia, description, parameters, annotations, additionalProperties, url, accountKey, servicePrincipalId, servicePrincipalKey, tenant, encryptedCredential); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureBlobFSLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureBlobFSLinkedService.cs new file mode 100644 index 000000000000..50aa79cca605 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureBlobFSLinkedService.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Azure Data Lake Storage Gen2 linked service. + public partial class AzureBlobFSLinkedService : LinkedService + { + /// Initializes a new instance of AzureBlobFSLinkedService. + /// Endpoint for the Azure Data Lake Storage Gen2 service. Type: string (or Expression with resultType string). + public AzureBlobFSLinkedService(object url) + { + if (url == null) + { + throw new ArgumentNullException(nameof(url)); + } + + Url = url; + Type = "AzureBlobFS"; + } + + /// Initializes a new instance of AzureBlobFSLinkedService. + /// Type of linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for describing the linked service. + /// . + /// Endpoint for the Azure Data Lake Storage Gen2 service. Type: string (or Expression with resultType string). + /// Account key for the Azure Data Lake Storage Gen2 service. Type: string (or Expression with resultType string). + /// The ID of the application used to authenticate against the Azure Data Lake Storage Gen2 account. Type: string (or Expression with resultType string). + /// The Key of the application used to authenticate against the Azure Data Lake Storage Gen2 account. + /// The name or ID of the tenant to which the service principal belongs. Type: string (or Expression with resultType string). + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + internal AzureBlobFSLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object url, object accountKey, object servicePrincipalId, SecretBase servicePrincipalKey, object tenant, object encryptedCredential) : base(type, connectVia, description, parameters, annotations, additionalProperties) + { + Url = url; + AccountKey = accountKey; + ServicePrincipalId = servicePrincipalId; + ServicePrincipalKey = servicePrincipalKey; + Tenant = tenant; + EncryptedCredential = encryptedCredential; + Type = type ?? "AzureBlobFS"; + } + + /// Endpoint for the Azure Data Lake Storage Gen2 service. Type: string (or Expression with resultType string). + public object Url { get; set; } + /// Account key for the Azure Data Lake Storage Gen2 service. Type: string (or Expression with resultType string). + public object AccountKey { get; set; } + /// The ID of the application used to authenticate against the Azure Data Lake Storage Gen2 account. Type: string (or Expression with resultType string). + public object ServicePrincipalId { get; set; } + /// The Key of the application used to authenticate against the Azure Data Lake Storage Gen2 account. + public SecretBase ServicePrincipalKey { get; set; } + /// The name or ID of the tenant to which the service principal belongs. Type: string (or Expression with resultType string). + public object Tenant { get; set; } + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + public object EncryptedCredential { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureBlobStorageLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureBlobStorageLinkedService.Serialization.cs new file mode 100644 index 000000000000..14b84dfdc883 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureBlobStorageLinkedService.Serialization.cs @@ -0,0 +1,295 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class AzureBlobStorageLinkedService : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (ConnectVia != null) + { + writer.WritePropertyName("connectVia"); + writer.WriteObjectValue(ConnectVia); + } + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + if (ConnectionString != null) + { + writer.WritePropertyName("connectionString"); + writer.WriteObjectValue(ConnectionString); + } + if (AccountKey != null) + { + writer.WritePropertyName("accountKey"); + writer.WriteObjectValue(AccountKey); + } + if (SasUri != null) + { + writer.WritePropertyName("sasUri"); + writer.WriteObjectValue(SasUri); + } + if (SasToken != null) + { + writer.WritePropertyName("sasToken"); + writer.WriteObjectValue(SasToken); + } + if (ServiceEndpoint != null) + { + writer.WritePropertyName("serviceEndpoint"); + writer.WriteStringValue(ServiceEndpoint); + } + if (ServicePrincipalId != null) + { + writer.WritePropertyName("servicePrincipalId"); + writer.WriteObjectValue(ServicePrincipalId); + } + if (ServicePrincipalKey != null) + { + writer.WritePropertyName("servicePrincipalKey"); + writer.WriteObjectValue(ServicePrincipalKey); + } + if (Tenant != null) + { + writer.WritePropertyName("tenant"); + writer.WriteObjectValue(Tenant); + } + if (EncryptedCredential != null) + { + writer.WritePropertyName("encryptedCredential"); + writer.WriteStringValue(EncryptedCredential); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static AzureBlobStorageLinkedService DeserializeAzureBlobStorageLinkedService(JsonElement element) + { + string type = default; + IntegrationRuntimeReference connectVia = default; + string description = default; + IDictionary parameters = default; + IList annotations = default; + object connectionString = default; + AzureKeyVaultSecretReference accountKey = default; + object sasUri = default; + AzureKeyVaultSecretReference sasToken = default; + string serviceEndpoint = default; + object servicePrincipalId = default; + SecretBase servicePrincipalKey = default; + object tenant = default; + string encryptedCredential = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("connectVia")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("connectionString")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectionString = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("accountKey")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + accountKey = AzureKeyVaultSecretReference.DeserializeAzureKeyVaultSecretReference(property0.Value); + continue; + } + if (property0.NameEquals("sasUri")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sasUri = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("sasToken")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sasToken = AzureKeyVaultSecretReference.DeserializeAzureKeyVaultSecretReference(property0.Value); + continue; + } + if (property0.NameEquals("serviceEndpoint")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + serviceEndpoint = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("servicePrincipalId")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + servicePrincipalId = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("servicePrincipalKey")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + servicePrincipalKey = SecretBase.DeserializeSecretBase(property0.Value); + continue; + } + if (property0.NameEquals("tenant")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + tenant = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("encryptedCredential")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + encryptedCredential = property0.Value.GetString(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new AzureBlobStorageLinkedService(type, connectVia, description, parameters, annotations, additionalProperties, connectionString, accountKey, sasUri, sasToken, serviceEndpoint, servicePrincipalId, servicePrincipalKey, tenant, encryptedCredential); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureBlobStorageLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureBlobStorageLinkedService.cs new file mode 100644 index 000000000000..c703b05741fd --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureBlobStorageLinkedService.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// The azure blob storage linked service. + public partial class AzureBlobStorageLinkedService : LinkedService + { + /// Initializes a new instance of AzureBlobStorageLinkedService. + public AzureBlobStorageLinkedService() + { + Type = "AzureBlobStorage"; + } + + /// Initializes a new instance of AzureBlobStorageLinkedService. + /// Type of linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for describing the linked service. + /// . + /// The connection string. It is mutually exclusive with sasUri, serviceEndpoint property. Type: string, SecureString or AzureKeyVaultSecretReference. + /// The Azure key vault secret reference of accountKey in connection string. + /// SAS URI of the Azure Blob Storage resource. It is mutually exclusive with connectionString, serviceEndpoint property. Type: string, SecureString or AzureKeyVaultSecretReference. + /// The Azure key vault secret reference of sasToken in sas uri. + /// Blob service endpoint of the Azure Blob Storage resource. It is mutually exclusive with connectionString, sasUri property. + /// The ID of the service principal used to authenticate against Azure SQL Data Warehouse. Type: string (or Expression with resultType string). + /// The key of the service principal used to authenticate against Azure SQL Data Warehouse. + /// The name or ID of the tenant to which the service principal belongs. Type: string (or Expression with resultType string). + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + internal AzureBlobStorageLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object connectionString, AzureKeyVaultSecretReference accountKey, object sasUri, AzureKeyVaultSecretReference sasToken, string serviceEndpoint, object servicePrincipalId, SecretBase servicePrincipalKey, object tenant, string encryptedCredential) : base(type, connectVia, description, parameters, annotations, additionalProperties) + { + ConnectionString = connectionString; + AccountKey = accountKey; + SasUri = sasUri; + SasToken = sasToken; + ServiceEndpoint = serviceEndpoint; + ServicePrincipalId = servicePrincipalId; + ServicePrincipalKey = servicePrincipalKey; + Tenant = tenant; + EncryptedCredential = encryptedCredential; + Type = type ?? "AzureBlobStorage"; + } + + /// The connection string. It is mutually exclusive with sasUri, serviceEndpoint property. Type: string, SecureString or AzureKeyVaultSecretReference. + public object ConnectionString { get; set; } + /// The Azure key vault secret reference of accountKey in connection string. + public AzureKeyVaultSecretReference AccountKey { get; set; } + /// SAS URI of the Azure Blob Storage resource. It is mutually exclusive with connectionString, serviceEndpoint property. Type: string, SecureString or AzureKeyVaultSecretReference. + public object SasUri { get; set; } + /// The Azure key vault secret reference of sasToken in sas uri. + public AzureKeyVaultSecretReference SasToken { get; set; } + /// Blob service endpoint of the Azure Blob Storage resource. It is mutually exclusive with connectionString, sasUri property. + public string ServiceEndpoint { get; set; } + /// The ID of the service principal used to authenticate against Azure SQL Data Warehouse. Type: string (or Expression with resultType string). + public object ServicePrincipalId { get; set; } + /// The key of the service principal used to authenticate against Azure SQL Data Warehouse. + public SecretBase ServicePrincipalKey { get; set; } + /// The name or ID of the tenant to which the service principal belongs. Type: string (or Expression with resultType string). + public object Tenant { get; set; } + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + public string EncryptedCredential { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureDataExplorerCommandActivity.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureDataExplorerCommandActivity.Serialization.cs new file mode 100644 index 000000000000..30781291df7b --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureDataExplorerCommandActivity.Serialization.cs @@ -0,0 +1,205 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class AzureDataExplorerCommandActivity : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (LinkedServiceName != null) + { + writer.WritePropertyName("linkedServiceName"); + writer.WriteObjectValue(LinkedServiceName); + } + if (Policy != null) + { + writer.WritePropertyName("policy"); + writer.WriteObjectValue(Policy); + } + writer.WritePropertyName("name"); + writer.WriteStringValue(Name); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (DependsOn != null) + { + writer.WritePropertyName("dependsOn"); + writer.WriteStartArray(); + foreach (var item in DependsOn) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (UserProperties != null) + { + writer.WritePropertyName("userProperties"); + writer.WriteStartArray(); + foreach (var item in UserProperties) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + writer.WritePropertyName("command"); + writer.WriteObjectValue(Command); + if (CommandTimeout != null) + { + writer.WritePropertyName("commandTimeout"); + writer.WriteObjectValue(CommandTimeout); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static AzureDataExplorerCommandActivity DeserializeAzureDataExplorerCommandActivity(JsonElement element) + { + LinkedServiceReference linkedServiceName = default; + ActivityPolicy policy = default; + string name = default; + string type = default; + string description = default; + IList dependsOn = default; + IList userProperties = default; + object command = default; + object commandTimeout = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("linkedServiceName")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value); + continue; + } + if (property.NameEquals("policy")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + policy = ActivityPolicy.DeserializeActivityPolicy(property.Value); + continue; + } + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("dependsOn")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(ActivityDependency.DeserializeActivityDependency(item)); + } + } + dependsOn = array; + continue; + } + if (property.NameEquals("userProperties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(UserProperty.DeserializeUserProperty(item)); + } + } + userProperties = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("command")) + { + command = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("commandTimeout")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + commandTimeout = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new AzureDataExplorerCommandActivity(name, type, description, dependsOn, userProperties, additionalProperties, linkedServiceName, policy, command, commandTimeout); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureDataExplorerCommandActivity.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureDataExplorerCommandActivity.cs new file mode 100644 index 000000000000..ce71be606ca0 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureDataExplorerCommandActivity.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Azure Data Explorer command activity. + public partial class AzureDataExplorerCommandActivity : ExecutionActivity + { + /// Initializes a new instance of AzureDataExplorerCommandActivity. + /// Activity name. + /// A control command, according to the Azure Data Explorer command syntax. Type: string (or Expression with resultType string). + public AzureDataExplorerCommandActivity(string name, object command) : base(name) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (command == null) + { + throw new ArgumentNullException(nameof(command)); + } + + Command = command; + Type = "AzureDataExplorerCommand"; + } + + /// Initializes a new instance of AzureDataExplorerCommandActivity. + /// Activity name. + /// Type of activity. + /// Activity description. + /// Activity depends on condition. + /// Activity user properties. + /// . + /// Linked service reference. + /// Activity policy. + /// A control command, according to the Azure Data Explorer command syntax. Type: string (or Expression with resultType string). + /// Control command timeout. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9]))..). + internal AzureDataExplorerCommandActivity(string name, string type, string description, IList dependsOn, IList userProperties, IDictionary additionalProperties, LinkedServiceReference linkedServiceName, ActivityPolicy policy, object command, object commandTimeout) : base(name, type, description, dependsOn, userProperties, additionalProperties, linkedServiceName, policy) + { + Command = command; + CommandTimeout = commandTimeout; + Type = type ?? "AzureDataExplorerCommand"; + } + + /// A control command, according to the Azure Data Explorer command syntax. Type: string (or Expression with resultType string). + public object Command { get; set; } + /// Control command timeout. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9]))..). + public object CommandTimeout { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureDataExplorerLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureDataExplorerLinkedService.Serialization.cs new file mode 100644 index 000000000000..047b5d38bcdb --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureDataExplorerLinkedService.Serialization.cs @@ -0,0 +1,200 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class AzureDataExplorerLinkedService : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (ConnectVia != null) + { + writer.WritePropertyName("connectVia"); + writer.WriteObjectValue(ConnectVia); + } + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + writer.WritePropertyName("endpoint"); + writer.WriteObjectValue(Endpoint); + writer.WritePropertyName("servicePrincipalId"); + writer.WriteObjectValue(ServicePrincipalId); + writer.WritePropertyName("servicePrincipalKey"); + writer.WriteObjectValue(ServicePrincipalKey); + writer.WritePropertyName("database"); + writer.WriteObjectValue(Database); + writer.WritePropertyName("tenant"); + writer.WriteObjectValue(Tenant); + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static AzureDataExplorerLinkedService DeserializeAzureDataExplorerLinkedService(JsonElement element) + { + string type = default; + IntegrationRuntimeReference connectVia = default; + string description = default; + IDictionary parameters = default; + IList annotations = default; + object endpoint = default; + object servicePrincipalId = default; + SecretBase servicePrincipalKey = default; + object database = default; + object tenant = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("connectVia")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("endpoint")) + { + endpoint = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("servicePrincipalId")) + { + servicePrincipalId = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("servicePrincipalKey")) + { + servicePrincipalKey = SecretBase.DeserializeSecretBase(property0.Value); + continue; + } + if (property0.NameEquals("database")) + { + database = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("tenant")) + { + tenant = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new AzureDataExplorerLinkedService(type, connectVia, description, parameters, annotations, additionalProperties, endpoint, servicePrincipalId, servicePrincipalKey, database, tenant); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureDataExplorerLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureDataExplorerLinkedService.cs new file mode 100644 index 000000000000..85fc0afa15c5 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureDataExplorerLinkedService.cs @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Azure Data Explorer (Kusto) linked service. + public partial class AzureDataExplorerLinkedService : LinkedService + { + /// Initializes a new instance of AzureDataExplorerLinkedService. + /// The endpoint of Azure Data Explorer (the engine's endpoint). URL will be in the format https://<clusterName>.<regionName>.kusto.windows.net. Type: string (or Expression with resultType string). + /// The ID of the service principal used to authenticate against Azure Data Explorer. Type: string (or Expression with resultType string). + /// The key of the service principal used to authenticate against Kusto. + /// Database name for connection. Type: string (or Expression with resultType string). + /// The name or ID of the tenant to which the service principal belongs. Type: string (or Expression with resultType string). + public AzureDataExplorerLinkedService(object endpoint, object servicePrincipalId, SecretBase servicePrincipalKey, object database, object tenant) + { + if (endpoint == null) + { + throw new ArgumentNullException(nameof(endpoint)); + } + if (servicePrincipalId == null) + { + throw new ArgumentNullException(nameof(servicePrincipalId)); + } + if (servicePrincipalKey == null) + { + throw new ArgumentNullException(nameof(servicePrincipalKey)); + } + if (database == null) + { + throw new ArgumentNullException(nameof(database)); + } + if (tenant == null) + { + throw new ArgumentNullException(nameof(tenant)); + } + + Endpoint = endpoint; + ServicePrincipalId = servicePrincipalId; + ServicePrincipalKey = servicePrincipalKey; + Database = database; + Tenant = tenant; + Type = "AzureDataExplorer"; + } + + /// Initializes a new instance of AzureDataExplorerLinkedService. + /// Type of linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for describing the linked service. + /// . + /// The endpoint of Azure Data Explorer (the engine's endpoint). URL will be in the format https://<clusterName>.<regionName>.kusto.windows.net. Type: string (or Expression with resultType string). + /// The ID of the service principal used to authenticate against Azure Data Explorer. Type: string (or Expression with resultType string). + /// The key of the service principal used to authenticate against Kusto. + /// Database name for connection. Type: string (or Expression with resultType string). + /// The name or ID of the tenant to which the service principal belongs. Type: string (or Expression with resultType string). + internal AzureDataExplorerLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object endpoint, object servicePrincipalId, SecretBase servicePrincipalKey, object database, object tenant) : base(type, connectVia, description, parameters, annotations, additionalProperties) + { + Endpoint = endpoint; + ServicePrincipalId = servicePrincipalId; + ServicePrincipalKey = servicePrincipalKey; + Database = database; + Tenant = tenant; + Type = type ?? "AzureDataExplorer"; + } + + /// The endpoint of Azure Data Explorer (the engine's endpoint). URL will be in the format https://<clusterName>.<regionName>.kusto.windows.net. Type: string (or Expression with resultType string). + public object Endpoint { get; set; } + /// The ID of the service principal used to authenticate against Azure Data Explorer. Type: string (or Expression with resultType string). + public object ServicePrincipalId { get; set; } + /// The key of the service principal used to authenticate against Kusto. + public SecretBase ServicePrincipalKey { get; set; } + /// Database name for connection. Type: string (or Expression with resultType string). + public object Database { get; set; } + /// The name or ID of the tenant to which the service principal belongs. Type: string (or Expression with resultType string). + public object Tenant { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureDataExplorerTableDataset.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureDataExplorerTableDataset.Serialization.cs new file mode 100644 index 000000000000..79804fe7a93a --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureDataExplorerTableDataset.Serialization.cs @@ -0,0 +1,213 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class AzureDataExplorerTableDataset : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Structure != null) + { + writer.WritePropertyName("structure"); + writer.WriteObjectValue(Structure); + } + if (Schema != null) + { + writer.WritePropertyName("schema"); + writer.WriteObjectValue(Schema); + } + writer.WritePropertyName("linkedServiceName"); + writer.WriteObjectValue(LinkedServiceName); + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Folder != null) + { + writer.WritePropertyName("folder"); + writer.WriteObjectValue(Folder); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + if (Table != null) + { + writer.WritePropertyName("table"); + writer.WriteObjectValue(Table); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static AzureDataExplorerTableDataset DeserializeAzureDataExplorerTableDataset(JsonElement element) + { + string type = default; + string description = default; + object structure = default; + object schema = default; + LinkedServiceReference linkedServiceName = default; + IDictionary parameters = default; + IList annotations = default; + DatasetFolder folder = default; + object table = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("structure")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + structure = property.Value.GetObject(); + continue; + } + if (property.NameEquals("schema")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + schema = property.Value.GetObject(); + continue; + } + if (property.NameEquals("linkedServiceName")) + { + linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("folder")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + folder = DatasetFolder.DeserializeDatasetFolder(property.Value); + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("table")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + table = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new AzureDataExplorerTableDataset(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties, table); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureDataExplorerTableDataset.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureDataExplorerTableDataset.cs new file mode 100644 index 000000000000..45ea239a81e3 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureDataExplorerTableDataset.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// The Azure Data Explorer (Kusto) dataset. + public partial class AzureDataExplorerTableDataset : Dataset + { + /// Initializes a new instance of AzureDataExplorerTableDataset. + /// Linked service reference. + public AzureDataExplorerTableDataset(LinkedServiceReference linkedServiceName) : base(linkedServiceName) + { + if (linkedServiceName == null) + { + throw new ArgumentNullException(nameof(linkedServiceName)); + } + + Type = "AzureDataExplorerTable"; + } + + /// Initializes a new instance of AzureDataExplorerTableDataset. + /// Type of dataset. + /// Dataset description. + /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. + /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. + /// Linked service reference. + /// Parameters for dataset. + /// List of tags that can be used for describing the Dataset. + /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. + /// . + /// The table name of the Azure Data Explorer database. Type: string (or Expression with resultType string). + internal AzureDataExplorerTableDataset(string type, string description, object structure, object schema, LinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary additionalProperties, object table) : base(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) + { + Table = table; + Type = type ?? "AzureDataExplorerTable"; + } + + /// The table name of the Azure Data Explorer database. Type: string (or Expression with resultType string). + public object Table { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureDataLakeAnalyticsLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureDataLakeAnalyticsLinkedService.Serialization.cs new file mode 100644 index 000000000000..c82d4c45f724 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureDataLakeAnalyticsLinkedService.Serialization.cs @@ -0,0 +1,266 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class AzureDataLakeAnalyticsLinkedService : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (ConnectVia != null) + { + writer.WritePropertyName("connectVia"); + writer.WriteObjectValue(ConnectVia); + } + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + writer.WritePropertyName("accountName"); + writer.WriteObjectValue(AccountName); + if (ServicePrincipalId != null) + { + writer.WritePropertyName("servicePrincipalId"); + writer.WriteObjectValue(ServicePrincipalId); + } + if (ServicePrincipalKey != null) + { + writer.WritePropertyName("servicePrincipalKey"); + writer.WriteObjectValue(ServicePrincipalKey); + } + writer.WritePropertyName("tenant"); + writer.WriteObjectValue(Tenant); + if (SubscriptionId != null) + { + writer.WritePropertyName("subscriptionId"); + writer.WriteObjectValue(SubscriptionId); + } + if (ResourceGroupName != null) + { + writer.WritePropertyName("resourceGroupName"); + writer.WriteObjectValue(ResourceGroupName); + } + if (DataLakeAnalyticsUri != null) + { + writer.WritePropertyName("dataLakeAnalyticsUri"); + writer.WriteObjectValue(DataLakeAnalyticsUri); + } + if (EncryptedCredential != null) + { + writer.WritePropertyName("encryptedCredential"); + writer.WriteObjectValue(EncryptedCredential); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static AzureDataLakeAnalyticsLinkedService DeserializeAzureDataLakeAnalyticsLinkedService(JsonElement element) + { + string type = default; + IntegrationRuntimeReference connectVia = default; + string description = default; + IDictionary parameters = default; + IList annotations = default; + object accountName = default; + object servicePrincipalId = default; + SecretBase servicePrincipalKey = default; + object tenant = default; + object subscriptionId = default; + object resourceGroupName = default; + object dataLakeAnalyticsUri = default; + object encryptedCredential = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("connectVia")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("accountName")) + { + accountName = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("servicePrincipalId")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + servicePrincipalId = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("servicePrincipalKey")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + servicePrincipalKey = SecretBase.DeserializeSecretBase(property0.Value); + continue; + } + if (property0.NameEquals("tenant")) + { + tenant = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("subscriptionId")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + subscriptionId = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("resourceGroupName")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + resourceGroupName = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("dataLakeAnalyticsUri")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dataLakeAnalyticsUri = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("encryptedCredential")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + encryptedCredential = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new AzureDataLakeAnalyticsLinkedService(type, connectVia, description, parameters, annotations, additionalProperties, accountName, servicePrincipalId, servicePrincipalKey, tenant, subscriptionId, resourceGroupName, dataLakeAnalyticsUri, encryptedCredential); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureDataLakeAnalyticsLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureDataLakeAnalyticsLinkedService.cs new file mode 100644 index 000000000000..d59ebcb32931 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureDataLakeAnalyticsLinkedService.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Azure Data Lake Analytics linked service. + public partial class AzureDataLakeAnalyticsLinkedService : LinkedService + { + /// Initializes a new instance of AzureDataLakeAnalyticsLinkedService. + /// The Azure Data Lake Analytics account name. Type: string (or Expression with resultType string). + /// The name or ID of the tenant to which the service principal belongs. Type: string (or Expression with resultType string). + public AzureDataLakeAnalyticsLinkedService(object accountName, object tenant) + { + if (accountName == null) + { + throw new ArgumentNullException(nameof(accountName)); + } + if (tenant == null) + { + throw new ArgumentNullException(nameof(tenant)); + } + + AccountName = accountName; + Tenant = tenant; + Type = "AzureDataLakeAnalytics"; + } + + /// Initializes a new instance of AzureDataLakeAnalyticsLinkedService. + /// Type of linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for describing the linked service. + /// . + /// The Azure Data Lake Analytics account name. Type: string (or Expression with resultType string). + /// The ID of the application used to authenticate against the Azure Data Lake Analytics account. Type: string (or Expression with resultType string). + /// The Key of the application used to authenticate against the Azure Data Lake Analytics account. + /// The name or ID of the tenant to which the service principal belongs. Type: string (or Expression with resultType string). + /// Data Lake Analytics account subscription ID (if different from Data Factory account). Type: string (or Expression with resultType string). + /// Data Lake Analytics account resource group name (if different from Data Factory account). Type: string (or Expression with resultType string). + /// Azure Data Lake Analytics URI Type: string (or Expression with resultType string). + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + internal AzureDataLakeAnalyticsLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object accountName, object servicePrincipalId, SecretBase servicePrincipalKey, object tenant, object subscriptionId, object resourceGroupName, object dataLakeAnalyticsUri, object encryptedCredential) : base(type, connectVia, description, parameters, annotations, additionalProperties) + { + AccountName = accountName; + ServicePrincipalId = servicePrincipalId; + ServicePrincipalKey = servicePrincipalKey; + Tenant = tenant; + SubscriptionId = subscriptionId; + ResourceGroupName = resourceGroupName; + DataLakeAnalyticsUri = dataLakeAnalyticsUri; + EncryptedCredential = encryptedCredential; + Type = type ?? "AzureDataLakeAnalytics"; + } + + /// The Azure Data Lake Analytics account name. Type: string (or Expression with resultType string). + public object AccountName { get; set; } + /// The ID of the application used to authenticate against the Azure Data Lake Analytics account. Type: string (or Expression with resultType string). + public object ServicePrincipalId { get; set; } + /// The Key of the application used to authenticate against the Azure Data Lake Analytics account. + public SecretBase ServicePrincipalKey { get; set; } + /// The name or ID of the tenant to which the service principal belongs. Type: string (or Expression with resultType string). + public object Tenant { get; set; } + /// Data Lake Analytics account subscription ID (if different from Data Factory account). Type: string (or Expression with resultType string). + public object SubscriptionId { get; set; } + /// Data Lake Analytics account resource group name (if different from Data Factory account). Type: string (or Expression with resultType string). + public object ResourceGroupName { get; set; } + /// Azure Data Lake Analytics URI Type: string (or Expression with resultType string). + public object DataLakeAnalyticsUri { get; set; } + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + public object EncryptedCredential { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureDataLakeStoreLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureDataLakeStoreLinkedService.Serialization.cs new file mode 100644 index 000000000000..2877f0037e17 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureDataLakeStoreLinkedService.Serialization.cs @@ -0,0 +1,273 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class AzureDataLakeStoreLinkedService : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (ConnectVia != null) + { + writer.WritePropertyName("connectVia"); + writer.WriteObjectValue(ConnectVia); + } + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + writer.WritePropertyName("dataLakeStoreUri"); + writer.WriteObjectValue(DataLakeStoreUri); + if (ServicePrincipalId != null) + { + writer.WritePropertyName("servicePrincipalId"); + writer.WriteObjectValue(ServicePrincipalId); + } + if (ServicePrincipalKey != null) + { + writer.WritePropertyName("servicePrincipalKey"); + writer.WriteObjectValue(ServicePrincipalKey); + } + if (Tenant != null) + { + writer.WritePropertyName("tenant"); + writer.WriteObjectValue(Tenant); + } + if (AccountName != null) + { + writer.WritePropertyName("accountName"); + writer.WriteObjectValue(AccountName); + } + if (SubscriptionId != null) + { + writer.WritePropertyName("subscriptionId"); + writer.WriteObjectValue(SubscriptionId); + } + if (ResourceGroupName != null) + { + writer.WritePropertyName("resourceGroupName"); + writer.WriteObjectValue(ResourceGroupName); + } + if (EncryptedCredential != null) + { + writer.WritePropertyName("encryptedCredential"); + writer.WriteObjectValue(EncryptedCredential); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static AzureDataLakeStoreLinkedService DeserializeAzureDataLakeStoreLinkedService(JsonElement element) + { + string type = default; + IntegrationRuntimeReference connectVia = default; + string description = default; + IDictionary parameters = default; + IList annotations = default; + object dataLakeStoreUri = default; + object servicePrincipalId = default; + SecretBase servicePrincipalKey = default; + object tenant = default; + object accountName = default; + object subscriptionId = default; + object resourceGroupName = default; + object encryptedCredential = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("connectVia")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("dataLakeStoreUri")) + { + dataLakeStoreUri = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("servicePrincipalId")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + servicePrincipalId = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("servicePrincipalKey")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + servicePrincipalKey = SecretBase.DeserializeSecretBase(property0.Value); + continue; + } + if (property0.NameEquals("tenant")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + tenant = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("accountName")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + accountName = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("subscriptionId")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + subscriptionId = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("resourceGroupName")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + resourceGroupName = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("encryptedCredential")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + encryptedCredential = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new AzureDataLakeStoreLinkedService(type, connectVia, description, parameters, annotations, additionalProperties, dataLakeStoreUri, servicePrincipalId, servicePrincipalKey, tenant, accountName, subscriptionId, resourceGroupName, encryptedCredential); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureDataLakeStoreLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureDataLakeStoreLinkedService.cs new file mode 100644 index 000000000000..21d96fe2741e --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureDataLakeStoreLinkedService.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Azure Data Lake Store linked service. + public partial class AzureDataLakeStoreLinkedService : LinkedService + { + /// Initializes a new instance of AzureDataLakeStoreLinkedService. + /// Data Lake Store service URI. Type: string (or Expression with resultType string). + public AzureDataLakeStoreLinkedService(object dataLakeStoreUri) + { + if (dataLakeStoreUri == null) + { + throw new ArgumentNullException(nameof(dataLakeStoreUri)); + } + + DataLakeStoreUri = dataLakeStoreUri; + Type = "AzureDataLakeStore"; + } + + /// Initializes a new instance of AzureDataLakeStoreLinkedService. + /// Type of linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for describing the linked service. + /// . + /// Data Lake Store service URI. Type: string (or Expression with resultType string). + /// The ID of the application used to authenticate against the Azure Data Lake Store account. Type: string (or Expression with resultType string). + /// The Key of the application used to authenticate against the Azure Data Lake Store account. + /// The name or ID of the tenant to which the service principal belongs. Type: string (or Expression with resultType string). + /// Data Lake Store account name. Type: string (or Expression with resultType string). + /// Data Lake Store account subscription ID (if different from Data Factory account). Type: string (or Expression with resultType string). + /// Data Lake Store account resource group name (if different from Data Factory account). Type: string (or Expression with resultType string). + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + internal AzureDataLakeStoreLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object dataLakeStoreUri, object servicePrincipalId, SecretBase servicePrincipalKey, object tenant, object accountName, object subscriptionId, object resourceGroupName, object encryptedCredential) : base(type, connectVia, description, parameters, annotations, additionalProperties) + { + DataLakeStoreUri = dataLakeStoreUri; + ServicePrincipalId = servicePrincipalId; + ServicePrincipalKey = servicePrincipalKey; + Tenant = tenant; + AccountName = accountName; + SubscriptionId = subscriptionId; + ResourceGroupName = resourceGroupName; + EncryptedCredential = encryptedCredential; + Type = type ?? "AzureDataLakeStore"; + } + + /// Data Lake Store service URI. Type: string (or Expression with resultType string). + public object DataLakeStoreUri { get; set; } + /// The ID of the application used to authenticate against the Azure Data Lake Store account. Type: string (or Expression with resultType string). + public object ServicePrincipalId { get; set; } + /// The Key of the application used to authenticate against the Azure Data Lake Store account. + public SecretBase ServicePrincipalKey { get; set; } + /// The name or ID of the tenant to which the service principal belongs. Type: string (or Expression with resultType string). + public object Tenant { get; set; } + /// Data Lake Store account name. Type: string (or Expression with resultType string). + public object AccountName { get; set; } + /// Data Lake Store account subscription ID (if different from Data Factory account). Type: string (or Expression with resultType string). + public object SubscriptionId { get; set; } + /// Data Lake Store account resource group name (if different from Data Factory account). Type: string (or Expression with resultType string). + public object ResourceGroupName { get; set; } + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + public object EncryptedCredential { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureDatabricksLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureDatabricksLinkedService.Serialization.cs new file mode 100644 index 000000000000..656769db0aa4 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureDatabricksLinkedService.Serialization.cs @@ -0,0 +1,410 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class AzureDatabricksLinkedService : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (ConnectVia != null) + { + writer.WritePropertyName("connectVia"); + writer.WriteObjectValue(ConnectVia); + } + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + writer.WritePropertyName("domain"); + writer.WriteObjectValue(Domain); + writer.WritePropertyName("accessToken"); + writer.WriteObjectValue(AccessToken); + if (ExistingClusterId != null) + { + writer.WritePropertyName("existingClusterId"); + writer.WriteObjectValue(ExistingClusterId); + } + if (InstancePoolId != null) + { + writer.WritePropertyName("instancePoolId"); + writer.WriteObjectValue(InstancePoolId); + } + if (NewClusterVersion != null) + { + writer.WritePropertyName("newClusterVersion"); + writer.WriteObjectValue(NewClusterVersion); + } + if (NewClusterNumOfWorker != null) + { + writer.WritePropertyName("newClusterNumOfWorker"); + writer.WriteObjectValue(NewClusterNumOfWorker); + } + if (NewClusterNodeType != null) + { + writer.WritePropertyName("newClusterNodeType"); + writer.WriteObjectValue(NewClusterNodeType); + } + if (NewClusterSparkConf != null) + { + writer.WritePropertyName("newClusterSparkConf"); + writer.WriteStartObject(); + foreach (var item in NewClusterSparkConf) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (NewClusterSparkEnvVars != null) + { + writer.WritePropertyName("newClusterSparkEnvVars"); + writer.WriteStartObject(); + foreach (var item in NewClusterSparkEnvVars) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (NewClusterCustomTags != null) + { + writer.WritePropertyName("newClusterCustomTags"); + writer.WriteStartObject(); + foreach (var item in NewClusterCustomTags) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (NewClusterDriverNodeType != null) + { + writer.WritePropertyName("newClusterDriverNodeType"); + writer.WriteObjectValue(NewClusterDriverNodeType); + } + if (NewClusterInitScripts != null) + { + writer.WritePropertyName("newClusterInitScripts"); + writer.WriteObjectValue(NewClusterInitScripts); + } + if (NewClusterEnableElasticDisk != null) + { + writer.WritePropertyName("newClusterEnableElasticDisk"); + writer.WriteObjectValue(NewClusterEnableElasticDisk); + } + if (EncryptedCredential != null) + { + writer.WritePropertyName("encryptedCredential"); + writer.WriteObjectValue(EncryptedCredential); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static AzureDatabricksLinkedService DeserializeAzureDatabricksLinkedService(JsonElement element) + { + string type = default; + IntegrationRuntimeReference connectVia = default; + string description = default; + IDictionary parameters = default; + IList annotations = default; + object domain = default; + SecretBase accessToken = default; + object existingClusterId = default; + object instancePoolId = default; + object newClusterVersion = default; + object newClusterNumOfWorker = default; + object newClusterNodeType = default; + IDictionary newClusterSparkConf = default; + IDictionary newClusterSparkEnvVars = default; + IDictionary newClusterCustomTags = default; + object newClusterDriverNodeType = default; + object newClusterInitScripts = default; + object newClusterEnableElasticDisk = default; + object encryptedCredential = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("connectVia")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("domain")) + { + domain = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("accessToken")) + { + accessToken = SecretBase.DeserializeSecretBase(property0.Value); + continue; + } + if (property0.NameEquals("existingClusterId")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + existingClusterId = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("instancePoolId")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + instancePoolId = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("newClusterVersion")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + newClusterVersion = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("newClusterNumOfWorker")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + newClusterNumOfWorker = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("newClusterNodeType")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + newClusterNodeType = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("newClusterSparkConf")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property1 in property0.Value.EnumerateObject()) + { + if (property1.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property1.Name, null); + } + else + { + dictionary.Add(property1.Name, property1.Value.GetObject()); + } + } + newClusterSparkConf = dictionary; + continue; + } + if (property0.NameEquals("newClusterSparkEnvVars")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property1 in property0.Value.EnumerateObject()) + { + if (property1.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property1.Name, null); + } + else + { + dictionary.Add(property1.Name, property1.Value.GetObject()); + } + } + newClusterSparkEnvVars = dictionary; + continue; + } + if (property0.NameEquals("newClusterCustomTags")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property1 in property0.Value.EnumerateObject()) + { + if (property1.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property1.Name, null); + } + else + { + dictionary.Add(property1.Name, property1.Value.GetObject()); + } + } + newClusterCustomTags = dictionary; + continue; + } + if (property0.NameEquals("newClusterDriverNodeType")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + newClusterDriverNodeType = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("newClusterInitScripts")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + newClusterInitScripts = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("newClusterEnableElasticDisk")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + newClusterEnableElasticDisk = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("encryptedCredential")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + encryptedCredential = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new AzureDatabricksLinkedService(type, connectVia, description, parameters, annotations, additionalProperties, domain, accessToken, existingClusterId, instancePoolId, newClusterVersion, newClusterNumOfWorker, newClusterNodeType, newClusterSparkConf, newClusterSparkEnvVars, newClusterCustomTags, newClusterDriverNodeType, newClusterInitScripts, newClusterEnableElasticDisk, encryptedCredential); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureDatabricksLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureDatabricksLinkedService.cs new file mode 100644 index 000000000000..f00a3b81cfd9 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureDatabricksLinkedService.cs @@ -0,0 +1,104 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Azure Databricks linked service. + public partial class AzureDatabricksLinkedService : LinkedService + { + /// Initializes a new instance of AzureDatabricksLinkedService. + /// <REGION>.azuredatabricks.net, domain name of your Databricks deployment. Type: string (or Expression with resultType string). + /// Access token for databricks REST API. Refer to https://docs.azuredatabricks.net/api/latest/authentication.html. Type: string (or Expression with resultType string). + public AzureDatabricksLinkedService(object domain, SecretBase accessToken) + { + if (domain == null) + { + throw new ArgumentNullException(nameof(domain)); + } + if (accessToken == null) + { + throw new ArgumentNullException(nameof(accessToken)); + } + + Domain = domain; + AccessToken = accessToken; + Type = "AzureDatabricks"; + } + + /// Initializes a new instance of AzureDatabricksLinkedService. + /// Type of linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for describing the linked service. + /// . + /// <REGION>.azuredatabricks.net, domain name of your Databricks deployment. Type: string (or Expression with resultType string). + /// Access token for databricks REST API. Refer to https://docs.azuredatabricks.net/api/latest/authentication.html. Type: string (or Expression with resultType string). + /// The id of an existing interactive cluster that will be used for all runs of this activity. Type: string (or Expression with resultType string). + /// The id of an existing instance pool that will be used for all runs of this activity. Type: string (or Expression with resultType string). + /// If not using an existing interactive cluster, this specifies the Spark version of a new job cluster or instance pool nodes created for each run of this activity. Required if instancePoolId is specified. Type: string (or Expression with resultType string). + /// If not using an existing interactive cluster, this specifies the number of worker nodes to use for the new job cluster or instance pool. For new job clusters, this a string-formatted Int32, like '1' means numOfWorker is 1 or '1:10' means auto-scale from 1 (min) to 10 (max). For instance pools, this is a string-formatted Int32, and can only specify a fixed number of worker nodes, such as '2'. Required if newClusterVersion is specified. Type: string (or Expression with resultType string). + /// The node type of the new job cluster. This property is required if newClusterVersion is specified and instancePoolId is not specified. If instancePoolId is specified, this property is ignored. Type: string (or Expression with resultType string). + /// A set of optional, user-specified Spark configuration key-value pairs. + /// A set of optional, user-specified Spark environment variables key-value pairs. + /// Additional tags for cluster resources. This property is ignored in instance pool configurations. + /// The driver node type for the new job cluster. This property is ignored in instance pool configurations. Type: string (or Expression with resultType string). + /// User-defined initialization scripts for the new cluster. Type: array of strings (or Expression with resultType array of strings). + /// Enable the elastic disk on the new cluster. This property is now ignored, and takes the default elastic disk behavior in Databricks (elastic disks are always enabled). Type: boolean (or Expression with resultType boolean). + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + internal AzureDatabricksLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object domain, SecretBase accessToken, object existingClusterId, object instancePoolId, object newClusterVersion, object newClusterNumOfWorker, object newClusterNodeType, IDictionary newClusterSparkConf, IDictionary newClusterSparkEnvVars, IDictionary newClusterCustomTags, object newClusterDriverNodeType, object newClusterInitScripts, object newClusterEnableElasticDisk, object encryptedCredential) : base(type, connectVia, description, parameters, annotations, additionalProperties) + { + Domain = domain; + AccessToken = accessToken; + ExistingClusterId = existingClusterId; + InstancePoolId = instancePoolId; + NewClusterVersion = newClusterVersion; + NewClusterNumOfWorker = newClusterNumOfWorker; + NewClusterNodeType = newClusterNodeType; + NewClusterSparkConf = newClusterSparkConf; + NewClusterSparkEnvVars = newClusterSparkEnvVars; + NewClusterCustomTags = newClusterCustomTags; + NewClusterDriverNodeType = newClusterDriverNodeType; + NewClusterInitScripts = newClusterInitScripts; + NewClusterEnableElasticDisk = newClusterEnableElasticDisk; + EncryptedCredential = encryptedCredential; + Type = type ?? "AzureDatabricks"; + } + + /// <REGION>.azuredatabricks.net, domain name of your Databricks deployment. Type: string (or Expression with resultType string). + public object Domain { get; set; } + /// Access token for databricks REST API. Refer to https://docs.azuredatabricks.net/api/latest/authentication.html. Type: string (or Expression with resultType string). + public SecretBase AccessToken { get; set; } + /// The id of an existing interactive cluster that will be used for all runs of this activity. Type: string (or Expression with resultType string). + public object ExistingClusterId { get; set; } + /// The id of an existing instance pool that will be used for all runs of this activity. Type: string (or Expression with resultType string). + public object InstancePoolId { get; set; } + /// If not using an existing interactive cluster, this specifies the Spark version of a new job cluster or instance pool nodes created for each run of this activity. Required if instancePoolId is specified. Type: string (or Expression with resultType string). + public object NewClusterVersion { get; set; } + /// If not using an existing interactive cluster, this specifies the number of worker nodes to use for the new job cluster or instance pool. For new job clusters, this a string-formatted Int32, like '1' means numOfWorker is 1 or '1:10' means auto-scale from 1 (min) to 10 (max). For instance pools, this is a string-formatted Int32, and can only specify a fixed number of worker nodes, such as '2'. Required if newClusterVersion is specified. Type: string (or Expression with resultType string). + public object NewClusterNumOfWorker { get; set; } + /// The node type of the new job cluster. This property is required if newClusterVersion is specified and instancePoolId is not specified. If instancePoolId is specified, this property is ignored. Type: string (or Expression with resultType string). + public object NewClusterNodeType { get; set; } + /// A set of optional, user-specified Spark configuration key-value pairs. + public IDictionary NewClusterSparkConf { get; set; } + /// A set of optional, user-specified Spark environment variables key-value pairs. + public IDictionary NewClusterSparkEnvVars { get; set; } + /// Additional tags for cluster resources. This property is ignored in instance pool configurations. + public IDictionary NewClusterCustomTags { get; set; } + /// The driver node type for the new job cluster. This property is ignored in instance pool configurations. Type: string (or Expression with resultType string). + public object NewClusterDriverNodeType { get; set; } + /// User-defined initialization scripts for the new cluster. Type: array of strings (or Expression with resultType array of strings). + public object NewClusterInitScripts { get; set; } + /// Enable the elastic disk on the new cluster. This property is now ignored, and takes the default elastic disk behavior in Databricks (elastic disks are always enabled). Type: boolean (or Expression with resultType boolean). + public object NewClusterEnableElasticDisk { get; set; } + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + public object EncryptedCredential { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureFileStorageLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureFileStorageLinkedService.Serialization.cs new file mode 100644 index 000000000000..18fc04a68325 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureFileStorageLinkedService.Serialization.cs @@ -0,0 +1,213 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class AzureFileStorageLinkedService : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (ConnectVia != null) + { + writer.WritePropertyName("connectVia"); + writer.WriteObjectValue(ConnectVia); + } + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + writer.WritePropertyName("host"); + writer.WriteObjectValue(Host); + if (UserId != null) + { + writer.WritePropertyName("userId"); + writer.WriteObjectValue(UserId); + } + if (Password != null) + { + writer.WritePropertyName("password"); + writer.WriteObjectValue(Password); + } + if (EncryptedCredential != null) + { + writer.WritePropertyName("encryptedCredential"); + writer.WriteObjectValue(EncryptedCredential); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static AzureFileStorageLinkedService DeserializeAzureFileStorageLinkedService(JsonElement element) + { + string type = default; + IntegrationRuntimeReference connectVia = default; + string description = default; + IDictionary parameters = default; + IList annotations = default; + object host = default; + object userId = default; + SecretBase password = default; + object encryptedCredential = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("connectVia")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("host")) + { + host = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("userId")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + userId = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("password")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + password = SecretBase.DeserializeSecretBase(property0.Value); + continue; + } + if (property0.NameEquals("encryptedCredential")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + encryptedCredential = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new AzureFileStorageLinkedService(type, connectVia, description, parameters, annotations, additionalProperties, host, userId, password, encryptedCredential); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureFileStorageLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureFileStorageLinkedService.cs new file mode 100644 index 000000000000..b0eec5bb1540 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureFileStorageLinkedService.cs @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Azure File Storage linked service. + public partial class AzureFileStorageLinkedService : LinkedService + { + /// Initializes a new instance of AzureFileStorageLinkedService. + /// Host name of the server. Type: string (or Expression with resultType string). + public AzureFileStorageLinkedService(object host) + { + if (host == null) + { + throw new ArgumentNullException(nameof(host)); + } + + Host = host; + Type = "AzureFileStorage"; + } + + /// Initializes a new instance of AzureFileStorageLinkedService. + /// Type of linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for describing the linked service. + /// . + /// Host name of the server. Type: string (or Expression with resultType string). + /// User ID to logon the server. Type: string (or Expression with resultType string). + /// Password to logon the server. + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + internal AzureFileStorageLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object host, object userId, SecretBase password, object encryptedCredential) : base(type, connectVia, description, parameters, annotations, additionalProperties) + { + Host = host; + UserId = userId; + Password = password; + EncryptedCredential = encryptedCredential; + Type = type ?? "AzureFileStorage"; + } + + /// Host name of the server. Type: string (or Expression with resultType string). + public object Host { get; set; } + /// User ID to logon the server. Type: string (or Expression with resultType string). + public object UserId { get; set; } + /// Password to logon the server. + public SecretBase Password { get; set; } + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + public object EncryptedCredential { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureFunctionActivity.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureFunctionActivity.Serialization.cs new file mode 100644 index 000000000000..b2b150211516 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureFunctionActivity.Serialization.cs @@ -0,0 +1,228 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class AzureFunctionActivity : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (LinkedServiceName != null) + { + writer.WritePropertyName("linkedServiceName"); + writer.WriteObjectValue(LinkedServiceName); + } + if (Policy != null) + { + writer.WritePropertyName("policy"); + writer.WriteObjectValue(Policy); + } + writer.WritePropertyName("name"); + writer.WriteStringValue(Name); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (DependsOn != null) + { + writer.WritePropertyName("dependsOn"); + writer.WriteStartArray(); + foreach (var item in DependsOn) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (UserProperties != null) + { + writer.WritePropertyName("userProperties"); + writer.WriteStartArray(); + foreach (var item in UserProperties) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + writer.WritePropertyName("method"); + writer.WriteStringValue(Method.ToString()); + writer.WritePropertyName("functionName"); + writer.WriteObjectValue(FunctionName); + if (Headers != null) + { + writer.WritePropertyName("headers"); + writer.WriteObjectValue(Headers); + } + if (Body != null) + { + writer.WritePropertyName("body"); + writer.WriteObjectValue(Body); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static AzureFunctionActivity DeserializeAzureFunctionActivity(JsonElement element) + { + LinkedServiceReference linkedServiceName = default; + ActivityPolicy policy = default; + string name = default; + string type = default; + string description = default; + IList dependsOn = default; + IList userProperties = default; + AzureFunctionActivityMethod method = default; + object functionName = default; + object headers = default; + object body = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("linkedServiceName")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value); + continue; + } + if (property.NameEquals("policy")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + policy = ActivityPolicy.DeserializeActivityPolicy(property.Value); + continue; + } + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("dependsOn")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(ActivityDependency.DeserializeActivityDependency(item)); + } + } + dependsOn = array; + continue; + } + if (property.NameEquals("userProperties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(UserProperty.DeserializeUserProperty(item)); + } + } + userProperties = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("method")) + { + method = new AzureFunctionActivityMethod(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("functionName")) + { + functionName = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("headers")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + headers = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("body")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + body = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new AzureFunctionActivity(name, type, description, dependsOn, userProperties, additionalProperties, linkedServiceName, policy, method, functionName, headers, body); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureFunctionActivity.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureFunctionActivity.cs new file mode 100644 index 000000000000..6978b41153fc --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureFunctionActivity.cs @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Azure Function activity. + public partial class AzureFunctionActivity : ExecutionActivity + { + /// Initializes a new instance of AzureFunctionActivity. + /// Activity name. + /// Rest API method for target endpoint. + /// Name of the Function that the Azure Function Activity will call. Type: string (or Expression with resultType string). + public AzureFunctionActivity(string name, AzureFunctionActivityMethod method, object functionName) : base(name) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (functionName == null) + { + throw new ArgumentNullException(nameof(functionName)); + } + + Method = method; + FunctionName = functionName; + Type = "AzureFunctionActivity"; + } + + /// Initializes a new instance of AzureFunctionActivity. + /// Activity name. + /// Type of activity. + /// Activity description. + /// Activity depends on condition. + /// Activity user properties. + /// . + /// Linked service reference. + /// Activity policy. + /// Rest API method for target endpoint. + /// Name of the Function that the Azure Function Activity will call. Type: string (or Expression with resultType string). + /// Represents the headers that will be sent to the request. For example, to set the language and type on a request: "headers" : { "Accept-Language": "en-us", "Content-Type": "application/json" }. Type: string (or Expression with resultType string). + /// Represents the payload that will be sent to the endpoint. Required for POST/PUT method, not allowed for GET method Type: string (or Expression with resultType string). + internal AzureFunctionActivity(string name, string type, string description, IList dependsOn, IList userProperties, IDictionary additionalProperties, LinkedServiceReference linkedServiceName, ActivityPolicy policy, AzureFunctionActivityMethod method, object functionName, object headers, object body) : base(name, type, description, dependsOn, userProperties, additionalProperties, linkedServiceName, policy) + { + Method = method; + FunctionName = functionName; + Headers = headers; + Body = body; + Type = type ?? "AzureFunctionActivity"; + } + + /// Rest API method for target endpoint. + public AzureFunctionActivityMethod Method { get; set; } + /// Name of the Function that the Azure Function Activity will call. Type: string (or Expression with resultType string). + public object FunctionName { get; set; } + /// Represents the headers that will be sent to the request. For example, to set the language and type on a request: "headers" : { "Accept-Language": "en-us", "Content-Type": "application/json" }. Type: string (or Expression with resultType string). + public object Headers { get; set; } + /// Represents the payload that will be sent to the endpoint. Required for POST/PUT method, not allowed for GET method Type: string (or Expression with resultType string). + public object Body { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureFunctionActivityMethod.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureFunctionActivityMethod.cs new file mode 100644 index 000000000000..7f42b48fea9e --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureFunctionActivityMethod.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// The list of HTTP methods supported by a AzureFunctionActivity. + public readonly partial struct AzureFunctionActivityMethod : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + public AzureFunctionActivityMethod(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string GETValue = "GET"; + private const string PostValue = "POST"; + private const string PUTValue = "PUT"; + private const string DeleteValue = "DELETE"; + private const string OptionsValue = "OPTIONS"; + private const string HeadValue = "HEAD"; + private const string TraceValue = "TRACE"; + + /// GET. + public static AzureFunctionActivityMethod GET { get; } = new AzureFunctionActivityMethod(GETValue); + /// POST. + public static AzureFunctionActivityMethod Post { get; } = new AzureFunctionActivityMethod(PostValue); + /// PUT. + public static AzureFunctionActivityMethod PUT { get; } = new AzureFunctionActivityMethod(PUTValue); + /// DELETE. + public static AzureFunctionActivityMethod Delete { get; } = new AzureFunctionActivityMethod(DeleteValue); + /// OPTIONS. + public static AzureFunctionActivityMethod Options { get; } = new AzureFunctionActivityMethod(OptionsValue); + /// HEAD. + public static AzureFunctionActivityMethod Head { get; } = new AzureFunctionActivityMethod(HeadValue); + /// TRACE. + public static AzureFunctionActivityMethod Trace { get; } = new AzureFunctionActivityMethod(TraceValue); + /// Determines if two values are the same. + public static bool operator ==(AzureFunctionActivityMethod left, AzureFunctionActivityMethod right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AzureFunctionActivityMethod left, AzureFunctionActivityMethod right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator AzureFunctionActivityMethod(string value) => new AzureFunctionActivityMethod(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AzureFunctionActivityMethod other && Equals(other); + /// + public bool Equals(AzureFunctionActivityMethod other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureFunctionLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureFunctionLinkedService.Serialization.cs new file mode 100644 index 000000000000..7cd461b034f8 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureFunctionLinkedService.Serialization.cs @@ -0,0 +1,198 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class AzureFunctionLinkedService : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (ConnectVia != null) + { + writer.WritePropertyName("connectVia"); + writer.WriteObjectValue(ConnectVia); + } + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + writer.WritePropertyName("functionAppUrl"); + writer.WriteObjectValue(FunctionAppUrl); + if (FunctionKey != null) + { + writer.WritePropertyName("functionKey"); + writer.WriteObjectValue(FunctionKey); + } + if (EncryptedCredential != null) + { + writer.WritePropertyName("encryptedCredential"); + writer.WriteObjectValue(EncryptedCredential); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static AzureFunctionLinkedService DeserializeAzureFunctionLinkedService(JsonElement element) + { + string type = default; + IntegrationRuntimeReference connectVia = default; + string description = default; + IDictionary parameters = default; + IList annotations = default; + object functionAppUrl = default; + SecretBase functionKey = default; + object encryptedCredential = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("connectVia")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("functionAppUrl")) + { + functionAppUrl = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("functionKey")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + functionKey = SecretBase.DeserializeSecretBase(property0.Value); + continue; + } + if (property0.NameEquals("encryptedCredential")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + encryptedCredential = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new AzureFunctionLinkedService(type, connectVia, description, parameters, annotations, additionalProperties, functionAppUrl, functionKey, encryptedCredential); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureFunctionLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureFunctionLinkedService.cs new file mode 100644 index 000000000000..2254bd68dea0 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureFunctionLinkedService.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Azure Function linked service. + public partial class AzureFunctionLinkedService : LinkedService + { + /// Initializes a new instance of AzureFunctionLinkedService. + /// The endpoint of the Azure Function App. URL will be in the format https://<accountName>.azurewebsites.net. + public AzureFunctionLinkedService(object functionAppUrl) + { + if (functionAppUrl == null) + { + throw new ArgumentNullException(nameof(functionAppUrl)); + } + + FunctionAppUrl = functionAppUrl; + Type = "AzureFunction"; + } + + /// Initializes a new instance of AzureFunctionLinkedService. + /// Type of linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for describing the linked service. + /// . + /// The endpoint of the Azure Function App. URL will be in the format https://<accountName>.azurewebsites.net. + /// Function or Host key for Azure Function App. + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + internal AzureFunctionLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object functionAppUrl, SecretBase functionKey, object encryptedCredential) : base(type, connectVia, description, parameters, annotations, additionalProperties) + { + FunctionAppUrl = functionAppUrl; + FunctionKey = functionKey; + EncryptedCredential = encryptedCredential; + Type = type ?? "AzureFunction"; + } + + /// The endpoint of the Azure Function App. URL will be in the format https://<accountName>.azurewebsites.net. + public object FunctionAppUrl { get; set; } + /// Function or Host key for Azure Function App. + public SecretBase FunctionKey { get; set; } + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + public object EncryptedCredential { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureKeyVaultLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureKeyVaultLinkedService.Serialization.cs new file mode 100644 index 000000000000..f9e7d04e6fe2 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureKeyVaultLinkedService.Serialization.cs @@ -0,0 +1,168 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class AzureKeyVaultLinkedService : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (ConnectVia != null) + { + writer.WritePropertyName("connectVia"); + writer.WriteObjectValue(ConnectVia); + } + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + writer.WritePropertyName("baseUrl"); + writer.WriteObjectValue(BaseUrl); + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static AzureKeyVaultLinkedService DeserializeAzureKeyVaultLinkedService(JsonElement element) + { + string type = default; + IntegrationRuntimeReference connectVia = default; + string description = default; + IDictionary parameters = default; + IList annotations = default; + object baseUrl = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("connectVia")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("baseUrl")) + { + baseUrl = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new AzureKeyVaultLinkedService(type, connectVia, description, parameters, annotations, additionalProperties, baseUrl); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureKeyVaultLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureKeyVaultLinkedService.cs new file mode 100644 index 000000000000..741e87d19fb9 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureKeyVaultLinkedService.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Azure Key Vault linked service. + public partial class AzureKeyVaultLinkedService : LinkedService + { + /// Initializes a new instance of AzureKeyVaultLinkedService. + /// The base URL of the Azure Key Vault. e.g. https://myakv.vault.azure.net Type: string (or Expression with resultType string). + public AzureKeyVaultLinkedService(object baseUrl) + { + if (baseUrl == null) + { + throw new ArgumentNullException(nameof(baseUrl)); + } + + BaseUrl = baseUrl; + Type = "AzureKeyVault"; + } + + /// Initializes a new instance of AzureKeyVaultLinkedService. + /// Type of linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for describing the linked service. + /// . + /// The base URL of the Azure Key Vault. e.g. https://myakv.vault.azure.net Type: string (or Expression with resultType string). + internal AzureKeyVaultLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object baseUrl) : base(type, connectVia, description, parameters, annotations, additionalProperties) + { + BaseUrl = baseUrl; + Type = type ?? "AzureKeyVault"; + } + + /// The base URL of the Azure Key Vault. e.g. https://myakv.vault.azure.net Type: string (or Expression with resultType string). + public object BaseUrl { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureKeyVaultSecretReference.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureKeyVaultSecretReference.Serialization.cs new file mode 100644 index 000000000000..ec29e199a13f --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureKeyVaultSecretReference.Serialization.cs @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class AzureKeyVaultSecretReference : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("store"); + writer.WriteObjectValue(Store); + writer.WritePropertyName("secretName"); + writer.WriteObjectValue(SecretName); + if (SecretVersion != null) + { + writer.WritePropertyName("secretVersion"); + writer.WriteObjectValue(SecretVersion); + } + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + writer.WriteEndObject(); + } + + internal static AzureKeyVaultSecretReference DeserializeAzureKeyVaultSecretReference(JsonElement element) + { + LinkedServiceReference store = default; + object secretName = default; + object secretVersion = default; + string type = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("store")) + { + store = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value); + continue; + } + if (property.NameEquals("secretName")) + { + secretName = property.Value.GetObject(); + continue; + } + if (property.NameEquals("secretVersion")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + secretVersion = property.Value.GetObject(); + continue; + } + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + } + return new AzureKeyVaultSecretReference(type, store, secretName, secretVersion); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureKeyVaultSecretReference.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureKeyVaultSecretReference.cs new file mode 100644 index 000000000000..0d83197d958c --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureKeyVaultSecretReference.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Azure Key Vault secret reference. + public partial class AzureKeyVaultSecretReference : SecretBase + { + /// Initializes a new instance of AzureKeyVaultSecretReference. + /// The Azure Key Vault linked service reference. + /// The name of the secret in Azure Key Vault. Type: string (or Expression with resultType string). + public AzureKeyVaultSecretReference(LinkedServiceReference store, object secretName) + { + if (store == null) + { + throw new ArgumentNullException(nameof(store)); + } + if (secretName == null) + { + throw new ArgumentNullException(nameof(secretName)); + } + + Store = store; + SecretName = secretName; + Type = "AzureKeyVaultSecret"; + } + + /// Initializes a new instance of AzureKeyVaultSecretReference. + /// Type of the secret. + /// The Azure Key Vault linked service reference. + /// The name of the secret in Azure Key Vault. Type: string (or Expression with resultType string). + /// The version of the secret in Azure Key Vault. The default value is the latest version of the secret. Type: string (or Expression with resultType string). + internal AzureKeyVaultSecretReference(string type, LinkedServiceReference store, object secretName, object secretVersion) : base(type) + { + Store = store; + SecretName = secretName; + SecretVersion = secretVersion; + Type = type ?? "AzureKeyVaultSecret"; + } + + /// The Azure Key Vault linked service reference. + public LinkedServiceReference Store { get; set; } + /// The name of the secret in Azure Key Vault. Type: string (or Expression with resultType string). + public object SecretName { get; set; } + /// The version of the secret in Azure Key Vault. The default value is the latest version of the secret. Type: string (or Expression with resultType string). + public object SecretVersion { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureMLBatchExecutionActivity.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureMLBatchExecutionActivity.Serialization.cs new file mode 100644 index 000000000000..f0cc574d4336 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureMLBatchExecutionActivity.Serialization.cs @@ -0,0 +1,281 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class AzureMLBatchExecutionActivity : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (LinkedServiceName != null) + { + writer.WritePropertyName("linkedServiceName"); + writer.WriteObjectValue(LinkedServiceName); + } + if (Policy != null) + { + writer.WritePropertyName("policy"); + writer.WriteObjectValue(Policy); + } + writer.WritePropertyName("name"); + writer.WriteStringValue(Name); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (DependsOn != null) + { + writer.WritePropertyName("dependsOn"); + writer.WriteStartArray(); + foreach (var item in DependsOn) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (UserProperties != null) + { + writer.WritePropertyName("userProperties"); + writer.WriteStartArray(); + foreach (var item in UserProperties) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + if (GlobalParameters != null) + { + writer.WritePropertyName("globalParameters"); + writer.WriteStartObject(); + foreach (var item in GlobalParameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (WebServiceOutputs != null) + { + writer.WritePropertyName("webServiceOutputs"); + writer.WriteStartObject(); + foreach (var item in WebServiceOutputs) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (WebServiceInputs != null) + { + writer.WritePropertyName("webServiceInputs"); + writer.WriteStartObject(); + foreach (var item in WebServiceInputs) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static AzureMLBatchExecutionActivity DeserializeAzureMLBatchExecutionActivity(JsonElement element) + { + LinkedServiceReference linkedServiceName = default; + ActivityPolicy policy = default; + string name = default; + string type = default; + string description = default; + IList dependsOn = default; + IList userProperties = default; + IDictionary globalParameters = default; + IDictionary webServiceOutputs = default; + IDictionary webServiceInputs = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("linkedServiceName")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value); + continue; + } + if (property.NameEquals("policy")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + policy = ActivityPolicy.DeserializeActivityPolicy(property.Value); + continue; + } + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("dependsOn")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(ActivityDependency.DeserializeActivityDependency(item)); + } + } + dependsOn = array; + continue; + } + if (property.NameEquals("userProperties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(UserProperty.DeserializeUserProperty(item)); + } + } + userProperties = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("globalParameters")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property1 in property0.Value.EnumerateObject()) + { + if (property1.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property1.Name, null); + } + else + { + dictionary.Add(property1.Name, property1.Value.GetObject()); + } + } + globalParameters = dictionary; + continue; + } + if (property0.NameEquals("webServiceOutputs")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property1 in property0.Value.EnumerateObject()) + { + if (property1.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property1.Name, null); + } + else + { + dictionary.Add(property1.Name, AzureMLWebServiceFile.DeserializeAzureMLWebServiceFile(property1.Value)); + } + } + webServiceOutputs = dictionary; + continue; + } + if (property0.NameEquals("webServiceInputs")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property1 in property0.Value.EnumerateObject()) + { + if (property1.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property1.Name, null); + } + else + { + dictionary.Add(property1.Name, AzureMLWebServiceFile.DeserializeAzureMLWebServiceFile(property1.Value)); + } + } + webServiceInputs = dictionary; + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new AzureMLBatchExecutionActivity(name, type, description, dependsOn, userProperties, additionalProperties, linkedServiceName, policy, globalParameters, webServiceOutputs, webServiceInputs); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureMLBatchExecutionActivity.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureMLBatchExecutionActivity.cs new file mode 100644 index 000000000000..0919298b07a6 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureMLBatchExecutionActivity.cs @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Azure ML Batch Execution activity. + public partial class AzureMLBatchExecutionActivity : ExecutionActivity + { + /// Initializes a new instance of AzureMLBatchExecutionActivity. + /// Activity name. + public AzureMLBatchExecutionActivity(string name) : base(name) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + + Type = "AzureMLBatchExecution"; + } + + /// Initializes a new instance of AzureMLBatchExecutionActivity. + /// Activity name. + /// Type of activity. + /// Activity description. + /// Activity depends on condition. + /// Activity user properties. + /// . + /// Linked service reference. + /// Activity policy. + /// Key,Value pairs to be passed to the Azure ML Batch Execution Service endpoint. Keys must match the names of web service parameters defined in the published Azure ML web service. Values will be passed in the GlobalParameters property of the Azure ML batch execution request. + /// Key,Value pairs, mapping the names of Azure ML endpoint's Web Service Outputs to AzureMLWebServiceFile objects specifying the output Blob locations. This information will be passed in the WebServiceOutputs property of the Azure ML batch execution request. + /// Key,Value pairs, mapping the names of Azure ML endpoint's Web Service Inputs to AzureMLWebServiceFile objects specifying the input Blob locations.. This information will be passed in the WebServiceInputs property of the Azure ML batch execution request. + internal AzureMLBatchExecutionActivity(string name, string type, string description, IList dependsOn, IList userProperties, IDictionary additionalProperties, LinkedServiceReference linkedServiceName, ActivityPolicy policy, IDictionary globalParameters, IDictionary webServiceOutputs, IDictionary webServiceInputs) : base(name, type, description, dependsOn, userProperties, additionalProperties, linkedServiceName, policy) + { + GlobalParameters = globalParameters; + WebServiceOutputs = webServiceOutputs; + WebServiceInputs = webServiceInputs; + Type = type ?? "AzureMLBatchExecution"; + } + + /// Key,Value pairs to be passed to the Azure ML Batch Execution Service endpoint. Keys must match the names of web service parameters defined in the published Azure ML web service. Values will be passed in the GlobalParameters property of the Azure ML batch execution request. + public IDictionary GlobalParameters { get; set; } + /// Key,Value pairs, mapping the names of Azure ML endpoint's Web Service Outputs to AzureMLWebServiceFile objects specifying the output Blob locations. This information will be passed in the WebServiceOutputs property of the Azure ML batch execution request. + public IDictionary WebServiceOutputs { get; set; } + /// Key,Value pairs, mapping the names of Azure ML endpoint's Web Service Inputs to AzureMLWebServiceFile objects specifying the input Blob locations.. This information will be passed in the WebServiceInputs property of the Azure ML batch execution request. + public IDictionary WebServiceInputs { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureMLExecutePipelineActivity.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureMLExecutePipelineActivity.Serialization.cs new file mode 100644 index 000000000000..00a0dd877843 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureMLExecutePipelineActivity.Serialization.cs @@ -0,0 +1,250 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class AzureMLExecutePipelineActivity : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (LinkedServiceName != null) + { + writer.WritePropertyName("linkedServiceName"); + writer.WriteObjectValue(LinkedServiceName); + } + if (Policy != null) + { + writer.WritePropertyName("policy"); + writer.WriteObjectValue(Policy); + } + writer.WritePropertyName("name"); + writer.WriteStringValue(Name); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (DependsOn != null) + { + writer.WritePropertyName("dependsOn"); + writer.WriteStartArray(); + foreach (var item in DependsOn) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (UserProperties != null) + { + writer.WritePropertyName("userProperties"); + writer.WriteStartArray(); + foreach (var item in UserProperties) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + writer.WritePropertyName("mlPipelineId"); + writer.WriteObjectValue(MlPipelineId); + if (ExperimentName != null) + { + writer.WritePropertyName("experimentName"); + writer.WriteObjectValue(ExperimentName); + } + if (MlPipelineParameters != null) + { + writer.WritePropertyName("mlPipelineParameters"); + writer.WriteObjectValue(MlPipelineParameters); + } + if (MlParentRunId != null) + { + writer.WritePropertyName("mlParentRunId"); + writer.WriteObjectValue(MlParentRunId); + } + if (ContinueOnStepFailure != null) + { + writer.WritePropertyName("continueOnStepFailure"); + writer.WriteObjectValue(ContinueOnStepFailure); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static AzureMLExecutePipelineActivity DeserializeAzureMLExecutePipelineActivity(JsonElement element) + { + LinkedServiceReference linkedServiceName = default; + ActivityPolicy policy = default; + string name = default; + string type = default; + string description = default; + IList dependsOn = default; + IList userProperties = default; + object mlPipelineId = default; + object experimentName = default; + object mlPipelineParameters = default; + object mlParentRunId = default; + object continueOnStepFailure = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("linkedServiceName")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value); + continue; + } + if (property.NameEquals("policy")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + policy = ActivityPolicy.DeserializeActivityPolicy(property.Value); + continue; + } + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("dependsOn")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(ActivityDependency.DeserializeActivityDependency(item)); + } + } + dependsOn = array; + continue; + } + if (property.NameEquals("userProperties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(UserProperty.DeserializeUserProperty(item)); + } + } + userProperties = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("mlPipelineId")) + { + mlPipelineId = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("experimentName")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + experimentName = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("mlPipelineParameters")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + mlPipelineParameters = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("mlParentRunId")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + mlParentRunId = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("continueOnStepFailure")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + continueOnStepFailure = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new AzureMLExecutePipelineActivity(name, type, description, dependsOn, userProperties, additionalProperties, linkedServiceName, policy, mlPipelineId, experimentName, mlPipelineParameters, mlParentRunId, continueOnStepFailure); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureMLExecutePipelineActivity.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureMLExecutePipelineActivity.cs new file mode 100644 index 000000000000..d96e17982bcb --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureMLExecutePipelineActivity.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Azure ML Execute Pipeline activity. + public partial class AzureMLExecutePipelineActivity : ExecutionActivity + { + /// Initializes a new instance of AzureMLExecutePipelineActivity. + /// Activity name. + /// ID of the published Azure ML pipeline. Type: string (or Expression with resultType string). + public AzureMLExecutePipelineActivity(string name, object mlPipelineId) : base(name) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (mlPipelineId == null) + { + throw new ArgumentNullException(nameof(mlPipelineId)); + } + + MlPipelineId = mlPipelineId; + Type = "AzureMLExecutePipeline"; + } + + /// Initializes a new instance of AzureMLExecutePipelineActivity. + /// Activity name. + /// Type of activity. + /// Activity description. + /// Activity depends on condition. + /// Activity user properties. + /// . + /// Linked service reference. + /// Activity policy. + /// ID of the published Azure ML pipeline. Type: string (or Expression with resultType string). + /// Run history experiment name of the pipeline run. This information will be passed in the ExperimentName property of the published pipeline execution request. Type: string (or Expression with resultType string). + /// Key,Value pairs to be passed to the published Azure ML pipeline endpoint. Keys must match the names of pipeline parameters defined in the published pipeline. Values will be passed in the ParameterAssignments property of the published pipeline execution request. Type: object with key value pairs (or Expression with resultType object). + /// The parent Azure ML Service pipeline run id. This information will be passed in the ParentRunId property of the published pipeline execution request. Type: string (or Expression with resultType string). + /// Whether to continue execution of other steps in the PipelineRun if a step fails. This information will be passed in the continueOnStepFailure property of the published pipeline execution request. Type: boolean (or Expression with resultType boolean). + internal AzureMLExecutePipelineActivity(string name, string type, string description, IList dependsOn, IList userProperties, IDictionary additionalProperties, LinkedServiceReference linkedServiceName, ActivityPolicy policy, object mlPipelineId, object experimentName, object mlPipelineParameters, object mlParentRunId, object continueOnStepFailure) : base(name, type, description, dependsOn, userProperties, additionalProperties, linkedServiceName, policy) + { + MlPipelineId = mlPipelineId; + ExperimentName = experimentName; + MlPipelineParameters = mlPipelineParameters; + MlParentRunId = mlParentRunId; + ContinueOnStepFailure = continueOnStepFailure; + Type = type ?? "AzureMLExecutePipeline"; + } + + /// ID of the published Azure ML pipeline. Type: string (or Expression with resultType string). + public object MlPipelineId { get; set; } + /// Run history experiment name of the pipeline run. This information will be passed in the ExperimentName property of the published pipeline execution request. Type: string (or Expression with resultType string). + public object ExperimentName { get; set; } + /// Key,Value pairs to be passed to the published Azure ML pipeline endpoint. Keys must match the names of pipeline parameters defined in the published pipeline. Values will be passed in the ParameterAssignments property of the published pipeline execution request. Type: object with key value pairs (or Expression with resultType object). + public object MlPipelineParameters { get; set; } + /// The parent Azure ML Service pipeline run id. This information will be passed in the ParentRunId property of the published pipeline execution request. Type: string (or Expression with resultType string). + public object MlParentRunId { get; set; } + /// Whether to continue execution of other steps in the PipelineRun if a step fails. This information will be passed in the continueOnStepFailure property of the published pipeline execution request. Type: boolean (or Expression with resultType boolean). + public object ContinueOnStepFailure { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureMLLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureMLLinkedService.Serialization.cs new file mode 100644 index 000000000000..01a89d630c6b --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureMLLinkedService.Serialization.cs @@ -0,0 +1,251 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class AzureMLLinkedService : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (ConnectVia != null) + { + writer.WritePropertyName("connectVia"); + writer.WriteObjectValue(ConnectVia); + } + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + writer.WritePropertyName("mlEndpoint"); + writer.WriteObjectValue(MlEndpoint); + writer.WritePropertyName("apiKey"); + writer.WriteObjectValue(ApiKey); + if (UpdateResourceEndpoint != null) + { + writer.WritePropertyName("updateResourceEndpoint"); + writer.WriteObjectValue(UpdateResourceEndpoint); + } + if (ServicePrincipalId != null) + { + writer.WritePropertyName("servicePrincipalId"); + writer.WriteObjectValue(ServicePrincipalId); + } + if (ServicePrincipalKey != null) + { + writer.WritePropertyName("servicePrincipalKey"); + writer.WriteObjectValue(ServicePrincipalKey); + } + if (Tenant != null) + { + writer.WritePropertyName("tenant"); + writer.WriteObjectValue(Tenant); + } + if (EncryptedCredential != null) + { + writer.WritePropertyName("encryptedCredential"); + writer.WriteObjectValue(EncryptedCredential); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static AzureMLLinkedService DeserializeAzureMLLinkedService(JsonElement element) + { + string type = default; + IntegrationRuntimeReference connectVia = default; + string description = default; + IDictionary parameters = default; + IList annotations = default; + object mlEndpoint = default; + SecretBase apiKey = default; + object updateResourceEndpoint = default; + object servicePrincipalId = default; + SecretBase servicePrincipalKey = default; + object tenant = default; + object encryptedCredential = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("connectVia")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("mlEndpoint")) + { + mlEndpoint = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("apiKey")) + { + apiKey = SecretBase.DeserializeSecretBase(property0.Value); + continue; + } + if (property0.NameEquals("updateResourceEndpoint")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + updateResourceEndpoint = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("servicePrincipalId")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + servicePrincipalId = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("servicePrincipalKey")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + servicePrincipalKey = SecretBase.DeserializeSecretBase(property0.Value); + continue; + } + if (property0.NameEquals("tenant")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + tenant = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("encryptedCredential")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + encryptedCredential = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new AzureMLLinkedService(type, connectVia, description, parameters, annotations, additionalProperties, mlEndpoint, apiKey, updateResourceEndpoint, servicePrincipalId, servicePrincipalKey, tenant, encryptedCredential); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureMLLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureMLLinkedService.cs new file mode 100644 index 000000000000..68c8382f35a3 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureMLLinkedService.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Azure ML Studio Web Service linked service. + public partial class AzureMLLinkedService : LinkedService + { + /// Initializes a new instance of AzureMLLinkedService. + /// The Batch Execution REST URL for an Azure ML Studio Web Service endpoint. Type: string (or Expression with resultType string). + /// The API key for accessing the Azure ML model endpoint. + public AzureMLLinkedService(object mlEndpoint, SecretBase apiKey) + { + if (mlEndpoint == null) + { + throw new ArgumentNullException(nameof(mlEndpoint)); + } + if (apiKey == null) + { + throw new ArgumentNullException(nameof(apiKey)); + } + + MlEndpoint = mlEndpoint; + ApiKey = apiKey; + Type = "AzureML"; + } + + /// Initializes a new instance of AzureMLLinkedService. + /// Type of linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for describing the linked service. + /// . + /// The Batch Execution REST URL for an Azure ML Studio Web Service endpoint. Type: string (or Expression with resultType string). + /// The API key for accessing the Azure ML model endpoint. + /// The Update Resource REST URL for an Azure ML Studio Web Service endpoint. Type: string (or Expression with resultType string). + /// The ID of the service principal used to authenticate against the ARM-based updateResourceEndpoint of an Azure ML Studio web service. Type: string (or Expression with resultType string). + /// The key of the service principal used to authenticate against the ARM-based updateResourceEndpoint of an Azure ML Studio web service. + /// The name or ID of the tenant to which the service principal belongs. Type: string (or Expression with resultType string). + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + internal AzureMLLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object mlEndpoint, SecretBase apiKey, object updateResourceEndpoint, object servicePrincipalId, SecretBase servicePrincipalKey, object tenant, object encryptedCredential) : base(type, connectVia, description, parameters, annotations, additionalProperties) + { + MlEndpoint = mlEndpoint; + ApiKey = apiKey; + UpdateResourceEndpoint = updateResourceEndpoint; + ServicePrincipalId = servicePrincipalId; + ServicePrincipalKey = servicePrincipalKey; + Tenant = tenant; + EncryptedCredential = encryptedCredential; + Type = type ?? "AzureML"; + } + + /// The Batch Execution REST URL for an Azure ML Studio Web Service endpoint. Type: string (or Expression with resultType string). + public object MlEndpoint { get; set; } + /// The API key for accessing the Azure ML model endpoint. + public SecretBase ApiKey { get; set; } + /// The Update Resource REST URL for an Azure ML Studio Web Service endpoint. Type: string (or Expression with resultType string). + public object UpdateResourceEndpoint { get; set; } + /// The ID of the service principal used to authenticate against the ARM-based updateResourceEndpoint of an Azure ML Studio web service. Type: string (or Expression with resultType string). + public object ServicePrincipalId { get; set; } + /// The key of the service principal used to authenticate against the ARM-based updateResourceEndpoint of an Azure ML Studio web service. + public SecretBase ServicePrincipalKey { get; set; } + /// The name or ID of the tenant to which the service principal belongs. Type: string (or Expression with resultType string). + public object Tenant { get; set; } + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + public object EncryptedCredential { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureMLServiceLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureMLServiceLinkedService.Serialization.cs new file mode 100644 index 000000000000..1d267d668419 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureMLServiceLinkedService.Serialization.cs @@ -0,0 +1,244 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class AzureMLServiceLinkedService : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (ConnectVia != null) + { + writer.WritePropertyName("connectVia"); + writer.WriteObjectValue(ConnectVia); + } + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + writer.WritePropertyName("subscriptionId"); + writer.WriteObjectValue(SubscriptionId); + writer.WritePropertyName("resourceGroupName"); + writer.WriteObjectValue(ResourceGroupName); + writer.WritePropertyName("mlWorkspaceName"); + writer.WriteObjectValue(MlWorkspaceName); + if (ServicePrincipalId != null) + { + writer.WritePropertyName("servicePrincipalId"); + writer.WriteObjectValue(ServicePrincipalId); + } + if (ServicePrincipalKey != null) + { + writer.WritePropertyName("servicePrincipalKey"); + writer.WriteObjectValue(ServicePrincipalKey); + } + if (Tenant != null) + { + writer.WritePropertyName("tenant"); + writer.WriteObjectValue(Tenant); + } + if (EncryptedCredential != null) + { + writer.WritePropertyName("encryptedCredential"); + writer.WriteObjectValue(EncryptedCredential); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static AzureMLServiceLinkedService DeserializeAzureMLServiceLinkedService(JsonElement element) + { + string type = default; + IntegrationRuntimeReference connectVia = default; + string description = default; + IDictionary parameters = default; + IList annotations = default; + object subscriptionId = default; + object resourceGroupName = default; + object mlWorkspaceName = default; + object servicePrincipalId = default; + SecretBase servicePrincipalKey = default; + object tenant = default; + object encryptedCredential = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("connectVia")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("subscriptionId")) + { + subscriptionId = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("resourceGroupName")) + { + resourceGroupName = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("mlWorkspaceName")) + { + mlWorkspaceName = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("servicePrincipalId")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + servicePrincipalId = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("servicePrincipalKey")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + servicePrincipalKey = SecretBase.DeserializeSecretBase(property0.Value); + continue; + } + if (property0.NameEquals("tenant")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + tenant = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("encryptedCredential")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + encryptedCredential = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new AzureMLServiceLinkedService(type, connectVia, description, parameters, annotations, additionalProperties, subscriptionId, resourceGroupName, mlWorkspaceName, servicePrincipalId, servicePrincipalKey, tenant, encryptedCredential); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureMLServiceLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureMLServiceLinkedService.cs new file mode 100644 index 000000000000..42b13c1963f1 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureMLServiceLinkedService.cs @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Azure ML Service linked service. + public partial class AzureMLServiceLinkedService : LinkedService + { + /// Initializes a new instance of AzureMLServiceLinkedService. + /// Azure ML Service workspace subscription ID. Type: string (or Expression with resultType string). + /// Azure ML Service workspace resource group name. Type: string (or Expression with resultType string). + /// Azure ML Service workspace name. Type: string (or Expression with resultType string). + public AzureMLServiceLinkedService(object subscriptionId, object resourceGroupName, object mlWorkspaceName) + { + if (subscriptionId == null) + { + throw new ArgumentNullException(nameof(subscriptionId)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (mlWorkspaceName == null) + { + throw new ArgumentNullException(nameof(mlWorkspaceName)); + } + + SubscriptionId = subscriptionId; + ResourceGroupName = resourceGroupName; + MlWorkspaceName = mlWorkspaceName; + Type = "AzureMLService"; + } + + /// Initializes a new instance of AzureMLServiceLinkedService. + /// Type of linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for describing the linked service. + /// . + /// Azure ML Service workspace subscription ID. Type: string (or Expression with resultType string). + /// Azure ML Service workspace resource group name. Type: string (or Expression with resultType string). + /// Azure ML Service workspace name. Type: string (or Expression with resultType string). + /// The ID of the service principal used to authenticate against the endpoint of a published Azure ML Service pipeline. Type: string (or Expression with resultType string). + /// The key of the service principal used to authenticate against the endpoint of a published Azure ML Service pipeline. + /// The name or ID of the tenant to which the service principal belongs. Type: string (or Expression with resultType string). + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + internal AzureMLServiceLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object subscriptionId, object resourceGroupName, object mlWorkspaceName, object servicePrincipalId, SecretBase servicePrincipalKey, object tenant, object encryptedCredential) : base(type, connectVia, description, parameters, annotations, additionalProperties) + { + SubscriptionId = subscriptionId; + ResourceGroupName = resourceGroupName; + MlWorkspaceName = mlWorkspaceName; + ServicePrincipalId = servicePrincipalId; + ServicePrincipalKey = servicePrincipalKey; + Tenant = tenant; + EncryptedCredential = encryptedCredential; + Type = type ?? "AzureMLService"; + } + + /// Azure ML Service workspace subscription ID. Type: string (or Expression with resultType string). + public object SubscriptionId { get; set; } + /// Azure ML Service workspace resource group name. Type: string (or Expression with resultType string). + public object ResourceGroupName { get; set; } + /// Azure ML Service workspace name. Type: string (or Expression with resultType string). + public object MlWorkspaceName { get; set; } + /// The ID of the service principal used to authenticate against the endpoint of a published Azure ML Service pipeline. Type: string (or Expression with resultType string). + public object ServicePrincipalId { get; set; } + /// The key of the service principal used to authenticate against the endpoint of a published Azure ML Service pipeline. + public SecretBase ServicePrincipalKey { get; set; } + /// The name or ID of the tenant to which the service principal belongs. Type: string (or Expression with resultType string). + public object Tenant { get; set; } + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + public object EncryptedCredential { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureMLUpdateResourceActivity.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureMLUpdateResourceActivity.Serialization.cs new file mode 100644 index 000000000000..edbbaea280da --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureMLUpdateResourceActivity.Serialization.cs @@ -0,0 +1,206 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class AzureMLUpdateResourceActivity : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (LinkedServiceName != null) + { + writer.WritePropertyName("linkedServiceName"); + writer.WriteObjectValue(LinkedServiceName); + } + if (Policy != null) + { + writer.WritePropertyName("policy"); + writer.WriteObjectValue(Policy); + } + writer.WritePropertyName("name"); + writer.WriteStringValue(Name); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (DependsOn != null) + { + writer.WritePropertyName("dependsOn"); + writer.WriteStartArray(); + foreach (var item in DependsOn) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (UserProperties != null) + { + writer.WritePropertyName("userProperties"); + writer.WriteStartArray(); + foreach (var item in UserProperties) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + writer.WritePropertyName("trainedModelName"); + writer.WriteObjectValue(TrainedModelName); + writer.WritePropertyName("trainedModelLinkedServiceName"); + writer.WriteObjectValue(TrainedModelLinkedServiceName); + writer.WritePropertyName("trainedModelFilePath"); + writer.WriteObjectValue(TrainedModelFilePath); + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static AzureMLUpdateResourceActivity DeserializeAzureMLUpdateResourceActivity(JsonElement element) + { + LinkedServiceReference linkedServiceName = default; + ActivityPolicy policy = default; + string name = default; + string type = default; + string description = default; + IList dependsOn = default; + IList userProperties = default; + object trainedModelName = default; + LinkedServiceReference trainedModelLinkedServiceName = default; + object trainedModelFilePath = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("linkedServiceName")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value); + continue; + } + if (property.NameEquals("policy")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + policy = ActivityPolicy.DeserializeActivityPolicy(property.Value); + continue; + } + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("dependsOn")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(ActivityDependency.DeserializeActivityDependency(item)); + } + } + dependsOn = array; + continue; + } + if (property.NameEquals("userProperties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(UserProperty.DeserializeUserProperty(item)); + } + } + userProperties = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("trainedModelName")) + { + trainedModelName = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("trainedModelLinkedServiceName")) + { + trainedModelLinkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property0.Value); + continue; + } + if (property0.NameEquals("trainedModelFilePath")) + { + trainedModelFilePath = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new AzureMLUpdateResourceActivity(name, type, description, dependsOn, userProperties, additionalProperties, linkedServiceName, policy, trainedModelName, trainedModelLinkedServiceName, trainedModelFilePath); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureMLUpdateResourceActivity.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureMLUpdateResourceActivity.cs new file mode 100644 index 000000000000..de1def155243 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureMLUpdateResourceActivity.cs @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Azure ML Update Resource management activity. + public partial class AzureMLUpdateResourceActivity : ExecutionActivity + { + /// Initializes a new instance of AzureMLUpdateResourceActivity. + /// Activity name. + /// Name of the Trained Model module in the Web Service experiment to be updated. Type: string (or Expression with resultType string). + /// Name of Azure Storage linked service holding the .ilearner file that will be uploaded by the update operation. + /// The relative file path in trainedModelLinkedService to represent the .ilearner file that will be uploaded by the update operation. Type: string (or Expression with resultType string). + public AzureMLUpdateResourceActivity(string name, object trainedModelName, LinkedServiceReference trainedModelLinkedServiceName, object trainedModelFilePath) : base(name) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (trainedModelName == null) + { + throw new ArgumentNullException(nameof(trainedModelName)); + } + if (trainedModelLinkedServiceName == null) + { + throw new ArgumentNullException(nameof(trainedModelLinkedServiceName)); + } + if (trainedModelFilePath == null) + { + throw new ArgumentNullException(nameof(trainedModelFilePath)); + } + + TrainedModelName = trainedModelName; + TrainedModelLinkedServiceName = trainedModelLinkedServiceName; + TrainedModelFilePath = trainedModelFilePath; + Type = "AzureMLUpdateResource"; + } + + /// Initializes a new instance of AzureMLUpdateResourceActivity. + /// Activity name. + /// Type of activity. + /// Activity description. + /// Activity depends on condition. + /// Activity user properties. + /// . + /// Linked service reference. + /// Activity policy. + /// Name of the Trained Model module in the Web Service experiment to be updated. Type: string (or Expression with resultType string). + /// Name of Azure Storage linked service holding the .ilearner file that will be uploaded by the update operation. + /// The relative file path in trainedModelLinkedService to represent the .ilearner file that will be uploaded by the update operation. Type: string (or Expression with resultType string). + internal AzureMLUpdateResourceActivity(string name, string type, string description, IList dependsOn, IList userProperties, IDictionary additionalProperties, LinkedServiceReference linkedServiceName, ActivityPolicy policy, object trainedModelName, LinkedServiceReference trainedModelLinkedServiceName, object trainedModelFilePath) : base(name, type, description, dependsOn, userProperties, additionalProperties, linkedServiceName, policy) + { + TrainedModelName = trainedModelName; + TrainedModelLinkedServiceName = trainedModelLinkedServiceName; + TrainedModelFilePath = trainedModelFilePath; + Type = type ?? "AzureMLUpdateResource"; + } + + /// Name of the Trained Model module in the Web Service experiment to be updated. Type: string (or Expression with resultType string). + public object TrainedModelName { get; set; } + /// Name of Azure Storage linked service holding the .ilearner file that will be uploaded by the update operation. + public LinkedServiceReference TrainedModelLinkedServiceName { get; set; } + /// The relative file path in trainedModelLinkedService to represent the .ilearner file that will be uploaded by the update operation. Type: string (or Expression with resultType string). + public object TrainedModelFilePath { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureMLWebServiceFile.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureMLWebServiceFile.Serialization.cs new file mode 100644 index 000000000000..cc98f9d73a99 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureMLWebServiceFile.Serialization.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class AzureMLWebServiceFile : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("filePath"); + writer.WriteObjectValue(FilePath); + writer.WritePropertyName("linkedServiceName"); + writer.WriteObjectValue(LinkedServiceName); + writer.WriteEndObject(); + } + + internal static AzureMLWebServiceFile DeserializeAzureMLWebServiceFile(JsonElement element) + { + object filePath = default; + LinkedServiceReference linkedServiceName = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("filePath")) + { + filePath = property.Value.GetObject(); + continue; + } + if (property.NameEquals("linkedServiceName")) + { + linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value); + continue; + } + } + return new AzureMLWebServiceFile(filePath, linkedServiceName); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureMLWebServiceFile.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureMLWebServiceFile.cs new file mode 100644 index 000000000000..089e54d5e142 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureMLWebServiceFile.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Azure ML WebService Input/Output file. + public partial class AzureMLWebServiceFile + { + /// Initializes a new instance of AzureMLWebServiceFile. + /// The relative file path, including container name, in the Azure Blob Storage specified by the LinkedService. Type: string (or Expression with resultType string). + /// Reference to an Azure Storage LinkedService, where Azure ML WebService Input/Output file located. + public AzureMLWebServiceFile(object filePath, LinkedServiceReference linkedServiceName) + { + if (filePath == null) + { + throw new ArgumentNullException(nameof(filePath)); + } + if (linkedServiceName == null) + { + throw new ArgumentNullException(nameof(linkedServiceName)); + } + + FilePath = filePath; + LinkedServiceName = linkedServiceName; + } + + /// The relative file path, including container name, in the Azure Blob Storage specified by the LinkedService. Type: string (or Expression with resultType string). + public object FilePath { get; set; } + /// Reference to an Azure Storage LinkedService, where Azure ML WebService Input/Output file located. + public LinkedServiceReference LinkedServiceName { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureMariaDBLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureMariaDBLinkedService.Serialization.cs new file mode 100644 index 000000000000..181d69218588 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureMariaDBLinkedService.Serialization.cs @@ -0,0 +1,205 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class AzureMariaDBLinkedService : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (ConnectVia != null) + { + writer.WritePropertyName("connectVia"); + writer.WriteObjectValue(ConnectVia); + } + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + if (ConnectionString != null) + { + writer.WritePropertyName("connectionString"); + writer.WriteObjectValue(ConnectionString); + } + if (Pwd != null) + { + writer.WritePropertyName("pwd"); + writer.WriteObjectValue(Pwd); + } + if (EncryptedCredential != null) + { + writer.WritePropertyName("encryptedCredential"); + writer.WriteObjectValue(EncryptedCredential); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static AzureMariaDBLinkedService DeserializeAzureMariaDBLinkedService(JsonElement element) + { + string type = default; + IntegrationRuntimeReference connectVia = default; + string description = default; + IDictionary parameters = default; + IList annotations = default; + object connectionString = default; + AzureKeyVaultSecretReference pwd = default; + object encryptedCredential = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("connectVia")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("connectionString")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectionString = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("pwd")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + pwd = AzureKeyVaultSecretReference.DeserializeAzureKeyVaultSecretReference(property0.Value); + continue; + } + if (property0.NameEquals("encryptedCredential")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + encryptedCredential = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new AzureMariaDBLinkedService(type, connectVia, description, parameters, annotations, additionalProperties, connectionString, pwd, encryptedCredential); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureMariaDBLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureMariaDBLinkedService.cs new file mode 100644 index 000000000000..797e727b7380 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureMariaDBLinkedService.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Azure Database for MariaDB linked service. + public partial class AzureMariaDBLinkedService : LinkedService + { + /// Initializes a new instance of AzureMariaDBLinkedService. + public AzureMariaDBLinkedService() + { + Type = "AzureMariaDB"; + } + + /// Initializes a new instance of AzureMariaDBLinkedService. + /// Type of linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for describing the linked service. + /// . + /// An ODBC connection string. Type: string, SecureString or AzureKeyVaultSecretReference. + /// The Azure key vault secret reference of password in connection string. + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + internal AzureMariaDBLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object connectionString, AzureKeyVaultSecretReference pwd, object encryptedCredential) : base(type, connectVia, description, parameters, annotations, additionalProperties) + { + ConnectionString = connectionString; + Pwd = pwd; + EncryptedCredential = encryptedCredential; + Type = type ?? "AzureMariaDB"; + } + + /// An ODBC connection string. Type: string, SecureString or AzureKeyVaultSecretReference. + public object ConnectionString { get; set; } + /// The Azure key vault secret reference of password in connection string. + public AzureKeyVaultSecretReference Pwd { get; set; } + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + public object EncryptedCredential { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureMariaDBTableDataset.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureMariaDBTableDataset.Serialization.cs new file mode 100644 index 000000000000..9343eb067803 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureMariaDBTableDataset.Serialization.cs @@ -0,0 +1,213 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class AzureMariaDBTableDataset : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Structure != null) + { + writer.WritePropertyName("structure"); + writer.WriteObjectValue(Structure); + } + if (Schema != null) + { + writer.WritePropertyName("schema"); + writer.WriteObjectValue(Schema); + } + writer.WritePropertyName("linkedServiceName"); + writer.WriteObjectValue(LinkedServiceName); + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Folder != null) + { + writer.WritePropertyName("folder"); + writer.WriteObjectValue(Folder); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + if (TableName != null) + { + writer.WritePropertyName("tableName"); + writer.WriteObjectValue(TableName); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static AzureMariaDBTableDataset DeserializeAzureMariaDBTableDataset(JsonElement element) + { + string type = default; + string description = default; + object structure = default; + object schema = default; + LinkedServiceReference linkedServiceName = default; + IDictionary parameters = default; + IList annotations = default; + DatasetFolder folder = default; + object tableName = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("structure")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + structure = property.Value.GetObject(); + continue; + } + if (property.NameEquals("schema")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + schema = property.Value.GetObject(); + continue; + } + if (property.NameEquals("linkedServiceName")) + { + linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("folder")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + folder = DatasetFolder.DeserializeDatasetFolder(property.Value); + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("tableName")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + tableName = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new AzureMariaDBTableDataset(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties, tableName); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureMariaDBTableDataset.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureMariaDBTableDataset.cs new file mode 100644 index 000000000000..982de48088aa --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureMariaDBTableDataset.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Azure Database for MariaDB dataset. + public partial class AzureMariaDBTableDataset : Dataset + { + /// Initializes a new instance of AzureMariaDBTableDataset. + /// Linked service reference. + public AzureMariaDBTableDataset(LinkedServiceReference linkedServiceName) : base(linkedServiceName) + { + if (linkedServiceName == null) + { + throw new ArgumentNullException(nameof(linkedServiceName)); + } + + Type = "AzureMariaDBTable"; + } + + /// Initializes a new instance of AzureMariaDBTableDataset. + /// Type of dataset. + /// Dataset description. + /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. + /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. + /// Linked service reference. + /// Parameters for dataset. + /// List of tags that can be used for describing the Dataset. + /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. + /// . + /// The table name. Type: string (or Expression with resultType string). + internal AzureMariaDBTableDataset(string type, string description, object structure, object schema, LinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary additionalProperties, object tableName) : base(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) + { + TableName = tableName; + Type = type ?? "AzureMariaDBTable"; + } + + /// The table name. Type: string (or Expression with resultType string). + public object TableName { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureMySqlLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureMySqlLinkedService.Serialization.cs new file mode 100644 index 000000000000..252cef7c62c1 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureMySqlLinkedService.Serialization.cs @@ -0,0 +1,198 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class AzureMySqlLinkedService : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (ConnectVia != null) + { + writer.WritePropertyName("connectVia"); + writer.WriteObjectValue(ConnectVia); + } + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + writer.WritePropertyName("connectionString"); + writer.WriteObjectValue(ConnectionString); + if (Password != null) + { + writer.WritePropertyName("password"); + writer.WriteObjectValue(Password); + } + if (EncryptedCredential != null) + { + writer.WritePropertyName("encryptedCredential"); + writer.WriteObjectValue(EncryptedCredential); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static AzureMySqlLinkedService DeserializeAzureMySqlLinkedService(JsonElement element) + { + string type = default; + IntegrationRuntimeReference connectVia = default; + string description = default; + IDictionary parameters = default; + IList annotations = default; + object connectionString = default; + AzureKeyVaultSecretReference password = default; + object encryptedCredential = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("connectVia")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("connectionString")) + { + connectionString = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("password")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + password = AzureKeyVaultSecretReference.DeserializeAzureKeyVaultSecretReference(property0.Value); + continue; + } + if (property0.NameEquals("encryptedCredential")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + encryptedCredential = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new AzureMySqlLinkedService(type, connectVia, description, parameters, annotations, additionalProperties, connectionString, password, encryptedCredential); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureMySqlLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureMySqlLinkedService.cs new file mode 100644 index 000000000000..ee50b0781060 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureMySqlLinkedService.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Azure MySQL database linked service. + public partial class AzureMySqlLinkedService : LinkedService + { + /// Initializes a new instance of AzureMySqlLinkedService. + /// The connection string. Type: string, SecureString or AzureKeyVaultSecretReference. + public AzureMySqlLinkedService(object connectionString) + { + if (connectionString == null) + { + throw new ArgumentNullException(nameof(connectionString)); + } + + ConnectionString = connectionString; + Type = "AzureMySql"; + } + + /// Initializes a new instance of AzureMySqlLinkedService. + /// Type of linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for describing the linked service. + /// . + /// The connection string. Type: string, SecureString or AzureKeyVaultSecretReference. + /// The Azure key vault secret reference of password in connection string. + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + internal AzureMySqlLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object connectionString, AzureKeyVaultSecretReference password, object encryptedCredential) : base(type, connectVia, description, parameters, annotations, additionalProperties) + { + ConnectionString = connectionString; + Password = password; + EncryptedCredential = encryptedCredential; + Type = type ?? "AzureMySql"; + } + + /// The connection string. Type: string, SecureString or AzureKeyVaultSecretReference. + public object ConnectionString { get; set; } + /// The Azure key vault secret reference of password in connection string. + public AzureKeyVaultSecretReference Password { get; set; } + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + public object EncryptedCredential { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureMySqlTableDataset.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureMySqlTableDataset.Serialization.cs new file mode 100644 index 000000000000..49e77b1338e0 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureMySqlTableDataset.Serialization.cs @@ -0,0 +1,228 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class AzureMySqlTableDataset : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Structure != null) + { + writer.WritePropertyName("structure"); + writer.WriteObjectValue(Structure); + } + if (Schema != null) + { + writer.WritePropertyName("schema"); + writer.WriteObjectValue(Schema); + } + writer.WritePropertyName("linkedServiceName"); + writer.WriteObjectValue(LinkedServiceName); + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Folder != null) + { + writer.WritePropertyName("folder"); + writer.WriteObjectValue(Folder); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + if (TableName != null) + { + writer.WritePropertyName("tableName"); + writer.WriteObjectValue(TableName); + } + if (Table != null) + { + writer.WritePropertyName("table"); + writer.WriteObjectValue(Table); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static AzureMySqlTableDataset DeserializeAzureMySqlTableDataset(JsonElement element) + { + string type = default; + string description = default; + object structure = default; + object schema = default; + LinkedServiceReference linkedServiceName = default; + IDictionary parameters = default; + IList annotations = default; + DatasetFolder folder = default; + object tableName = default; + object table = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("structure")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + structure = property.Value.GetObject(); + continue; + } + if (property.NameEquals("schema")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + schema = property.Value.GetObject(); + continue; + } + if (property.NameEquals("linkedServiceName")) + { + linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("folder")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + folder = DatasetFolder.DeserializeDatasetFolder(property.Value); + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("tableName")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + tableName = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("table")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + table = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new AzureMySqlTableDataset(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties, tableName, table); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureMySqlTableDataset.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureMySqlTableDataset.cs new file mode 100644 index 000000000000..321a685ffd90 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureMySqlTableDataset.cs @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// The Azure MySQL database dataset. + public partial class AzureMySqlTableDataset : Dataset + { + /// Initializes a new instance of AzureMySqlTableDataset. + /// Linked service reference. + public AzureMySqlTableDataset(LinkedServiceReference linkedServiceName) : base(linkedServiceName) + { + if (linkedServiceName == null) + { + throw new ArgumentNullException(nameof(linkedServiceName)); + } + + Type = "AzureMySqlTable"; + } + + /// Initializes a new instance of AzureMySqlTableDataset. + /// Type of dataset. + /// Dataset description. + /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. + /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. + /// Linked service reference. + /// Parameters for dataset. + /// List of tags that can be used for describing the Dataset. + /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. + /// . + /// The Azure MySQL database table name. Type: string (or Expression with resultType string). + /// The name of Azure MySQL database table. Type: string (or Expression with resultType string). + internal AzureMySqlTableDataset(string type, string description, object structure, object schema, LinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary additionalProperties, object tableName, object table) : base(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) + { + TableName = tableName; + Table = table; + Type = type ?? "AzureMySqlTable"; + } + + /// The Azure MySQL database table name. Type: string (or Expression with resultType string). + public object TableName { get; set; } + /// The name of Azure MySQL database table. Type: string (or Expression with resultType string). + public object Table { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzurePostgreSqlLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzurePostgreSqlLinkedService.Serialization.cs new file mode 100644 index 000000000000..c00b2208eaf2 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzurePostgreSqlLinkedService.Serialization.cs @@ -0,0 +1,205 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class AzurePostgreSqlLinkedService : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (ConnectVia != null) + { + writer.WritePropertyName("connectVia"); + writer.WriteObjectValue(ConnectVia); + } + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + if (ConnectionString != null) + { + writer.WritePropertyName("connectionString"); + writer.WriteObjectValue(ConnectionString); + } + if (Password != null) + { + writer.WritePropertyName("password"); + writer.WriteObjectValue(Password); + } + if (EncryptedCredential != null) + { + writer.WritePropertyName("encryptedCredential"); + writer.WriteObjectValue(EncryptedCredential); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static AzurePostgreSqlLinkedService DeserializeAzurePostgreSqlLinkedService(JsonElement element) + { + string type = default; + IntegrationRuntimeReference connectVia = default; + string description = default; + IDictionary parameters = default; + IList annotations = default; + object connectionString = default; + AzureKeyVaultSecretReference password = default; + object encryptedCredential = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("connectVia")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("connectionString")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectionString = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("password")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + password = AzureKeyVaultSecretReference.DeserializeAzureKeyVaultSecretReference(property0.Value); + continue; + } + if (property0.NameEquals("encryptedCredential")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + encryptedCredential = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new AzurePostgreSqlLinkedService(type, connectVia, description, parameters, annotations, additionalProperties, connectionString, password, encryptedCredential); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzurePostgreSqlLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzurePostgreSqlLinkedService.cs new file mode 100644 index 000000000000..213db1d0a73f --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzurePostgreSqlLinkedService.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Azure PostgreSQL linked service. + public partial class AzurePostgreSqlLinkedService : LinkedService + { + /// Initializes a new instance of AzurePostgreSqlLinkedService. + public AzurePostgreSqlLinkedService() + { + Type = "AzurePostgreSql"; + } + + /// Initializes a new instance of AzurePostgreSqlLinkedService. + /// Type of linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for describing the linked service. + /// . + /// An ODBC connection string. Type: string, SecureString or AzureKeyVaultSecretReference. + /// The Azure key vault secret reference of password in connection string. + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + internal AzurePostgreSqlLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object connectionString, AzureKeyVaultSecretReference password, object encryptedCredential) : base(type, connectVia, description, parameters, annotations, additionalProperties) + { + ConnectionString = connectionString; + Password = password; + EncryptedCredential = encryptedCredential; + Type = type ?? "AzurePostgreSql"; + } + + /// An ODBC connection string. Type: string, SecureString or AzureKeyVaultSecretReference. + public object ConnectionString { get; set; } + /// The Azure key vault secret reference of password in connection string. + public AzureKeyVaultSecretReference Password { get; set; } + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + public object EncryptedCredential { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzurePostgreSqlTableDataset.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzurePostgreSqlTableDataset.Serialization.cs new file mode 100644 index 000000000000..1e9a6f391b27 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzurePostgreSqlTableDataset.Serialization.cs @@ -0,0 +1,243 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class AzurePostgreSqlTableDataset : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Structure != null) + { + writer.WritePropertyName("structure"); + writer.WriteObjectValue(Structure); + } + if (Schema != null) + { + writer.WritePropertyName("schema"); + writer.WriteObjectValue(Schema); + } + writer.WritePropertyName("linkedServiceName"); + writer.WriteObjectValue(LinkedServiceName); + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Folder != null) + { + writer.WritePropertyName("folder"); + writer.WriteObjectValue(Folder); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + if (TableName != null) + { + writer.WritePropertyName("tableName"); + writer.WriteObjectValue(TableName); + } + if (Table != null) + { + writer.WritePropertyName("table"); + writer.WriteObjectValue(Table); + } + if (SchemaTypePropertiesSchema != null) + { + writer.WritePropertyName("schema"); + writer.WriteObjectValue(SchemaTypePropertiesSchema); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static AzurePostgreSqlTableDataset DeserializeAzurePostgreSqlTableDataset(JsonElement element) + { + string type = default; + string description = default; + object structure = default; + object schema = default; + LinkedServiceReference linkedServiceName = default; + IDictionary parameters = default; + IList annotations = default; + DatasetFolder folder = default; + object tableName = default; + object table = default; + object schema0 = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("structure")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + structure = property.Value.GetObject(); + continue; + } + if (property.NameEquals("schema")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + schema = property.Value.GetObject(); + continue; + } + if (property.NameEquals("linkedServiceName")) + { + linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("folder")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + folder = DatasetFolder.DeserializeDatasetFolder(property.Value); + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("tableName")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + tableName = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("table")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + table = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("schema")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + schema0 = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new AzurePostgreSqlTableDataset(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties, tableName, table, schema0); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzurePostgreSqlTableDataset.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzurePostgreSqlTableDataset.cs new file mode 100644 index 000000000000..85e1504d59e4 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzurePostgreSqlTableDataset.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Azure PostgreSQL dataset. + public partial class AzurePostgreSqlTableDataset : Dataset + { + /// Initializes a new instance of AzurePostgreSqlTableDataset. + /// Linked service reference. + public AzurePostgreSqlTableDataset(LinkedServiceReference linkedServiceName) : base(linkedServiceName) + { + if (linkedServiceName == null) + { + throw new ArgumentNullException(nameof(linkedServiceName)); + } + + Type = "AzurePostgreSqlTable"; + } + + /// Initializes a new instance of AzurePostgreSqlTableDataset. + /// Type of dataset. + /// Dataset description. + /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. + /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. + /// Linked service reference. + /// Parameters for dataset. + /// List of tags that can be used for describing the Dataset. + /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. + /// . + /// The table name of the Azure PostgreSQL database which includes both schema and table. Type: string (or Expression with resultType string). + /// The table name of the Azure PostgreSQL database. Type: string (or Expression with resultType string). + /// The schema name of the Azure PostgreSQL database. Type: string (or Expression with resultType string). + internal AzurePostgreSqlTableDataset(string type, string description, object structure, object schema, LinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary additionalProperties, object tableName, object table, object schemaTypePropertiesSchema) : base(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) + { + TableName = tableName; + Table = table; + SchemaTypePropertiesSchema = schemaTypePropertiesSchema; + Type = type ?? "AzurePostgreSqlTable"; + } + + /// The table name of the Azure PostgreSQL database which includes both schema and table. Type: string (or Expression with resultType string). + public object TableName { get; set; } + /// The table name of the Azure PostgreSQL database. Type: string (or Expression with resultType string). + public object Table { get; set; } + /// The schema name of the Azure PostgreSQL database. Type: string (or Expression with resultType string). + public object SchemaTypePropertiesSchema { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureSearchIndexDataset.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureSearchIndexDataset.Serialization.cs new file mode 100644 index 000000000000..dbcdcbfd856c --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureSearchIndexDataset.Serialization.cs @@ -0,0 +1,206 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class AzureSearchIndexDataset : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Structure != null) + { + writer.WritePropertyName("structure"); + writer.WriteObjectValue(Structure); + } + if (Schema != null) + { + writer.WritePropertyName("schema"); + writer.WriteObjectValue(Schema); + } + writer.WritePropertyName("linkedServiceName"); + writer.WriteObjectValue(LinkedServiceName); + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Folder != null) + { + writer.WritePropertyName("folder"); + writer.WriteObjectValue(Folder); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + writer.WritePropertyName("indexName"); + writer.WriteObjectValue(IndexName); + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static AzureSearchIndexDataset DeserializeAzureSearchIndexDataset(JsonElement element) + { + string type = default; + string description = default; + object structure = default; + object schema = default; + LinkedServiceReference linkedServiceName = default; + IDictionary parameters = default; + IList annotations = default; + DatasetFolder folder = default; + object indexName = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("structure")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + structure = property.Value.GetObject(); + continue; + } + if (property.NameEquals("schema")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + schema = property.Value.GetObject(); + continue; + } + if (property.NameEquals("linkedServiceName")) + { + linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("folder")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + folder = DatasetFolder.DeserializeDatasetFolder(property.Value); + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("indexName")) + { + indexName = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new AzureSearchIndexDataset(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties, indexName); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureSearchIndexDataset.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureSearchIndexDataset.cs new file mode 100644 index 000000000000..994acacc853f --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureSearchIndexDataset.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// The Azure Search Index. + public partial class AzureSearchIndexDataset : Dataset + { + /// Initializes a new instance of AzureSearchIndexDataset. + /// Linked service reference. + /// The name of the Azure Search Index. Type: string (or Expression with resultType string). + public AzureSearchIndexDataset(LinkedServiceReference linkedServiceName, object indexName) : base(linkedServiceName) + { + if (linkedServiceName == null) + { + throw new ArgumentNullException(nameof(linkedServiceName)); + } + if (indexName == null) + { + throw new ArgumentNullException(nameof(indexName)); + } + + IndexName = indexName; + Type = "AzureSearchIndex"; + } + + /// Initializes a new instance of AzureSearchIndexDataset. + /// Type of dataset. + /// Dataset description. + /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. + /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. + /// Linked service reference. + /// Parameters for dataset. + /// List of tags that can be used for describing the Dataset. + /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. + /// . + /// The name of the Azure Search Index. Type: string (or Expression with resultType string). + internal AzureSearchIndexDataset(string type, string description, object structure, object schema, LinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary additionalProperties, object indexName) : base(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) + { + IndexName = indexName; + Type = type ?? "AzureSearchIndex"; + } + + /// The name of the Azure Search Index. Type: string (or Expression with resultType string). + public object IndexName { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureSearchLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureSearchLinkedService.Serialization.cs new file mode 100644 index 000000000000..6ad1abcb251b --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureSearchLinkedService.Serialization.cs @@ -0,0 +1,198 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class AzureSearchLinkedService : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (ConnectVia != null) + { + writer.WritePropertyName("connectVia"); + writer.WriteObjectValue(ConnectVia); + } + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + writer.WritePropertyName("url"); + writer.WriteObjectValue(Url); + if (Key != null) + { + writer.WritePropertyName("key"); + writer.WriteObjectValue(Key); + } + if (EncryptedCredential != null) + { + writer.WritePropertyName("encryptedCredential"); + writer.WriteObjectValue(EncryptedCredential); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static AzureSearchLinkedService DeserializeAzureSearchLinkedService(JsonElement element) + { + string type = default; + IntegrationRuntimeReference connectVia = default; + string description = default; + IDictionary parameters = default; + IList annotations = default; + object url = default; + SecretBase key = default; + object encryptedCredential = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("connectVia")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("url")) + { + url = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("key")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + key = SecretBase.DeserializeSecretBase(property0.Value); + continue; + } + if (property0.NameEquals("encryptedCredential")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + encryptedCredential = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new AzureSearchLinkedService(type, connectVia, description, parameters, annotations, additionalProperties, url, key, encryptedCredential); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureSearchLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureSearchLinkedService.cs new file mode 100644 index 000000000000..fd1109757021 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureSearchLinkedService.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Linked service for Windows Azure Search Service. + public partial class AzureSearchLinkedService : LinkedService + { + /// Initializes a new instance of AzureSearchLinkedService. + /// URL for Azure Search service. Type: string (or Expression with resultType string). + public AzureSearchLinkedService(object url) + { + if (url == null) + { + throw new ArgumentNullException(nameof(url)); + } + + Url = url; + Type = "AzureSearch"; + } + + /// Initializes a new instance of AzureSearchLinkedService. + /// Type of linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for describing the linked service. + /// . + /// URL for Azure Search service. Type: string (or Expression with resultType string). + /// Admin Key for Azure Search service. + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + internal AzureSearchLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object url, SecretBase key, object encryptedCredential) : base(type, connectVia, description, parameters, annotations, additionalProperties) + { + Url = url; + Key = key; + EncryptedCredential = encryptedCredential; + Type = type ?? "AzureSearch"; + } + + /// URL for Azure Search service. Type: string (or Expression with resultType string). + public object Url { get; set; } + /// Admin Key for Azure Search service. + public SecretBase Key { get; set; } + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + public object EncryptedCredential { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureSqlDWLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureSqlDWLinkedService.Serialization.cs new file mode 100644 index 000000000000..3c2206020ba9 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureSqlDWLinkedService.Serialization.cs @@ -0,0 +1,243 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class AzureSqlDWLinkedService : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (ConnectVia != null) + { + writer.WritePropertyName("connectVia"); + writer.WriteObjectValue(ConnectVia); + } + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + writer.WritePropertyName("connectionString"); + writer.WriteObjectValue(ConnectionString); + if (Password != null) + { + writer.WritePropertyName("password"); + writer.WriteObjectValue(Password); + } + if (ServicePrincipalId != null) + { + writer.WritePropertyName("servicePrincipalId"); + writer.WriteObjectValue(ServicePrincipalId); + } + if (ServicePrincipalKey != null) + { + writer.WritePropertyName("servicePrincipalKey"); + writer.WriteObjectValue(ServicePrincipalKey); + } + if (Tenant != null) + { + writer.WritePropertyName("tenant"); + writer.WriteObjectValue(Tenant); + } + if (EncryptedCredential != null) + { + writer.WritePropertyName("encryptedCredential"); + writer.WriteObjectValue(EncryptedCredential); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static AzureSqlDWLinkedService DeserializeAzureSqlDWLinkedService(JsonElement element) + { + string type = default; + IntegrationRuntimeReference connectVia = default; + string description = default; + IDictionary parameters = default; + IList annotations = default; + object connectionString = default; + AzureKeyVaultSecretReference password = default; + object servicePrincipalId = default; + SecretBase servicePrincipalKey = default; + object tenant = default; + object encryptedCredential = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("connectVia")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("connectionString")) + { + connectionString = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("password")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + password = AzureKeyVaultSecretReference.DeserializeAzureKeyVaultSecretReference(property0.Value); + continue; + } + if (property0.NameEquals("servicePrincipalId")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + servicePrincipalId = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("servicePrincipalKey")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + servicePrincipalKey = SecretBase.DeserializeSecretBase(property0.Value); + continue; + } + if (property0.NameEquals("tenant")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + tenant = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("encryptedCredential")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + encryptedCredential = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new AzureSqlDWLinkedService(type, connectVia, description, parameters, annotations, additionalProperties, connectionString, password, servicePrincipalId, servicePrincipalKey, tenant, encryptedCredential); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureSqlDWLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureSqlDWLinkedService.cs new file mode 100644 index 000000000000..3cb8e3910e96 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureSqlDWLinkedService.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Azure SQL Data Warehouse linked service. + public partial class AzureSqlDWLinkedService : LinkedService + { + /// Initializes a new instance of AzureSqlDWLinkedService. + /// The connection string. Type: string, SecureString or AzureKeyVaultSecretReference. Type: string, SecureString or AzureKeyVaultSecretReference. + public AzureSqlDWLinkedService(object connectionString) + { + if (connectionString == null) + { + throw new ArgumentNullException(nameof(connectionString)); + } + + ConnectionString = connectionString; + Type = "AzureSqlDW"; + } + + /// Initializes a new instance of AzureSqlDWLinkedService. + /// Type of linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for describing the linked service. + /// . + /// The connection string. Type: string, SecureString or AzureKeyVaultSecretReference. Type: string, SecureString or AzureKeyVaultSecretReference. + /// The Azure key vault secret reference of password in connection string. + /// The ID of the service principal used to authenticate against Azure SQL Data Warehouse. Type: string (or Expression with resultType string). + /// The key of the service principal used to authenticate against Azure SQL Data Warehouse. + /// The name or ID of the tenant to which the service principal belongs. Type: string (or Expression with resultType string). + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + internal AzureSqlDWLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object connectionString, AzureKeyVaultSecretReference password, object servicePrincipalId, SecretBase servicePrincipalKey, object tenant, object encryptedCredential) : base(type, connectVia, description, parameters, annotations, additionalProperties) + { + ConnectionString = connectionString; + Password = password; + ServicePrincipalId = servicePrincipalId; + ServicePrincipalKey = servicePrincipalKey; + Tenant = tenant; + EncryptedCredential = encryptedCredential; + Type = type ?? "AzureSqlDW"; + } + + /// The connection string. Type: string, SecureString or AzureKeyVaultSecretReference. Type: string, SecureString or AzureKeyVaultSecretReference. + public object ConnectionString { get; set; } + /// The Azure key vault secret reference of password in connection string. + public AzureKeyVaultSecretReference Password { get; set; } + /// The ID of the service principal used to authenticate against Azure SQL Data Warehouse. Type: string (or Expression with resultType string). + public object ServicePrincipalId { get; set; } + /// The key of the service principal used to authenticate against Azure SQL Data Warehouse. + public SecretBase ServicePrincipalKey { get; set; } + /// The name or ID of the tenant to which the service principal belongs. Type: string (or Expression with resultType string). + public object Tenant { get; set; } + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + public object EncryptedCredential { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureSqlDWTableDataset.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureSqlDWTableDataset.Serialization.cs new file mode 100644 index 000000000000..4ad60bd41a27 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureSqlDWTableDataset.Serialization.cs @@ -0,0 +1,243 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class AzureSqlDWTableDataset : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Structure != null) + { + writer.WritePropertyName("structure"); + writer.WriteObjectValue(Structure); + } + if (Schema != null) + { + writer.WritePropertyName("schema"); + writer.WriteObjectValue(Schema); + } + writer.WritePropertyName("linkedServiceName"); + writer.WriteObjectValue(LinkedServiceName); + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Folder != null) + { + writer.WritePropertyName("folder"); + writer.WriteObjectValue(Folder); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + if (TableName != null) + { + writer.WritePropertyName("tableName"); + writer.WriteObjectValue(TableName); + } + if (SchemaTypePropertiesSchema != null) + { + writer.WritePropertyName("schema"); + writer.WriteObjectValue(SchemaTypePropertiesSchema); + } + if (Table != null) + { + writer.WritePropertyName("table"); + writer.WriteObjectValue(Table); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static AzureSqlDWTableDataset DeserializeAzureSqlDWTableDataset(JsonElement element) + { + string type = default; + string description = default; + object structure = default; + object schema = default; + LinkedServiceReference linkedServiceName = default; + IDictionary parameters = default; + IList annotations = default; + DatasetFolder folder = default; + object tableName = default; + object schema0 = default; + object table = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("structure")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + structure = property.Value.GetObject(); + continue; + } + if (property.NameEquals("schema")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + schema = property.Value.GetObject(); + continue; + } + if (property.NameEquals("linkedServiceName")) + { + linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("folder")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + folder = DatasetFolder.DeserializeDatasetFolder(property.Value); + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("tableName")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + tableName = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("schema")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + schema0 = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("table")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + table = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new AzureSqlDWTableDataset(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties, tableName, schema0, table); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureSqlDWTableDataset.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureSqlDWTableDataset.cs new file mode 100644 index 000000000000..f842d3493e3f --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureSqlDWTableDataset.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// The Azure SQL Data Warehouse dataset. + public partial class AzureSqlDWTableDataset : Dataset + { + /// Initializes a new instance of AzureSqlDWTableDataset. + /// Linked service reference. + public AzureSqlDWTableDataset(LinkedServiceReference linkedServiceName) : base(linkedServiceName) + { + if (linkedServiceName == null) + { + throw new ArgumentNullException(nameof(linkedServiceName)); + } + + Type = "AzureSqlDWTable"; + } + + /// Initializes a new instance of AzureSqlDWTableDataset. + /// Type of dataset. + /// Dataset description. + /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. + /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. + /// Linked service reference. + /// Parameters for dataset. + /// List of tags that can be used for describing the Dataset. + /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. + /// . + /// This property will be retired. Please consider using schema + table properties instead. + /// The schema name of the Azure SQL Data Warehouse. Type: string (or Expression with resultType string). + /// The table name of the Azure SQL Data Warehouse. Type: string (or Expression with resultType string). + internal AzureSqlDWTableDataset(string type, string description, object structure, object schema, LinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary additionalProperties, object tableName, object schemaTypePropertiesSchema, object table) : base(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) + { + TableName = tableName; + SchemaTypePropertiesSchema = schemaTypePropertiesSchema; + Table = table; + Type = type ?? "AzureSqlDWTable"; + } + + /// This property will be retired. Please consider using schema + table properties instead. + public object TableName { get; set; } + /// The schema name of the Azure SQL Data Warehouse. Type: string (or Expression with resultType string). + public object SchemaTypePropertiesSchema { get; set; } + /// The table name of the Azure SQL Data Warehouse. Type: string (or Expression with resultType string). + public object Table { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureSqlDatabaseLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureSqlDatabaseLinkedService.Serialization.cs new file mode 100644 index 000000000000..59f89ebc2325 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureSqlDatabaseLinkedService.Serialization.cs @@ -0,0 +1,243 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class AzureSqlDatabaseLinkedService : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (ConnectVia != null) + { + writer.WritePropertyName("connectVia"); + writer.WriteObjectValue(ConnectVia); + } + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + writer.WritePropertyName("connectionString"); + writer.WriteObjectValue(ConnectionString); + if (Password != null) + { + writer.WritePropertyName("password"); + writer.WriteObjectValue(Password); + } + if (ServicePrincipalId != null) + { + writer.WritePropertyName("servicePrincipalId"); + writer.WriteObjectValue(ServicePrincipalId); + } + if (ServicePrincipalKey != null) + { + writer.WritePropertyName("servicePrincipalKey"); + writer.WriteObjectValue(ServicePrincipalKey); + } + if (Tenant != null) + { + writer.WritePropertyName("tenant"); + writer.WriteObjectValue(Tenant); + } + if (EncryptedCredential != null) + { + writer.WritePropertyName("encryptedCredential"); + writer.WriteObjectValue(EncryptedCredential); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static AzureSqlDatabaseLinkedService DeserializeAzureSqlDatabaseLinkedService(JsonElement element) + { + string type = default; + IntegrationRuntimeReference connectVia = default; + string description = default; + IDictionary parameters = default; + IList annotations = default; + object connectionString = default; + AzureKeyVaultSecretReference password = default; + object servicePrincipalId = default; + SecretBase servicePrincipalKey = default; + object tenant = default; + object encryptedCredential = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("connectVia")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("connectionString")) + { + connectionString = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("password")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + password = AzureKeyVaultSecretReference.DeserializeAzureKeyVaultSecretReference(property0.Value); + continue; + } + if (property0.NameEquals("servicePrincipalId")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + servicePrincipalId = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("servicePrincipalKey")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + servicePrincipalKey = SecretBase.DeserializeSecretBase(property0.Value); + continue; + } + if (property0.NameEquals("tenant")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + tenant = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("encryptedCredential")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + encryptedCredential = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new AzureSqlDatabaseLinkedService(type, connectVia, description, parameters, annotations, additionalProperties, connectionString, password, servicePrincipalId, servicePrincipalKey, tenant, encryptedCredential); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureSqlDatabaseLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureSqlDatabaseLinkedService.cs new file mode 100644 index 000000000000..3bdc4a3ceccf --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureSqlDatabaseLinkedService.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Microsoft Azure SQL Database linked service. + public partial class AzureSqlDatabaseLinkedService : LinkedService + { + /// Initializes a new instance of AzureSqlDatabaseLinkedService. + /// The connection string. Type: string, SecureString or AzureKeyVaultSecretReference. + public AzureSqlDatabaseLinkedService(object connectionString) + { + if (connectionString == null) + { + throw new ArgumentNullException(nameof(connectionString)); + } + + ConnectionString = connectionString; + Type = "AzureSqlDatabase"; + } + + /// Initializes a new instance of AzureSqlDatabaseLinkedService. + /// Type of linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for describing the linked service. + /// . + /// The connection string. Type: string, SecureString or AzureKeyVaultSecretReference. + /// The Azure key vault secret reference of password in connection string. + /// The ID of the service principal used to authenticate against Azure SQL Database. Type: string (or Expression with resultType string). + /// The key of the service principal used to authenticate against Azure SQL Database. + /// The name or ID of the tenant to which the service principal belongs. Type: string (or Expression with resultType string). + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + internal AzureSqlDatabaseLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object connectionString, AzureKeyVaultSecretReference password, object servicePrincipalId, SecretBase servicePrincipalKey, object tenant, object encryptedCredential) : base(type, connectVia, description, parameters, annotations, additionalProperties) + { + ConnectionString = connectionString; + Password = password; + ServicePrincipalId = servicePrincipalId; + ServicePrincipalKey = servicePrincipalKey; + Tenant = tenant; + EncryptedCredential = encryptedCredential; + Type = type ?? "AzureSqlDatabase"; + } + + /// The connection string. Type: string, SecureString or AzureKeyVaultSecretReference. + public object ConnectionString { get; set; } + /// The Azure key vault secret reference of password in connection string. + public AzureKeyVaultSecretReference Password { get; set; } + /// The ID of the service principal used to authenticate against Azure SQL Database. Type: string (or Expression with resultType string). + public object ServicePrincipalId { get; set; } + /// The key of the service principal used to authenticate against Azure SQL Database. + public SecretBase ServicePrincipalKey { get; set; } + /// The name or ID of the tenant to which the service principal belongs. Type: string (or Expression with resultType string). + public object Tenant { get; set; } + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + public object EncryptedCredential { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureSqlMILinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureSqlMILinkedService.Serialization.cs new file mode 100644 index 000000000000..f23a370b25a2 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureSqlMILinkedService.Serialization.cs @@ -0,0 +1,243 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class AzureSqlMILinkedService : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (ConnectVia != null) + { + writer.WritePropertyName("connectVia"); + writer.WriteObjectValue(ConnectVia); + } + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + writer.WritePropertyName("connectionString"); + writer.WriteObjectValue(ConnectionString); + if (Password != null) + { + writer.WritePropertyName("password"); + writer.WriteObjectValue(Password); + } + if (ServicePrincipalId != null) + { + writer.WritePropertyName("servicePrincipalId"); + writer.WriteObjectValue(ServicePrincipalId); + } + if (ServicePrincipalKey != null) + { + writer.WritePropertyName("servicePrincipalKey"); + writer.WriteObjectValue(ServicePrincipalKey); + } + if (Tenant != null) + { + writer.WritePropertyName("tenant"); + writer.WriteObjectValue(Tenant); + } + if (EncryptedCredential != null) + { + writer.WritePropertyName("encryptedCredential"); + writer.WriteObjectValue(EncryptedCredential); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static AzureSqlMILinkedService DeserializeAzureSqlMILinkedService(JsonElement element) + { + string type = default; + IntegrationRuntimeReference connectVia = default; + string description = default; + IDictionary parameters = default; + IList annotations = default; + object connectionString = default; + AzureKeyVaultSecretReference password = default; + object servicePrincipalId = default; + SecretBase servicePrincipalKey = default; + object tenant = default; + object encryptedCredential = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("connectVia")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("connectionString")) + { + connectionString = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("password")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + password = AzureKeyVaultSecretReference.DeserializeAzureKeyVaultSecretReference(property0.Value); + continue; + } + if (property0.NameEquals("servicePrincipalId")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + servicePrincipalId = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("servicePrincipalKey")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + servicePrincipalKey = SecretBase.DeserializeSecretBase(property0.Value); + continue; + } + if (property0.NameEquals("tenant")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + tenant = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("encryptedCredential")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + encryptedCredential = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new AzureSqlMILinkedService(type, connectVia, description, parameters, annotations, additionalProperties, connectionString, password, servicePrincipalId, servicePrincipalKey, tenant, encryptedCredential); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureSqlMILinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureSqlMILinkedService.cs new file mode 100644 index 000000000000..f17b2e72c121 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureSqlMILinkedService.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Azure SQL Managed Instance linked service. + public partial class AzureSqlMILinkedService : LinkedService + { + /// Initializes a new instance of AzureSqlMILinkedService. + /// The connection string. Type: string, SecureString or AzureKeyVaultSecretReference. + public AzureSqlMILinkedService(object connectionString) + { + if (connectionString == null) + { + throw new ArgumentNullException(nameof(connectionString)); + } + + ConnectionString = connectionString; + Type = "AzureSqlMI"; + } + + /// Initializes a new instance of AzureSqlMILinkedService. + /// Type of linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for describing the linked service. + /// . + /// The connection string. Type: string, SecureString or AzureKeyVaultSecretReference. + /// The Azure key vault secret reference of password in connection string. + /// The ID of the service principal used to authenticate against Azure SQL Managed Instance. Type: string (or Expression with resultType string). + /// The key of the service principal used to authenticate against Azure SQL Managed Instance. + /// The name or ID of the tenant to which the service principal belongs. Type: string (or Expression with resultType string). + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + internal AzureSqlMILinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object connectionString, AzureKeyVaultSecretReference password, object servicePrincipalId, SecretBase servicePrincipalKey, object tenant, object encryptedCredential) : base(type, connectVia, description, parameters, annotations, additionalProperties) + { + ConnectionString = connectionString; + Password = password; + ServicePrincipalId = servicePrincipalId; + ServicePrincipalKey = servicePrincipalKey; + Tenant = tenant; + EncryptedCredential = encryptedCredential; + Type = type ?? "AzureSqlMI"; + } + + /// The connection string. Type: string, SecureString or AzureKeyVaultSecretReference. + public object ConnectionString { get; set; } + /// The Azure key vault secret reference of password in connection string. + public AzureKeyVaultSecretReference Password { get; set; } + /// The ID of the service principal used to authenticate against Azure SQL Managed Instance. Type: string (or Expression with resultType string). + public object ServicePrincipalId { get; set; } + /// The key of the service principal used to authenticate against Azure SQL Managed Instance. + public SecretBase ServicePrincipalKey { get; set; } + /// The name or ID of the tenant to which the service principal belongs. Type: string (or Expression with resultType string). + public object Tenant { get; set; } + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + public object EncryptedCredential { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureSqlMITableDataset.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureSqlMITableDataset.Serialization.cs new file mode 100644 index 000000000000..af9a69de349f --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureSqlMITableDataset.Serialization.cs @@ -0,0 +1,243 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class AzureSqlMITableDataset : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Structure != null) + { + writer.WritePropertyName("structure"); + writer.WriteObjectValue(Structure); + } + if (Schema != null) + { + writer.WritePropertyName("schema"); + writer.WriteObjectValue(Schema); + } + writer.WritePropertyName("linkedServiceName"); + writer.WriteObjectValue(LinkedServiceName); + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Folder != null) + { + writer.WritePropertyName("folder"); + writer.WriteObjectValue(Folder); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + if (TableName != null) + { + writer.WritePropertyName("tableName"); + writer.WriteObjectValue(TableName); + } + if (SchemaTypePropertiesSchema != null) + { + writer.WritePropertyName("schema"); + writer.WriteObjectValue(SchemaTypePropertiesSchema); + } + if (Table != null) + { + writer.WritePropertyName("table"); + writer.WriteObjectValue(Table); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static AzureSqlMITableDataset DeserializeAzureSqlMITableDataset(JsonElement element) + { + string type = default; + string description = default; + object structure = default; + object schema = default; + LinkedServiceReference linkedServiceName = default; + IDictionary parameters = default; + IList annotations = default; + DatasetFolder folder = default; + object tableName = default; + object schema0 = default; + object table = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("structure")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + structure = property.Value.GetObject(); + continue; + } + if (property.NameEquals("schema")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + schema = property.Value.GetObject(); + continue; + } + if (property.NameEquals("linkedServiceName")) + { + linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("folder")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + folder = DatasetFolder.DeserializeDatasetFolder(property.Value); + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("tableName")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + tableName = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("schema")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + schema0 = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("table")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + table = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new AzureSqlMITableDataset(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties, tableName, schema0, table); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureSqlMITableDataset.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureSqlMITableDataset.cs new file mode 100644 index 000000000000..9c3e6cdaf8a3 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureSqlMITableDataset.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// The Azure SQL Managed Instance dataset. + public partial class AzureSqlMITableDataset : Dataset + { + /// Initializes a new instance of AzureSqlMITableDataset. + /// Linked service reference. + public AzureSqlMITableDataset(LinkedServiceReference linkedServiceName) : base(linkedServiceName) + { + if (linkedServiceName == null) + { + throw new ArgumentNullException(nameof(linkedServiceName)); + } + + Type = "AzureSqlMITable"; + } + + /// Initializes a new instance of AzureSqlMITableDataset. + /// Type of dataset. + /// Dataset description. + /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. + /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. + /// Linked service reference. + /// Parameters for dataset. + /// List of tags that can be used for describing the Dataset. + /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. + /// . + /// This property will be retired. Please consider using schema + table properties instead. + /// The schema name of the Azure SQL Managed Instance. Type: string (or Expression with resultType string). + /// The table name of the Azure SQL Managed Instance dataset. Type: string (or Expression with resultType string). + internal AzureSqlMITableDataset(string type, string description, object structure, object schema, LinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary additionalProperties, object tableName, object schemaTypePropertiesSchema, object table) : base(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) + { + TableName = tableName; + SchemaTypePropertiesSchema = schemaTypePropertiesSchema; + Table = table; + Type = type ?? "AzureSqlMITable"; + } + + /// This property will be retired. Please consider using schema + table properties instead. + public object TableName { get; set; } + /// The schema name of the Azure SQL Managed Instance. Type: string (or Expression with resultType string). + public object SchemaTypePropertiesSchema { get; set; } + /// The table name of the Azure SQL Managed Instance dataset. Type: string (or Expression with resultType string). + public object Table { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureSqlTableDataset.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureSqlTableDataset.Serialization.cs new file mode 100644 index 000000000000..e46e281a6e07 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureSqlTableDataset.Serialization.cs @@ -0,0 +1,243 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class AzureSqlTableDataset : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Structure != null) + { + writer.WritePropertyName("structure"); + writer.WriteObjectValue(Structure); + } + if (Schema != null) + { + writer.WritePropertyName("schema"); + writer.WriteObjectValue(Schema); + } + writer.WritePropertyName("linkedServiceName"); + writer.WriteObjectValue(LinkedServiceName); + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Folder != null) + { + writer.WritePropertyName("folder"); + writer.WriteObjectValue(Folder); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + if (TableName != null) + { + writer.WritePropertyName("tableName"); + writer.WriteObjectValue(TableName); + } + if (SchemaTypePropertiesSchema != null) + { + writer.WritePropertyName("schema"); + writer.WriteObjectValue(SchemaTypePropertiesSchema); + } + if (Table != null) + { + writer.WritePropertyName("table"); + writer.WriteObjectValue(Table); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static AzureSqlTableDataset DeserializeAzureSqlTableDataset(JsonElement element) + { + string type = default; + string description = default; + object structure = default; + object schema = default; + LinkedServiceReference linkedServiceName = default; + IDictionary parameters = default; + IList annotations = default; + DatasetFolder folder = default; + object tableName = default; + object schema0 = default; + object table = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("structure")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + structure = property.Value.GetObject(); + continue; + } + if (property.NameEquals("schema")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + schema = property.Value.GetObject(); + continue; + } + if (property.NameEquals("linkedServiceName")) + { + linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("folder")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + folder = DatasetFolder.DeserializeDatasetFolder(property.Value); + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("tableName")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + tableName = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("schema")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + schema0 = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("table")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + table = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new AzureSqlTableDataset(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties, tableName, schema0, table); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureSqlTableDataset.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureSqlTableDataset.cs new file mode 100644 index 000000000000..243bf74fce06 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureSqlTableDataset.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// The Azure SQL Server database dataset. + public partial class AzureSqlTableDataset : Dataset + { + /// Initializes a new instance of AzureSqlTableDataset. + /// Linked service reference. + public AzureSqlTableDataset(LinkedServiceReference linkedServiceName) : base(linkedServiceName) + { + if (linkedServiceName == null) + { + throw new ArgumentNullException(nameof(linkedServiceName)); + } + + Type = "AzureSqlTable"; + } + + /// Initializes a new instance of AzureSqlTableDataset. + /// Type of dataset. + /// Dataset description. + /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. + /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. + /// Linked service reference. + /// Parameters for dataset. + /// List of tags that can be used for describing the Dataset. + /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. + /// . + /// This property will be retired. Please consider using schema + table properties instead. + /// The schema name of the Azure SQL database. Type: string (or Expression with resultType string). + /// The table name of the Azure SQL database. Type: string (or Expression with resultType string). + internal AzureSqlTableDataset(string type, string description, object structure, object schema, LinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary additionalProperties, object tableName, object schemaTypePropertiesSchema, object table) : base(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) + { + TableName = tableName; + SchemaTypePropertiesSchema = schemaTypePropertiesSchema; + Table = table; + Type = type ?? "AzureSqlTable"; + } + + /// This property will be retired. Please consider using schema + table properties instead. + public object TableName { get; set; } + /// The schema name of the Azure SQL database. Type: string (or Expression with resultType string). + public object SchemaTypePropertiesSchema { get; set; } + /// The table name of the Azure SQL database. Type: string (or Expression with resultType string). + public object Table { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureStorageLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureStorageLinkedService.Serialization.cs new file mode 100644 index 000000000000..94568102bbe8 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureStorageLinkedService.Serialization.cs @@ -0,0 +1,235 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class AzureStorageLinkedService : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (ConnectVia != null) + { + writer.WritePropertyName("connectVia"); + writer.WriteObjectValue(ConnectVia); + } + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + if (ConnectionString != null) + { + writer.WritePropertyName("connectionString"); + writer.WriteObjectValue(ConnectionString); + } + if (AccountKey != null) + { + writer.WritePropertyName("accountKey"); + writer.WriteObjectValue(AccountKey); + } + if (SasUri != null) + { + writer.WritePropertyName("sasUri"); + writer.WriteObjectValue(SasUri); + } + if (SasToken != null) + { + writer.WritePropertyName("sasToken"); + writer.WriteObjectValue(SasToken); + } + if (EncryptedCredential != null) + { + writer.WritePropertyName("encryptedCredential"); + writer.WriteStringValue(EncryptedCredential); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static AzureStorageLinkedService DeserializeAzureStorageLinkedService(JsonElement element) + { + string type = default; + IntegrationRuntimeReference connectVia = default; + string description = default; + IDictionary parameters = default; + IList annotations = default; + object connectionString = default; + AzureKeyVaultSecretReference accountKey = default; + object sasUri = default; + AzureKeyVaultSecretReference sasToken = default; + string encryptedCredential = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("connectVia")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("connectionString")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectionString = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("accountKey")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + accountKey = AzureKeyVaultSecretReference.DeserializeAzureKeyVaultSecretReference(property0.Value); + continue; + } + if (property0.NameEquals("sasUri")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sasUri = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("sasToken")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sasToken = AzureKeyVaultSecretReference.DeserializeAzureKeyVaultSecretReference(property0.Value); + continue; + } + if (property0.NameEquals("encryptedCredential")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + encryptedCredential = property0.Value.GetString(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new AzureStorageLinkedService(type, connectVia, description, parameters, annotations, additionalProperties, connectionString, accountKey, sasUri, sasToken, encryptedCredential); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureStorageLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureStorageLinkedService.cs new file mode 100644 index 000000000000..70ae22092f08 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureStorageLinkedService.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// The storage account linked service. + public partial class AzureStorageLinkedService : LinkedService + { + /// Initializes a new instance of AzureStorageLinkedService. + public AzureStorageLinkedService() + { + Type = "AzureStorage"; + } + + /// Initializes a new instance of AzureStorageLinkedService. + /// Type of linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for describing the linked service. + /// . + /// The connection string. It is mutually exclusive with sasUri property. Type: string, SecureString or AzureKeyVaultSecretReference. + /// The Azure key vault secret reference of accountKey in connection string. + /// SAS URI of the Azure Storage resource. It is mutually exclusive with connectionString property. Type: string, SecureString or AzureKeyVaultSecretReference. + /// The Azure key vault secret reference of sasToken in sas uri. + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + internal AzureStorageLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object connectionString, AzureKeyVaultSecretReference accountKey, object sasUri, AzureKeyVaultSecretReference sasToken, string encryptedCredential) : base(type, connectVia, description, parameters, annotations, additionalProperties) + { + ConnectionString = connectionString; + AccountKey = accountKey; + SasUri = sasUri; + SasToken = sasToken; + EncryptedCredential = encryptedCredential; + Type = type ?? "AzureStorage"; + } + + /// The connection string. It is mutually exclusive with sasUri property. Type: string, SecureString or AzureKeyVaultSecretReference. + public object ConnectionString { get; set; } + /// The Azure key vault secret reference of accountKey in connection string. + public AzureKeyVaultSecretReference AccountKey { get; set; } + /// SAS URI of the Azure Storage resource. It is mutually exclusive with connectionString property. Type: string, SecureString or AzureKeyVaultSecretReference. + public object SasUri { get; set; } + /// The Azure key vault secret reference of sasToken in sas uri. + public AzureKeyVaultSecretReference SasToken { get; set; } + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + public string EncryptedCredential { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureTableDataset.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureTableDataset.Serialization.cs new file mode 100644 index 000000000000..698e3a899f7c --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureTableDataset.Serialization.cs @@ -0,0 +1,206 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class AzureTableDataset : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Structure != null) + { + writer.WritePropertyName("structure"); + writer.WriteObjectValue(Structure); + } + if (Schema != null) + { + writer.WritePropertyName("schema"); + writer.WriteObjectValue(Schema); + } + writer.WritePropertyName("linkedServiceName"); + writer.WriteObjectValue(LinkedServiceName); + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Folder != null) + { + writer.WritePropertyName("folder"); + writer.WriteObjectValue(Folder); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + writer.WritePropertyName("tableName"); + writer.WriteObjectValue(TableName); + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static AzureTableDataset DeserializeAzureTableDataset(JsonElement element) + { + string type = default; + string description = default; + object structure = default; + object schema = default; + LinkedServiceReference linkedServiceName = default; + IDictionary parameters = default; + IList annotations = default; + DatasetFolder folder = default; + object tableName = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("structure")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + structure = property.Value.GetObject(); + continue; + } + if (property.NameEquals("schema")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + schema = property.Value.GetObject(); + continue; + } + if (property.NameEquals("linkedServiceName")) + { + linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("folder")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + folder = DatasetFolder.DeserializeDatasetFolder(property.Value); + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("tableName")) + { + tableName = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new AzureTableDataset(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties, tableName); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureTableDataset.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureTableDataset.cs new file mode 100644 index 000000000000..1ebb4d185abe --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureTableDataset.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// The Azure Table storage dataset. + public partial class AzureTableDataset : Dataset + { + /// Initializes a new instance of AzureTableDataset. + /// Linked service reference. + /// The table name of the Azure Table storage. Type: string (or Expression with resultType string). + public AzureTableDataset(LinkedServiceReference linkedServiceName, object tableName) : base(linkedServiceName) + { + if (linkedServiceName == null) + { + throw new ArgumentNullException(nameof(linkedServiceName)); + } + if (tableName == null) + { + throw new ArgumentNullException(nameof(tableName)); + } + + TableName = tableName; + Type = "AzureTable"; + } + + /// Initializes a new instance of AzureTableDataset. + /// Type of dataset. + /// Dataset description. + /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. + /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. + /// Linked service reference. + /// Parameters for dataset. + /// List of tags that can be used for describing the Dataset. + /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. + /// . + /// The table name of the Azure Table storage. Type: string (or Expression with resultType string). + internal AzureTableDataset(string type, string description, object structure, object schema, LinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary additionalProperties, object tableName) : base(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) + { + TableName = tableName; + Type = type ?? "AzureTable"; + } + + /// The table name of the Azure Table storage. Type: string (or Expression with resultType string). + public object TableName { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureTableStorageLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureTableStorageLinkedService.Serialization.cs new file mode 100644 index 000000000000..324c1757d23f --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureTableStorageLinkedService.Serialization.cs @@ -0,0 +1,235 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class AzureTableStorageLinkedService : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (ConnectVia != null) + { + writer.WritePropertyName("connectVia"); + writer.WriteObjectValue(ConnectVia); + } + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + if (ConnectionString != null) + { + writer.WritePropertyName("connectionString"); + writer.WriteObjectValue(ConnectionString); + } + if (AccountKey != null) + { + writer.WritePropertyName("accountKey"); + writer.WriteObjectValue(AccountKey); + } + if (SasUri != null) + { + writer.WritePropertyName("sasUri"); + writer.WriteObjectValue(SasUri); + } + if (SasToken != null) + { + writer.WritePropertyName("sasToken"); + writer.WriteObjectValue(SasToken); + } + if (EncryptedCredential != null) + { + writer.WritePropertyName("encryptedCredential"); + writer.WriteStringValue(EncryptedCredential); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static AzureTableStorageLinkedService DeserializeAzureTableStorageLinkedService(JsonElement element) + { + string type = default; + IntegrationRuntimeReference connectVia = default; + string description = default; + IDictionary parameters = default; + IList annotations = default; + object connectionString = default; + AzureKeyVaultSecretReference accountKey = default; + object sasUri = default; + AzureKeyVaultSecretReference sasToken = default; + string encryptedCredential = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("connectVia")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("connectionString")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectionString = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("accountKey")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + accountKey = AzureKeyVaultSecretReference.DeserializeAzureKeyVaultSecretReference(property0.Value); + continue; + } + if (property0.NameEquals("sasUri")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sasUri = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("sasToken")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sasToken = AzureKeyVaultSecretReference.DeserializeAzureKeyVaultSecretReference(property0.Value); + continue; + } + if (property0.NameEquals("encryptedCredential")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + encryptedCredential = property0.Value.GetString(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new AzureTableStorageLinkedService(type, connectVia, description, parameters, annotations, additionalProperties, connectionString, accountKey, sasUri, sasToken, encryptedCredential); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureTableStorageLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureTableStorageLinkedService.cs new file mode 100644 index 000000000000..ded76fc74323 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureTableStorageLinkedService.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// The azure table storage linked service. + public partial class AzureTableStorageLinkedService : LinkedService + { + /// Initializes a new instance of AzureTableStorageLinkedService. + public AzureTableStorageLinkedService() + { + Type = "AzureTableStorage"; + } + + /// Initializes a new instance of AzureTableStorageLinkedService. + /// Type of linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for describing the linked service. + /// . + /// The connection string. It is mutually exclusive with sasUri property. Type: string, SecureString or AzureKeyVaultSecretReference. + /// The Azure key vault secret reference of accountKey in connection string. + /// SAS URI of the Azure Storage resource. It is mutually exclusive with connectionString property. Type: string, SecureString or AzureKeyVaultSecretReference. + /// The Azure key vault secret reference of sasToken in sas uri. + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + internal AzureTableStorageLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object connectionString, AzureKeyVaultSecretReference accountKey, object sasUri, AzureKeyVaultSecretReference sasToken, string encryptedCredential) : base(type, connectVia, description, parameters, annotations, additionalProperties) + { + ConnectionString = connectionString; + AccountKey = accountKey; + SasUri = sasUri; + SasToken = sasToken; + EncryptedCredential = encryptedCredential; + Type = type ?? "AzureTableStorage"; + } + + /// The connection string. It is mutually exclusive with sasUri property. Type: string, SecureString or AzureKeyVaultSecretReference. + public object ConnectionString { get; set; } + /// The Azure key vault secret reference of accountKey in connection string. + public AzureKeyVaultSecretReference AccountKey { get; set; } + /// SAS URI of the Azure Storage resource. It is mutually exclusive with connectionString property. Type: string, SecureString or AzureKeyVaultSecretReference. + public object SasUri { get; set; } + /// The Azure key vault secret reference of sasToken in sas uri. + public AzureKeyVaultSecretReference SasToken { get; set; } + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + public string EncryptedCredential { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/BigDataPoolReference.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/BigDataPoolReference.Serialization.cs new file mode 100644 index 000000000000..51a8338c7efa --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/BigDataPoolReference.Serialization.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class BigDataPoolReference : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + writer.WritePropertyName("referenceName"); + writer.WriteStringValue(ReferenceName); + writer.WriteEndObject(); + } + + internal static BigDataPoolReference DeserializeBigDataPoolReference(JsonElement element) + { + string type = default; + string referenceName = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("referenceName")) + { + referenceName = property.Value.GetString(); + continue; + } + } + return new BigDataPoolReference(type, referenceName); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/BigDataPoolReference.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/BigDataPoolReference.cs new file mode 100644 index 000000000000..a82a7af4555f --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/BigDataPoolReference.cs @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Big data pool reference. + public partial class BigDataPoolReference + { + /// Initializes a new instance of BigDataPoolReference. + /// Reference big data pool name. + public BigDataPoolReference(string referenceName) + { + if (referenceName == null) + { + throw new ArgumentNullException(nameof(referenceName)); + } + + Type = "BigDataPoolReference"; + ReferenceName = referenceName; + } + + /// Initializes a new instance of BigDataPoolReference. + /// Big data pool reference type. + /// Reference big data pool name. + internal BigDataPoolReference(string type, string referenceName) + { + Type = type; + ReferenceName = referenceName; + } + + /// Big data pool reference type. + public string Type { get; set; } + /// Reference big data pool name. + public string ReferenceName { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/BinaryDataset.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/BinaryDataset.Serialization.cs new file mode 100644 index 000000000000..b66d419f00cb --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/BinaryDataset.Serialization.cs @@ -0,0 +1,228 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class BinaryDataset : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Structure != null) + { + writer.WritePropertyName("structure"); + writer.WriteObjectValue(Structure); + } + if (Schema != null) + { + writer.WritePropertyName("schema"); + writer.WriteObjectValue(Schema); + } + writer.WritePropertyName("linkedServiceName"); + writer.WriteObjectValue(LinkedServiceName); + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Folder != null) + { + writer.WritePropertyName("folder"); + writer.WriteObjectValue(Folder); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + if (Location != null) + { + writer.WritePropertyName("location"); + writer.WriteObjectValue(Location); + } + if (Compression != null) + { + writer.WritePropertyName("compression"); + writer.WriteObjectValue(Compression); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static BinaryDataset DeserializeBinaryDataset(JsonElement element) + { + string type = default; + string description = default; + object structure = default; + object schema = default; + LinkedServiceReference linkedServiceName = default; + IDictionary parameters = default; + IList annotations = default; + DatasetFolder folder = default; + DatasetLocation location = default; + DatasetCompression compression = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("structure")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + structure = property.Value.GetObject(); + continue; + } + if (property.NameEquals("schema")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + schema = property.Value.GetObject(); + continue; + } + if (property.NameEquals("linkedServiceName")) + { + linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("folder")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + folder = DatasetFolder.DeserializeDatasetFolder(property.Value); + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("location")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + location = DatasetLocation.DeserializeDatasetLocation(property0.Value); + continue; + } + if (property0.NameEquals("compression")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + compression = DatasetCompression.DeserializeDatasetCompression(property0.Value); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new BinaryDataset(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties, location, compression); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/BinaryDataset.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/BinaryDataset.cs new file mode 100644 index 000000000000..d887edad0d62 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/BinaryDataset.cs @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Binary dataset. + public partial class BinaryDataset : Dataset + { + /// Initializes a new instance of BinaryDataset. + /// Linked service reference. + public BinaryDataset(LinkedServiceReference linkedServiceName) : base(linkedServiceName) + { + if (linkedServiceName == null) + { + throw new ArgumentNullException(nameof(linkedServiceName)); + } + + Type = "Binary"; + } + + /// Initializes a new instance of BinaryDataset. + /// Type of dataset. + /// Dataset description. + /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. + /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. + /// Linked service reference. + /// Parameters for dataset. + /// List of tags that can be used for describing the Dataset. + /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. + /// . + /// The location of the Binary storage. + /// The data compression method used for the binary dataset. + internal BinaryDataset(string type, string description, object structure, object schema, LinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary additionalProperties, DatasetLocation location, DatasetCompression compression) : base(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) + { + Location = location; + Compression = compression; + Type = type ?? "Binary"; + } + + /// The location of the Binary storage. + public DatasetLocation Location { get; set; } + /// The data compression method used for the binary dataset. + public DatasetCompression Compression { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CassandraLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CassandraLinkedService.Serialization.cs new file mode 100644 index 000000000000..8b80b33611e9 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CassandraLinkedService.Serialization.cs @@ -0,0 +1,243 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class CassandraLinkedService : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (ConnectVia != null) + { + writer.WritePropertyName("connectVia"); + writer.WriteObjectValue(ConnectVia); + } + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + writer.WritePropertyName("host"); + writer.WriteObjectValue(Host); + if (AuthenticationType != null) + { + writer.WritePropertyName("authenticationType"); + writer.WriteObjectValue(AuthenticationType); + } + if (Port != null) + { + writer.WritePropertyName("port"); + writer.WriteObjectValue(Port); + } + if (Username != null) + { + writer.WritePropertyName("username"); + writer.WriteObjectValue(Username); + } + if (Password != null) + { + writer.WritePropertyName("password"); + writer.WriteObjectValue(Password); + } + if (EncryptedCredential != null) + { + writer.WritePropertyName("encryptedCredential"); + writer.WriteObjectValue(EncryptedCredential); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static CassandraLinkedService DeserializeCassandraLinkedService(JsonElement element) + { + string type = default; + IntegrationRuntimeReference connectVia = default; + string description = default; + IDictionary parameters = default; + IList annotations = default; + object host = default; + object authenticationType = default; + object port = default; + object username = default; + SecretBase password = default; + object encryptedCredential = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("connectVia")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("host")) + { + host = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("authenticationType")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + authenticationType = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("port")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + port = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("username")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + username = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("password")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + password = SecretBase.DeserializeSecretBase(property0.Value); + continue; + } + if (property0.NameEquals("encryptedCredential")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + encryptedCredential = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new CassandraLinkedService(type, connectVia, description, parameters, annotations, additionalProperties, host, authenticationType, port, username, password, encryptedCredential); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CassandraLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CassandraLinkedService.cs new file mode 100644 index 000000000000..8a73a13eb1e0 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CassandraLinkedService.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Linked service for Cassandra data source. + public partial class CassandraLinkedService : LinkedService + { + /// Initializes a new instance of CassandraLinkedService. + /// Host name for connection. Type: string (or Expression with resultType string). + public CassandraLinkedService(object host) + { + if (host == null) + { + throw new ArgumentNullException(nameof(host)); + } + + Host = host; + Type = "Cassandra"; + } + + /// Initializes a new instance of CassandraLinkedService. + /// Type of linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for describing the linked service. + /// . + /// Host name for connection. Type: string (or Expression with resultType string). + /// AuthenticationType to be used for connection. Type: string (or Expression with resultType string). + /// The port for the connection. Type: integer (or Expression with resultType integer). + /// Username for authentication. Type: string (or Expression with resultType string). + /// Password for authentication. + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + internal CassandraLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object host, object authenticationType, object port, object username, SecretBase password, object encryptedCredential) : base(type, connectVia, description, parameters, annotations, additionalProperties) + { + Host = host; + AuthenticationType = authenticationType; + Port = port; + Username = username; + Password = password; + EncryptedCredential = encryptedCredential; + Type = type ?? "Cassandra"; + } + + /// Host name for connection. Type: string (or Expression with resultType string). + public object Host { get; set; } + /// AuthenticationType to be used for connection. Type: string (or Expression with resultType string). + public object AuthenticationType { get; set; } + /// The port for the connection. Type: integer (or Expression with resultType integer). + public object Port { get; set; } + /// Username for authentication. Type: string (or Expression with resultType string). + public object Username { get; set; } + /// Password for authentication. + public SecretBase Password { get; set; } + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + public object EncryptedCredential { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CassandraTableDataset.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CassandraTableDataset.Serialization.cs new file mode 100644 index 000000000000..c074dab64b2b --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CassandraTableDataset.Serialization.cs @@ -0,0 +1,228 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class CassandraTableDataset : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Structure != null) + { + writer.WritePropertyName("structure"); + writer.WriteObjectValue(Structure); + } + if (Schema != null) + { + writer.WritePropertyName("schema"); + writer.WriteObjectValue(Schema); + } + writer.WritePropertyName("linkedServiceName"); + writer.WriteObjectValue(LinkedServiceName); + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Folder != null) + { + writer.WritePropertyName("folder"); + writer.WriteObjectValue(Folder); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + if (TableName != null) + { + writer.WritePropertyName("tableName"); + writer.WriteObjectValue(TableName); + } + if (Keyspace != null) + { + writer.WritePropertyName("keyspace"); + writer.WriteObjectValue(Keyspace); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static CassandraTableDataset DeserializeCassandraTableDataset(JsonElement element) + { + string type = default; + string description = default; + object structure = default; + object schema = default; + LinkedServiceReference linkedServiceName = default; + IDictionary parameters = default; + IList annotations = default; + DatasetFolder folder = default; + object tableName = default; + object keyspace = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("structure")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + structure = property.Value.GetObject(); + continue; + } + if (property.NameEquals("schema")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + schema = property.Value.GetObject(); + continue; + } + if (property.NameEquals("linkedServiceName")) + { + linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("folder")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + folder = DatasetFolder.DeserializeDatasetFolder(property.Value); + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("tableName")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + tableName = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("keyspace")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + keyspace = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new CassandraTableDataset(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties, tableName, keyspace); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CassandraTableDataset.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CassandraTableDataset.cs new file mode 100644 index 000000000000..49b56ab1b8c7 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CassandraTableDataset.cs @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// The Cassandra database dataset. + public partial class CassandraTableDataset : Dataset + { + /// Initializes a new instance of CassandraTableDataset. + /// Linked service reference. + public CassandraTableDataset(LinkedServiceReference linkedServiceName) : base(linkedServiceName) + { + if (linkedServiceName == null) + { + throw new ArgumentNullException(nameof(linkedServiceName)); + } + + Type = "CassandraTable"; + } + + /// Initializes a new instance of CassandraTableDataset. + /// Type of dataset. + /// Dataset description. + /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. + /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. + /// Linked service reference. + /// Parameters for dataset. + /// List of tags that can be used for describing the Dataset. + /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. + /// . + /// The table name of the Cassandra database. Type: string (or Expression with resultType string). + /// The keyspace of the Cassandra database. Type: string (or Expression with resultType string). + internal CassandraTableDataset(string type, string description, object structure, object schema, LinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary additionalProperties, object tableName, object keyspace) : base(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) + { + TableName = tableName; + Keyspace = keyspace; + Type = type ?? "CassandraTable"; + } + + /// The table name of the Cassandra database. Type: string (or Expression with resultType string). + public object TableName { get; set; } + /// The keyspace of the Cassandra database. Type: string (or Expression with resultType string). + public object Keyspace { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CellOutputType.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CellOutputType.cs new file mode 100644 index 000000000000..fb0e674e1da5 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CellOutputType.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Execution, display, or stream outputs. + public readonly partial struct CellOutputType : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + public CellOutputType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ExecuteResultValue = "execute_result"; + private const string DisplayDataValue = "display_data"; + private const string StreamValue = "stream"; + private const string ErrorValue = "error"; + + /// execute_result. + public static CellOutputType ExecuteResult { get; } = new CellOutputType(ExecuteResultValue); + /// display_data. + public static CellOutputType DisplayData { get; } = new CellOutputType(DisplayDataValue); + /// stream. + public static CellOutputType Stream { get; } = new CellOutputType(StreamValue); + /// error. + public static CellOutputType Error { get; } = new CellOutputType(ErrorValue); + /// Determines if two values are the same. + public static bool operator ==(CellOutputType left, CellOutputType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(CellOutputType left, CellOutputType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator CellOutputType(string value) => new CellOutputType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is CellOutputType other && Equals(other); + /// + public bool Equals(CellOutputType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CloudError.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CloudError.Serialization.cs new file mode 100644 index 000000000000..61868d9cfc8a --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CloudError.Serialization.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + internal partial class CloudError + { + internal static CloudError DeserializeCloudError(JsonElement element) + { + string code = default; + string message = default; + string target = default; + IReadOnlyList details = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("error")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("code")) + { + code = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("message")) + { + message = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("target")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + target = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("details")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(DeserializeCloudError(item)); + } + } + details = array; + continue; + } + } + continue; + } + } + return new CloudError(code, message, target, details); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CloudError.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CloudError.cs new file mode 100644 index 000000000000..eb414dfba9f9 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CloudError.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// The object that defines the structure of an Azure Synapse error response. + internal partial class CloudError + { + /// Initializes a new instance of CloudError. + /// Error code. + /// Error message. + internal CloudError(string code, string message) + { + if (code == null) + { + throw new ArgumentNullException(nameof(code)); + } + if (message == null) + { + throw new ArgumentNullException(nameof(message)); + } + + Code = code; + Message = message; + } + + /// Initializes a new instance of CloudError. + /// Error code. + /// Error message. + /// Property name/path in request associated with error. + /// Array with additional error details. + internal CloudError(string code, string message, string target, IReadOnlyList details) + { + Code = code; + Message = message; + Target = target; + Details = details; + } + + /// Error code. + public string Code { get; } + /// Error message. + public string Message { get; } + /// Property name/path in request associated with error. + public string Target { get; } + /// Array with additional error details. + public IReadOnlyList Details { get; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CommonDataServiceForAppsEntityDataset.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CommonDataServiceForAppsEntityDataset.Serialization.cs new file mode 100644 index 000000000000..f0a2b9f65775 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CommonDataServiceForAppsEntityDataset.Serialization.cs @@ -0,0 +1,213 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class CommonDataServiceForAppsEntityDataset : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Structure != null) + { + writer.WritePropertyName("structure"); + writer.WriteObjectValue(Structure); + } + if (Schema != null) + { + writer.WritePropertyName("schema"); + writer.WriteObjectValue(Schema); + } + writer.WritePropertyName("linkedServiceName"); + writer.WriteObjectValue(LinkedServiceName); + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Folder != null) + { + writer.WritePropertyName("folder"); + writer.WriteObjectValue(Folder); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + if (EntityName != null) + { + writer.WritePropertyName("entityName"); + writer.WriteObjectValue(EntityName); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static CommonDataServiceForAppsEntityDataset DeserializeCommonDataServiceForAppsEntityDataset(JsonElement element) + { + string type = default; + string description = default; + object structure = default; + object schema = default; + LinkedServiceReference linkedServiceName = default; + IDictionary parameters = default; + IList annotations = default; + DatasetFolder folder = default; + object entityName = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("structure")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + structure = property.Value.GetObject(); + continue; + } + if (property.NameEquals("schema")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + schema = property.Value.GetObject(); + continue; + } + if (property.NameEquals("linkedServiceName")) + { + linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("folder")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + folder = DatasetFolder.DeserializeDatasetFolder(property.Value); + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("entityName")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + entityName = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new CommonDataServiceForAppsEntityDataset(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties, entityName); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CommonDataServiceForAppsEntityDataset.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CommonDataServiceForAppsEntityDataset.cs new file mode 100644 index 000000000000..5870c8f777ee --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CommonDataServiceForAppsEntityDataset.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// The Common Data Service for Apps entity dataset. + public partial class CommonDataServiceForAppsEntityDataset : Dataset + { + /// Initializes a new instance of CommonDataServiceForAppsEntityDataset. + /// Linked service reference. + public CommonDataServiceForAppsEntityDataset(LinkedServiceReference linkedServiceName) : base(linkedServiceName) + { + if (linkedServiceName == null) + { + throw new ArgumentNullException(nameof(linkedServiceName)); + } + + Type = "CommonDataServiceForAppsEntity"; + } + + /// Initializes a new instance of CommonDataServiceForAppsEntityDataset. + /// Type of dataset. + /// Dataset description. + /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. + /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. + /// Linked service reference. + /// Parameters for dataset. + /// List of tags that can be used for describing the Dataset. + /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. + /// . + /// The logical name of the entity. Type: string (or Expression with resultType string). + internal CommonDataServiceForAppsEntityDataset(string type, string description, object structure, object schema, LinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary additionalProperties, object entityName) : base(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) + { + EntityName = entityName; + Type = type ?? "CommonDataServiceForAppsEntity"; + } + + /// The logical name of the entity. Type: string (or Expression with resultType string). + public object EntityName { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CommonDataServiceForAppsLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CommonDataServiceForAppsLinkedService.Serialization.cs new file mode 100644 index 000000000000..87485fee0ce7 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CommonDataServiceForAppsLinkedService.Serialization.cs @@ -0,0 +1,326 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class CommonDataServiceForAppsLinkedService : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (ConnectVia != null) + { + writer.WritePropertyName("connectVia"); + writer.WriteObjectValue(ConnectVia); + } + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + writer.WritePropertyName("deploymentType"); + writer.WriteStringValue(DeploymentType.ToString()); + if (HostName != null) + { + writer.WritePropertyName("hostName"); + writer.WriteObjectValue(HostName); + } + if (Port != null) + { + writer.WritePropertyName("port"); + writer.WriteObjectValue(Port); + } + if (ServiceUri != null) + { + writer.WritePropertyName("serviceUri"); + writer.WriteObjectValue(ServiceUri); + } + if (OrganizationName != null) + { + writer.WritePropertyName("organizationName"); + writer.WriteObjectValue(OrganizationName); + } + writer.WritePropertyName("authenticationType"); + writer.WriteStringValue(AuthenticationType.ToString()); + if (Username != null) + { + writer.WritePropertyName("username"); + writer.WriteObjectValue(Username); + } + if (Password != null) + { + writer.WritePropertyName("password"); + writer.WriteObjectValue(Password); + } + if (ServicePrincipalId != null) + { + writer.WritePropertyName("servicePrincipalId"); + writer.WriteObjectValue(ServicePrincipalId); + } + if (ServicePrincipalCredentialType != null) + { + writer.WritePropertyName("servicePrincipalCredentialType"); + writer.WriteStringValue(ServicePrincipalCredentialType.Value.ToString()); + } + if (ServicePrincipalCredential != null) + { + writer.WritePropertyName("servicePrincipalCredential"); + writer.WriteObjectValue(ServicePrincipalCredential); + } + if (EncryptedCredential != null) + { + writer.WritePropertyName("encryptedCredential"); + writer.WriteObjectValue(EncryptedCredential); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static CommonDataServiceForAppsLinkedService DeserializeCommonDataServiceForAppsLinkedService(JsonElement element) + { + string type = default; + IntegrationRuntimeReference connectVia = default; + string description = default; + IDictionary parameters = default; + IList annotations = default; + DynamicsDeploymentType deploymentType = default; + object hostName = default; + object port = default; + object serviceUri = default; + object organizationName = default; + DynamicsAuthenticationType authenticationType = default; + object username = default; + SecretBase password = default; + object servicePrincipalId = default; + DynamicsServicePrincipalCredentialType? servicePrincipalCredentialType = default; + SecretBase servicePrincipalCredential = default; + object encryptedCredential = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("connectVia")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("deploymentType")) + { + deploymentType = new DynamicsDeploymentType(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("hostName")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + hostName = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("port")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + port = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("serviceUri")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + serviceUri = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("organizationName")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + organizationName = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("authenticationType")) + { + authenticationType = new DynamicsAuthenticationType(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("username")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + username = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("password")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + password = SecretBase.DeserializeSecretBase(property0.Value); + continue; + } + if (property0.NameEquals("servicePrincipalId")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + servicePrincipalId = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("servicePrincipalCredentialType")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + servicePrincipalCredentialType = new DynamicsServicePrincipalCredentialType(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("servicePrincipalCredential")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + servicePrincipalCredential = SecretBase.DeserializeSecretBase(property0.Value); + continue; + } + if (property0.NameEquals("encryptedCredential")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + encryptedCredential = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new CommonDataServiceForAppsLinkedService(type, connectVia, description, parameters, annotations, additionalProperties, deploymentType, hostName, port, serviceUri, organizationName, authenticationType, username, password, servicePrincipalId, servicePrincipalCredentialType, servicePrincipalCredential, encryptedCredential); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CommonDataServiceForAppsLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CommonDataServiceForAppsLinkedService.cs new file mode 100644 index 000000000000..d6b22d6e4d5b --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CommonDataServiceForAppsLinkedService.cs @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Common Data Service for Apps linked service. + public partial class CommonDataServiceForAppsLinkedService : LinkedService + { + /// Initializes a new instance of CommonDataServiceForAppsLinkedService. + /// The deployment type of the Common Data Service for Apps instance. 'Online' for Common Data Service for Apps Online and 'OnPremisesWithIfd' for Common Data Service for Apps on-premises with Ifd. Type: string (or Expression with resultType string). + /// The authentication type to connect to Common Data Service for Apps server. 'Office365' for online scenario, 'Ifd' for on-premises with Ifd scenario. 'AADServicePrincipal' for Server-To-Server authentication in online scenario. Type: string (or Expression with resultType string). + public CommonDataServiceForAppsLinkedService(DynamicsDeploymentType deploymentType, DynamicsAuthenticationType authenticationType) + { + DeploymentType = deploymentType; + AuthenticationType = authenticationType; + Type = "CommonDataServiceForApps"; + } + + /// Initializes a new instance of CommonDataServiceForAppsLinkedService. + /// Type of linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for describing the linked service. + /// . + /// The deployment type of the Common Data Service for Apps instance. 'Online' for Common Data Service for Apps Online and 'OnPremisesWithIfd' for Common Data Service for Apps on-premises with Ifd. Type: string (or Expression with resultType string). + /// The host name of the on-premises Common Data Service for Apps server. The property is required for on-prem and not allowed for online. Type: string (or Expression with resultType string). + /// The port of on-premises Common Data Service for Apps server. The property is required for on-prem and not allowed for online. Default is 443. Type: integer (or Expression with resultType integer), minimum: 0. + /// The URL to the Microsoft Common Data Service for Apps server. The property is required for on-line and not allowed for on-prem. Type: string (or Expression with resultType string). + /// The organization name of the Common Data Service for Apps instance. The property is required for on-prem and required for online when there are more than one Common Data Service for Apps instances associated with the user. Type: string (or Expression with resultType string). + /// The authentication type to connect to Common Data Service for Apps server. 'Office365' for online scenario, 'Ifd' for on-premises with Ifd scenario. 'AADServicePrincipal' for Server-To-Server authentication in online scenario. Type: string (or Expression with resultType string). + /// User name to access the Common Data Service for Apps instance. Type: string (or Expression with resultType string). + /// Password to access the Common Data Service for Apps instance. + /// The client ID of the application in Azure Active Directory used for Server-To-Server authentication. Type: string (or Expression with resultType string). + /// The service principal credential type to use in Server-To-Server authentication. 'ServicePrincipalKey' for key/secret, 'ServicePrincipalCert' for certificate. Type: string (or Expression with resultType string). + /// The credential of the service principal object in Azure Active Directory. If servicePrincipalCredentialType is 'ServicePrincipalKey', servicePrincipalCredential can be SecureString or AzureKeyVaultSecretReference. If servicePrincipalCredentialType is 'ServicePrincipalCert', servicePrincipalCredential can only be AzureKeyVaultSecretReference. + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + internal CommonDataServiceForAppsLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, DynamicsDeploymentType deploymentType, object hostName, object port, object serviceUri, object organizationName, DynamicsAuthenticationType authenticationType, object username, SecretBase password, object servicePrincipalId, DynamicsServicePrincipalCredentialType? servicePrincipalCredentialType, SecretBase servicePrincipalCredential, object encryptedCredential) : base(type, connectVia, description, parameters, annotations, additionalProperties) + { + DeploymentType = deploymentType; + HostName = hostName; + Port = port; + ServiceUri = serviceUri; + OrganizationName = organizationName; + AuthenticationType = authenticationType; + Username = username; + Password = password; + ServicePrincipalId = servicePrincipalId; + ServicePrincipalCredentialType = servicePrincipalCredentialType; + ServicePrincipalCredential = servicePrincipalCredential; + EncryptedCredential = encryptedCredential; + Type = type ?? "CommonDataServiceForApps"; + } + + /// The deployment type of the Common Data Service for Apps instance. 'Online' for Common Data Service for Apps Online and 'OnPremisesWithIfd' for Common Data Service for Apps on-premises with Ifd. Type: string (or Expression with resultType string). + public DynamicsDeploymentType DeploymentType { get; set; } + /// The host name of the on-premises Common Data Service for Apps server. The property is required for on-prem and not allowed for online. Type: string (or Expression with resultType string). + public object HostName { get; set; } + /// The port of on-premises Common Data Service for Apps server. The property is required for on-prem and not allowed for online. Default is 443. Type: integer (or Expression with resultType integer), minimum: 0. + public object Port { get; set; } + /// The URL to the Microsoft Common Data Service for Apps server. The property is required for on-line and not allowed for on-prem. Type: string (or Expression with resultType string). + public object ServiceUri { get; set; } + /// The organization name of the Common Data Service for Apps instance. The property is required for on-prem and required for online when there are more than one Common Data Service for Apps instances associated with the user. Type: string (or Expression with resultType string). + public object OrganizationName { get; set; } + /// The authentication type to connect to Common Data Service for Apps server. 'Office365' for online scenario, 'Ifd' for on-premises with Ifd scenario. 'AADServicePrincipal' for Server-To-Server authentication in online scenario. Type: string (or Expression with resultType string). + public DynamicsAuthenticationType AuthenticationType { get; set; } + /// User name to access the Common Data Service for Apps instance. Type: string (or Expression with resultType string). + public object Username { get; set; } + /// Password to access the Common Data Service for Apps instance. + public SecretBase Password { get; set; } + /// The client ID of the application in Azure Active Directory used for Server-To-Server authentication. Type: string (or Expression with resultType string). + public object ServicePrincipalId { get; set; } + /// The service principal credential type to use in Server-To-Server authentication. 'ServicePrincipalKey' for key/secret, 'ServicePrincipalCert' for certificate. Type: string (or Expression with resultType string). + public DynamicsServicePrincipalCredentialType? ServicePrincipalCredentialType { get; set; } + /// The credential of the service principal object in Azure Active Directory. If servicePrincipalCredentialType is 'ServicePrincipalKey', servicePrincipalCredential can be SecureString or AzureKeyVaultSecretReference. If servicePrincipalCredentialType is 'ServicePrincipalCert', servicePrincipalCredential can only be AzureKeyVaultSecretReference. + public SecretBase ServicePrincipalCredential { get; set; } + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + public object EncryptedCredential { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ConcurLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ConcurLinkedService.Serialization.cs new file mode 100644 index 000000000000..c4596de619c1 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ConcurLinkedService.Serialization.cs @@ -0,0 +1,251 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class ConcurLinkedService : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (ConnectVia != null) + { + writer.WritePropertyName("connectVia"); + writer.WriteObjectValue(ConnectVia); + } + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + writer.WritePropertyName("clientId"); + writer.WriteObjectValue(ClientId); + writer.WritePropertyName("username"); + writer.WriteObjectValue(Username); + if (Password != null) + { + writer.WritePropertyName("password"); + writer.WriteObjectValue(Password); + } + if (UseEncryptedEndpoints != null) + { + writer.WritePropertyName("useEncryptedEndpoints"); + writer.WriteObjectValue(UseEncryptedEndpoints); + } + if (UseHostVerification != null) + { + writer.WritePropertyName("useHostVerification"); + writer.WriteObjectValue(UseHostVerification); + } + if (UsePeerVerification != null) + { + writer.WritePropertyName("usePeerVerification"); + writer.WriteObjectValue(UsePeerVerification); + } + if (EncryptedCredential != null) + { + writer.WritePropertyName("encryptedCredential"); + writer.WriteObjectValue(EncryptedCredential); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static ConcurLinkedService DeserializeConcurLinkedService(JsonElement element) + { + string type = default; + IntegrationRuntimeReference connectVia = default; + string description = default; + IDictionary parameters = default; + IList annotations = default; + object clientId = default; + object username = default; + SecretBase password = default; + object useEncryptedEndpoints = default; + object useHostVerification = default; + object usePeerVerification = default; + object encryptedCredential = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("connectVia")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("clientId")) + { + clientId = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("username")) + { + username = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("password")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + password = SecretBase.DeserializeSecretBase(property0.Value); + continue; + } + if (property0.NameEquals("useEncryptedEndpoints")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + useEncryptedEndpoints = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("useHostVerification")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + useHostVerification = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("usePeerVerification")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + usePeerVerification = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("encryptedCredential")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + encryptedCredential = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new ConcurLinkedService(type, connectVia, description, parameters, annotations, additionalProperties, clientId, username, password, useEncryptedEndpoints, useHostVerification, usePeerVerification, encryptedCredential); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ConcurLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ConcurLinkedService.cs new file mode 100644 index 000000000000..939f85b2921a --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ConcurLinkedService.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Concur Service linked service. + public partial class ConcurLinkedService : LinkedService + { + /// Initializes a new instance of ConcurLinkedService. + /// Application client_id supplied by Concur App Management. + /// The user name that you use to access Concur Service. + public ConcurLinkedService(object clientId, object username) + { + if (clientId == null) + { + throw new ArgumentNullException(nameof(clientId)); + } + if (username == null) + { + throw new ArgumentNullException(nameof(username)); + } + + ClientId = clientId; + Username = username; + Type = "Concur"; + } + + /// Initializes a new instance of ConcurLinkedService. + /// Type of linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for describing the linked service. + /// . + /// Application client_id supplied by Concur App Management. + /// The user name that you use to access Concur Service. + /// The password corresponding to the user name that you provided in the username field. + /// Specifies whether the data source endpoints are encrypted using HTTPS. The default value is true. + /// Specifies whether to require the host name in the server's certificate to match the host name of the server when connecting over SSL. The default value is true. + /// Specifies whether to verify the identity of the server when connecting over SSL. The default value is true. + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + internal ConcurLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object clientId, object username, SecretBase password, object useEncryptedEndpoints, object useHostVerification, object usePeerVerification, object encryptedCredential) : base(type, connectVia, description, parameters, annotations, additionalProperties) + { + ClientId = clientId; + Username = username; + Password = password; + UseEncryptedEndpoints = useEncryptedEndpoints; + UseHostVerification = useHostVerification; + UsePeerVerification = usePeerVerification; + EncryptedCredential = encryptedCredential; + Type = type ?? "Concur"; + } + + /// Application client_id supplied by Concur App Management. + public object ClientId { get; set; } + /// The user name that you use to access Concur Service. + public object Username { get; set; } + /// The password corresponding to the user name that you provided in the username field. + public SecretBase Password { get; set; } + /// Specifies whether the data source endpoints are encrypted using HTTPS. The default value is true. + public object UseEncryptedEndpoints { get; set; } + /// Specifies whether to require the host name in the server's certificate to match the host name of the server when connecting over SSL. The default value is true. + public object UseHostVerification { get; set; } + /// Specifies whether to verify the identity of the server when connecting over SSL. The default value is true. + public object UsePeerVerification { get; set; } + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + public object EncryptedCredential { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ConcurObjectDataset.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ConcurObjectDataset.Serialization.cs new file mode 100644 index 000000000000..579ffd0de1b1 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ConcurObjectDataset.Serialization.cs @@ -0,0 +1,213 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class ConcurObjectDataset : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Structure != null) + { + writer.WritePropertyName("structure"); + writer.WriteObjectValue(Structure); + } + if (Schema != null) + { + writer.WritePropertyName("schema"); + writer.WriteObjectValue(Schema); + } + writer.WritePropertyName("linkedServiceName"); + writer.WriteObjectValue(LinkedServiceName); + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Folder != null) + { + writer.WritePropertyName("folder"); + writer.WriteObjectValue(Folder); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + if (TableName != null) + { + writer.WritePropertyName("tableName"); + writer.WriteObjectValue(TableName); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static ConcurObjectDataset DeserializeConcurObjectDataset(JsonElement element) + { + string type = default; + string description = default; + object structure = default; + object schema = default; + LinkedServiceReference linkedServiceName = default; + IDictionary parameters = default; + IList annotations = default; + DatasetFolder folder = default; + object tableName = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("structure")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + structure = property.Value.GetObject(); + continue; + } + if (property.NameEquals("schema")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + schema = property.Value.GetObject(); + continue; + } + if (property.NameEquals("linkedServiceName")) + { + linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("folder")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + folder = DatasetFolder.DeserializeDatasetFolder(property.Value); + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("tableName")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + tableName = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new ConcurObjectDataset(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties, tableName); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ConcurObjectDataset.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ConcurObjectDataset.cs new file mode 100644 index 000000000000..379807e50b46 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ConcurObjectDataset.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Concur Service dataset. + public partial class ConcurObjectDataset : Dataset + { + /// Initializes a new instance of ConcurObjectDataset. + /// Linked service reference. + public ConcurObjectDataset(LinkedServiceReference linkedServiceName) : base(linkedServiceName) + { + if (linkedServiceName == null) + { + throw new ArgumentNullException(nameof(linkedServiceName)); + } + + Type = "ConcurObject"; + } + + /// Initializes a new instance of ConcurObjectDataset. + /// Type of dataset. + /// Dataset description. + /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. + /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. + /// Linked service reference. + /// Parameters for dataset. + /// List of tags that can be used for describing the Dataset. + /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. + /// . + /// The table name. Type: string (or Expression with resultType string). + internal ConcurObjectDataset(string type, string description, object structure, object schema, LinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary additionalProperties, object tableName) : base(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) + { + TableName = tableName; + Type = type ?? "ConcurObject"; + } + + /// The table name. Type: string (or Expression with resultType string). + public object TableName { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ControlActivity.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ControlActivity.Serialization.cs new file mode 100644 index 000000000000..08d3837e1224 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ControlActivity.Serialization.cs @@ -0,0 +1,142 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class ControlActivity : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("name"); + writer.WriteStringValue(Name); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (DependsOn != null) + { + writer.WritePropertyName("dependsOn"); + writer.WriteStartArray(); + foreach (var item in DependsOn) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (UserProperties != null) + { + writer.WritePropertyName("userProperties"); + writer.WriteStartArray(); + foreach (var item in UserProperties) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static ControlActivity DeserializeControlActivity(JsonElement element) + { + string name = default; + string type = default; + string description = default; + IList dependsOn = default; + IList userProperties = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("dependsOn")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(ActivityDependency.DeserializeActivityDependency(item)); + } + } + dependsOn = array; + continue; + } + if (property.NameEquals("userProperties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(UserProperty.DeserializeUserProperty(item)); + } + } + userProperties = array; + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new ControlActivity(name, type, description, dependsOn, userProperties, additionalProperties); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ControlActivity.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ControlActivity.cs new file mode 100644 index 000000000000..f500e8dfc81b --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ControlActivity.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Base class for all control activities like IfCondition, ForEach , Until. + public partial class ControlActivity : Activity + { + /// Initializes a new instance of ControlActivity. + /// Activity name. + public ControlActivity(string name) : base(name) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + + Type = "Container"; + } + + /// Initializes a new instance of ControlActivity. + /// Activity name. + /// Type of activity. + /// Activity description. + /// Activity depends on condition. + /// Activity user properties. + /// . + internal ControlActivity(string name, string type, string description, IList dependsOn, IList userProperties, IDictionary additionalProperties) : base(name, type, description, dependsOn, userProperties, additionalProperties) + { + Type = type ?? "Container"; + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CopyActivity.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CopyActivity.Serialization.cs new file mode 100644 index 000000000000..b6af382d9e44 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CopyActivity.Serialization.cs @@ -0,0 +1,431 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class CopyActivity : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Inputs != null) + { + writer.WritePropertyName("inputs"); + writer.WriteStartArray(); + foreach (var item in Inputs) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Outputs != null) + { + writer.WritePropertyName("outputs"); + writer.WriteStartArray(); + foreach (var item in Outputs) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (LinkedServiceName != null) + { + writer.WritePropertyName("linkedServiceName"); + writer.WriteObjectValue(LinkedServiceName); + } + if (Policy != null) + { + writer.WritePropertyName("policy"); + writer.WriteObjectValue(Policy); + } + writer.WritePropertyName("name"); + writer.WriteStringValue(Name); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (DependsOn != null) + { + writer.WritePropertyName("dependsOn"); + writer.WriteStartArray(); + foreach (var item in DependsOn) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (UserProperties != null) + { + writer.WritePropertyName("userProperties"); + writer.WriteStartArray(); + foreach (var item in UserProperties) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + writer.WritePropertyName("source"); + writer.WriteObjectValue(Source); + writer.WritePropertyName("sink"); + writer.WriteObjectValue(Sink); + if (Translator != null) + { + writer.WritePropertyName("translator"); + writer.WriteObjectValue(Translator); + } + if (EnableStaging != null) + { + writer.WritePropertyName("enableStaging"); + writer.WriteObjectValue(EnableStaging); + } + if (StagingSettings != null) + { + writer.WritePropertyName("stagingSettings"); + writer.WriteObjectValue(StagingSettings); + } + if (ParallelCopies != null) + { + writer.WritePropertyName("parallelCopies"); + writer.WriteObjectValue(ParallelCopies); + } + if (DataIntegrationUnits != null) + { + writer.WritePropertyName("dataIntegrationUnits"); + writer.WriteObjectValue(DataIntegrationUnits); + } + if (EnableSkipIncompatibleRow != null) + { + writer.WritePropertyName("enableSkipIncompatibleRow"); + writer.WriteObjectValue(EnableSkipIncompatibleRow); + } + if (RedirectIncompatibleRowSettings != null) + { + writer.WritePropertyName("redirectIncompatibleRowSettings"); + writer.WriteObjectValue(RedirectIncompatibleRowSettings); + } + if (PreserveRules != null) + { + writer.WritePropertyName("preserveRules"); + writer.WriteStartArray(); + foreach (var item in PreserveRules) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Preserve != null) + { + writer.WritePropertyName("preserve"); + writer.WriteStartArray(); + foreach (var item in Preserve) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static CopyActivity DeserializeCopyActivity(JsonElement element) + { + IList inputs = default; + IList outputs = default; + LinkedServiceReference linkedServiceName = default; + ActivityPolicy policy = default; + string name = default; + string type = default; + string description = default; + IList dependsOn = default; + IList userProperties = default; + CopySource source = default; + CopySink sink = default; + object translator = default; + object enableStaging = default; + StagingSettings stagingSettings = default; + object parallelCopies = default; + object dataIntegrationUnits = default; + object enableSkipIncompatibleRow = default; + RedirectIncompatibleRowSettings redirectIncompatibleRowSettings = default; + IList preserveRules = default; + IList preserve = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("inputs")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(DatasetReference.DeserializeDatasetReference(item)); + } + } + inputs = array; + continue; + } + if (property.NameEquals("outputs")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(DatasetReference.DeserializeDatasetReference(item)); + } + } + outputs = array; + continue; + } + if (property.NameEquals("linkedServiceName")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value); + continue; + } + if (property.NameEquals("policy")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + policy = ActivityPolicy.DeserializeActivityPolicy(property.Value); + continue; + } + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("dependsOn")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(ActivityDependency.DeserializeActivityDependency(item)); + } + } + dependsOn = array; + continue; + } + if (property.NameEquals("userProperties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(UserProperty.DeserializeUserProperty(item)); + } + } + userProperties = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("source")) + { + source = CopySource.DeserializeCopySource(property0.Value); + continue; + } + if (property0.NameEquals("sink")) + { + sink = CopySink.DeserializeCopySink(property0.Value); + continue; + } + if (property0.NameEquals("translator")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + translator = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("enableStaging")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + enableStaging = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("stagingSettings")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + stagingSettings = StagingSettings.DeserializeStagingSettings(property0.Value); + continue; + } + if (property0.NameEquals("parallelCopies")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + parallelCopies = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("dataIntegrationUnits")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dataIntegrationUnits = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("enableSkipIncompatibleRow")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + enableSkipIncompatibleRow = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("redirectIncompatibleRowSettings")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + redirectIncompatibleRowSettings = RedirectIncompatibleRowSettings.DeserializeRedirectIncompatibleRowSettings(property0.Value); + continue; + } + if (property0.NameEquals("preserveRules")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + preserveRules = array; + continue; + } + if (property0.NameEquals("preserve")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + preserve = array; + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new CopyActivity(name, type, description, dependsOn, userProperties, additionalProperties, linkedServiceName, policy, inputs, outputs, source, sink, translator, enableStaging, stagingSettings, parallelCopies, dataIntegrationUnits, enableSkipIncompatibleRow, redirectIncompatibleRowSettings, preserveRules, preserve); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CopyActivity.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CopyActivity.cs new file mode 100644 index 000000000000..5c099f7e470d --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CopyActivity.cs @@ -0,0 +1,107 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Copy activity. + public partial class CopyActivity : ExecutionActivity + { + /// Initializes a new instance of CopyActivity. + /// Activity name. + /// Copy activity source. + /// Copy activity sink. + public CopyActivity(string name, CopySource source, CopySink sink) : base(name) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (source == null) + { + throw new ArgumentNullException(nameof(source)); + } + if (sink == null) + { + throw new ArgumentNullException(nameof(sink)); + } + + Source = source; + Sink = sink; + Type = "Copy"; + } + + /// Initializes a new instance of CopyActivity. + /// Activity name. + /// Type of activity. + /// Activity description. + /// Activity depends on condition. + /// Activity user properties. + /// . + /// Linked service reference. + /// Activity policy. + /// List of inputs for the activity. + /// List of outputs for the activity. + /// Copy activity source. + /// Copy activity sink. + /// Copy activity translator. If not specified, tabular translator is used. + /// Specifies whether to copy data via an interim staging. Default value is false. Type: boolean (or Expression with resultType boolean). + /// Specifies interim staging settings when EnableStaging is true. + /// Maximum number of concurrent sessions opened on the source or sink to avoid overloading the data store. Type: integer (or Expression with resultType integer), minimum: 0. + /// Maximum number of data integration units that can be used to perform this data movement. Type: integer (or Expression with resultType integer), minimum: 0. + /// Whether to skip incompatible row. Default value is false. Type: boolean (or Expression with resultType boolean). + /// Redirect incompatible row settings when EnableSkipIncompatibleRow is true. + /// Preserve Rules. + /// Preserve rules. + internal CopyActivity(string name, string type, string description, IList dependsOn, IList userProperties, IDictionary additionalProperties, LinkedServiceReference linkedServiceName, ActivityPolicy policy, IList inputs, IList outputs, CopySource source, CopySink sink, object translator, object enableStaging, StagingSettings stagingSettings, object parallelCopies, object dataIntegrationUnits, object enableSkipIncompatibleRow, RedirectIncompatibleRowSettings redirectIncompatibleRowSettings, IList preserveRules, IList preserve) : base(name, type, description, dependsOn, userProperties, additionalProperties, linkedServiceName, policy) + { + Inputs = inputs; + Outputs = outputs; + Source = source; + Sink = sink; + Translator = translator; + EnableStaging = enableStaging; + StagingSettings = stagingSettings; + ParallelCopies = parallelCopies; + DataIntegrationUnits = dataIntegrationUnits; + EnableSkipIncompatibleRow = enableSkipIncompatibleRow; + RedirectIncompatibleRowSettings = redirectIncompatibleRowSettings; + PreserveRules = preserveRules; + Preserve = preserve; + Type = type ?? "Copy"; + } + + /// List of inputs for the activity. + public IList Inputs { get; set; } + /// List of outputs for the activity. + public IList Outputs { get; set; } + /// Copy activity source. + public CopySource Source { get; set; } + /// Copy activity sink. + public CopySink Sink { get; set; } + /// Copy activity translator. If not specified, tabular translator is used. + public object Translator { get; set; } + /// Specifies whether to copy data via an interim staging. Default value is false. Type: boolean (or Expression with resultType boolean). + public object EnableStaging { get; set; } + /// Specifies interim staging settings when EnableStaging is true. + public StagingSettings StagingSettings { get; set; } + /// Maximum number of concurrent sessions opened on the source or sink to avoid overloading the data store. Type: integer (or Expression with resultType integer), minimum: 0. + public object ParallelCopies { get; set; } + /// Maximum number of data integration units that can be used to perform this data movement. Type: integer (or Expression with resultType integer), minimum: 0. + public object DataIntegrationUnits { get; set; } + /// Whether to skip incompatible row. Default value is false. Type: boolean (or Expression with resultType boolean). + public object EnableSkipIncompatibleRow { get; set; } + /// Redirect incompatible row settings when EnableSkipIncompatibleRow is true. + public RedirectIncompatibleRowSettings RedirectIncompatibleRowSettings { get; set; } + /// Preserve Rules. + public IList PreserveRules { get; set; } + /// Preserve rules. + public IList Preserve { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CopySink.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CopySink.Serialization.cs new file mode 100644 index 000000000000..cb6eceb68917 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CopySink.Serialization.cs @@ -0,0 +1,130 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class CopySink : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (WriteBatchSize != null) + { + writer.WritePropertyName("writeBatchSize"); + writer.WriteObjectValue(WriteBatchSize); + } + if (WriteBatchTimeout != null) + { + writer.WritePropertyName("writeBatchTimeout"); + writer.WriteObjectValue(WriteBatchTimeout); + } + if (SinkRetryCount != null) + { + writer.WritePropertyName("sinkRetryCount"); + writer.WriteObjectValue(SinkRetryCount); + } + if (SinkRetryWait != null) + { + writer.WritePropertyName("sinkRetryWait"); + writer.WriteObjectValue(SinkRetryWait); + } + if (MaxConcurrentConnections != null) + { + writer.WritePropertyName("maxConcurrentConnections"); + writer.WriteObjectValue(MaxConcurrentConnections); + } + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static CopySink DeserializeCopySink(JsonElement element) + { + string type = default; + object writeBatchSize = default; + object writeBatchTimeout = default; + object sinkRetryCount = default; + object sinkRetryWait = default; + object maxConcurrentConnections = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("writeBatchSize")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + writeBatchSize = property.Value.GetObject(); + continue; + } + if (property.NameEquals("writeBatchTimeout")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + writeBatchTimeout = property.Value.GetObject(); + continue; + } + if (property.NameEquals("sinkRetryCount")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sinkRetryCount = property.Value.GetObject(); + continue; + } + if (property.NameEquals("sinkRetryWait")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sinkRetryWait = property.Value.GetObject(); + continue; + } + if (property.NameEquals("maxConcurrentConnections")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + maxConcurrentConnections = property.Value.GetObject(); + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new CopySink(type, writeBatchSize, writeBatchTimeout, sinkRetryCount, sinkRetryWait, maxConcurrentConnections, additionalProperties); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CopySink.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CopySink.cs new file mode 100644 index 000000000000..22954411dfe6 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CopySink.cs @@ -0,0 +1,92 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// A copy activity sink. + public partial class CopySink : IDictionary + { + /// Initializes a new instance of CopySink. + public CopySink() + { + AdditionalProperties = new Dictionary(); + Type = "CopySink"; + } + + /// Initializes a new instance of CopySink. + /// Copy sink type. + /// Write batch size. Type: integer (or Expression with resultType integer), minimum: 0. + /// Write batch timeout. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Sink retry count. Type: integer (or Expression with resultType integer). + /// Sink retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent connection count for the sink data store. Type: integer (or Expression with resultType integer). + /// . + internal CopySink(string type, object writeBatchSize, object writeBatchTimeout, object sinkRetryCount, object sinkRetryWait, object maxConcurrentConnections, IDictionary additionalProperties) + { + Type = type ?? "CopySink"; + WriteBatchSize = writeBatchSize; + WriteBatchTimeout = writeBatchTimeout; + SinkRetryCount = sinkRetryCount; + SinkRetryWait = sinkRetryWait; + MaxConcurrentConnections = maxConcurrentConnections; + AdditionalProperties = additionalProperties ?? new Dictionary(); + } + + /// Copy sink type. + internal string Type { get; set; } + /// Write batch size. Type: integer (or Expression with resultType integer), minimum: 0. + public object WriteBatchSize { get; set; } + /// Write batch timeout. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + public object WriteBatchTimeout { get; set; } + /// Sink retry count. Type: integer (or Expression with resultType integer). + public object SinkRetryCount { get; set; } + /// Sink retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + public object SinkRetryWait { get; set; } + /// The maximum concurrent connection count for the sink data store. Type: integer (or Expression with resultType integer). + public object MaxConcurrentConnections { get; set; } + internal IDictionary AdditionalProperties { get; } + /// + public IEnumerator> GetEnumerator() => AdditionalProperties.GetEnumerator(); + /// + IEnumerator IEnumerable.GetEnumerator() => AdditionalProperties.GetEnumerator(); + /// + public bool TryGetValue(string key, out object value) => AdditionalProperties.TryGetValue(key, out value); + /// + public bool ContainsKey(string key) => AdditionalProperties.ContainsKey(key); + /// + public ICollection Keys => AdditionalProperties.Keys; + /// + public ICollection Values => AdditionalProperties.Values; + /// + int ICollection>.Count => AdditionalProperties.Count; + /// + public void Add(string key, object value) => AdditionalProperties.Add(key, value); + /// + public bool Remove(string key) => AdditionalProperties.Remove(key); + /// + bool ICollection>.IsReadOnly => AdditionalProperties.IsReadOnly; + /// + void ICollection>.Add(KeyValuePair value) => AdditionalProperties.Add(value); + /// + bool ICollection>.Remove(KeyValuePair value) => AdditionalProperties.Remove(value); + /// + bool ICollection>.Contains(KeyValuePair value) => AdditionalProperties.Contains(value); + /// + void ICollection>.CopyTo(KeyValuePair[] destination, int offset) => AdditionalProperties.CopyTo(destination, offset); + /// + void ICollection>.Clear() => AdditionalProperties.Clear(); + /// + public object this[string key] + { + get => AdditionalProperties[key]; + set => AdditionalProperties[key] = value; + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CopySource.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CopySource.Serialization.cs new file mode 100644 index 000000000000..12cac2fed30e --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CopySource.Serialization.cs @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class CopySource : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (SourceRetryCount != null) + { + writer.WritePropertyName("sourceRetryCount"); + writer.WriteObjectValue(SourceRetryCount); + } + if (SourceRetryWait != null) + { + writer.WritePropertyName("sourceRetryWait"); + writer.WriteObjectValue(SourceRetryWait); + } + if (MaxConcurrentConnections != null) + { + writer.WritePropertyName("maxConcurrentConnections"); + writer.WriteObjectValue(MaxConcurrentConnections); + } + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static CopySource DeserializeCopySource(JsonElement element) + { + string type = default; + object sourceRetryCount = default; + object sourceRetryWait = default; + object maxConcurrentConnections = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("sourceRetryCount")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sourceRetryCount = property.Value.GetObject(); + continue; + } + if (property.NameEquals("sourceRetryWait")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sourceRetryWait = property.Value.GetObject(); + continue; + } + if (property.NameEquals("maxConcurrentConnections")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + maxConcurrentConnections = property.Value.GetObject(); + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new CopySource(type, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, additionalProperties); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CopySource.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CopySource.cs new file mode 100644 index 000000000000..f2def063767e --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CopySource.cs @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// A copy activity source. + public partial class CopySource : IDictionary + { + /// Initializes a new instance of CopySource. + public CopySource() + { + AdditionalProperties = new Dictionary(); + Type = "CopySource"; + } + + /// Initializes a new instance of CopySource. + /// Copy source type. + /// Source retry count. Type: integer (or Expression with resultType integer). + /// Source retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). + /// . + internal CopySource(string type, object sourceRetryCount, object sourceRetryWait, object maxConcurrentConnections, IDictionary additionalProperties) + { + Type = type ?? "CopySource"; + SourceRetryCount = sourceRetryCount; + SourceRetryWait = sourceRetryWait; + MaxConcurrentConnections = maxConcurrentConnections; + AdditionalProperties = additionalProperties ?? new Dictionary(); + } + + /// Copy source type. + internal string Type { get; set; } + /// Source retry count. Type: integer (or Expression with resultType integer). + public object SourceRetryCount { get; set; } + /// Source retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + public object SourceRetryWait { get; set; } + /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). + public object MaxConcurrentConnections { get; set; } + internal IDictionary AdditionalProperties { get; } + /// + public IEnumerator> GetEnumerator() => AdditionalProperties.GetEnumerator(); + /// + IEnumerator IEnumerable.GetEnumerator() => AdditionalProperties.GetEnumerator(); + /// + public bool TryGetValue(string key, out object value) => AdditionalProperties.TryGetValue(key, out value); + /// + public bool ContainsKey(string key) => AdditionalProperties.ContainsKey(key); + /// + public ICollection Keys => AdditionalProperties.Keys; + /// + public ICollection Values => AdditionalProperties.Values; + /// + int ICollection>.Count => AdditionalProperties.Count; + /// + public void Add(string key, object value) => AdditionalProperties.Add(key, value); + /// + public bool Remove(string key) => AdditionalProperties.Remove(key); + /// + bool ICollection>.IsReadOnly => AdditionalProperties.IsReadOnly; + /// + void ICollection>.Add(KeyValuePair value) => AdditionalProperties.Add(value); + /// + bool ICollection>.Remove(KeyValuePair value) => AdditionalProperties.Remove(value); + /// + bool ICollection>.Contains(KeyValuePair value) => AdditionalProperties.Contains(value); + /// + void ICollection>.CopyTo(KeyValuePair[] destination, int offset) => AdditionalProperties.CopyTo(destination, offset); + /// + void ICollection>.Clear() => AdditionalProperties.Clear(); + /// + public object this[string key] + { + get => AdditionalProperties[key]; + set => AdditionalProperties[key] = value; + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CosmosDbLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CosmosDbLinkedService.Serialization.cs new file mode 100644 index 000000000000..306fb163b906 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CosmosDbLinkedService.Serialization.cs @@ -0,0 +1,235 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class CosmosDbLinkedService : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (ConnectVia != null) + { + writer.WritePropertyName("connectVia"); + writer.WriteObjectValue(ConnectVia); + } + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + if (ConnectionString != null) + { + writer.WritePropertyName("connectionString"); + writer.WriteObjectValue(ConnectionString); + } + if (AccountEndpoint != null) + { + writer.WritePropertyName("accountEndpoint"); + writer.WriteObjectValue(AccountEndpoint); + } + if (Database != null) + { + writer.WritePropertyName("database"); + writer.WriteObjectValue(Database); + } + if (AccountKey != null) + { + writer.WritePropertyName("accountKey"); + writer.WriteObjectValue(AccountKey); + } + if (EncryptedCredential != null) + { + writer.WritePropertyName("encryptedCredential"); + writer.WriteObjectValue(EncryptedCredential); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static CosmosDbLinkedService DeserializeCosmosDbLinkedService(JsonElement element) + { + string type = default; + IntegrationRuntimeReference connectVia = default; + string description = default; + IDictionary parameters = default; + IList annotations = default; + object connectionString = default; + object accountEndpoint = default; + object database = default; + SecretBase accountKey = default; + object encryptedCredential = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("connectVia")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("connectionString")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectionString = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("accountEndpoint")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + accountEndpoint = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("database")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + database = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("accountKey")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + accountKey = SecretBase.DeserializeSecretBase(property0.Value); + continue; + } + if (property0.NameEquals("encryptedCredential")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + encryptedCredential = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new CosmosDbLinkedService(type, connectVia, description, parameters, annotations, additionalProperties, connectionString, accountEndpoint, database, accountKey, encryptedCredential); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CosmosDbLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CosmosDbLinkedService.cs new file mode 100644 index 000000000000..f8df2752ab91 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CosmosDbLinkedService.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Microsoft Azure Cosmos Database (CosmosDB) linked service. + public partial class CosmosDbLinkedService : LinkedService + { + /// Initializes a new instance of CosmosDbLinkedService. + public CosmosDbLinkedService() + { + Type = "CosmosDb"; + } + + /// Initializes a new instance of CosmosDbLinkedService. + /// Type of linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for describing the linked service. + /// . + /// The connection string. Type: string, SecureString or AzureKeyVaultSecretReference. + /// The endpoint of the Azure CosmosDB account. Type: string (or Expression with resultType string). + /// The name of the database. Type: string (or Expression with resultType string). + /// The account key of the Azure CosmosDB account. Type: SecureString or AzureKeyVaultSecretReference. + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + internal CosmosDbLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object connectionString, object accountEndpoint, object database, SecretBase accountKey, object encryptedCredential) : base(type, connectVia, description, parameters, annotations, additionalProperties) + { + ConnectionString = connectionString; + AccountEndpoint = accountEndpoint; + Database = database; + AccountKey = accountKey; + EncryptedCredential = encryptedCredential; + Type = type ?? "CosmosDb"; + } + + /// The connection string. Type: string, SecureString or AzureKeyVaultSecretReference. + public object ConnectionString { get; set; } + /// The endpoint of the Azure CosmosDB account. Type: string (or Expression with resultType string). + public object AccountEndpoint { get; set; } + /// The name of the database. Type: string (or Expression with resultType string). + public object Database { get; set; } + /// The account key of the Azure CosmosDB account. Type: SecureString or AzureKeyVaultSecretReference. + public SecretBase AccountKey { get; set; } + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + public object EncryptedCredential { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CosmosDbMongoDbApiCollectionDataset.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CosmosDbMongoDbApiCollectionDataset.Serialization.cs new file mode 100644 index 000000000000..540da7fd99eb --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CosmosDbMongoDbApiCollectionDataset.Serialization.cs @@ -0,0 +1,206 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class CosmosDbMongoDbApiCollectionDataset : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Structure != null) + { + writer.WritePropertyName("structure"); + writer.WriteObjectValue(Structure); + } + if (Schema != null) + { + writer.WritePropertyName("schema"); + writer.WriteObjectValue(Schema); + } + writer.WritePropertyName("linkedServiceName"); + writer.WriteObjectValue(LinkedServiceName); + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Folder != null) + { + writer.WritePropertyName("folder"); + writer.WriteObjectValue(Folder); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + writer.WritePropertyName("collection"); + writer.WriteObjectValue(Collection); + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static CosmosDbMongoDbApiCollectionDataset DeserializeCosmosDbMongoDbApiCollectionDataset(JsonElement element) + { + string type = default; + string description = default; + object structure = default; + object schema = default; + LinkedServiceReference linkedServiceName = default; + IDictionary parameters = default; + IList annotations = default; + DatasetFolder folder = default; + object collection = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("structure")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + structure = property.Value.GetObject(); + continue; + } + if (property.NameEquals("schema")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + schema = property.Value.GetObject(); + continue; + } + if (property.NameEquals("linkedServiceName")) + { + linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("folder")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + folder = DatasetFolder.DeserializeDatasetFolder(property.Value); + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("collection")) + { + collection = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new CosmosDbMongoDbApiCollectionDataset(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties, collection); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CosmosDbMongoDbApiCollectionDataset.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CosmosDbMongoDbApiCollectionDataset.cs new file mode 100644 index 000000000000..46e6c46635ff --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CosmosDbMongoDbApiCollectionDataset.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// The CosmosDB (MongoDB API) database dataset. + public partial class CosmosDbMongoDbApiCollectionDataset : Dataset + { + /// Initializes a new instance of CosmosDbMongoDbApiCollectionDataset. + /// Linked service reference. + /// The collection name of the CosmosDB (MongoDB API) database. Type: string (or Expression with resultType string). + public CosmosDbMongoDbApiCollectionDataset(LinkedServiceReference linkedServiceName, object collection) : base(linkedServiceName) + { + if (linkedServiceName == null) + { + throw new ArgumentNullException(nameof(linkedServiceName)); + } + if (collection == null) + { + throw new ArgumentNullException(nameof(collection)); + } + + Collection = collection; + Type = "CosmosDbMongoDbApiCollection"; + } + + /// Initializes a new instance of CosmosDbMongoDbApiCollectionDataset. + /// Type of dataset. + /// Dataset description. + /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. + /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. + /// Linked service reference. + /// Parameters for dataset. + /// List of tags that can be used for describing the Dataset. + /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. + /// . + /// The collection name of the CosmosDB (MongoDB API) database. Type: string (or Expression with resultType string). + internal CosmosDbMongoDbApiCollectionDataset(string type, string description, object structure, object schema, LinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary additionalProperties, object collection) : base(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) + { + Collection = collection; + Type = type ?? "CosmosDbMongoDbApiCollection"; + } + + /// The collection name of the CosmosDB (MongoDB API) database. Type: string (or Expression with resultType string). + public object Collection { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CosmosDbMongoDbApiLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CosmosDbMongoDbApiLinkedService.Serialization.cs new file mode 100644 index 000000000000..9629218bd948 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CosmosDbMongoDbApiLinkedService.Serialization.cs @@ -0,0 +1,176 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class CosmosDbMongoDbApiLinkedService : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (ConnectVia != null) + { + writer.WritePropertyName("connectVia"); + writer.WriteObjectValue(ConnectVia); + } + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + writer.WritePropertyName("connectionString"); + writer.WriteObjectValue(ConnectionString); + writer.WritePropertyName("database"); + writer.WriteObjectValue(Database); + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static CosmosDbMongoDbApiLinkedService DeserializeCosmosDbMongoDbApiLinkedService(JsonElement element) + { + string type = default; + IntegrationRuntimeReference connectVia = default; + string description = default; + IDictionary parameters = default; + IList annotations = default; + object connectionString = default; + object database = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("connectVia")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("connectionString")) + { + connectionString = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("database")) + { + database = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new CosmosDbMongoDbApiLinkedService(type, connectVia, description, parameters, annotations, additionalProperties, connectionString, database); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CosmosDbMongoDbApiLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CosmosDbMongoDbApiLinkedService.cs new file mode 100644 index 000000000000..675aff3b33a6 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CosmosDbMongoDbApiLinkedService.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Linked service for CosmosDB (MongoDB API) data source. + public partial class CosmosDbMongoDbApiLinkedService : LinkedService + { + /// Initializes a new instance of CosmosDbMongoDbApiLinkedService. + /// The CosmosDB (MongoDB API) connection string. Type: string, SecureString or AzureKeyVaultSecretReference. Type: string, SecureString or AzureKeyVaultSecretReference. + /// The name of the CosmosDB (MongoDB API) database that you want to access. Type: string (or Expression with resultType string). + public CosmosDbMongoDbApiLinkedService(object connectionString, object database) + { + if (connectionString == null) + { + throw new ArgumentNullException(nameof(connectionString)); + } + if (database == null) + { + throw new ArgumentNullException(nameof(database)); + } + + ConnectionString = connectionString; + Database = database; + Type = "CosmosDbMongoDbApi"; + } + + /// Initializes a new instance of CosmosDbMongoDbApiLinkedService. + /// Type of linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for describing the linked service. + /// . + /// The CosmosDB (MongoDB API) connection string. Type: string, SecureString or AzureKeyVaultSecretReference. Type: string, SecureString or AzureKeyVaultSecretReference. + /// The name of the CosmosDB (MongoDB API) database that you want to access. Type: string (or Expression with resultType string). + internal CosmosDbMongoDbApiLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object connectionString, object database) : base(type, connectVia, description, parameters, annotations, additionalProperties) + { + ConnectionString = connectionString; + Database = database; + Type = type ?? "CosmosDbMongoDbApi"; + } + + /// The CosmosDB (MongoDB API) connection string. Type: string, SecureString or AzureKeyVaultSecretReference. Type: string, SecureString or AzureKeyVaultSecretReference. + public object ConnectionString { get; set; } + /// The name of the CosmosDB (MongoDB API) database that you want to access. Type: string (or Expression with resultType string). + public object Database { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CosmosDbSqlApiCollectionDataset.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CosmosDbSqlApiCollectionDataset.Serialization.cs new file mode 100644 index 000000000000..ca641ad1cbfa --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CosmosDbSqlApiCollectionDataset.Serialization.cs @@ -0,0 +1,206 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class CosmosDbSqlApiCollectionDataset : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Structure != null) + { + writer.WritePropertyName("structure"); + writer.WriteObjectValue(Structure); + } + if (Schema != null) + { + writer.WritePropertyName("schema"); + writer.WriteObjectValue(Schema); + } + writer.WritePropertyName("linkedServiceName"); + writer.WriteObjectValue(LinkedServiceName); + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Folder != null) + { + writer.WritePropertyName("folder"); + writer.WriteObjectValue(Folder); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + writer.WritePropertyName("collectionName"); + writer.WriteObjectValue(CollectionName); + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static CosmosDbSqlApiCollectionDataset DeserializeCosmosDbSqlApiCollectionDataset(JsonElement element) + { + string type = default; + string description = default; + object structure = default; + object schema = default; + LinkedServiceReference linkedServiceName = default; + IDictionary parameters = default; + IList annotations = default; + DatasetFolder folder = default; + object collectionName = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("structure")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + structure = property.Value.GetObject(); + continue; + } + if (property.NameEquals("schema")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + schema = property.Value.GetObject(); + continue; + } + if (property.NameEquals("linkedServiceName")) + { + linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("folder")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + folder = DatasetFolder.DeserializeDatasetFolder(property.Value); + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("collectionName")) + { + collectionName = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new CosmosDbSqlApiCollectionDataset(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties, collectionName); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CosmosDbSqlApiCollectionDataset.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CosmosDbSqlApiCollectionDataset.cs new file mode 100644 index 000000000000..c6cdc3a14fa3 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CosmosDbSqlApiCollectionDataset.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Microsoft Azure CosmosDB (SQL API) Collection dataset. + public partial class CosmosDbSqlApiCollectionDataset : Dataset + { + /// Initializes a new instance of CosmosDbSqlApiCollectionDataset. + /// Linked service reference. + /// CosmosDB (SQL API) collection name. Type: string (or Expression with resultType string). + public CosmosDbSqlApiCollectionDataset(LinkedServiceReference linkedServiceName, object collectionName) : base(linkedServiceName) + { + if (linkedServiceName == null) + { + throw new ArgumentNullException(nameof(linkedServiceName)); + } + if (collectionName == null) + { + throw new ArgumentNullException(nameof(collectionName)); + } + + CollectionName = collectionName; + Type = "CosmosDbSqlApiCollection"; + } + + /// Initializes a new instance of CosmosDbSqlApiCollectionDataset. + /// Type of dataset. + /// Dataset description. + /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. + /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. + /// Linked service reference. + /// Parameters for dataset. + /// List of tags that can be used for describing the Dataset. + /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. + /// . + /// CosmosDB (SQL API) collection name. Type: string (or Expression with resultType string). + internal CosmosDbSqlApiCollectionDataset(string type, string description, object structure, object schema, LinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary additionalProperties, object collectionName) : base(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) + { + CollectionName = collectionName; + Type = type ?? "CosmosDbSqlApiCollection"; + } + + /// CosmosDB (SQL API) collection name. Type: string (or Expression with resultType string). + public object CollectionName { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CouchbaseLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CouchbaseLinkedService.Serialization.cs new file mode 100644 index 000000000000..5592a2b9f0de --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CouchbaseLinkedService.Serialization.cs @@ -0,0 +1,205 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class CouchbaseLinkedService : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (ConnectVia != null) + { + writer.WritePropertyName("connectVia"); + writer.WriteObjectValue(ConnectVia); + } + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + if (ConnectionString != null) + { + writer.WritePropertyName("connectionString"); + writer.WriteObjectValue(ConnectionString); + } + if (CredString != null) + { + writer.WritePropertyName("credString"); + writer.WriteObjectValue(CredString); + } + if (EncryptedCredential != null) + { + writer.WritePropertyName("encryptedCredential"); + writer.WriteObjectValue(EncryptedCredential); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static CouchbaseLinkedService DeserializeCouchbaseLinkedService(JsonElement element) + { + string type = default; + IntegrationRuntimeReference connectVia = default; + string description = default; + IDictionary parameters = default; + IList annotations = default; + object connectionString = default; + AzureKeyVaultSecretReference credString = default; + object encryptedCredential = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("connectVia")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("connectionString")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectionString = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("credString")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + credString = AzureKeyVaultSecretReference.DeserializeAzureKeyVaultSecretReference(property0.Value); + continue; + } + if (property0.NameEquals("encryptedCredential")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + encryptedCredential = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new CouchbaseLinkedService(type, connectVia, description, parameters, annotations, additionalProperties, connectionString, credString, encryptedCredential); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CouchbaseLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CouchbaseLinkedService.cs new file mode 100644 index 000000000000..362d1c7595e9 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CouchbaseLinkedService.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Couchbase server linked service. + public partial class CouchbaseLinkedService : LinkedService + { + /// Initializes a new instance of CouchbaseLinkedService. + public CouchbaseLinkedService() + { + Type = "Couchbase"; + } + + /// Initializes a new instance of CouchbaseLinkedService. + /// Type of linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for describing the linked service. + /// . + /// An ODBC connection string. Type: string, SecureString or AzureKeyVaultSecretReference. + /// The Azure key vault secret reference of credString in connection string. + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + internal CouchbaseLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object connectionString, AzureKeyVaultSecretReference credString, object encryptedCredential) : base(type, connectVia, description, parameters, annotations, additionalProperties) + { + ConnectionString = connectionString; + CredString = credString; + EncryptedCredential = encryptedCredential; + Type = type ?? "Couchbase"; + } + + /// An ODBC connection string. Type: string, SecureString or AzureKeyVaultSecretReference. + public object ConnectionString { get; set; } + /// The Azure key vault secret reference of credString in connection string. + public AzureKeyVaultSecretReference CredString { get; set; } + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + public object EncryptedCredential { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CouchbaseTableDataset.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CouchbaseTableDataset.Serialization.cs new file mode 100644 index 000000000000..fdf9b53c303e --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CouchbaseTableDataset.Serialization.cs @@ -0,0 +1,213 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class CouchbaseTableDataset : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Structure != null) + { + writer.WritePropertyName("structure"); + writer.WriteObjectValue(Structure); + } + if (Schema != null) + { + writer.WritePropertyName("schema"); + writer.WriteObjectValue(Schema); + } + writer.WritePropertyName("linkedServiceName"); + writer.WriteObjectValue(LinkedServiceName); + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Folder != null) + { + writer.WritePropertyName("folder"); + writer.WriteObjectValue(Folder); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + if (TableName != null) + { + writer.WritePropertyName("tableName"); + writer.WriteObjectValue(TableName); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static CouchbaseTableDataset DeserializeCouchbaseTableDataset(JsonElement element) + { + string type = default; + string description = default; + object structure = default; + object schema = default; + LinkedServiceReference linkedServiceName = default; + IDictionary parameters = default; + IList annotations = default; + DatasetFolder folder = default; + object tableName = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("structure")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + structure = property.Value.GetObject(); + continue; + } + if (property.NameEquals("schema")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + schema = property.Value.GetObject(); + continue; + } + if (property.NameEquals("linkedServiceName")) + { + linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("folder")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + folder = DatasetFolder.DeserializeDatasetFolder(property.Value); + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("tableName")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + tableName = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new CouchbaseTableDataset(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties, tableName); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CouchbaseTableDataset.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CouchbaseTableDataset.cs new file mode 100644 index 000000000000..1a4e0bb286a1 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CouchbaseTableDataset.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Couchbase server dataset. + public partial class CouchbaseTableDataset : Dataset + { + /// Initializes a new instance of CouchbaseTableDataset. + /// Linked service reference. + public CouchbaseTableDataset(LinkedServiceReference linkedServiceName) : base(linkedServiceName) + { + if (linkedServiceName == null) + { + throw new ArgumentNullException(nameof(linkedServiceName)); + } + + Type = "CouchbaseTable"; + } + + /// Initializes a new instance of CouchbaseTableDataset. + /// Type of dataset. + /// Dataset description. + /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. + /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. + /// Linked service reference. + /// Parameters for dataset. + /// List of tags that can be used for describing the Dataset. + /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. + /// . + /// The table name. Type: string (or Expression with resultType string). + internal CouchbaseTableDataset(string type, string description, object structure, object schema, LinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary additionalProperties, object tableName) : base(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) + { + TableName = tableName; + Type = type ?? "CouchbaseTable"; + } + + /// The table name. Type: string (or Expression with resultType string). + public object TableName { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CreateDataFlowDebugSessionRequest.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CreateDataFlowDebugSessionRequest.Serialization.cs new file mode 100644 index 000000000000..a91c8ad0ec66 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CreateDataFlowDebugSessionRequest.Serialization.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class CreateDataFlowDebugSessionRequest : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (DataFlowName != null) + { + writer.WritePropertyName("dataFlowName"); + writer.WriteStringValue(DataFlowName); + } + if (ExistingClusterId != null) + { + writer.WritePropertyName("existingClusterId"); + writer.WriteStringValue(ExistingClusterId); + } + if (ClusterTimeout != null) + { + writer.WritePropertyName("clusterTimeout"); + writer.WriteNumberValue(ClusterTimeout.Value); + } + if (NewClusterName != null) + { + writer.WritePropertyName("newClusterName"); + writer.WriteStringValue(NewClusterName); + } + if (NewClusterNodeType != null) + { + writer.WritePropertyName("newClusterNodeType"); + writer.WriteStringValue(NewClusterNodeType); + } + if (DataBricksLinkedService != null) + { + writer.WritePropertyName("dataBricksLinkedService"); + writer.WriteObjectValue(DataBricksLinkedService); + } + writer.WriteEndObject(); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CreateDataFlowDebugSessionRequest.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CreateDataFlowDebugSessionRequest.cs new file mode 100644 index 000000000000..572ed79a6a13 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CreateDataFlowDebugSessionRequest.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Request body structure for creating data flow debug session. + public partial class CreateDataFlowDebugSessionRequest + { + /// Initializes a new instance of CreateDataFlowDebugSessionRequest. + public CreateDataFlowDebugSessionRequest() + { + } + + /// Initializes a new instance of CreateDataFlowDebugSessionRequest. + /// The name of the data flow. + /// The ID of existing Databricks cluster. + /// Timeout setting for Databricks cluster. + /// The name of new Databricks cluster. + /// The type of new Databricks cluster. + /// Data bricks linked service. + internal CreateDataFlowDebugSessionRequest(string dataFlowName, string existingClusterId, int? clusterTimeout, string newClusterName, string newClusterNodeType, LinkedServiceResource dataBricksLinkedService) + { + DataFlowName = dataFlowName; + ExistingClusterId = existingClusterId; + ClusterTimeout = clusterTimeout; + NewClusterName = newClusterName; + NewClusterNodeType = newClusterNodeType; + DataBricksLinkedService = dataBricksLinkedService; + } + + /// The name of the data flow. + public string DataFlowName { get; set; } + /// The ID of existing Databricks cluster. + public string ExistingClusterId { get; set; } + /// Timeout setting for Databricks cluster. + public int? ClusterTimeout { get; set; } + /// The name of new Databricks cluster. + public string NewClusterName { get; set; } + /// The type of new Databricks cluster. + public string NewClusterNodeType { get; set; } + /// Data bricks linked service. + public LinkedServiceResource DataBricksLinkedService { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CreateDataFlowDebugSessionResponse.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CreateDataFlowDebugSessionResponse.Serialization.cs new file mode 100644 index 000000000000..8055ec6b832b --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CreateDataFlowDebugSessionResponse.Serialization.cs @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class CreateDataFlowDebugSessionResponse + { + internal static CreateDataFlowDebugSessionResponse DeserializeCreateDataFlowDebugSessionResponse(JsonElement element) + { + string sessionId = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("sessionId")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sessionId = property.Value.GetString(); + continue; + } + } + return new CreateDataFlowDebugSessionResponse(sessionId); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CreateDataFlowDebugSessionResponse.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CreateDataFlowDebugSessionResponse.cs new file mode 100644 index 000000000000..b42f677b595c --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CreateDataFlowDebugSessionResponse.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Response body structure for creating data flow debug session. + public partial class CreateDataFlowDebugSessionResponse + { + /// Initializes a new instance of CreateDataFlowDebugSessionResponse. + internal CreateDataFlowDebugSessionResponse() + { + } + + /// Initializes a new instance of CreateDataFlowDebugSessionResponse. + /// The ID of data flow debug session. + internal CreateDataFlowDebugSessionResponse(string sessionId) + { + SessionId = sessionId; + } + + /// The ID of data flow debug session. + public string SessionId { get; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CreateRunResponse.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CreateRunResponse.Serialization.cs new file mode 100644 index 000000000000..88a8e9373388 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CreateRunResponse.Serialization.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class CreateRunResponse + { + internal static CreateRunResponse DeserializeCreateRunResponse(JsonElement element) + { + string runId = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("runId")) + { + runId = property.Value.GetString(); + continue; + } + } + return new CreateRunResponse(runId); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CreateRunResponse.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CreateRunResponse.cs new file mode 100644 index 000000000000..e9f3192e7837 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CreateRunResponse.cs @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Response body with a run identifier. + public partial class CreateRunResponse + { + /// Initializes a new instance of CreateRunResponse. + /// Identifier of a run. + internal CreateRunResponse(string runId) + { + if (runId == null) + { + throw new ArgumentNullException(nameof(runId)); + } + + RunId = runId; + } + + /// Identifier of a run. + public string RunId { get; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CustomActivity.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CustomActivity.Serialization.cs new file mode 100644 index 000000000000..c1a0e0a424f3 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CustomActivity.Serialization.cs @@ -0,0 +1,283 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class CustomActivity : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (LinkedServiceName != null) + { + writer.WritePropertyName("linkedServiceName"); + writer.WriteObjectValue(LinkedServiceName); + } + if (Policy != null) + { + writer.WritePropertyName("policy"); + writer.WriteObjectValue(Policy); + } + writer.WritePropertyName("name"); + writer.WriteStringValue(Name); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (DependsOn != null) + { + writer.WritePropertyName("dependsOn"); + writer.WriteStartArray(); + foreach (var item in DependsOn) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (UserProperties != null) + { + writer.WritePropertyName("userProperties"); + writer.WriteStartArray(); + foreach (var item in UserProperties) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + writer.WritePropertyName("command"); + writer.WriteObjectValue(Command); + if (ResourceLinkedService != null) + { + writer.WritePropertyName("resourceLinkedService"); + writer.WriteObjectValue(ResourceLinkedService); + } + if (FolderPath != null) + { + writer.WritePropertyName("folderPath"); + writer.WriteObjectValue(FolderPath); + } + if (ReferenceObjects != null) + { + writer.WritePropertyName("referenceObjects"); + writer.WriteObjectValue(ReferenceObjects); + } + if (ExtendedProperties != null) + { + writer.WritePropertyName("extendedProperties"); + writer.WriteStartObject(); + foreach (var item in ExtendedProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (RetentionTimeInDays != null) + { + writer.WritePropertyName("retentionTimeInDays"); + writer.WriteObjectValue(RetentionTimeInDays); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static CustomActivity DeserializeCustomActivity(JsonElement element) + { + LinkedServiceReference linkedServiceName = default; + ActivityPolicy policy = default; + string name = default; + string type = default; + string description = default; + IList dependsOn = default; + IList userProperties = default; + object command = default; + LinkedServiceReference resourceLinkedService = default; + object folderPath = default; + CustomActivityReferenceObject referenceObjects = default; + IDictionary extendedProperties = default; + object retentionTimeInDays = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("linkedServiceName")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value); + continue; + } + if (property.NameEquals("policy")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + policy = ActivityPolicy.DeserializeActivityPolicy(property.Value); + continue; + } + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("dependsOn")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(ActivityDependency.DeserializeActivityDependency(item)); + } + } + dependsOn = array; + continue; + } + if (property.NameEquals("userProperties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(UserProperty.DeserializeUserProperty(item)); + } + } + userProperties = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("command")) + { + command = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("resourceLinkedService")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + resourceLinkedService = LinkedServiceReference.DeserializeLinkedServiceReference(property0.Value); + continue; + } + if (property0.NameEquals("folderPath")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + folderPath = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("referenceObjects")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + referenceObjects = CustomActivityReferenceObject.DeserializeCustomActivityReferenceObject(property0.Value); + continue; + } + if (property0.NameEquals("extendedProperties")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property1 in property0.Value.EnumerateObject()) + { + if (property1.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property1.Name, null); + } + else + { + dictionary.Add(property1.Name, property1.Value.GetObject()); + } + } + extendedProperties = dictionary; + continue; + } + if (property0.NameEquals("retentionTimeInDays")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + retentionTimeInDays = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new CustomActivity(name, type, description, dependsOn, userProperties, additionalProperties, linkedServiceName, policy, command, resourceLinkedService, folderPath, referenceObjects, extendedProperties, retentionTimeInDays); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CustomActivity.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CustomActivity.cs new file mode 100644 index 000000000000..9d6ae12a0a78 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CustomActivity.cs @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Custom activity type. + public partial class CustomActivity : ExecutionActivity + { + /// Initializes a new instance of CustomActivity. + /// Activity name. + /// Command for custom activity Type: string (or Expression with resultType string). + public CustomActivity(string name, object command) : base(name) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (command == null) + { + throw new ArgumentNullException(nameof(command)); + } + + Command = command; + Type = "Custom"; + } + + /// Initializes a new instance of CustomActivity. + /// Activity name. + /// Type of activity. + /// Activity description. + /// Activity depends on condition. + /// Activity user properties. + /// . + /// Linked service reference. + /// Activity policy. + /// Command for custom activity Type: string (or Expression with resultType string). + /// Resource linked service reference. + /// Folder path for resource files Type: string (or Expression with resultType string). + /// Reference objects. + /// User defined property bag. There is no restriction on the keys or values that can be used. The user specified custom activity has the full responsibility to consume and interpret the content defined. + /// The retention time for the files submitted for custom activity. Type: double (or Expression with resultType double). + internal CustomActivity(string name, string type, string description, IList dependsOn, IList userProperties, IDictionary additionalProperties, LinkedServiceReference linkedServiceName, ActivityPolicy policy, object command, LinkedServiceReference resourceLinkedService, object folderPath, CustomActivityReferenceObject referenceObjects, IDictionary extendedProperties, object retentionTimeInDays) : base(name, type, description, dependsOn, userProperties, additionalProperties, linkedServiceName, policy) + { + Command = command; + ResourceLinkedService = resourceLinkedService; + FolderPath = folderPath; + ReferenceObjects = referenceObjects; + ExtendedProperties = extendedProperties; + RetentionTimeInDays = retentionTimeInDays; + Type = type ?? "Custom"; + } + + /// Command for custom activity Type: string (or Expression with resultType string). + public object Command { get; set; } + /// Resource linked service reference. + public LinkedServiceReference ResourceLinkedService { get; set; } + /// Folder path for resource files Type: string (or Expression with resultType string). + public object FolderPath { get; set; } + /// Reference objects. + public CustomActivityReferenceObject ReferenceObjects { get; set; } + /// User defined property bag. There is no restriction on the keys or values that can be used. The user specified custom activity has the full responsibility to consume and interpret the content defined. + public IDictionary ExtendedProperties { get; set; } + /// The retention time for the files submitted for custom activity. Type: double (or Expression with resultType double). + public object RetentionTimeInDays { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CustomActivityReferenceObject.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CustomActivityReferenceObject.Serialization.cs new file mode 100644 index 000000000000..1ff0e4d36690 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CustomActivityReferenceObject.Serialization.cs @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class CustomActivityReferenceObject : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (LinkedServices != null) + { + writer.WritePropertyName("linkedServices"); + writer.WriteStartArray(); + foreach (var item in LinkedServices) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Datasets != null) + { + writer.WritePropertyName("datasets"); + writer.WriteStartArray(); + foreach (var item in Datasets) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + } + + internal static CustomActivityReferenceObject DeserializeCustomActivityReferenceObject(JsonElement element) + { + IList linkedServices = default; + IList datasets = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("linkedServices")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(LinkedServiceReference.DeserializeLinkedServiceReference(item)); + } + } + linkedServices = array; + continue; + } + if (property.NameEquals("datasets")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(DatasetReference.DeserializeDatasetReference(item)); + } + } + datasets = array; + continue; + } + } + return new CustomActivityReferenceObject(linkedServices, datasets); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CustomActivityReferenceObject.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CustomActivityReferenceObject.cs new file mode 100644 index 000000000000..2060775032d7 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CustomActivityReferenceObject.cs @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Reference objects for custom activity. + public partial class CustomActivityReferenceObject + { + /// Initializes a new instance of CustomActivityReferenceObject. + public CustomActivityReferenceObject() + { + } + + /// Initializes a new instance of CustomActivityReferenceObject. + /// Linked service references. + /// Dataset references. + internal CustomActivityReferenceObject(IList linkedServices, IList datasets) + { + LinkedServices = linkedServices; + Datasets = datasets; + } + + /// Linked service references. + public IList LinkedServices { get; set; } + /// Dataset references. + public IList Datasets { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CustomDataSourceLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CustomDataSourceLinkedService.Serialization.cs new file mode 100644 index 000000000000..9a04c03c77c1 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CustomDataSourceLinkedService.Serialization.cs @@ -0,0 +1,158 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class CustomDataSourceLinkedService : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("typeProperties"); + writer.WriteObjectValue(TypeProperties); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (ConnectVia != null) + { + writer.WritePropertyName("connectVia"); + writer.WriteObjectValue(ConnectVia); + } + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static CustomDataSourceLinkedService DeserializeCustomDataSourceLinkedService(JsonElement element) + { + object typeProperties = default; + string type = default; + IntegrationRuntimeReference connectVia = default; + string description = default; + IDictionary parameters = default; + IList annotations = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("typeProperties")) + { + typeProperties = property.Value.GetObject(); + continue; + } + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("connectVia")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new CustomDataSourceLinkedService(type, connectVia, description, parameters, annotations, additionalProperties, typeProperties); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CustomDataSourceLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CustomDataSourceLinkedService.cs new file mode 100644 index 000000000000..35c2ecdce51f --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CustomDataSourceLinkedService.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Custom linked service. + public partial class CustomDataSourceLinkedService : LinkedService + { + /// Initializes a new instance of CustomDataSourceLinkedService. + /// Custom linked service properties. + public CustomDataSourceLinkedService(object typeProperties) + { + if (typeProperties == null) + { + throw new ArgumentNullException(nameof(typeProperties)); + } + + TypeProperties = typeProperties; + Type = "CustomDataSource"; + } + + /// Initializes a new instance of CustomDataSourceLinkedService. + /// Type of linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for describing the linked service. + /// . + /// Custom linked service properties. + internal CustomDataSourceLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object typeProperties) : base(type, connectVia, description, parameters, annotations, additionalProperties) + { + TypeProperties = typeProperties; + Type = type ?? "CustomDataSource"; + } + + /// Custom linked service properties. + public object TypeProperties { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataFlow.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataFlow.Serialization.cs new file mode 100644 index 000000000000..2be0be882295 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataFlow.Serialization.cs @@ -0,0 +1,107 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class DataFlow : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Folder != null) + { + writer.WritePropertyName("folder"); + writer.WriteObjectValue(Folder); + } + writer.WriteEndObject(); + } + + internal static DataFlow DeserializeDataFlow(JsonElement element) + { + if (element.TryGetProperty("type", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "MappingDataFlow": return MappingDataFlow.DeserializeMappingDataFlow(element); + } + } + string type = default; + string description = default; + IList annotations = default; + DataFlowFolder folder = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("folder")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + folder = DataFlowFolder.DeserializeDataFlowFolder(property.Value); + continue; + } + } + return new DataFlow(type, description, annotations, folder); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataFlow.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataFlow.cs new file mode 100644 index 000000000000..6c151218dda2 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataFlow.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Azure Synapse nested object which contains a flow with data movements and transformations. + public partial class DataFlow + { + /// Initializes a new instance of DataFlow. + public DataFlow() + { + Type = null; + } + + /// Initializes a new instance of DataFlow. + /// Type of data flow. + /// The description of the data flow. + /// List of tags that can be used for describing the data flow. + /// The folder that this data flow is in. If not specified, Data flow will appear at the root level. + internal DataFlow(string type, string description, IList annotations, DataFlowFolder folder) + { + Type = type; + Description = description; + Annotations = annotations; + Folder = folder; + } + + /// Type of data flow. + internal string Type { get; set; } + /// The description of the data flow. + public string Description { get; set; } + /// List of tags that can be used for describing the data flow. + public IList Annotations { get; set; } + /// The folder that this data flow is in. If not specified, Data flow will appear at the root level. + public DataFlowFolder Folder { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataFlowComputeType.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataFlowComputeType.cs new file mode 100644 index 000000000000..22409d19979d --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataFlowComputeType.cs @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Compute type of the cluster which will execute data flow job. + public readonly partial struct DataFlowComputeType : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + public DataFlowComputeType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string GeneralValue = "General"; + private const string MemoryOptimizedValue = "MemoryOptimized"; + private const string ComputeOptimizedValue = "ComputeOptimized"; + + /// General. + public static DataFlowComputeType General { get; } = new DataFlowComputeType(GeneralValue); + /// MemoryOptimized. + public static DataFlowComputeType MemoryOptimized { get; } = new DataFlowComputeType(MemoryOptimizedValue); + /// ComputeOptimized. + public static DataFlowComputeType ComputeOptimized { get; } = new DataFlowComputeType(ComputeOptimizedValue); + /// Determines if two values are the same. + public static bool operator ==(DataFlowComputeType left, DataFlowComputeType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DataFlowComputeType left, DataFlowComputeType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator DataFlowComputeType(string value) => new DataFlowComputeType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DataFlowComputeType other && Equals(other); + /// + public bool Equals(DataFlowComputeType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataFlowDebugCommandRequest.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataFlowDebugCommandRequest.Serialization.cs new file mode 100644 index 000000000000..212f4a6d83d0 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataFlowDebugCommandRequest.Serialization.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class DataFlowDebugCommandRequest : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (SessionId != null) + { + writer.WritePropertyName("sessionId"); + writer.WriteStringValue(SessionId); + } + if (DataFlowName != null) + { + writer.WritePropertyName("dataFlowName"); + writer.WriteStringValue(DataFlowName); + } + if (CommandName != null) + { + writer.WritePropertyName("commandName"); + writer.WriteStringValue(CommandName); + } + if (CommandPayload != null) + { + writer.WritePropertyName("commandPayload"); + writer.WriteObjectValue(CommandPayload); + } + writer.WriteEndObject(); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataFlowDebugCommandRequest.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataFlowDebugCommandRequest.cs new file mode 100644 index 000000000000..f644e84033f5 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataFlowDebugCommandRequest.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Request body structure for data flow expression preview. + public partial class DataFlowDebugCommandRequest + { + /// Initializes a new instance of DataFlowDebugCommandRequest. + public DataFlowDebugCommandRequest() + { + } + + /// Initializes a new instance of DataFlowDebugCommandRequest. + /// The ID of data flow debug session. + /// The data flow which contains the debug session. + /// The command name. + /// The command payload object. + internal DataFlowDebugCommandRequest(string sessionId, string dataFlowName, string commandName, object commandPayload) + { + SessionId = sessionId; + DataFlowName = dataFlowName; + CommandName = commandName; + CommandPayload = commandPayload; + } + + /// The ID of data flow debug session. + public string SessionId { get; set; } + /// The data flow which contains the debug session. + public string DataFlowName { get; set; } + /// The command name. + public string CommandName { get; set; } + /// The command payload object. + public object CommandPayload { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataFlowDebugCommandResponse.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataFlowDebugCommandResponse.Serialization.cs new file mode 100644 index 000000000000..db3b0f56bdc5 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataFlowDebugCommandResponse.Serialization.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class DataFlowDebugCommandResponse + { + internal static DataFlowDebugCommandResponse DeserializeDataFlowDebugCommandResponse(JsonElement element) + { + string status = default; + string data = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("status")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + status = property.Value.GetString(); + continue; + } + if (property.NameEquals("data")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + data = property.Value.GetString(); + continue; + } + } + return new DataFlowDebugCommandResponse(status, data); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataFlowDebugCommandResponse.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataFlowDebugCommandResponse.cs new file mode 100644 index 000000000000..42ea60740971 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataFlowDebugCommandResponse.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Response body structure of data flow result for data preview, statistics or expression preview. + public partial class DataFlowDebugCommandResponse + { + /// Initializes a new instance of DataFlowDebugCommandResponse. + internal DataFlowDebugCommandResponse() + { + } + + /// Initializes a new instance of DataFlowDebugCommandResponse. + /// The run status of data preview, statistics or expression preview. + /// The result data of data preview, statistics or expression preview. + internal DataFlowDebugCommandResponse(string status, string data) + { + Status = status; + Data = data; + } + + /// The run status of data preview, statistics or expression preview. + public string Status { get; } + /// The result data of data preview, statistics or expression preview. + public string Data { get; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataFlowDebugPackage.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataFlowDebugPackage.Serialization.cs new file mode 100644 index 000000000000..93709065f48f --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataFlowDebugPackage.Serialization.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class DataFlowDebugPackage : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (SessionId != null) + { + writer.WritePropertyName("sessionId"); + writer.WriteStringValue(SessionId); + } + if (DataFlow != null) + { + writer.WritePropertyName("dataFlow"); + writer.WriteObjectValue(DataFlow); + } + if (Datasets != null) + { + writer.WritePropertyName("datasets"); + writer.WriteStartArray(); + foreach (var item in Datasets) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (LinkedServices != null) + { + writer.WritePropertyName("linkedServices"); + writer.WriteStartArray(); + foreach (var item in LinkedServices) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Staging != null) + { + writer.WritePropertyName("staging"); + writer.WriteObjectValue(Staging); + } + if (DebugSettings != null) + { + writer.WritePropertyName("debugSettings"); + writer.WriteObjectValue(DebugSettings); + } + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataFlowDebugPackage.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataFlowDebugPackage.cs new file mode 100644 index 000000000000..6d48361bfa69 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataFlowDebugPackage.cs @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Request body structure for starting data flow debug session. + public partial class DataFlowDebugPackage : IDictionary + { + /// Initializes a new instance of DataFlowDebugPackage. + public DataFlowDebugPackage() + { + AdditionalProperties = new Dictionary(); + } + + /// Initializes a new instance of DataFlowDebugPackage. + /// The ID of data flow debug session. + /// Data flow instance. + /// List of datasets. + /// List of linked services. + /// Staging info for debug session. + /// Data flow debug settings. + /// . + internal DataFlowDebugPackage(string sessionId, DataFlowDebugResource dataFlow, IList datasets, IList linkedServices, DataFlowStagingInfo staging, DataFlowDebugPackageDebugSettings debugSettings, IDictionary additionalProperties) + { + SessionId = sessionId; + DataFlow = dataFlow; + Datasets = datasets; + LinkedServices = linkedServices; + Staging = staging; + DebugSettings = debugSettings; + AdditionalProperties = additionalProperties ?? new Dictionary(); + } + + /// The ID of data flow debug session. + public string SessionId { get; set; } + /// Data flow instance. + public DataFlowDebugResource DataFlow { get; set; } + /// List of datasets. + public IList Datasets { get; set; } + /// List of linked services. + public IList LinkedServices { get; set; } + /// Staging info for debug session. + public DataFlowStagingInfo Staging { get; set; } + /// Data flow debug settings. + public DataFlowDebugPackageDebugSettings DebugSettings { get; set; } + internal IDictionary AdditionalProperties { get; } + /// + public IEnumerator> GetEnumerator() => AdditionalProperties.GetEnumerator(); + /// + IEnumerator IEnumerable.GetEnumerator() => AdditionalProperties.GetEnumerator(); + /// + public bool TryGetValue(string key, out object value) => AdditionalProperties.TryGetValue(key, out value); + /// + public bool ContainsKey(string key) => AdditionalProperties.ContainsKey(key); + /// + public ICollection Keys => AdditionalProperties.Keys; + /// + public ICollection Values => AdditionalProperties.Values; + /// + int ICollection>.Count => AdditionalProperties.Count; + /// + public void Add(string key, object value) => AdditionalProperties.Add(key, value); + /// + public bool Remove(string key) => AdditionalProperties.Remove(key); + /// + bool ICollection>.IsReadOnly => AdditionalProperties.IsReadOnly; + /// + void ICollection>.Add(KeyValuePair value) => AdditionalProperties.Add(value); + /// + bool ICollection>.Remove(KeyValuePair value) => AdditionalProperties.Remove(value); + /// + bool ICollection>.Contains(KeyValuePair value) => AdditionalProperties.Contains(value); + /// + void ICollection>.CopyTo(KeyValuePair[] destination, int offset) => AdditionalProperties.CopyTo(destination, offset); + /// + void ICollection>.Clear() => AdditionalProperties.Clear(); + /// + public object this[string key] + { + get => AdditionalProperties[key]; + set => AdditionalProperties[key] = value; + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataFlowDebugPackageDebugSettings.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataFlowDebugPackageDebugSettings.Serialization.cs new file mode 100644 index 000000000000..5002e2970bb1 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataFlowDebugPackageDebugSettings.Serialization.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class DataFlowDebugPackageDebugSettings : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (SourceSettings != null) + { + writer.WritePropertyName("sourceSettings"); + writer.WriteStartArray(); + foreach (var item in SourceSettings) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (DatasetParameters != null) + { + writer.WritePropertyName("datasetParameters"); + writer.WriteObjectValue(DatasetParameters); + } + writer.WriteEndObject(); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataFlowDebugPackageDebugSettings.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataFlowDebugPackageDebugSettings.cs new file mode 100644 index 000000000000..5bc3727ccb49 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataFlowDebugPackageDebugSettings.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Data flow debug settings. + public partial class DataFlowDebugPackageDebugSettings + { + /// Initializes a new instance of DataFlowDebugPackageDebugSettings. + public DataFlowDebugPackageDebugSettings() + { + } + + /// Initializes a new instance of DataFlowDebugPackageDebugSettings. + /// Source setting for data flow debug. + /// Data flow parameters. + /// Parameters for dataset. + internal DataFlowDebugPackageDebugSettings(IList sourceSettings, IDictionary parameters, object datasetParameters) + { + SourceSettings = sourceSettings; + Parameters = parameters; + DatasetParameters = datasetParameters; + } + + /// Source setting for data flow debug. + public IList SourceSettings { get; set; } + /// Data flow parameters. + public IDictionary Parameters { get; set; } + /// Parameters for dataset. + public object DatasetParameters { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataFlowDebugPreviewDataRequest.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataFlowDebugPreviewDataRequest.cs new file mode 100644 index 000000000000..6117fc101474 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataFlowDebugPreviewDataRequest.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Request body structure for data flow preview data. + internal partial class DataFlowDebugPreviewDataRequest + { + /// Initializes a new instance of DataFlowDebugPreviewDataRequest. + internal DataFlowDebugPreviewDataRequest() + { + } + + /// Initializes a new instance of DataFlowDebugPreviewDataRequest. + /// The ID of data flow debug session. + /// The data flow which contains the debug session. + /// The output stream name. + /// The row limit for preview request. + internal DataFlowDebugPreviewDataRequest(string sessionId, string dataFlowName, string streamName, int? rowLimits) + { + SessionId = sessionId; + DataFlowName = dataFlowName; + StreamName = streamName; + RowLimits = rowLimits; + } + + /// The ID of data flow debug session. + public string SessionId { get; set; } + /// The data flow which contains the debug session. + public string DataFlowName { get; set; } + /// The output stream name. + public string StreamName { get; set; } + /// The row limit for preview request. + public int? RowLimits { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataFlowDebugQueryResponse.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataFlowDebugQueryResponse.cs new file mode 100644 index 000000000000..813a993435b5 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataFlowDebugQueryResponse.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Response body structure of data flow query for data preview, statistics or expression preview. + internal partial class DataFlowDebugQueryResponse + { + /// Initializes a new instance of DataFlowDebugQueryResponse. + internal DataFlowDebugQueryResponse() + { + } + + /// Initializes a new instance of DataFlowDebugQueryResponse. + /// The run ID of data flow debug session. + internal DataFlowDebugQueryResponse(string runId) + { + RunId = runId; + } + + /// The run ID of data flow debug session. + public string RunId { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataFlowDebugResource.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataFlowDebugResource.Serialization.cs new file mode 100644 index 000000000000..e97610da971d --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataFlowDebugResource.Serialization.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class DataFlowDebugResource : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("properties"); + writer.WriteObjectValue(Properties); + if (Name != null) + { + writer.WritePropertyName("name"); + writer.WriteStringValue(Name); + } + writer.WriteEndObject(); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataFlowDebugResource.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataFlowDebugResource.cs new file mode 100644 index 000000000000..758d5b7ecc42 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataFlowDebugResource.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Data flow debug resource. + public partial class DataFlowDebugResource : SubResourceDebugResource + { + /// Initializes a new instance of DataFlowDebugResource. + /// Data flow properties. + public DataFlowDebugResource(DataFlow properties) + { + if (properties == null) + { + throw new ArgumentNullException(nameof(properties)); + } + + Properties = properties; + } + + /// Initializes a new instance of DataFlowDebugResource. + /// The resource name. + /// Data flow properties. + internal DataFlowDebugResource(string name, DataFlow properties) : base(name) + { + Properties = properties; + } + + /// Data flow properties. + public DataFlow Properties { get; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataFlowDebugResultResponse.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataFlowDebugResultResponse.cs new file mode 100644 index 000000000000..3c707012cf52 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataFlowDebugResultResponse.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Response body structure of data flow result for data preview, statistics or expression preview. + internal partial class DataFlowDebugResultResponse + { + /// Initializes a new instance of DataFlowDebugResultResponse. + internal DataFlowDebugResultResponse() + { + } + + /// Initializes a new instance of DataFlowDebugResultResponse. + /// The run status of data preview, statistics or expression preview. + /// The result data of data preview, statistics or expression preview. + internal DataFlowDebugResultResponse(string status, string data) + { + Status = status; + Data = data; + } + + /// The run status of data preview, statistics or expression preview. + public string Status { get; set; } + /// The result data of data preview, statistics or expression preview. + public string Data { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataFlowDebugSessionInfo.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataFlowDebugSessionInfo.Serialization.cs new file mode 100644 index 000000000000..a86445731939 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataFlowDebugSessionInfo.Serialization.cs @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class DataFlowDebugSessionInfo + { + internal static DataFlowDebugSessionInfo DeserializeDataFlowDebugSessionInfo(JsonElement element) + { + string dataFlowName = default; + string computeType = default; + int? coreCount = default; + int? nodeCount = default; + string integrationRuntimeName = default; + string sessionId = default; + string startTime = default; + int? timeToLiveInMinutes = default; + string lastActivityTime = default; + IReadOnlyDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("dataFlowName")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dataFlowName = property.Value.GetString(); + continue; + } + if (property.NameEquals("computeType")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + computeType = property.Value.GetString(); + continue; + } + if (property.NameEquals("coreCount")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + coreCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("nodeCount")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nodeCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("integrationRuntimeName")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + integrationRuntimeName = property.Value.GetString(); + continue; + } + if (property.NameEquals("sessionId")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sessionId = property.Value.GetString(); + continue; + } + if (property.NameEquals("startTime")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + startTime = property.Value.GetString(); + continue; + } + if (property.NameEquals("timeToLiveInMinutes")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + timeToLiveInMinutes = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("lastActivityTime")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + lastActivityTime = property.Value.GetString(); + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new DataFlowDebugSessionInfo(dataFlowName, computeType, coreCount, nodeCount, integrationRuntimeName, sessionId, startTime, timeToLiveInMinutes, lastActivityTime, additionalProperties); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataFlowDebugSessionInfo.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataFlowDebugSessionInfo.cs new file mode 100644 index 000000000000..5462a147687b --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataFlowDebugSessionInfo.cs @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Data flow debug session info. + public partial class DataFlowDebugSessionInfo : IReadOnlyDictionary + { + /// Initializes a new instance of DataFlowDebugSessionInfo. + internal DataFlowDebugSessionInfo() + { + AdditionalProperties = new Dictionary(); + } + + /// Initializes a new instance of DataFlowDebugSessionInfo. + /// The name of the data flow. + /// Compute type of the cluster. + /// Core count of the cluster. + /// Node count of the cluster. (deprecated property). + /// Attached integration runtime name of data flow debug session. + /// The ID of data flow debug session. + /// Start time of data flow debug session. + /// Compute type of the cluster. + /// Last activity time of data flow debug session. + /// . + internal DataFlowDebugSessionInfo(string dataFlowName, string computeType, int? coreCount, int? nodeCount, string integrationRuntimeName, string sessionId, string startTime, int? timeToLiveInMinutes, string lastActivityTime, IReadOnlyDictionary additionalProperties) + { + DataFlowName = dataFlowName; + ComputeType = computeType; + CoreCount = coreCount; + NodeCount = nodeCount; + IntegrationRuntimeName = integrationRuntimeName; + SessionId = sessionId; + StartTime = startTime; + TimeToLiveInMinutes = timeToLiveInMinutes; + LastActivityTime = lastActivityTime; + AdditionalProperties = additionalProperties ?? new Dictionary(); + } + + /// The name of the data flow. + public string DataFlowName { get; } + /// Compute type of the cluster. + public string ComputeType { get; } + /// Core count of the cluster. + public int? CoreCount { get; } + /// Node count of the cluster. (deprecated property). + public int? NodeCount { get; } + /// Attached integration runtime name of data flow debug session. + public string IntegrationRuntimeName { get; } + /// The ID of data flow debug session. + public string SessionId { get; } + /// Start time of data flow debug session. + public string StartTime { get; } + /// Compute type of the cluster. + public int? TimeToLiveInMinutes { get; } + /// Last activity time of data flow debug session. + public string LastActivityTime { get; } + internal IReadOnlyDictionary AdditionalProperties { get; } + /// + public IEnumerator> GetEnumerator() => AdditionalProperties.GetEnumerator(); + /// + IEnumerator IEnumerable.GetEnumerator() => AdditionalProperties.GetEnumerator(); + /// + public bool TryGetValue(string key, out object value) => AdditionalProperties.TryGetValue(key, out value); + /// + public bool ContainsKey(string key) => AdditionalProperties.ContainsKey(key); + /// + public IEnumerable Keys => AdditionalProperties.Keys; + /// + public IEnumerable Values => AdditionalProperties.Values; + /// + int IReadOnlyCollection>.Count => AdditionalProperties.Count; + /// + public object this[string key] + { + get => AdditionalProperties[key]; + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataFlowDebugStatisticsRequest.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataFlowDebugStatisticsRequest.cs new file mode 100644 index 000000000000..c73813ce58f3 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataFlowDebugStatisticsRequest.cs @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Request body structure for data flow statistics. + internal partial class DataFlowDebugStatisticsRequest + { + /// Initializes a new instance of DataFlowDebugStatisticsRequest. + internal DataFlowDebugStatisticsRequest() + { + } + + /// Initializes a new instance of DataFlowDebugStatisticsRequest. + /// The ID of data flow debug session. + /// The data flow which contains the debug session. + /// The output stream name. + /// List of column names. + internal DataFlowDebugStatisticsRequest(string sessionId, string dataFlowName, string streamName, IReadOnlyList columns) + { + SessionId = sessionId; + DataFlowName = dataFlowName; + StreamName = streamName; + Columns = columns; + } + + /// The ID of data flow debug session. + public string SessionId { get; set; } + /// The data flow which contains the debug session. + public string DataFlowName { get; set; } + /// The output stream name. + public string StreamName { get; set; } + /// List of column names. + public IReadOnlyList Columns { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataFlowFolder.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataFlowFolder.Serialization.cs new file mode 100644 index 000000000000..48769a88bb58 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataFlowFolder.Serialization.cs @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class DataFlowFolder : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Name != null) + { + writer.WritePropertyName("name"); + writer.WriteStringValue(Name); + } + writer.WriteEndObject(); + } + + internal static DataFlowFolder DeserializeDataFlowFolder(JsonElement element) + { + string name = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + name = property.Value.GetString(); + continue; + } + } + return new DataFlowFolder(name); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataFlowFolder.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataFlowFolder.cs new file mode 100644 index 000000000000..080a860abe80 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataFlowFolder.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// The folder that this data flow is in. If not specified, Data flow will appear at the root level. + public partial class DataFlowFolder + { + /// Initializes a new instance of DataFlowFolder. + public DataFlowFolder() + { + } + + /// Initializes a new instance of DataFlowFolder. + /// The name of the folder that this data flow is in. + internal DataFlowFolder(string name) + { + Name = name; + } + + /// The name of the folder that this data flow is in. + public string Name { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataFlowListResponse.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataFlowListResponse.Serialization.cs new file mode 100644 index 000000000000..f5c8a36c8bc7 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataFlowListResponse.Serialization.cs @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class DataFlowListResponse + { + internal static DataFlowListResponse DeserializeDataFlowListResponse(JsonElement element) + { + IReadOnlyList value = default; + string nextLink = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value")) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(DataFlowResource.DeserializeDataFlowResource(item)); + } + } + value = array; + continue; + } + if (property.NameEquals("nextLink")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = property.Value.GetString(); + continue; + } + } + return new DataFlowListResponse(value, nextLink); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataFlowListResponse.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataFlowListResponse.cs new file mode 100644 index 000000000000..d3928e2e27b4 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataFlowListResponse.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// A list of data flow resources. + public partial class DataFlowListResponse + { + /// Initializes a new instance of DataFlowListResponse. + /// List of data flows. + internal DataFlowListResponse(IEnumerable value) + { + if (value == null) + { + throw new ArgumentNullException(nameof(value)); + } + + Value = value.ToArray(); + } + + /// Initializes a new instance of DataFlowListResponse. + /// List of data flows. + /// The link to the next page of results, if any remaining results exist. + internal DataFlowListResponse(IReadOnlyList value, string nextLink) + { + Value = value; + NextLink = nextLink; + } + + /// List of data flows. + public IReadOnlyList Value { get; } + /// The link to the next page of results, if any remaining results exist. + public string NextLink { get; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataFlowReference.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataFlowReference.Serialization.cs new file mode 100644 index 000000000000..e33166b5be12 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataFlowReference.Serialization.cs @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class DataFlowReference : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + writer.WritePropertyName("referenceName"); + writer.WriteStringValue(ReferenceName); + if (DatasetParameters != null) + { + writer.WritePropertyName("datasetParameters"); + writer.WriteObjectValue(DatasetParameters); + } + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static DataFlowReference DeserializeDataFlowReference(JsonElement element) + { + string type = default; + string referenceName = default; + object datasetParameters = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("referenceName")) + { + referenceName = property.Value.GetString(); + continue; + } + if (property.NameEquals("datasetParameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + datasetParameters = property.Value.GetObject(); + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new DataFlowReference(type, referenceName, datasetParameters, additionalProperties); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataFlowReference.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataFlowReference.cs new file mode 100644 index 000000000000..d66894df1448 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataFlowReference.cs @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Data flow reference type. + public partial class DataFlowReference : IDictionary + { + /// Initializes a new instance of DataFlowReference. + /// Reference data flow name. + public DataFlowReference(string referenceName) + { + if (referenceName == null) + { + throw new ArgumentNullException(nameof(referenceName)); + } + + Type = "DataFlowReference"; + ReferenceName = referenceName; + AdditionalProperties = new Dictionary(); + } + + /// Initializes a new instance of DataFlowReference. + /// Data flow reference type. + /// Reference data flow name. + /// Reference data flow parameters from dataset. + /// . + internal DataFlowReference(string type, string referenceName, object datasetParameters, IDictionary additionalProperties) + { + Type = type; + ReferenceName = referenceName; + DatasetParameters = datasetParameters; + AdditionalProperties = additionalProperties ?? new Dictionary(); + } + + /// Data flow reference type. + public string Type { get; set; } + /// Reference data flow name. + public string ReferenceName { get; set; } + /// Reference data flow parameters from dataset. + public object DatasetParameters { get; set; } + internal IDictionary AdditionalProperties { get; } + /// + public IEnumerator> GetEnumerator() => AdditionalProperties.GetEnumerator(); + /// + IEnumerator IEnumerable.GetEnumerator() => AdditionalProperties.GetEnumerator(); + /// + public bool TryGetValue(string key, out object value) => AdditionalProperties.TryGetValue(key, out value); + /// + public bool ContainsKey(string key) => AdditionalProperties.ContainsKey(key); + /// + public ICollection Keys => AdditionalProperties.Keys; + /// + public ICollection Values => AdditionalProperties.Values; + /// + int ICollection>.Count => AdditionalProperties.Count; + /// + public void Add(string key, object value) => AdditionalProperties.Add(key, value); + /// + public bool Remove(string key) => AdditionalProperties.Remove(key); + /// + bool ICollection>.IsReadOnly => AdditionalProperties.IsReadOnly; + /// + void ICollection>.Add(KeyValuePair value) => AdditionalProperties.Add(value); + /// + bool ICollection>.Remove(KeyValuePair value) => AdditionalProperties.Remove(value); + /// + bool ICollection>.Contains(KeyValuePair value) => AdditionalProperties.Contains(value); + /// + void ICollection>.CopyTo(KeyValuePair[] destination, int offset) => AdditionalProperties.CopyTo(destination, offset); + /// + void ICollection>.Clear() => AdditionalProperties.Clear(); + /// + public object this[string key] + { + get => AdditionalProperties[key]; + set => AdditionalProperties[key] = value; + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataFlowResource.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataFlowResource.Serialization.cs new file mode 100644 index 000000000000..3d6e7a294b1b --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataFlowResource.Serialization.cs @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class DataFlowResource : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("properties"); + writer.WriteObjectValue(Properties); + if (Id != null) + { + writer.WritePropertyName("id"); + writer.WriteStringValue(Id); + } + if (Name != null) + { + writer.WritePropertyName("name"); + writer.WriteStringValue(Name); + } + if (Type != null) + { + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + } + if (Etag != null) + { + writer.WritePropertyName("etag"); + writer.WriteStringValue(Etag); + } + writer.WriteEndObject(); + } + + internal static DataFlowResource DeserializeDataFlowResource(JsonElement element) + { + DataFlow properties = default; + string id = default; + string name = default; + string type = default; + string etag = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties")) + { + properties = DataFlow.DeserializeDataFlow(property.Value); + continue; + } + if (property.NameEquals("id")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("name")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("etag")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + etag = property.Value.GetString(); + continue; + } + } + return new DataFlowResource(id, name, type, etag, properties); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataFlowResource.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataFlowResource.cs new file mode 100644 index 000000000000..26c9a9143a40 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataFlowResource.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Data flow resource type. + public partial class DataFlowResource : SubResource + { + /// Initializes a new instance of DataFlowResource. + /// Data flow properties. + public DataFlowResource(DataFlow properties) + { + if (properties == null) + { + throw new ArgumentNullException(nameof(properties)); + } + + Properties = properties; + } + + /// Initializes a new instance of DataFlowResource. + /// The resource identifier. + /// The resource name. + /// The resource type. + /// Etag identifies change in the resource. + /// Data flow properties. + internal DataFlowResource(string id, string name, string type, string etag, DataFlow properties) : base(id, name, type, etag) + { + Properties = properties; + } + + /// Data flow properties. + public DataFlow Properties { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataFlowSink.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataFlowSink.Serialization.cs new file mode 100644 index 000000000000..0aeac7b3e722 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataFlowSink.Serialization.cs @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class DataFlowSink : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Dataset != null) + { + writer.WritePropertyName("dataset"); + writer.WriteObjectValue(Dataset); + } + writer.WritePropertyName("name"); + writer.WriteStringValue(Name); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + writer.WriteEndObject(); + } + + internal static DataFlowSink DeserializeDataFlowSink(JsonElement element) + { + DatasetReference dataset = default; + string name = default; + string description = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("dataset")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dataset = DatasetReference.DeserializeDatasetReference(property.Value); + continue; + } + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + } + return new DataFlowSink(name, description, dataset); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataFlowSink.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataFlowSink.cs new file mode 100644 index 000000000000..bf6b32ec7b9c --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataFlowSink.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Transformation for data flow sink. + public partial class DataFlowSink : Transformation + { + /// Initializes a new instance of DataFlowSink. + /// Transformation name. + public DataFlowSink(string name) : base(name) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + } + + /// Initializes a new instance of DataFlowSink. + /// Transformation name. + /// Transformation description. + /// Dataset reference. + internal DataFlowSink(string name, string description, DatasetReference dataset) : base(name, description) + { + Dataset = dataset; + } + + /// Dataset reference. + public DatasetReference Dataset { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataFlowSource.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataFlowSource.Serialization.cs new file mode 100644 index 000000000000..f22690e8a9af --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataFlowSource.Serialization.cs @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class DataFlowSource : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Dataset != null) + { + writer.WritePropertyName("dataset"); + writer.WriteObjectValue(Dataset); + } + writer.WritePropertyName("name"); + writer.WriteStringValue(Name); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + writer.WriteEndObject(); + } + + internal static DataFlowSource DeserializeDataFlowSource(JsonElement element) + { + DatasetReference dataset = default; + string name = default; + string description = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("dataset")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dataset = DatasetReference.DeserializeDatasetReference(property.Value); + continue; + } + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + } + return new DataFlowSource(name, description, dataset); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataFlowSource.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataFlowSource.cs new file mode 100644 index 000000000000..312c5fe36b40 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataFlowSource.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Transformation for data flow source. + public partial class DataFlowSource : Transformation + { + /// Initializes a new instance of DataFlowSource. + /// Transformation name. + public DataFlowSource(string name) : base(name) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + } + + /// Initializes a new instance of DataFlowSource. + /// Transformation name. + /// Transformation description. + /// Dataset reference. + internal DataFlowSource(string name, string description, DatasetReference dataset) : base(name, description) + { + Dataset = dataset; + } + + /// Dataset reference. + public DatasetReference Dataset { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataFlowSourceSetting.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataFlowSourceSetting.Serialization.cs new file mode 100644 index 000000000000..65add8c57ec3 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataFlowSourceSetting.Serialization.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class DataFlowSourceSetting : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (SourceName != null) + { + writer.WritePropertyName("sourceName"); + writer.WriteStringValue(SourceName); + } + if (RowLimit != null) + { + writer.WritePropertyName("rowLimit"); + writer.WriteNumberValue(RowLimit.Value); + } + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataFlowSourceSetting.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataFlowSourceSetting.cs new file mode 100644 index 000000000000..648bee8c7c95 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataFlowSourceSetting.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Definition of data flow source setting for debug. + public partial class DataFlowSourceSetting : IDictionary + { + /// Initializes a new instance of DataFlowSourceSetting. + public DataFlowSourceSetting() + { + AdditionalProperties = new Dictionary(); + } + + /// Initializes a new instance of DataFlowSourceSetting. + /// The data flow source name. + /// Defines the row limit of data flow source in debug. + /// . + internal DataFlowSourceSetting(string sourceName, int? rowLimit, IDictionary additionalProperties) + { + SourceName = sourceName; + RowLimit = rowLimit; + AdditionalProperties = additionalProperties ?? new Dictionary(); + } + + /// The data flow source name. + public string SourceName { get; set; } + /// Defines the row limit of data flow source in debug. + public int? RowLimit { get; set; } + internal IDictionary AdditionalProperties { get; } + /// + public IEnumerator> GetEnumerator() => AdditionalProperties.GetEnumerator(); + /// + IEnumerator IEnumerable.GetEnumerator() => AdditionalProperties.GetEnumerator(); + /// + public bool TryGetValue(string key, out object value) => AdditionalProperties.TryGetValue(key, out value); + /// + public bool ContainsKey(string key) => AdditionalProperties.ContainsKey(key); + /// + public ICollection Keys => AdditionalProperties.Keys; + /// + public ICollection Values => AdditionalProperties.Values; + /// + int ICollection>.Count => AdditionalProperties.Count; + /// + public void Add(string key, object value) => AdditionalProperties.Add(key, value); + /// + public bool Remove(string key) => AdditionalProperties.Remove(key); + /// + bool ICollection>.IsReadOnly => AdditionalProperties.IsReadOnly; + /// + void ICollection>.Add(KeyValuePair value) => AdditionalProperties.Add(value); + /// + bool ICollection>.Remove(KeyValuePair value) => AdditionalProperties.Remove(value); + /// + bool ICollection>.Contains(KeyValuePair value) => AdditionalProperties.Contains(value); + /// + void ICollection>.CopyTo(KeyValuePair[] destination, int offset) => AdditionalProperties.CopyTo(destination, offset); + /// + void ICollection>.Clear() => AdditionalProperties.Clear(); + /// + public object this[string key] + { + get => AdditionalProperties[key]; + set => AdditionalProperties[key] = value; + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataFlowStagingInfo.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataFlowStagingInfo.Serialization.cs new file mode 100644 index 000000000000..750626cbb52d --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataFlowStagingInfo.Serialization.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class DataFlowStagingInfo : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (LinkedService != null) + { + writer.WritePropertyName("linkedService"); + writer.WriteObjectValue(LinkedService); + } + if (FolderPath != null) + { + writer.WritePropertyName("folderPath"); + writer.WriteStringValue(FolderPath); + } + writer.WriteEndObject(); + } + + internal static DataFlowStagingInfo DeserializeDataFlowStagingInfo(JsonElement element) + { + LinkedServiceReference linkedService = default; + string folderPath = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("linkedService")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + linkedService = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value); + continue; + } + if (property.NameEquals("folderPath")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + folderPath = property.Value.GetString(); + continue; + } + } + return new DataFlowStagingInfo(linkedService, folderPath); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataFlowStagingInfo.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataFlowStagingInfo.cs new file mode 100644 index 000000000000..a885ed0421ba --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataFlowStagingInfo.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Staging info for execute data flow activity. + public partial class DataFlowStagingInfo + { + /// Initializes a new instance of DataFlowStagingInfo. + public DataFlowStagingInfo() + { + } + + /// Initializes a new instance of DataFlowStagingInfo. + /// Staging linked service reference. + /// Folder path for staging blob. + internal DataFlowStagingInfo(LinkedServiceReference linkedService, string folderPath) + { + LinkedService = linkedService; + FolderPath = folderPath; + } + + /// Staging linked service reference. + public LinkedServiceReference LinkedService { get; set; } + /// Folder path for staging blob. + public string FolderPath { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataLakeAnalyticsUsqlActivity.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataLakeAnalyticsUsqlActivity.Serialization.cs new file mode 100644 index 000000000000..11df0d0822d8 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataLakeAnalyticsUsqlActivity.Serialization.cs @@ -0,0 +1,291 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class DataLakeAnalyticsUsqlActivity : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (LinkedServiceName != null) + { + writer.WritePropertyName("linkedServiceName"); + writer.WriteObjectValue(LinkedServiceName); + } + if (Policy != null) + { + writer.WritePropertyName("policy"); + writer.WriteObjectValue(Policy); + } + writer.WritePropertyName("name"); + writer.WriteStringValue(Name); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (DependsOn != null) + { + writer.WritePropertyName("dependsOn"); + writer.WriteStartArray(); + foreach (var item in DependsOn) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (UserProperties != null) + { + writer.WritePropertyName("userProperties"); + writer.WriteStartArray(); + foreach (var item in UserProperties) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + writer.WritePropertyName("scriptPath"); + writer.WriteObjectValue(ScriptPath); + writer.WritePropertyName("scriptLinkedService"); + writer.WriteObjectValue(ScriptLinkedService); + if (DegreeOfParallelism != null) + { + writer.WritePropertyName("degreeOfParallelism"); + writer.WriteObjectValue(DegreeOfParallelism); + } + if (Priority != null) + { + writer.WritePropertyName("priority"); + writer.WriteObjectValue(Priority); + } + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (RuntimeVersion != null) + { + writer.WritePropertyName("runtimeVersion"); + writer.WriteObjectValue(RuntimeVersion); + } + if (CompilationMode != null) + { + writer.WritePropertyName("compilationMode"); + writer.WriteObjectValue(CompilationMode); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static DataLakeAnalyticsUsqlActivity DeserializeDataLakeAnalyticsUsqlActivity(JsonElement element) + { + LinkedServiceReference linkedServiceName = default; + ActivityPolicy policy = default; + string name = default; + string type = default; + string description = default; + IList dependsOn = default; + IList userProperties = default; + object scriptPath = default; + LinkedServiceReference scriptLinkedService = default; + object degreeOfParallelism = default; + object priority = default; + IDictionary parameters = default; + object runtimeVersion = default; + object compilationMode = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("linkedServiceName")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value); + continue; + } + if (property.NameEquals("policy")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + policy = ActivityPolicy.DeserializeActivityPolicy(property.Value); + continue; + } + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("dependsOn")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(ActivityDependency.DeserializeActivityDependency(item)); + } + } + dependsOn = array; + continue; + } + if (property.NameEquals("userProperties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(UserProperty.DeserializeUserProperty(item)); + } + } + userProperties = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("scriptPath")) + { + scriptPath = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("scriptLinkedService")) + { + scriptLinkedService = LinkedServiceReference.DeserializeLinkedServiceReference(property0.Value); + continue; + } + if (property0.NameEquals("degreeOfParallelism")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + degreeOfParallelism = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("priority")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + priority = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("parameters")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property1 in property0.Value.EnumerateObject()) + { + if (property1.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property1.Name, null); + } + else + { + dictionary.Add(property1.Name, property1.Value.GetObject()); + } + } + parameters = dictionary; + continue; + } + if (property0.NameEquals("runtimeVersion")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + runtimeVersion = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("compilationMode")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + compilationMode = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new DataLakeAnalyticsUsqlActivity(name, type, description, dependsOn, userProperties, additionalProperties, linkedServiceName, policy, scriptPath, scriptLinkedService, degreeOfParallelism, priority, parameters, runtimeVersion, compilationMode); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataLakeAnalyticsUsqlActivity.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataLakeAnalyticsUsqlActivity.cs new file mode 100644 index 000000000000..5e839472aee8 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataLakeAnalyticsUsqlActivity.cs @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Data Lake Analytics U-SQL activity. + public partial class DataLakeAnalyticsUsqlActivity : ExecutionActivity + { + /// Initializes a new instance of DataLakeAnalyticsUsqlActivity. + /// Activity name. + /// Case-sensitive path to folder that contains the U-SQL script. Type: string (or Expression with resultType string). + /// Script linked service reference. + public DataLakeAnalyticsUsqlActivity(string name, object scriptPath, LinkedServiceReference scriptLinkedService) : base(name) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (scriptPath == null) + { + throw new ArgumentNullException(nameof(scriptPath)); + } + if (scriptLinkedService == null) + { + throw new ArgumentNullException(nameof(scriptLinkedService)); + } + + ScriptPath = scriptPath; + ScriptLinkedService = scriptLinkedService; + Type = "DataLakeAnalyticsU-SQL"; + } + + /// Initializes a new instance of DataLakeAnalyticsUsqlActivity. + /// Activity name. + /// Type of activity. + /// Activity description. + /// Activity depends on condition. + /// Activity user properties. + /// . + /// Linked service reference. + /// Activity policy. + /// Case-sensitive path to folder that contains the U-SQL script. Type: string (or Expression with resultType string). + /// Script linked service reference. + /// The maximum number of nodes simultaneously used to run the job. Default value is 1. Type: integer (or Expression with resultType integer), minimum: 1. + /// Determines which jobs out of all that are queued should be selected to run first. The lower the number, the higher the priority. Default value is 1000. Type: integer (or Expression with resultType integer), minimum: 1. + /// Parameters for U-SQL job request. + /// Runtime version of the U-SQL engine to use. Type: string (or Expression with resultType string). + /// Compilation mode of U-SQL. Must be one of these values : Semantic, Full and SingleBox. Type: string (or Expression with resultType string). + internal DataLakeAnalyticsUsqlActivity(string name, string type, string description, IList dependsOn, IList userProperties, IDictionary additionalProperties, LinkedServiceReference linkedServiceName, ActivityPolicy policy, object scriptPath, LinkedServiceReference scriptLinkedService, object degreeOfParallelism, object priority, IDictionary parameters, object runtimeVersion, object compilationMode) : base(name, type, description, dependsOn, userProperties, additionalProperties, linkedServiceName, policy) + { + ScriptPath = scriptPath; + ScriptLinkedService = scriptLinkedService; + DegreeOfParallelism = degreeOfParallelism; + Priority = priority; + Parameters = parameters; + RuntimeVersion = runtimeVersion; + CompilationMode = compilationMode; + Type = type ?? "DataLakeAnalyticsU-SQL"; + } + + /// Case-sensitive path to folder that contains the U-SQL script. Type: string (or Expression with resultType string). + public object ScriptPath { get; set; } + /// Script linked service reference. + public LinkedServiceReference ScriptLinkedService { get; set; } + /// The maximum number of nodes simultaneously used to run the job. Default value is 1. Type: integer (or Expression with resultType integer), minimum: 1. + public object DegreeOfParallelism { get; set; } + /// Determines which jobs out of all that are queued should be selected to run first. The lower the number, the higher the priority. Default value is 1000. Type: integer (or Expression with resultType integer), minimum: 1. + public object Priority { get; set; } + /// Parameters for U-SQL job request. + public IDictionary Parameters { get; set; } + /// Runtime version of the U-SQL engine to use. Type: string (or Expression with resultType string). + public object RuntimeVersion { get; set; } + /// Compilation mode of U-SQL. Must be one of these values : Semantic, Full and SingleBox. Type: string (or Expression with resultType string). + public object CompilationMode { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatabricksNotebookActivity.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatabricksNotebookActivity.Serialization.cs new file mode 100644 index 000000000000..234776f9239e --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatabricksNotebookActivity.Serialization.cs @@ -0,0 +1,273 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class DatabricksNotebookActivity : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (LinkedServiceName != null) + { + writer.WritePropertyName("linkedServiceName"); + writer.WriteObjectValue(LinkedServiceName); + } + if (Policy != null) + { + writer.WritePropertyName("policy"); + writer.WriteObjectValue(Policy); + } + writer.WritePropertyName("name"); + writer.WriteStringValue(Name); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (DependsOn != null) + { + writer.WritePropertyName("dependsOn"); + writer.WriteStartArray(); + foreach (var item in DependsOn) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (UserProperties != null) + { + writer.WritePropertyName("userProperties"); + writer.WriteStartArray(); + foreach (var item in UserProperties) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + writer.WritePropertyName("notebookPath"); + writer.WriteObjectValue(NotebookPath); + if (BaseParameters != null) + { + writer.WritePropertyName("baseParameters"); + writer.WriteStartObject(); + foreach (var item in BaseParameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Libraries != null) + { + writer.WritePropertyName("libraries"); + writer.WriteStartArray(); + foreach (var item in Libraries) + { + writer.WriteStartObject(); + foreach (var item0 in item) + { + writer.WritePropertyName(item0.Key); + writer.WriteObjectValue(item0.Value); + } + writer.WriteEndObject(); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static DatabricksNotebookActivity DeserializeDatabricksNotebookActivity(JsonElement element) + { + LinkedServiceReference linkedServiceName = default; + ActivityPolicy policy = default; + string name = default; + string type = default; + string description = default; + IList dependsOn = default; + IList userProperties = default; + object notebookPath = default; + IDictionary baseParameters = default; + IList> libraries = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("linkedServiceName")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value); + continue; + } + if (property.NameEquals("policy")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + policy = ActivityPolicy.DeserializeActivityPolicy(property.Value); + continue; + } + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("dependsOn")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(ActivityDependency.DeserializeActivityDependency(item)); + } + } + dependsOn = array; + continue; + } + if (property.NameEquals("userProperties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(UserProperty.DeserializeUserProperty(item)); + } + } + userProperties = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("notebookPath")) + { + notebookPath = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("baseParameters")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property1 in property0.Value.EnumerateObject()) + { + if (property1.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property1.Name, null); + } + else + { + dictionary.Add(property1.Name, property1.Value.GetObject()); + } + } + baseParameters = dictionary; + continue; + } + if (property0.NameEquals("libraries")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List> array = new List>(); + foreach (var item in property0.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + Dictionary dictionary = new Dictionary(); + foreach (var property1 in item.EnumerateObject()) + { + if (property1.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property1.Name, null); + } + else + { + dictionary.Add(property1.Name, property1.Value.GetObject()); + } + } + array.Add(dictionary); + } + } + libraries = array; + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new DatabricksNotebookActivity(name, type, description, dependsOn, userProperties, additionalProperties, linkedServiceName, policy, notebookPath, baseParameters, libraries); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatabricksNotebookActivity.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatabricksNotebookActivity.cs new file mode 100644 index 000000000000..c5f4acc785e6 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatabricksNotebookActivity.cs @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// DatabricksNotebook activity. + public partial class DatabricksNotebookActivity : ExecutionActivity + { + /// Initializes a new instance of DatabricksNotebookActivity. + /// Activity name. + /// The absolute path of the notebook to be run in the Databricks Workspace. This path must begin with a slash. Type: string (or Expression with resultType string). + public DatabricksNotebookActivity(string name, object notebookPath) : base(name) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (notebookPath == null) + { + throw new ArgumentNullException(nameof(notebookPath)); + } + + NotebookPath = notebookPath; + Type = "DatabricksNotebook"; + } + + /// Initializes a new instance of DatabricksNotebookActivity. + /// Activity name. + /// Type of activity. + /// Activity description. + /// Activity depends on condition. + /// Activity user properties. + /// . + /// Linked service reference. + /// Activity policy. + /// The absolute path of the notebook to be run in the Databricks Workspace. This path must begin with a slash. Type: string (or Expression with resultType string). + /// Base parameters to be used for each run of this job.If the notebook takes a parameter that is not specified, the default value from the notebook will be used. + /// A list of libraries to be installed on the cluster that will execute the job. + internal DatabricksNotebookActivity(string name, string type, string description, IList dependsOn, IList userProperties, IDictionary additionalProperties, LinkedServiceReference linkedServiceName, ActivityPolicy policy, object notebookPath, IDictionary baseParameters, IList> libraries) : base(name, type, description, dependsOn, userProperties, additionalProperties, linkedServiceName, policy) + { + NotebookPath = notebookPath; + BaseParameters = baseParameters; + Libraries = libraries; + Type = type ?? "DatabricksNotebook"; + } + + /// The absolute path of the notebook to be run in the Databricks Workspace. This path must begin with a slash. Type: string (or Expression with resultType string). + public object NotebookPath { get; set; } + /// Base parameters to be used for each run of this job.If the notebook takes a parameter that is not specified, the default value from the notebook will be used. + public IDictionary BaseParameters { get; set; } + /// A list of libraries to be installed on the cluster that will execute the job. + public IList> Libraries { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatabricksSparkJarActivity.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatabricksSparkJarActivity.Serialization.cs new file mode 100644 index 000000000000..b2c824571f76 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatabricksSparkJarActivity.Serialization.cs @@ -0,0 +1,272 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class DatabricksSparkJarActivity : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (LinkedServiceName != null) + { + writer.WritePropertyName("linkedServiceName"); + writer.WriteObjectValue(LinkedServiceName); + } + if (Policy != null) + { + writer.WritePropertyName("policy"); + writer.WriteObjectValue(Policy); + } + writer.WritePropertyName("name"); + writer.WriteStringValue(Name); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (DependsOn != null) + { + writer.WritePropertyName("dependsOn"); + writer.WriteStartArray(); + foreach (var item in DependsOn) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (UserProperties != null) + { + writer.WritePropertyName("userProperties"); + writer.WriteStartArray(); + foreach (var item in UserProperties) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + writer.WritePropertyName("mainClassName"); + writer.WriteObjectValue(MainClassName); + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartArray(); + foreach (var item in Parameters) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Libraries != null) + { + writer.WritePropertyName("libraries"); + writer.WriteStartArray(); + foreach (var item in Libraries) + { + writer.WriteStartObject(); + foreach (var item0 in item) + { + writer.WritePropertyName(item0.Key); + writer.WriteObjectValue(item0.Value); + } + writer.WriteEndObject(); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static DatabricksSparkJarActivity DeserializeDatabricksSparkJarActivity(JsonElement element) + { + LinkedServiceReference linkedServiceName = default; + ActivityPolicy policy = default; + string name = default; + string type = default; + string description = default; + IList dependsOn = default; + IList userProperties = default; + object mainClassName = default; + IList parameters = default; + IList> libraries = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("linkedServiceName")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value); + continue; + } + if (property.NameEquals("policy")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + policy = ActivityPolicy.DeserializeActivityPolicy(property.Value); + continue; + } + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("dependsOn")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(ActivityDependency.DeserializeActivityDependency(item)); + } + } + dependsOn = array; + continue; + } + if (property.NameEquals("userProperties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(UserProperty.DeserializeUserProperty(item)); + } + } + userProperties = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("mainClassName")) + { + mainClassName = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("parameters")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + parameters = array; + continue; + } + if (property0.NameEquals("libraries")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List> array = new List>(); + foreach (var item in property0.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + Dictionary dictionary = new Dictionary(); + foreach (var property1 in item.EnumerateObject()) + { + if (property1.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property1.Name, null); + } + else + { + dictionary.Add(property1.Name, property1.Value.GetObject()); + } + } + array.Add(dictionary); + } + } + libraries = array; + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new DatabricksSparkJarActivity(name, type, description, dependsOn, userProperties, additionalProperties, linkedServiceName, policy, mainClassName, parameters, libraries); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatabricksSparkJarActivity.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatabricksSparkJarActivity.cs new file mode 100644 index 000000000000..41c79d61a7c0 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatabricksSparkJarActivity.cs @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// DatabricksSparkJar activity. + public partial class DatabricksSparkJarActivity : ExecutionActivity + { + /// Initializes a new instance of DatabricksSparkJarActivity. + /// Activity name. + /// The full name of the class containing the main method to be executed. This class must be contained in a JAR provided as a library. Type: string (or Expression with resultType string). + public DatabricksSparkJarActivity(string name, object mainClassName) : base(name) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (mainClassName == null) + { + throw new ArgumentNullException(nameof(mainClassName)); + } + + MainClassName = mainClassName; + Type = "DatabricksSparkJar"; + } + + /// Initializes a new instance of DatabricksSparkJarActivity. + /// Activity name. + /// Type of activity. + /// Activity description. + /// Activity depends on condition. + /// Activity user properties. + /// . + /// Linked service reference. + /// Activity policy. + /// The full name of the class containing the main method to be executed. This class must be contained in a JAR provided as a library. Type: string (or Expression with resultType string). + /// Parameters that will be passed to the main method. + /// A list of libraries to be installed on the cluster that will execute the job. + internal DatabricksSparkJarActivity(string name, string type, string description, IList dependsOn, IList userProperties, IDictionary additionalProperties, LinkedServiceReference linkedServiceName, ActivityPolicy policy, object mainClassName, IList parameters, IList> libraries) : base(name, type, description, dependsOn, userProperties, additionalProperties, linkedServiceName, policy) + { + MainClassName = mainClassName; + Parameters = parameters; + Libraries = libraries; + Type = type ?? "DatabricksSparkJar"; + } + + /// The full name of the class containing the main method to be executed. This class must be contained in a JAR provided as a library. Type: string (or Expression with resultType string). + public object MainClassName { get; set; } + /// Parameters that will be passed to the main method. + public IList Parameters { get; set; } + /// A list of libraries to be installed on the cluster that will execute the job. + public IList> Libraries { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatabricksSparkPythonActivity.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatabricksSparkPythonActivity.Serialization.cs new file mode 100644 index 000000000000..0ee6b2cf258b --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatabricksSparkPythonActivity.Serialization.cs @@ -0,0 +1,272 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class DatabricksSparkPythonActivity : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (LinkedServiceName != null) + { + writer.WritePropertyName("linkedServiceName"); + writer.WriteObjectValue(LinkedServiceName); + } + if (Policy != null) + { + writer.WritePropertyName("policy"); + writer.WriteObjectValue(Policy); + } + writer.WritePropertyName("name"); + writer.WriteStringValue(Name); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (DependsOn != null) + { + writer.WritePropertyName("dependsOn"); + writer.WriteStartArray(); + foreach (var item in DependsOn) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (UserProperties != null) + { + writer.WritePropertyName("userProperties"); + writer.WriteStartArray(); + foreach (var item in UserProperties) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + writer.WritePropertyName("pythonFile"); + writer.WriteObjectValue(PythonFile); + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartArray(); + foreach (var item in Parameters) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Libraries != null) + { + writer.WritePropertyName("libraries"); + writer.WriteStartArray(); + foreach (var item in Libraries) + { + writer.WriteStartObject(); + foreach (var item0 in item) + { + writer.WritePropertyName(item0.Key); + writer.WriteObjectValue(item0.Value); + } + writer.WriteEndObject(); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static DatabricksSparkPythonActivity DeserializeDatabricksSparkPythonActivity(JsonElement element) + { + LinkedServiceReference linkedServiceName = default; + ActivityPolicy policy = default; + string name = default; + string type = default; + string description = default; + IList dependsOn = default; + IList userProperties = default; + object pythonFile = default; + IList parameters = default; + IList> libraries = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("linkedServiceName")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value); + continue; + } + if (property.NameEquals("policy")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + policy = ActivityPolicy.DeserializeActivityPolicy(property.Value); + continue; + } + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("dependsOn")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(ActivityDependency.DeserializeActivityDependency(item)); + } + } + dependsOn = array; + continue; + } + if (property.NameEquals("userProperties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(UserProperty.DeserializeUserProperty(item)); + } + } + userProperties = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("pythonFile")) + { + pythonFile = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("parameters")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + parameters = array; + continue; + } + if (property0.NameEquals("libraries")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List> array = new List>(); + foreach (var item in property0.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + Dictionary dictionary = new Dictionary(); + foreach (var property1 in item.EnumerateObject()) + { + if (property1.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property1.Name, null); + } + else + { + dictionary.Add(property1.Name, property1.Value.GetObject()); + } + } + array.Add(dictionary); + } + } + libraries = array; + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new DatabricksSparkPythonActivity(name, type, description, dependsOn, userProperties, additionalProperties, linkedServiceName, policy, pythonFile, parameters, libraries); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatabricksSparkPythonActivity.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatabricksSparkPythonActivity.cs new file mode 100644 index 000000000000..907637028dbd --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatabricksSparkPythonActivity.cs @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// DatabricksSparkPython activity. + public partial class DatabricksSparkPythonActivity : ExecutionActivity + { + /// Initializes a new instance of DatabricksSparkPythonActivity. + /// Activity name. + /// The URI of the Python file to be executed. DBFS paths are supported. Type: string (or Expression with resultType string). + public DatabricksSparkPythonActivity(string name, object pythonFile) : base(name) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (pythonFile == null) + { + throw new ArgumentNullException(nameof(pythonFile)); + } + + PythonFile = pythonFile; + Type = "DatabricksSparkPython"; + } + + /// Initializes a new instance of DatabricksSparkPythonActivity. + /// Activity name. + /// Type of activity. + /// Activity description. + /// Activity depends on condition. + /// Activity user properties. + /// . + /// Linked service reference. + /// Activity policy. + /// The URI of the Python file to be executed. DBFS paths are supported. Type: string (or Expression with resultType string). + /// Command line parameters that will be passed to the Python file. + /// A list of libraries to be installed on the cluster that will execute the job. + internal DatabricksSparkPythonActivity(string name, string type, string description, IList dependsOn, IList userProperties, IDictionary additionalProperties, LinkedServiceReference linkedServiceName, ActivityPolicy policy, object pythonFile, IList parameters, IList> libraries) : base(name, type, description, dependsOn, userProperties, additionalProperties, linkedServiceName, policy) + { + PythonFile = pythonFile; + Parameters = parameters; + Libraries = libraries; + Type = type ?? "DatabricksSparkPython"; + } + + /// The URI of the Python file to be executed. DBFS paths are supported. Type: string (or Expression with resultType string). + public object PythonFile { get; set; } + /// Command line parameters that will be passed to the Python file. + public IList Parameters { get; set; } + /// A list of libraries to be installed on the cluster that will execute the job. + public IList> Libraries { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/Dataset.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/Dataset.Serialization.cs new file mode 100644 index 000000000000..7f62be2c2c23 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/Dataset.Serialization.cs @@ -0,0 +1,274 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class Dataset : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Structure != null) + { + writer.WritePropertyName("structure"); + writer.WriteObjectValue(Structure); + } + if (Schema != null) + { + writer.WritePropertyName("schema"); + writer.WriteObjectValue(Schema); + } + writer.WritePropertyName("linkedServiceName"); + writer.WriteObjectValue(LinkedServiceName); + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Folder != null) + { + writer.WritePropertyName("folder"); + writer.WriteObjectValue(Folder); + } + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static Dataset DeserializeDataset(JsonElement element) + { + if (element.TryGetProperty("type", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "AmazonMWSObject": return AmazonMWSObjectDataset.DeserializeAmazonMWSObjectDataset(element); + case "AmazonRedshiftTable": return AmazonRedshiftTableDataset.DeserializeAmazonRedshiftTableDataset(element); + case "Avro": return AvroDataset.DeserializeAvroDataset(element); + case "AzureDataExplorerTable": return AzureDataExplorerTableDataset.DeserializeAzureDataExplorerTableDataset(element); + case "AzureMariaDBTable": return AzureMariaDBTableDataset.DeserializeAzureMariaDBTableDataset(element); + case "AzureMySqlTable": return AzureMySqlTableDataset.DeserializeAzureMySqlTableDataset(element); + case "AzurePostgreSqlTable": return AzurePostgreSqlTableDataset.DeserializeAzurePostgreSqlTableDataset(element); + case "AzureSearchIndex": return AzureSearchIndexDataset.DeserializeAzureSearchIndexDataset(element); + case "AzureSqlDWTable": return AzureSqlDWTableDataset.DeserializeAzureSqlDWTableDataset(element); + case "AzureSqlMITable": return AzureSqlMITableDataset.DeserializeAzureSqlMITableDataset(element); + case "AzureSqlTable": return AzureSqlTableDataset.DeserializeAzureSqlTableDataset(element); + case "AzureTable": return AzureTableDataset.DeserializeAzureTableDataset(element); + case "Binary": return BinaryDataset.DeserializeBinaryDataset(element); + case "CassandraTable": return CassandraTableDataset.DeserializeCassandraTableDataset(element); + case "CommonDataServiceForAppsEntity": return CommonDataServiceForAppsEntityDataset.DeserializeCommonDataServiceForAppsEntityDataset(element); + case "ConcurObject": return ConcurObjectDataset.DeserializeConcurObjectDataset(element); + case "CosmosDbMongoDbApiCollection": return CosmosDbMongoDbApiCollectionDataset.DeserializeCosmosDbMongoDbApiCollectionDataset(element); + case "CosmosDbSqlApiCollection": return CosmosDbSqlApiCollectionDataset.DeserializeCosmosDbSqlApiCollectionDataset(element); + case "CouchbaseTable": return CouchbaseTableDataset.DeserializeCouchbaseTableDataset(element); + case "Db2Table": return Db2TableDataset.DeserializeDb2TableDataset(element); + case "DelimitedText": return DelimitedTextDataset.DeserializeDelimitedTextDataset(element); + case "DocumentDbCollection": return DocumentDbCollectionDataset.DeserializeDocumentDbCollectionDataset(element); + case "DrillTable": return DrillTableDataset.DeserializeDrillTableDataset(element); + case "DynamicsAXResource": return DynamicsAXResourceDataset.DeserializeDynamicsAXResourceDataset(element); + case "DynamicsCrmEntity": return DynamicsCrmEntityDataset.DeserializeDynamicsCrmEntityDataset(element); + case "DynamicsEntity": return DynamicsEntityDataset.DeserializeDynamicsEntityDataset(element); + case "EloquaObject": return EloquaObjectDataset.DeserializeEloquaObjectDataset(element); + case "GoogleAdWordsObject": return GoogleAdWordsObjectDataset.DeserializeGoogleAdWordsObjectDataset(element); + case "GoogleBigQueryObject": return GoogleBigQueryObjectDataset.DeserializeGoogleBigQueryObjectDataset(element); + case "GreenplumTable": return GreenplumTableDataset.DeserializeGreenplumTableDataset(element); + case "HBaseObject": return HBaseObjectDataset.DeserializeHBaseObjectDataset(element); + case "HiveObject": return HiveObjectDataset.DeserializeHiveObjectDataset(element); + case "HubspotObject": return HubspotObjectDataset.DeserializeHubspotObjectDataset(element); + case "ImpalaObject": return ImpalaObjectDataset.DeserializeImpalaObjectDataset(element); + case "InformixTable": return InformixTableDataset.DeserializeInformixTableDataset(element); + case "JiraObject": return JiraObjectDataset.DeserializeJiraObjectDataset(element); + case "Json": return JsonDataset.DeserializeJsonDataset(element); + case "MagentoObject": return MagentoObjectDataset.DeserializeMagentoObjectDataset(element); + case "MariaDBTable": return MariaDBTableDataset.DeserializeMariaDBTableDataset(element); + case "MarketoObject": return MarketoObjectDataset.DeserializeMarketoObjectDataset(element); + case "MicrosoftAccessTable": return MicrosoftAccessTableDataset.DeserializeMicrosoftAccessTableDataset(element); + case "MongoDbCollection": return MongoDbCollectionDataset.DeserializeMongoDbCollectionDataset(element); + case "MongoDbV2Collection": return MongoDbV2CollectionDataset.DeserializeMongoDbV2CollectionDataset(element); + case "MySqlTable": return MySqlTableDataset.DeserializeMySqlTableDataset(element); + case "NetezzaTable": return NetezzaTableDataset.DeserializeNetezzaTableDataset(element); + case "ODataResource": return ODataResourceDataset.DeserializeODataResourceDataset(element); + case "OdbcTable": return OdbcTableDataset.DeserializeOdbcTableDataset(element); + case "Office365Table": return Office365Dataset.DeserializeOffice365Dataset(element); + case "OracleServiceCloudObject": return OracleServiceCloudObjectDataset.DeserializeOracleServiceCloudObjectDataset(element); + case "OracleTable": return OracleTableDataset.DeserializeOracleTableDataset(element); + case "Orc": return OrcDataset.DeserializeOrcDataset(element); + case "Parquet": return ParquetDataset.DeserializeParquetDataset(element); + case "PaypalObject": return PaypalObjectDataset.DeserializePaypalObjectDataset(element); + case "PhoenixObject": return PhoenixObjectDataset.DeserializePhoenixObjectDataset(element); + case "PostgreSqlTable": return PostgreSqlTableDataset.DeserializePostgreSqlTableDataset(element); + case "PrestoObject": return PrestoObjectDataset.DeserializePrestoObjectDataset(element); + case "QuickBooksObject": return QuickBooksObjectDataset.DeserializeQuickBooksObjectDataset(element); + case "RelationalTable": return RelationalTableDataset.DeserializeRelationalTableDataset(element); + case "ResponsysObject": return ResponsysObjectDataset.DeserializeResponsysObjectDataset(element); + case "RestResource": return RestResourceDataset.DeserializeRestResourceDataset(element); + case "SalesforceMarketingCloudObject": return SalesforceMarketingCloudObjectDataset.DeserializeSalesforceMarketingCloudObjectDataset(element); + case "SalesforceObject": return SalesforceObjectDataset.DeserializeSalesforceObjectDataset(element); + case "SalesforceServiceCloudObject": return SalesforceServiceCloudObjectDataset.DeserializeSalesforceServiceCloudObjectDataset(element); + case "SapBwCube": return SapBwCubeDataset.DeserializeSapBwCubeDataset(element); + case "SapCloudForCustomerResource": return SapCloudForCustomerResourceDataset.DeserializeSapCloudForCustomerResourceDataset(element); + case "SapEccResource": return SapEccResourceDataset.DeserializeSapEccResourceDataset(element); + case "SapHanaTable": return SapHanaTableDataset.DeserializeSapHanaTableDataset(element); + case "SapOpenHubTable": return SapOpenHubTableDataset.DeserializeSapOpenHubTableDataset(element); + case "SapTableResource": return SapTableResourceDataset.DeserializeSapTableResourceDataset(element); + case "ServiceNowObject": return ServiceNowObjectDataset.DeserializeServiceNowObjectDataset(element); + case "ShopifyObject": return ShopifyObjectDataset.DeserializeShopifyObjectDataset(element); + case "SparkObject": return SparkObjectDataset.DeserializeSparkObjectDataset(element); + case "SqlServerTable": return SqlServerTableDataset.DeserializeSqlServerTableDataset(element); + case "SquareObject": return SquareObjectDataset.DeserializeSquareObjectDataset(element); + case "SybaseTable": return SybaseTableDataset.DeserializeSybaseTableDataset(element); + case "TeradataTable": return TeradataTableDataset.DeserializeTeradataTableDataset(element); + case "VerticaTable": return VerticaTableDataset.DeserializeVerticaTableDataset(element); + case "WebTable": return WebTableDataset.DeserializeWebTableDataset(element); + case "XeroObject": return XeroObjectDataset.DeserializeXeroObjectDataset(element); + case "ZohoObject": return ZohoObjectDataset.DeserializeZohoObjectDataset(element); + } + } + string type = default; + string description = default; + object structure = default; + object schema = default; + LinkedServiceReference linkedServiceName = default; + IDictionary parameters = default; + IList annotations = default; + DatasetFolder folder = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("structure")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + structure = property.Value.GetObject(); + continue; + } + if (property.NameEquals("schema")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + schema = property.Value.GetObject(); + continue; + } + if (property.NameEquals("linkedServiceName")) + { + linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("folder")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + folder = DatasetFolder.DeserializeDatasetFolder(property.Value); + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new Dataset(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/Dataset.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/Dataset.cs new file mode 100644 index 000000000000..571690e627e0 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/Dataset.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// The Azure Data Factory nested object which identifies data within different data stores, such as tables, files, folders, and documents. + public partial class Dataset : IDictionary + { + /// Initializes a new instance of Dataset. + /// Linked service reference. + public Dataset(LinkedServiceReference linkedServiceName) + { + if (linkedServiceName == null) + { + throw new ArgumentNullException(nameof(linkedServiceName)); + } + + LinkedServiceName = linkedServiceName; + AdditionalProperties = new Dictionary(); + Type = "Dataset"; + } + + /// Initializes a new instance of Dataset. + /// Type of dataset. + /// Dataset description. + /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. + /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. + /// Linked service reference. + /// Parameters for dataset. + /// List of tags that can be used for describing the Dataset. + /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. + /// . + internal Dataset(string type, string description, object structure, object schema, LinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary additionalProperties) + { + Type = type ?? "Dataset"; + Description = description; + Structure = structure; + Schema = schema; + LinkedServiceName = linkedServiceName; + Parameters = parameters; + Annotations = annotations; + Folder = folder; + AdditionalProperties = additionalProperties ?? new Dictionary(); + } + + /// Type of dataset. + internal string Type { get; set; } + /// Dataset description. + public string Description { get; set; } + /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. + public object Structure { get; set; } + /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. + public object Schema { get; set; } + /// Linked service reference. + public LinkedServiceReference LinkedServiceName { get; set; } + /// Parameters for dataset. + public IDictionary Parameters { get; set; } + /// List of tags that can be used for describing the Dataset. + public IList Annotations { get; set; } + /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. + public DatasetFolder Folder { get; set; } + internal IDictionary AdditionalProperties { get; } + /// + public IEnumerator> GetEnumerator() => AdditionalProperties.GetEnumerator(); + /// + IEnumerator IEnumerable.GetEnumerator() => AdditionalProperties.GetEnumerator(); + /// + public bool TryGetValue(string key, out object value) => AdditionalProperties.TryGetValue(key, out value); + /// + public bool ContainsKey(string key) => AdditionalProperties.ContainsKey(key); + /// + public ICollection Keys => AdditionalProperties.Keys; + /// + public ICollection Values => AdditionalProperties.Values; + /// + int ICollection>.Count => AdditionalProperties.Count; + /// + public void Add(string key, object value) => AdditionalProperties.Add(key, value); + /// + public bool Remove(string key) => AdditionalProperties.Remove(key); + /// + bool ICollection>.IsReadOnly => AdditionalProperties.IsReadOnly; + /// + void ICollection>.Add(KeyValuePair value) => AdditionalProperties.Add(value); + /// + bool ICollection>.Remove(KeyValuePair value) => AdditionalProperties.Remove(value); + /// + bool ICollection>.Contains(KeyValuePair value) => AdditionalProperties.Contains(value); + /// + void ICollection>.CopyTo(KeyValuePair[] destination, int offset) => AdditionalProperties.CopyTo(destination, offset); + /// + void ICollection>.Clear() => AdditionalProperties.Clear(); + /// + public object this[string key] + { + get => AdditionalProperties[key]; + set => AdditionalProperties[key] = value; + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatasetBZip2Compression.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatasetBZip2Compression.Serialization.cs new file mode 100644 index 000000000000..67f8dce032b3 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatasetBZip2Compression.Serialization.cs @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class DatasetBZip2Compression : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static DatasetBZip2Compression DeserializeDatasetBZip2Compression(JsonElement element) + { + string type = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new DatasetBZip2Compression(type, additionalProperties); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatasetBZip2Compression.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatasetBZip2Compression.cs new file mode 100644 index 000000000000..cc90d66cb283 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatasetBZip2Compression.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// The BZip2 compression method used on a dataset. + public partial class DatasetBZip2Compression : DatasetCompression + { + /// Initializes a new instance of DatasetBZip2Compression. + public DatasetBZip2Compression() + { + Type = "BZip2"; + } + + /// Initializes a new instance of DatasetBZip2Compression. + /// Type of dataset compression. + /// . + internal DatasetBZip2Compression(string type, IDictionary additionalProperties) : base(type, additionalProperties) + { + Type = type ?? "BZip2"; + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatasetCompression.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatasetCompression.Serialization.cs new file mode 100644 index 000000000000..2dc1759e950b --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatasetCompression.Serialization.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class DatasetCompression : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static DatasetCompression DeserializeDatasetCompression(JsonElement element) + { + if (element.TryGetProperty("type", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "BZip2": return DatasetBZip2Compression.DeserializeDatasetBZip2Compression(element); + case "Deflate": return DatasetDeflateCompression.DeserializeDatasetDeflateCompression(element); + case "GZip": return DatasetGZipCompression.DeserializeDatasetGZipCompression(element); + case "ZipDeflate": return DatasetZipDeflateCompression.DeserializeDatasetZipDeflateCompression(element); + } + } + string type = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new DatasetCompression(type, additionalProperties); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatasetCompression.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatasetCompression.cs new file mode 100644 index 000000000000..3c4e496f955a --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatasetCompression.cs @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// The compression method used on a dataset. + public partial class DatasetCompression : IDictionary + { + /// Initializes a new instance of DatasetCompression. + public DatasetCompression() + { + AdditionalProperties = new Dictionary(); + Type = "DatasetCompression"; + } + + /// Initializes a new instance of DatasetCompression. + /// Type of dataset compression. + /// . + internal DatasetCompression(string type, IDictionary additionalProperties) + { + Type = type ?? "DatasetCompression"; + AdditionalProperties = additionalProperties ?? new Dictionary(); + } + + /// Type of dataset compression. + internal string Type { get; set; } + internal IDictionary AdditionalProperties { get; } + /// + public IEnumerator> GetEnumerator() => AdditionalProperties.GetEnumerator(); + /// + IEnumerator IEnumerable.GetEnumerator() => AdditionalProperties.GetEnumerator(); + /// + public bool TryGetValue(string key, out object value) => AdditionalProperties.TryGetValue(key, out value); + /// + public bool ContainsKey(string key) => AdditionalProperties.ContainsKey(key); + /// + public ICollection Keys => AdditionalProperties.Keys; + /// + public ICollection Values => AdditionalProperties.Values; + /// + int ICollection>.Count => AdditionalProperties.Count; + /// + public void Add(string key, object value) => AdditionalProperties.Add(key, value); + /// + public bool Remove(string key) => AdditionalProperties.Remove(key); + /// + bool ICollection>.IsReadOnly => AdditionalProperties.IsReadOnly; + /// + void ICollection>.Add(KeyValuePair value) => AdditionalProperties.Add(value); + /// + bool ICollection>.Remove(KeyValuePair value) => AdditionalProperties.Remove(value); + /// + bool ICollection>.Contains(KeyValuePair value) => AdditionalProperties.Contains(value); + /// + void ICollection>.CopyTo(KeyValuePair[] destination, int offset) => AdditionalProperties.CopyTo(destination, offset); + /// + void ICollection>.Clear() => AdditionalProperties.Clear(); + /// + public object this[string key] + { + get => AdditionalProperties[key]; + set => AdditionalProperties[key] = value; + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatasetCompressionLevel.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatasetCompressionLevel.cs new file mode 100644 index 000000000000..c66e866a502b --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatasetCompressionLevel.cs @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// All available compression levels. + public readonly partial struct DatasetCompressionLevel : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + public DatasetCompressionLevel(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string OptimalValue = "Optimal"; + private const string FastestValue = "Fastest"; + + /// Optimal. + public static DatasetCompressionLevel Optimal { get; } = new DatasetCompressionLevel(OptimalValue); + /// Fastest. + public static DatasetCompressionLevel Fastest { get; } = new DatasetCompressionLevel(FastestValue); + /// Determines if two values are the same. + public static bool operator ==(DatasetCompressionLevel left, DatasetCompressionLevel right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DatasetCompressionLevel left, DatasetCompressionLevel right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator DatasetCompressionLevel(string value) => new DatasetCompressionLevel(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DatasetCompressionLevel other && Equals(other); + /// + public bool Equals(DatasetCompressionLevel other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatasetDebugResource.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatasetDebugResource.Serialization.cs new file mode 100644 index 000000000000..1ddb6b3a0273 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatasetDebugResource.Serialization.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class DatasetDebugResource : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("properties"); + writer.WriteObjectValue(Properties); + if (Name != null) + { + writer.WritePropertyName("name"); + writer.WriteStringValue(Name); + } + writer.WriteEndObject(); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatasetDebugResource.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatasetDebugResource.cs new file mode 100644 index 000000000000..41c504387d43 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatasetDebugResource.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Dataset debug resource. + public partial class DatasetDebugResource : SubResourceDebugResource + { + /// Initializes a new instance of DatasetDebugResource. + /// Dataset properties. + public DatasetDebugResource(Dataset properties) + { + if (properties == null) + { + throw new ArgumentNullException(nameof(properties)); + } + + Properties = properties; + } + + /// Initializes a new instance of DatasetDebugResource. + /// The resource name. + /// Dataset properties. + internal DatasetDebugResource(string name, Dataset properties) : base(name) + { + Properties = properties; + } + + /// Dataset properties. + public Dataset Properties { get; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatasetDeflateCompression.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatasetDeflateCompression.Serialization.cs new file mode 100644 index 000000000000..d08e5babb399 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatasetDeflateCompression.Serialization.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class DatasetDeflateCompression : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Level != null) + { + writer.WritePropertyName("level"); + writer.WriteStringValue(Level.Value.ToString()); + } + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static DatasetDeflateCompression DeserializeDatasetDeflateCompression(JsonElement element) + { + DatasetCompressionLevel? level = default; + string type = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("level")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + level = new DatasetCompressionLevel(property.Value.GetString()); + continue; + } + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new DatasetDeflateCompression(type, additionalProperties, level); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatasetDeflateCompression.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatasetDeflateCompression.cs new file mode 100644 index 000000000000..f825dbeb7b53 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatasetDeflateCompression.cs @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// The Deflate compression method used on a dataset. + public partial class DatasetDeflateCompression : DatasetCompression + { + /// Initializes a new instance of DatasetDeflateCompression. + public DatasetDeflateCompression() + { + Type = "Deflate"; + } + + /// Initializes a new instance of DatasetDeflateCompression. + /// Type of dataset compression. + /// . + /// The Deflate compression level. + internal DatasetDeflateCompression(string type, IDictionary additionalProperties, DatasetCompressionLevel? level) : base(type, additionalProperties) + { + Level = level; + Type = type ?? "Deflate"; + } + + /// The Deflate compression level. + public DatasetCompressionLevel? Level { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatasetFolder.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatasetFolder.Serialization.cs new file mode 100644 index 000000000000..41b451e7ea79 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatasetFolder.Serialization.cs @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class DatasetFolder : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Name != null) + { + writer.WritePropertyName("name"); + writer.WriteStringValue(Name); + } + writer.WriteEndObject(); + } + + internal static DatasetFolder DeserializeDatasetFolder(JsonElement element) + { + string name = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + name = property.Value.GetString(); + continue; + } + } + return new DatasetFolder(name); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatasetFolder.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatasetFolder.cs new file mode 100644 index 000000000000..224bebf4469f --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatasetFolder.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. + public partial class DatasetFolder + { + /// Initializes a new instance of DatasetFolder. + public DatasetFolder() + { + } + + /// Initializes a new instance of DatasetFolder. + /// The name of the folder that this Dataset is in. + internal DatasetFolder(string name) + { + Name = name; + } + + /// The name of the folder that this Dataset is in. + public string Name { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatasetGZipCompression.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatasetGZipCompression.Serialization.cs new file mode 100644 index 000000000000..97fa10fd0c66 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatasetGZipCompression.Serialization.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class DatasetGZipCompression : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Level != null) + { + writer.WritePropertyName("level"); + writer.WriteStringValue(Level.Value.ToString()); + } + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static DatasetGZipCompression DeserializeDatasetGZipCompression(JsonElement element) + { + DatasetCompressionLevel? level = default; + string type = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("level")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + level = new DatasetCompressionLevel(property.Value.GetString()); + continue; + } + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new DatasetGZipCompression(type, additionalProperties, level); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatasetGZipCompression.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatasetGZipCompression.cs new file mode 100644 index 000000000000..53baf8408ca5 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatasetGZipCompression.cs @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// The GZip compression method used on a dataset. + public partial class DatasetGZipCompression : DatasetCompression + { + /// Initializes a new instance of DatasetGZipCompression. + public DatasetGZipCompression() + { + Type = "GZip"; + } + + /// Initializes a new instance of DatasetGZipCompression. + /// Type of dataset compression. + /// . + /// The GZip compression level. + internal DatasetGZipCompression(string type, IDictionary additionalProperties, DatasetCompressionLevel? level) : base(type, additionalProperties) + { + Level = level; + Type = type ?? "GZip"; + } + + /// The GZip compression level. + public DatasetCompressionLevel? Level { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatasetListResponse.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatasetListResponse.Serialization.cs new file mode 100644 index 000000000000..29b963e7d8e3 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatasetListResponse.Serialization.cs @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class DatasetListResponse + { + internal static DatasetListResponse DeserializeDatasetListResponse(JsonElement element) + { + IReadOnlyList value = default; + string nextLink = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value")) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(DatasetResource.DeserializeDatasetResource(item)); + } + } + value = array; + continue; + } + if (property.NameEquals("nextLink")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = property.Value.GetString(); + continue; + } + } + return new DatasetListResponse(value, nextLink); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatasetListResponse.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatasetListResponse.cs new file mode 100644 index 000000000000..2c82b134dd6a --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatasetListResponse.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// A list of dataset resources. + public partial class DatasetListResponse + { + /// Initializes a new instance of DatasetListResponse. + /// List of datasets. + internal DatasetListResponse(IEnumerable value) + { + if (value == null) + { + throw new ArgumentNullException(nameof(value)); + } + + Value = value.ToArray(); + } + + /// Initializes a new instance of DatasetListResponse. + /// List of datasets. + /// The link to the next page of results, if any remaining results exist. + internal DatasetListResponse(IReadOnlyList value, string nextLink) + { + Value = value; + NextLink = nextLink; + } + + /// List of datasets. + public IReadOnlyList Value { get; } + /// The link to the next page of results, if any remaining results exist. + public string NextLink { get; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatasetLocation.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatasetLocation.Serialization.cs new file mode 100644 index 000000000000..9fe731692b3e --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatasetLocation.Serialization.cs @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class DatasetLocation : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (FolderPath != null) + { + writer.WritePropertyName("folderPath"); + writer.WriteObjectValue(FolderPath); + } + if (FileName != null) + { + writer.WritePropertyName("fileName"); + writer.WriteObjectValue(FileName); + } + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static DatasetLocation DeserializeDatasetLocation(JsonElement element) + { + string type = default; + object folderPath = default; + object fileName = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("folderPath")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + folderPath = property.Value.GetObject(); + continue; + } + if (property.NameEquals("fileName")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + fileName = property.Value.GetObject(); + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new DatasetLocation(type, folderPath, fileName, additionalProperties); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatasetLocation.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatasetLocation.cs new file mode 100644 index 000000000000..f4192690d161 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatasetLocation.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Dataset location. + public partial class DatasetLocation : IDictionary + { + /// Initializes a new instance of DatasetLocation. + public DatasetLocation() + { + AdditionalProperties = new Dictionary(); + Type = "DatasetLocation"; + } + + /// Initializes a new instance of DatasetLocation. + /// Type of dataset storage location. + /// Specify the folder path of dataset. Type: string (or Expression with resultType string). + /// Specify the file name of dataset. Type: string (or Expression with resultType string). + /// . + internal DatasetLocation(string type, object folderPath, object fileName, IDictionary additionalProperties) + { + Type = type ?? "DatasetLocation"; + FolderPath = folderPath; + FileName = fileName; + AdditionalProperties = additionalProperties ?? new Dictionary(); + } + + /// Type of dataset storage location. + internal string Type { get; set; } + /// Specify the folder path of dataset. Type: string (or Expression with resultType string). + public object FolderPath { get; set; } + /// Specify the file name of dataset. Type: string (or Expression with resultType string). + public object FileName { get; set; } + internal IDictionary AdditionalProperties { get; } + /// + public IEnumerator> GetEnumerator() => AdditionalProperties.GetEnumerator(); + /// + IEnumerator IEnumerable.GetEnumerator() => AdditionalProperties.GetEnumerator(); + /// + public bool TryGetValue(string key, out object value) => AdditionalProperties.TryGetValue(key, out value); + /// + public bool ContainsKey(string key) => AdditionalProperties.ContainsKey(key); + /// + public ICollection Keys => AdditionalProperties.Keys; + /// + public ICollection Values => AdditionalProperties.Values; + /// + int ICollection>.Count => AdditionalProperties.Count; + /// + public void Add(string key, object value) => AdditionalProperties.Add(key, value); + /// + public bool Remove(string key) => AdditionalProperties.Remove(key); + /// + bool ICollection>.IsReadOnly => AdditionalProperties.IsReadOnly; + /// + void ICollection>.Add(KeyValuePair value) => AdditionalProperties.Add(value); + /// + bool ICollection>.Remove(KeyValuePair value) => AdditionalProperties.Remove(value); + /// + bool ICollection>.Contains(KeyValuePair value) => AdditionalProperties.Contains(value); + /// + void ICollection>.CopyTo(KeyValuePair[] destination, int offset) => AdditionalProperties.CopyTo(destination, offset); + /// + void ICollection>.Clear() => AdditionalProperties.Clear(); + /// + public object this[string key] + { + get => AdditionalProperties[key]; + set => AdditionalProperties[key] = value; + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatasetReference.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatasetReference.Serialization.cs new file mode 100644 index 000000000000..606dbbf5a862 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatasetReference.Serialization.cs @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class DatasetReference : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + writer.WritePropertyName("referenceName"); + writer.WriteStringValue(ReferenceName); + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WriteEndObject(); + } + + internal static DatasetReference DeserializeDatasetReference(JsonElement element) + { + string type = default; + string referenceName = default; + IDictionary parameters = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("referenceName")) + { + referenceName = property.Value.GetString(); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, property0.Value.GetObject()); + } + } + parameters = dictionary; + continue; + } + } + return new DatasetReference(type, referenceName, parameters); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatasetReference.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatasetReference.cs new file mode 100644 index 000000000000..78a0f5b3f05d --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatasetReference.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Dataset reference type. + public partial class DatasetReference + { + /// Initializes a new instance of DatasetReference. + /// Reference dataset name. + public DatasetReference(string referenceName) + { + if (referenceName == null) + { + throw new ArgumentNullException(nameof(referenceName)); + } + + Type = "DatasetReference"; + ReferenceName = referenceName; + } + + /// Initializes a new instance of DatasetReference. + /// Dataset reference type. + /// Reference dataset name. + /// Arguments for dataset. + internal DatasetReference(string type, string referenceName, IDictionary parameters) + { + Type = type; + ReferenceName = referenceName; + Parameters = parameters; + } + + /// Dataset reference type. + public string Type { get; set; } + /// Reference dataset name. + public string ReferenceName { get; set; } + /// Arguments for dataset. + public IDictionary Parameters { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatasetResource.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatasetResource.Serialization.cs new file mode 100644 index 000000000000..f5b9c03636d1 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatasetResource.Serialization.cs @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class DatasetResource : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("properties"); + writer.WriteObjectValue(Properties); + if (Id != null) + { + writer.WritePropertyName("id"); + writer.WriteStringValue(Id); + } + if (Name != null) + { + writer.WritePropertyName("name"); + writer.WriteStringValue(Name); + } + if (Type != null) + { + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + } + if (Etag != null) + { + writer.WritePropertyName("etag"); + writer.WriteStringValue(Etag); + } + writer.WriteEndObject(); + } + + internal static DatasetResource DeserializeDatasetResource(JsonElement element) + { + Dataset properties = default; + string id = default; + string name = default; + string type = default; + string etag = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties")) + { + properties = Dataset.DeserializeDataset(property.Value); + continue; + } + if (property.NameEquals("id")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("name")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("etag")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + etag = property.Value.GetString(); + continue; + } + } + return new DatasetResource(id, name, type, etag, properties); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatasetResource.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatasetResource.cs new file mode 100644 index 000000000000..2fc9320ceccb --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatasetResource.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Dataset resource type. + public partial class DatasetResource : SubResource + { + /// Initializes a new instance of DatasetResource. + /// Dataset properties. + public DatasetResource(Dataset properties) + { + if (properties == null) + { + throw new ArgumentNullException(nameof(properties)); + } + + Properties = properties; + } + + /// Initializes a new instance of DatasetResource. + /// The resource identifier. + /// The resource name. + /// The resource type. + /// Etag identifies change in the resource. + /// Dataset properties. + internal DatasetResource(string id, string name, string type, string etag, Dataset properties) : base(id, name, type, etag) + { + Properties = properties; + } + + /// Dataset properties. + public Dataset Properties { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatasetZipDeflateCompression.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatasetZipDeflateCompression.Serialization.cs new file mode 100644 index 000000000000..2dc09295845f --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatasetZipDeflateCompression.Serialization.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class DatasetZipDeflateCompression : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Level != null) + { + writer.WritePropertyName("level"); + writer.WriteStringValue(Level.Value.ToString()); + } + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static DatasetZipDeflateCompression DeserializeDatasetZipDeflateCompression(JsonElement element) + { + DatasetCompressionLevel? level = default; + string type = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("level")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + level = new DatasetCompressionLevel(property.Value.GetString()); + continue; + } + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new DatasetZipDeflateCompression(type, additionalProperties, level); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatasetZipDeflateCompression.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatasetZipDeflateCompression.cs new file mode 100644 index 000000000000..ba26975d78e6 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatasetZipDeflateCompression.cs @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// The ZipDeflate compression method used on a dataset. + public partial class DatasetZipDeflateCompression : DatasetCompression + { + /// Initializes a new instance of DatasetZipDeflateCompression. + public DatasetZipDeflateCompression() + { + Type = "ZipDeflate"; + } + + /// Initializes a new instance of DatasetZipDeflateCompression. + /// Type of dataset compression. + /// . + /// The ZipDeflate compression level. + internal DatasetZipDeflateCompression(string type, IDictionary additionalProperties, DatasetCompressionLevel? level) : base(type, additionalProperties) + { + Level = level; + Type = type ?? "ZipDeflate"; + } + + /// The ZipDeflate compression level. + public DatasetCompressionLevel? Level { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/Db2LinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/Db2LinkedService.Serialization.cs new file mode 100644 index 000000000000..b8a0496c1609 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/Db2LinkedService.Serialization.cs @@ -0,0 +1,266 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class Db2LinkedService : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (ConnectVia != null) + { + writer.WritePropertyName("connectVia"); + writer.WriteObjectValue(ConnectVia); + } + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + writer.WritePropertyName("server"); + writer.WriteObjectValue(Server); + writer.WritePropertyName("database"); + writer.WriteObjectValue(Database); + if (AuthenticationType != null) + { + writer.WritePropertyName("authenticationType"); + writer.WriteStringValue(AuthenticationType); + } + if (Username != null) + { + writer.WritePropertyName("username"); + writer.WriteObjectValue(Username); + } + if (Password != null) + { + writer.WritePropertyName("password"); + writer.WriteObjectValue(Password); + } + if (PackageCollection != null) + { + writer.WritePropertyName("packageCollection"); + writer.WriteObjectValue(PackageCollection); + } + if (CertificateCommonName != null) + { + writer.WritePropertyName("certificateCommonName"); + writer.WriteObjectValue(CertificateCommonName); + } + if (EncryptedCredential != null) + { + writer.WritePropertyName("encryptedCredential"); + writer.WriteObjectValue(EncryptedCredential); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static Db2LinkedService DeserializeDb2LinkedService(JsonElement element) + { + string type = default; + IntegrationRuntimeReference connectVia = default; + string description = default; + IDictionary parameters = default; + IList annotations = default; + object server = default; + object database = default; + string authenticationType = default; + object username = default; + SecretBase password = default; + object packageCollection = default; + object certificateCommonName = default; + object encryptedCredential = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("connectVia")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("server")) + { + server = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("database")) + { + database = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("authenticationType")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + authenticationType = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("username")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + username = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("password")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + password = SecretBase.DeserializeSecretBase(property0.Value); + continue; + } + if (property0.NameEquals("packageCollection")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + packageCollection = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("certificateCommonName")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + certificateCommonName = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("encryptedCredential")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + encryptedCredential = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new Db2LinkedService(type, connectVia, description, parameters, annotations, additionalProperties, server, database, authenticationType, username, password, packageCollection, certificateCommonName, encryptedCredential); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/Db2LinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/Db2LinkedService.cs new file mode 100644 index 000000000000..7baf6ac03e0b --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/Db2LinkedService.cs @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Linked service for DB2 data source. + public partial class Db2LinkedService : LinkedService + { + /// Initializes a new instance of Db2LinkedService. + /// Server name for connection. Type: string (or Expression with resultType string). + /// Database name for connection. Type: string (or Expression with resultType string). + public Db2LinkedService(object server, object database) + { + if (server == null) + { + throw new ArgumentNullException(nameof(server)); + } + if (database == null) + { + throw new ArgumentNullException(nameof(database)); + } + + Server = server; + Database = database; + AuthenticationType = "Basic"; + Type = "Db2"; + } + + /// Initializes a new instance of Db2LinkedService. + /// Type of linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for describing the linked service. + /// . + /// Server name for connection. Type: string (or Expression with resultType string). + /// Database name for connection. Type: string (or Expression with resultType string). + /// AuthenticationType to be used for connection. + /// Username for authentication. Type: string (or Expression with resultType string). + /// Password for authentication. + /// Under where packages are created when querying database. Type: string (or Expression with resultType string). + /// Certificate Common Name when TLS is enabled. Type: string (or Expression with resultType string). + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + internal Db2LinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object server, object database, string authenticationType, object username, SecretBase password, object packageCollection, object certificateCommonName, object encryptedCredential) : base(type, connectVia, description, parameters, annotations, additionalProperties) + { + Server = server; + Database = database; + AuthenticationType = authenticationType; + Username = username; + Password = password; + PackageCollection = packageCollection; + CertificateCommonName = certificateCommonName; + EncryptedCredential = encryptedCredential; + Type = type ?? "Db2"; + } + + /// Server name for connection. Type: string (or Expression with resultType string). + public object Server { get; set; } + /// Database name for connection. Type: string (or Expression with resultType string). + public object Database { get; set; } + /// AuthenticationType to be used for connection. + public string AuthenticationType { get; set; } + /// Username for authentication. Type: string (or Expression with resultType string). + public object Username { get; set; } + /// Password for authentication. + public SecretBase Password { get; set; } + /// Under where packages are created when querying database. Type: string (or Expression with resultType string). + public object PackageCollection { get; set; } + /// Certificate Common Name when TLS is enabled. Type: string (or Expression with resultType string). + public object CertificateCommonName { get; set; } + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + public object EncryptedCredential { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/Db2TableDataset.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/Db2TableDataset.Serialization.cs new file mode 100644 index 000000000000..042c5c962f95 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/Db2TableDataset.Serialization.cs @@ -0,0 +1,243 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class Db2TableDataset : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Structure != null) + { + writer.WritePropertyName("structure"); + writer.WriteObjectValue(Structure); + } + if (Schema != null) + { + writer.WritePropertyName("schema"); + writer.WriteObjectValue(Schema); + } + writer.WritePropertyName("linkedServiceName"); + writer.WriteObjectValue(LinkedServiceName); + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Folder != null) + { + writer.WritePropertyName("folder"); + writer.WriteObjectValue(Folder); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + if (TableName != null) + { + writer.WritePropertyName("tableName"); + writer.WriteObjectValue(TableName); + } + if (SchemaTypePropertiesSchema != null) + { + writer.WritePropertyName("schema"); + writer.WriteObjectValue(SchemaTypePropertiesSchema); + } + if (Table != null) + { + writer.WritePropertyName("table"); + writer.WriteObjectValue(Table); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static Db2TableDataset DeserializeDb2TableDataset(JsonElement element) + { + string type = default; + string description = default; + object structure = default; + object schema = default; + LinkedServiceReference linkedServiceName = default; + IDictionary parameters = default; + IList annotations = default; + DatasetFolder folder = default; + object tableName = default; + object schema0 = default; + object table = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("structure")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + structure = property.Value.GetObject(); + continue; + } + if (property.NameEquals("schema")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + schema = property.Value.GetObject(); + continue; + } + if (property.NameEquals("linkedServiceName")) + { + linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("folder")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + folder = DatasetFolder.DeserializeDatasetFolder(property.Value); + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("tableName")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + tableName = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("schema")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + schema0 = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("table")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + table = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new Db2TableDataset(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties, tableName, schema0, table); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/Db2TableDataset.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/Db2TableDataset.cs new file mode 100644 index 000000000000..2cdfdf9b96fa --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/Db2TableDataset.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// The Db2 table dataset. + public partial class Db2TableDataset : Dataset + { + /// Initializes a new instance of Db2TableDataset. + /// Linked service reference. + public Db2TableDataset(LinkedServiceReference linkedServiceName) : base(linkedServiceName) + { + if (linkedServiceName == null) + { + throw new ArgumentNullException(nameof(linkedServiceName)); + } + + Type = "Db2Table"; + } + + /// Initializes a new instance of Db2TableDataset. + /// Type of dataset. + /// Dataset description. + /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. + /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. + /// Linked service reference. + /// Parameters for dataset. + /// List of tags that can be used for describing the Dataset. + /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. + /// . + /// This property will be retired. Please consider using schema + table properties instead. + /// The Db2 schema name. Type: string (or Expression with resultType string). + /// The Db2 table name. Type: string (or Expression with resultType string). + internal Db2TableDataset(string type, string description, object structure, object schema, LinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary additionalProperties, object tableName, object schemaTypePropertiesSchema, object table) : base(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) + { + TableName = tableName; + SchemaTypePropertiesSchema = schemaTypePropertiesSchema; + Table = table; + Type = type ?? "Db2Table"; + } + + /// This property will be retired. Please consider using schema + table properties instead. + public object TableName { get; set; } + /// The Db2 schema name. Type: string (or Expression with resultType string). + public object SchemaTypePropertiesSchema { get; set; } + /// The Db2 table name. Type: string (or Expression with resultType string). + public object Table { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DeleteActivity.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DeleteActivity.Serialization.cs new file mode 100644 index 000000000000..e1ead6af78bc --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DeleteActivity.Serialization.cs @@ -0,0 +1,250 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class DeleteActivity : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (LinkedServiceName != null) + { + writer.WritePropertyName("linkedServiceName"); + writer.WriteObjectValue(LinkedServiceName); + } + if (Policy != null) + { + writer.WritePropertyName("policy"); + writer.WriteObjectValue(Policy); + } + writer.WritePropertyName("name"); + writer.WriteStringValue(Name); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (DependsOn != null) + { + writer.WritePropertyName("dependsOn"); + writer.WriteStartArray(); + foreach (var item in DependsOn) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (UserProperties != null) + { + writer.WritePropertyName("userProperties"); + writer.WriteStartArray(); + foreach (var item in UserProperties) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + if (Recursive != null) + { + writer.WritePropertyName("recursive"); + writer.WriteObjectValue(Recursive); + } + if (MaxConcurrentConnections != null) + { + writer.WritePropertyName("maxConcurrentConnections"); + writer.WriteNumberValue(MaxConcurrentConnections.Value); + } + if (EnableLogging != null) + { + writer.WritePropertyName("enableLogging"); + writer.WriteObjectValue(EnableLogging); + } + if (LogStorageSettings != null) + { + writer.WritePropertyName("logStorageSettings"); + writer.WriteObjectValue(LogStorageSettings); + } + writer.WritePropertyName("dataset"); + writer.WriteObjectValue(Dataset); + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static DeleteActivity DeserializeDeleteActivity(JsonElement element) + { + LinkedServiceReference linkedServiceName = default; + ActivityPolicy policy = default; + string name = default; + string type = default; + string description = default; + IList dependsOn = default; + IList userProperties = default; + object recursive = default; + int? maxConcurrentConnections = default; + object enableLogging = default; + LogStorageSettings logStorageSettings = default; + DatasetReference dataset = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("linkedServiceName")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value); + continue; + } + if (property.NameEquals("policy")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + policy = ActivityPolicy.DeserializeActivityPolicy(property.Value); + continue; + } + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("dependsOn")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(ActivityDependency.DeserializeActivityDependency(item)); + } + } + dependsOn = array; + continue; + } + if (property.NameEquals("userProperties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(UserProperty.DeserializeUserProperty(item)); + } + } + userProperties = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("recursive")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + recursive = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("maxConcurrentConnections")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + maxConcurrentConnections = property0.Value.GetInt32(); + continue; + } + if (property0.NameEquals("enableLogging")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + enableLogging = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("logStorageSettings")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + logStorageSettings = LogStorageSettings.DeserializeLogStorageSettings(property0.Value); + continue; + } + if (property0.NameEquals("dataset")) + { + dataset = DatasetReference.DeserializeDatasetReference(property0.Value); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new DeleteActivity(name, type, description, dependsOn, userProperties, additionalProperties, linkedServiceName, policy, recursive, maxConcurrentConnections, enableLogging, logStorageSettings, dataset); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DeleteActivity.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DeleteActivity.cs new file mode 100644 index 000000000000..46bf0760a702 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DeleteActivity.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Delete activity. + public partial class DeleteActivity : ExecutionActivity + { + /// Initializes a new instance of DeleteActivity. + /// Activity name. + /// Delete activity dataset reference. + public DeleteActivity(string name, DatasetReference dataset) : base(name) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (dataset == null) + { + throw new ArgumentNullException(nameof(dataset)); + } + + Dataset = dataset; + Type = "Delete"; + } + + /// Initializes a new instance of DeleteActivity. + /// Activity name. + /// Type of activity. + /// Activity description. + /// Activity depends on condition. + /// Activity user properties. + /// . + /// Linked service reference. + /// Activity policy. + /// If true, files or sub-folders under current folder path will be deleted recursively. Default is false. Type: boolean (or Expression with resultType boolean). + /// The max concurrent connections to connect data source at the same time. + /// Whether to record detailed logs of delete-activity execution. Default value is false. Type: boolean (or Expression with resultType boolean). + /// Log storage settings customer need to provide when enableLogging is true. + /// Delete activity dataset reference. + internal DeleteActivity(string name, string type, string description, IList dependsOn, IList userProperties, IDictionary additionalProperties, LinkedServiceReference linkedServiceName, ActivityPolicy policy, object recursive, int? maxConcurrentConnections, object enableLogging, LogStorageSettings logStorageSettings, DatasetReference dataset) : base(name, type, description, dependsOn, userProperties, additionalProperties, linkedServiceName, policy) + { + Recursive = recursive; + MaxConcurrentConnections = maxConcurrentConnections; + EnableLogging = enableLogging; + LogStorageSettings = logStorageSettings; + Dataset = dataset; + Type = type ?? "Delete"; + } + + /// If true, files or sub-folders under current folder path will be deleted recursively. Default is false. Type: boolean (or Expression with resultType boolean). + public object Recursive { get; set; } + /// The max concurrent connections to connect data source at the same time. + public int? MaxConcurrentConnections { get; set; } + /// Whether to record detailed logs of delete-activity execution. Default value is false. Type: boolean (or Expression with resultType boolean). + public object EnableLogging { get; set; } + /// Log storage settings customer need to provide when enableLogging is true. + public LogStorageSettings LogStorageSettings { get; set; } + /// Delete activity dataset reference. + public DatasetReference Dataset { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DeleteDataFlowDebugSessionRequest.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DeleteDataFlowDebugSessionRequest.Serialization.cs new file mode 100644 index 000000000000..0a3127ffcfd6 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DeleteDataFlowDebugSessionRequest.Serialization.cs @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class DeleteDataFlowDebugSessionRequest : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (SessionId != null) + { + writer.WritePropertyName("sessionId"); + writer.WriteStringValue(SessionId); + } + if (DataFlowName != null) + { + writer.WritePropertyName("dataFlowName"); + writer.WriteStringValue(DataFlowName); + } + writer.WriteEndObject(); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DeleteDataFlowDebugSessionRequest.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DeleteDataFlowDebugSessionRequest.cs new file mode 100644 index 000000000000..0685a3b8db25 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DeleteDataFlowDebugSessionRequest.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Request body structure for deleting data flow debug session. + public partial class DeleteDataFlowDebugSessionRequest + { + /// Initializes a new instance of DeleteDataFlowDebugSessionRequest. + public DeleteDataFlowDebugSessionRequest() + { + } + + /// Initializes a new instance of DeleteDataFlowDebugSessionRequest. + /// The ID of data flow debug session. + /// The data flow which contains the debug session. + internal DeleteDataFlowDebugSessionRequest(string sessionId, string dataFlowName) + { + SessionId = sessionId; + DataFlowName = dataFlowName; + } + + /// The ID of data flow debug session. + public string SessionId { get; set; } + /// The data flow which contains the debug session. + public string DataFlowName { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DelimitedTextCompressionCodec.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DelimitedTextCompressionCodec.cs new file mode 100644 index 000000000000..e134801246ba --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DelimitedTextCompressionCodec.cs @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// The DelimitedTextCompressionCodec. + public readonly partial struct DelimitedTextCompressionCodec : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + public DelimitedTextCompressionCodec(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string Bzip2Value = "bzip2"; + private const string GzipValue = "gzip"; + private const string DeflateValue = "deflate"; + private const string ZipDeflateValue = "zipDeflate"; + private const string SnappyValue = "snappy"; + private const string Lz4Value = "lz4"; + + /// bzip2. + public static DelimitedTextCompressionCodec Bzip2 { get; } = new DelimitedTextCompressionCodec(Bzip2Value); + /// gzip. + public static DelimitedTextCompressionCodec Gzip { get; } = new DelimitedTextCompressionCodec(GzipValue); + /// deflate. + public static DelimitedTextCompressionCodec Deflate { get; } = new DelimitedTextCompressionCodec(DeflateValue); + /// zipDeflate. + public static DelimitedTextCompressionCodec ZipDeflate { get; } = new DelimitedTextCompressionCodec(ZipDeflateValue); + /// snappy. + public static DelimitedTextCompressionCodec Snappy { get; } = new DelimitedTextCompressionCodec(SnappyValue); + /// lz4. + public static DelimitedTextCompressionCodec Lz4 { get; } = new DelimitedTextCompressionCodec(Lz4Value); + /// Determines if two values are the same. + public static bool operator ==(DelimitedTextCompressionCodec left, DelimitedTextCompressionCodec right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DelimitedTextCompressionCodec left, DelimitedTextCompressionCodec right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator DelimitedTextCompressionCodec(string value) => new DelimitedTextCompressionCodec(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DelimitedTextCompressionCodec other && Equals(other); + /// + public bool Equals(DelimitedTextCompressionCodec other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DelimitedTextDataset.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DelimitedTextDataset.Serialization.cs new file mode 100644 index 000000000000..a61d0ba6e7fa --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DelimitedTextDataset.Serialization.cs @@ -0,0 +1,348 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class DelimitedTextDataset : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Structure != null) + { + writer.WritePropertyName("structure"); + writer.WriteObjectValue(Structure); + } + if (Schema != null) + { + writer.WritePropertyName("schema"); + writer.WriteObjectValue(Schema); + } + writer.WritePropertyName("linkedServiceName"); + writer.WriteObjectValue(LinkedServiceName); + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Folder != null) + { + writer.WritePropertyName("folder"); + writer.WriteObjectValue(Folder); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + if (Location != null) + { + writer.WritePropertyName("location"); + writer.WriteObjectValue(Location); + } + if (ColumnDelimiter != null) + { + writer.WritePropertyName("columnDelimiter"); + writer.WriteObjectValue(ColumnDelimiter); + } + if (RowDelimiter != null) + { + writer.WritePropertyName("rowDelimiter"); + writer.WriteObjectValue(RowDelimiter); + } + if (EncodingName != null) + { + writer.WritePropertyName("encodingName"); + writer.WriteObjectValue(EncodingName); + } + if (CompressionCodec != null) + { + writer.WritePropertyName("compressionCodec"); + writer.WriteStringValue(CompressionCodec.Value.ToString()); + } + if (CompressionLevel != null) + { + writer.WritePropertyName("compressionLevel"); + writer.WriteStringValue(CompressionLevel.Value.ToString()); + } + if (QuoteChar != null) + { + writer.WritePropertyName("quoteChar"); + writer.WriteObjectValue(QuoteChar); + } + if (EscapeChar != null) + { + writer.WritePropertyName("escapeChar"); + writer.WriteObjectValue(EscapeChar); + } + if (FirstRowAsHeader != null) + { + writer.WritePropertyName("firstRowAsHeader"); + writer.WriteObjectValue(FirstRowAsHeader); + } + if (NullValue != null) + { + writer.WritePropertyName("nullValue"); + writer.WriteObjectValue(NullValue); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static DelimitedTextDataset DeserializeDelimitedTextDataset(JsonElement element) + { + string type = default; + string description = default; + object structure = default; + object schema = default; + LinkedServiceReference linkedServiceName = default; + IDictionary parameters = default; + IList annotations = default; + DatasetFolder folder = default; + DatasetLocation location = default; + object columnDelimiter = default; + object rowDelimiter = default; + object encodingName = default; + DelimitedTextCompressionCodec? compressionCodec = default; + DatasetCompressionLevel? compressionLevel = default; + object quoteChar = default; + object escapeChar = default; + object firstRowAsHeader = default; + object nullValue = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("structure")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + structure = property.Value.GetObject(); + continue; + } + if (property.NameEquals("schema")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + schema = property.Value.GetObject(); + continue; + } + if (property.NameEquals("linkedServiceName")) + { + linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("folder")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + folder = DatasetFolder.DeserializeDatasetFolder(property.Value); + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("location")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + location = DatasetLocation.DeserializeDatasetLocation(property0.Value); + continue; + } + if (property0.NameEquals("columnDelimiter")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + columnDelimiter = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("rowDelimiter")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + rowDelimiter = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("encodingName")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + encodingName = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("compressionCodec")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + compressionCodec = new DelimitedTextCompressionCodec(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("compressionLevel")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + compressionLevel = new DatasetCompressionLevel(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("quoteChar")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + quoteChar = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("escapeChar")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + escapeChar = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("firstRowAsHeader")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + firstRowAsHeader = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("nullValue")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nullValue = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new DelimitedTextDataset(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties, location, columnDelimiter, rowDelimiter, encodingName, compressionCodec, compressionLevel, quoteChar, escapeChar, firstRowAsHeader, nullValue); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DelimitedTextDataset.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DelimitedTextDataset.cs new file mode 100644 index 000000000000..63d9dede1550 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DelimitedTextDataset.cs @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Delimited text dataset. + public partial class DelimitedTextDataset : Dataset + { + /// Initializes a new instance of DelimitedTextDataset. + /// Linked service reference. + public DelimitedTextDataset(LinkedServiceReference linkedServiceName) : base(linkedServiceName) + { + if (linkedServiceName == null) + { + throw new ArgumentNullException(nameof(linkedServiceName)); + } + + Type = "DelimitedText"; + } + + /// Initializes a new instance of DelimitedTextDataset. + /// Type of dataset. + /// Dataset description. + /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. + /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. + /// Linked service reference. + /// Parameters for dataset. + /// List of tags that can be used for describing the Dataset. + /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. + /// . + /// The location of the delimited text storage. + /// The column delimiter. Type: string (or Expression with resultType string). + /// The row delimiter. Type: string (or Expression with resultType string). + /// The code page name of the preferred encoding. If miss, the default value is UTF-8, unless BOM denotes another Unicode encoding. Refer to the name column of the table in the following link to set supported values: https://msdn.microsoft.com/library/system.text.encoding.aspx. Type: string (or Expression with resultType string). + /// . + /// The data compression method used for DelimitedText. + /// The quote character. Type: string (or Expression with resultType string). + /// The escape character. Type: string (or Expression with resultType string). + /// When used as input, treat the first row of data as headers. When used as output,write the headers into the output as the first row of data. The default value is false. Type: boolean (or Expression with resultType boolean). + /// The null value string. Type: string (or Expression with resultType string). + internal DelimitedTextDataset(string type, string description, object structure, object schema, LinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary additionalProperties, DatasetLocation location, object columnDelimiter, object rowDelimiter, object encodingName, DelimitedTextCompressionCodec? compressionCodec, DatasetCompressionLevel? compressionLevel, object quoteChar, object escapeChar, object firstRowAsHeader, object nullValue) : base(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) + { + Location = location; + ColumnDelimiter = columnDelimiter; + RowDelimiter = rowDelimiter; + EncodingName = encodingName; + CompressionCodec = compressionCodec; + CompressionLevel = compressionLevel; + QuoteChar = quoteChar; + EscapeChar = escapeChar; + FirstRowAsHeader = firstRowAsHeader; + NullValue = nullValue; + Type = type ?? "DelimitedText"; + } + + /// The location of the delimited text storage. + public DatasetLocation Location { get; set; } + /// The column delimiter. Type: string (or Expression with resultType string). + public object ColumnDelimiter { get; set; } + /// The row delimiter. Type: string (or Expression with resultType string). + public object RowDelimiter { get; set; } + /// The code page name of the preferred encoding. If miss, the default value is UTF-8, unless BOM denotes another Unicode encoding. Refer to the name column of the table in the following link to set supported values: https://msdn.microsoft.com/library/system.text.encoding.aspx. Type: string (or Expression with resultType string). + public object EncodingName { get; set; } + public DelimitedTextCompressionCodec? CompressionCodec { get; set; } + /// The data compression method used for DelimitedText. + public DatasetCompressionLevel? CompressionLevel { get; set; } + /// The quote character. Type: string (or Expression with resultType string). + public object QuoteChar { get; set; } + /// The escape character. Type: string (or Expression with resultType string). + public object EscapeChar { get; set; } + /// When used as input, treat the first row of data as headers. When used as output,write the headers into the output as the first row of data. The default value is false. Type: boolean (or Expression with resultType boolean). + public object FirstRowAsHeader { get; set; } + /// The null value string. Type: string (or Expression with resultType string). + public object NullValue { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DependencyCondition.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DependencyCondition.cs new file mode 100644 index 000000000000..a9402b956daf --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DependencyCondition.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// The DependencyCondition. + public readonly partial struct DependencyCondition : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + public DependencyCondition(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SucceededValue = "Succeeded"; + private const string FailedValue = "Failed"; + private const string SkippedValue = "Skipped"; + private const string CompletedValue = "Completed"; + + /// Succeeded. + public static DependencyCondition Succeeded { get; } = new DependencyCondition(SucceededValue); + /// Failed. + public static DependencyCondition Failed { get; } = new DependencyCondition(FailedValue); + /// Skipped. + public static DependencyCondition Skipped { get; } = new DependencyCondition(SkippedValue); + /// Completed. + public static DependencyCondition Completed { get; } = new DependencyCondition(CompletedValue); + /// Determines if two values are the same. + public static bool operator ==(DependencyCondition left, DependencyCondition right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DependencyCondition left, DependencyCondition right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator DependencyCondition(string value) => new DependencyCondition(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DependencyCondition other && Equals(other); + /// + public bool Equals(DependencyCondition other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DocumentDbCollectionDataset.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DocumentDbCollectionDataset.Serialization.cs new file mode 100644 index 000000000000..e55edb413ed1 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DocumentDbCollectionDataset.Serialization.cs @@ -0,0 +1,206 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class DocumentDbCollectionDataset : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Structure != null) + { + writer.WritePropertyName("structure"); + writer.WriteObjectValue(Structure); + } + if (Schema != null) + { + writer.WritePropertyName("schema"); + writer.WriteObjectValue(Schema); + } + writer.WritePropertyName("linkedServiceName"); + writer.WriteObjectValue(LinkedServiceName); + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Folder != null) + { + writer.WritePropertyName("folder"); + writer.WriteObjectValue(Folder); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + writer.WritePropertyName("collectionName"); + writer.WriteObjectValue(CollectionName); + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static DocumentDbCollectionDataset DeserializeDocumentDbCollectionDataset(JsonElement element) + { + string type = default; + string description = default; + object structure = default; + object schema = default; + LinkedServiceReference linkedServiceName = default; + IDictionary parameters = default; + IList annotations = default; + DatasetFolder folder = default; + object collectionName = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("structure")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + structure = property.Value.GetObject(); + continue; + } + if (property.NameEquals("schema")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + schema = property.Value.GetObject(); + continue; + } + if (property.NameEquals("linkedServiceName")) + { + linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("folder")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + folder = DatasetFolder.DeserializeDatasetFolder(property.Value); + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("collectionName")) + { + collectionName = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new DocumentDbCollectionDataset(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties, collectionName); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DocumentDbCollectionDataset.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DocumentDbCollectionDataset.cs new file mode 100644 index 000000000000..ea6619b043d5 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DocumentDbCollectionDataset.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Microsoft Azure Document Database Collection dataset. + public partial class DocumentDbCollectionDataset : Dataset + { + /// Initializes a new instance of DocumentDbCollectionDataset. + /// Linked service reference. + /// Document Database collection name. Type: string (or Expression with resultType string). + public DocumentDbCollectionDataset(LinkedServiceReference linkedServiceName, object collectionName) : base(linkedServiceName) + { + if (linkedServiceName == null) + { + throw new ArgumentNullException(nameof(linkedServiceName)); + } + if (collectionName == null) + { + throw new ArgumentNullException(nameof(collectionName)); + } + + CollectionName = collectionName; + Type = "DocumentDbCollection"; + } + + /// Initializes a new instance of DocumentDbCollectionDataset. + /// Type of dataset. + /// Dataset description. + /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. + /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. + /// Linked service reference. + /// Parameters for dataset. + /// List of tags that can be used for describing the Dataset. + /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. + /// . + /// Document Database collection name. Type: string (or Expression with resultType string). + internal DocumentDbCollectionDataset(string type, string description, object structure, object schema, LinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary additionalProperties, object collectionName) : base(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) + { + CollectionName = collectionName; + Type = type ?? "DocumentDbCollection"; + } + + /// Document Database collection name. Type: string (or Expression with resultType string). + public object CollectionName { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DrillLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DrillLinkedService.Serialization.cs new file mode 100644 index 000000000000..246b596bc1e7 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DrillLinkedService.Serialization.cs @@ -0,0 +1,205 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class DrillLinkedService : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (ConnectVia != null) + { + writer.WritePropertyName("connectVia"); + writer.WriteObjectValue(ConnectVia); + } + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + if (ConnectionString != null) + { + writer.WritePropertyName("connectionString"); + writer.WriteObjectValue(ConnectionString); + } + if (Pwd != null) + { + writer.WritePropertyName("pwd"); + writer.WriteObjectValue(Pwd); + } + if (EncryptedCredential != null) + { + writer.WritePropertyName("encryptedCredential"); + writer.WriteObjectValue(EncryptedCredential); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static DrillLinkedService DeserializeDrillLinkedService(JsonElement element) + { + string type = default; + IntegrationRuntimeReference connectVia = default; + string description = default; + IDictionary parameters = default; + IList annotations = default; + object connectionString = default; + AzureKeyVaultSecretReference pwd = default; + object encryptedCredential = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("connectVia")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("connectionString")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectionString = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("pwd")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + pwd = AzureKeyVaultSecretReference.DeserializeAzureKeyVaultSecretReference(property0.Value); + continue; + } + if (property0.NameEquals("encryptedCredential")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + encryptedCredential = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new DrillLinkedService(type, connectVia, description, parameters, annotations, additionalProperties, connectionString, pwd, encryptedCredential); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DrillLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DrillLinkedService.cs new file mode 100644 index 000000000000..c8c6e1c2896d --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DrillLinkedService.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Drill server linked service. + public partial class DrillLinkedService : LinkedService + { + /// Initializes a new instance of DrillLinkedService. + public DrillLinkedService() + { + Type = "Drill"; + } + + /// Initializes a new instance of DrillLinkedService. + /// Type of linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for describing the linked service. + /// . + /// An ODBC connection string. Type: string, SecureString or AzureKeyVaultSecretReference. + /// The Azure key vault secret reference of password in connection string. + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + internal DrillLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object connectionString, AzureKeyVaultSecretReference pwd, object encryptedCredential) : base(type, connectVia, description, parameters, annotations, additionalProperties) + { + ConnectionString = connectionString; + Pwd = pwd; + EncryptedCredential = encryptedCredential; + Type = type ?? "Drill"; + } + + /// An ODBC connection string. Type: string, SecureString or AzureKeyVaultSecretReference. + public object ConnectionString { get; set; } + /// The Azure key vault secret reference of password in connection string. + public AzureKeyVaultSecretReference Pwd { get; set; } + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + public object EncryptedCredential { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DrillTableDataset.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DrillTableDataset.Serialization.cs new file mode 100644 index 000000000000..303be1b29f5d --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DrillTableDataset.Serialization.cs @@ -0,0 +1,243 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class DrillTableDataset : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Structure != null) + { + writer.WritePropertyName("structure"); + writer.WriteObjectValue(Structure); + } + if (Schema != null) + { + writer.WritePropertyName("schema"); + writer.WriteObjectValue(Schema); + } + writer.WritePropertyName("linkedServiceName"); + writer.WriteObjectValue(LinkedServiceName); + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Folder != null) + { + writer.WritePropertyName("folder"); + writer.WriteObjectValue(Folder); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + if (TableName != null) + { + writer.WritePropertyName("tableName"); + writer.WriteObjectValue(TableName); + } + if (Table != null) + { + writer.WritePropertyName("table"); + writer.WriteObjectValue(Table); + } + if (SchemaTypePropertiesSchema != null) + { + writer.WritePropertyName("schema"); + writer.WriteObjectValue(SchemaTypePropertiesSchema); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static DrillTableDataset DeserializeDrillTableDataset(JsonElement element) + { + string type = default; + string description = default; + object structure = default; + object schema = default; + LinkedServiceReference linkedServiceName = default; + IDictionary parameters = default; + IList annotations = default; + DatasetFolder folder = default; + object tableName = default; + object table = default; + object schema0 = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("structure")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + structure = property.Value.GetObject(); + continue; + } + if (property.NameEquals("schema")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + schema = property.Value.GetObject(); + continue; + } + if (property.NameEquals("linkedServiceName")) + { + linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("folder")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + folder = DatasetFolder.DeserializeDatasetFolder(property.Value); + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("tableName")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + tableName = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("table")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + table = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("schema")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + schema0 = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new DrillTableDataset(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties, tableName, table, schema0); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DrillTableDataset.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DrillTableDataset.cs new file mode 100644 index 000000000000..7b280db07917 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DrillTableDataset.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Drill server dataset. + public partial class DrillTableDataset : Dataset + { + /// Initializes a new instance of DrillTableDataset. + /// Linked service reference. + public DrillTableDataset(LinkedServiceReference linkedServiceName) : base(linkedServiceName) + { + if (linkedServiceName == null) + { + throw new ArgumentNullException(nameof(linkedServiceName)); + } + + Type = "DrillTable"; + } + + /// Initializes a new instance of DrillTableDataset. + /// Type of dataset. + /// Dataset description. + /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. + /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. + /// Linked service reference. + /// Parameters for dataset. + /// List of tags that can be used for describing the Dataset. + /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. + /// . + /// This property will be retired. Please consider using schema + table properties instead. + /// The table name of the Drill. Type: string (or Expression with resultType string). + /// The schema name of the Drill. Type: string (or Expression with resultType string). + internal DrillTableDataset(string type, string description, object structure, object schema, LinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary additionalProperties, object tableName, object table, object schemaTypePropertiesSchema) : base(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) + { + TableName = tableName; + Table = table; + SchemaTypePropertiesSchema = schemaTypePropertiesSchema; + Type = type ?? "DrillTable"; + } + + /// This property will be retired. Please consider using schema + table properties instead. + public object TableName { get; set; } + /// The table name of the Drill. Type: string (or Expression with resultType string). + public object Table { get; set; } + /// The schema name of the Drill. Type: string (or Expression with resultType string). + public object SchemaTypePropertiesSchema { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DynamicsAXLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DynamicsAXLinkedService.Serialization.cs new file mode 100644 index 000000000000..d478a10e8519 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DynamicsAXLinkedService.Serialization.cs @@ -0,0 +1,215 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class DynamicsAXLinkedService : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (ConnectVia != null) + { + writer.WritePropertyName("connectVia"); + writer.WriteObjectValue(ConnectVia); + } + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + writer.WritePropertyName("url"); + writer.WriteObjectValue(Url); + writer.WritePropertyName("servicePrincipalId"); + writer.WriteObjectValue(ServicePrincipalId); + writer.WritePropertyName("servicePrincipalKey"); + writer.WriteObjectValue(ServicePrincipalKey); + writer.WritePropertyName("tenant"); + writer.WriteObjectValue(Tenant); + writer.WritePropertyName("aadResourceId"); + writer.WriteObjectValue(AadResourceId); + if (EncryptedCredential != null) + { + writer.WritePropertyName("encryptedCredential"); + writer.WriteObjectValue(EncryptedCredential); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static DynamicsAXLinkedService DeserializeDynamicsAXLinkedService(JsonElement element) + { + string type = default; + IntegrationRuntimeReference connectVia = default; + string description = default; + IDictionary parameters = default; + IList annotations = default; + object url = default; + object servicePrincipalId = default; + SecretBase servicePrincipalKey = default; + object tenant = default; + object aadResourceId = default; + object encryptedCredential = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("connectVia")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("url")) + { + url = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("servicePrincipalId")) + { + servicePrincipalId = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("servicePrincipalKey")) + { + servicePrincipalKey = SecretBase.DeserializeSecretBase(property0.Value); + continue; + } + if (property0.NameEquals("tenant")) + { + tenant = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("aadResourceId")) + { + aadResourceId = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("encryptedCredential")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + encryptedCredential = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new DynamicsAXLinkedService(type, connectVia, description, parameters, annotations, additionalProperties, url, servicePrincipalId, servicePrincipalKey, tenant, aadResourceId, encryptedCredential); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DynamicsAXLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DynamicsAXLinkedService.cs new file mode 100644 index 000000000000..0d1de76f6260 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DynamicsAXLinkedService.cs @@ -0,0 +1,90 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Dynamics AX linked service. + public partial class DynamicsAXLinkedService : LinkedService + { + /// Initializes a new instance of DynamicsAXLinkedService. + /// The Dynamics AX (or Dynamics 365 Finance and Operations) instance OData endpoint. + /// Specify the application's client ID. Type: string (or Expression with resultType string). + /// Specify the application's key. Mark this field as a SecureString to store it securely in Data Factory, or reference a secret stored in Azure Key Vault. Type: string (or Expression with resultType string). + /// Specify the tenant information (domain name or tenant ID) under which your application resides. Retrieve it by hovering the mouse in the top-right corner of the Azure portal. Type: string (or Expression with resultType string). + /// Specify the resource you are requesting authorization. Type: string (or Expression with resultType string). + public DynamicsAXLinkedService(object url, object servicePrincipalId, SecretBase servicePrincipalKey, object tenant, object aadResourceId) + { + if (url == null) + { + throw new ArgumentNullException(nameof(url)); + } + if (servicePrincipalId == null) + { + throw new ArgumentNullException(nameof(servicePrincipalId)); + } + if (servicePrincipalKey == null) + { + throw new ArgumentNullException(nameof(servicePrincipalKey)); + } + if (tenant == null) + { + throw new ArgumentNullException(nameof(tenant)); + } + if (aadResourceId == null) + { + throw new ArgumentNullException(nameof(aadResourceId)); + } + + Url = url; + ServicePrincipalId = servicePrincipalId; + ServicePrincipalKey = servicePrincipalKey; + Tenant = tenant; + AadResourceId = aadResourceId; + Type = "DynamicsAX"; + } + + /// Initializes a new instance of DynamicsAXLinkedService. + /// Type of linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for describing the linked service. + /// . + /// The Dynamics AX (or Dynamics 365 Finance and Operations) instance OData endpoint. + /// Specify the application's client ID. Type: string (or Expression with resultType string). + /// Specify the application's key. Mark this field as a SecureString to store it securely in Data Factory, or reference a secret stored in Azure Key Vault. Type: string (or Expression with resultType string). + /// Specify the tenant information (domain name or tenant ID) under which your application resides. Retrieve it by hovering the mouse in the top-right corner of the Azure portal. Type: string (or Expression with resultType string). + /// Specify the resource you are requesting authorization. Type: string (or Expression with resultType string). + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + internal DynamicsAXLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object url, object servicePrincipalId, SecretBase servicePrincipalKey, object tenant, object aadResourceId, object encryptedCredential) : base(type, connectVia, description, parameters, annotations, additionalProperties) + { + Url = url; + ServicePrincipalId = servicePrincipalId; + ServicePrincipalKey = servicePrincipalKey; + Tenant = tenant; + AadResourceId = aadResourceId; + EncryptedCredential = encryptedCredential; + Type = type ?? "DynamicsAX"; + } + + /// The Dynamics AX (or Dynamics 365 Finance and Operations) instance OData endpoint. + public object Url { get; set; } + /// Specify the application's client ID. Type: string (or Expression with resultType string). + public object ServicePrincipalId { get; set; } + /// Specify the application's key. Mark this field as a SecureString to store it securely in Data Factory, or reference a secret stored in Azure Key Vault. Type: string (or Expression with resultType string). + public SecretBase ServicePrincipalKey { get; set; } + /// Specify the tenant information (domain name or tenant ID) under which your application resides. Retrieve it by hovering the mouse in the top-right corner of the Azure portal. Type: string (or Expression with resultType string). + public object Tenant { get; set; } + /// Specify the resource you are requesting authorization. Type: string (or Expression with resultType string). + public object AadResourceId { get; set; } + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + public object EncryptedCredential { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DynamicsAXResourceDataset.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DynamicsAXResourceDataset.Serialization.cs new file mode 100644 index 000000000000..0f623fca9e35 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DynamicsAXResourceDataset.Serialization.cs @@ -0,0 +1,206 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class DynamicsAXResourceDataset : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Structure != null) + { + writer.WritePropertyName("structure"); + writer.WriteObjectValue(Structure); + } + if (Schema != null) + { + writer.WritePropertyName("schema"); + writer.WriteObjectValue(Schema); + } + writer.WritePropertyName("linkedServiceName"); + writer.WriteObjectValue(LinkedServiceName); + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Folder != null) + { + writer.WritePropertyName("folder"); + writer.WriteObjectValue(Folder); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + writer.WritePropertyName("path"); + writer.WriteObjectValue(Path); + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static DynamicsAXResourceDataset DeserializeDynamicsAXResourceDataset(JsonElement element) + { + string type = default; + string description = default; + object structure = default; + object schema = default; + LinkedServiceReference linkedServiceName = default; + IDictionary parameters = default; + IList annotations = default; + DatasetFolder folder = default; + object path = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("structure")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + structure = property.Value.GetObject(); + continue; + } + if (property.NameEquals("schema")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + schema = property.Value.GetObject(); + continue; + } + if (property.NameEquals("linkedServiceName")) + { + linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("folder")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + folder = DatasetFolder.DeserializeDatasetFolder(property.Value); + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("path")) + { + path = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new DynamicsAXResourceDataset(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties, path); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DynamicsAXResourceDataset.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DynamicsAXResourceDataset.cs new file mode 100644 index 000000000000..c07a58a1ce19 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DynamicsAXResourceDataset.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// The path of the Dynamics AX OData entity. + public partial class DynamicsAXResourceDataset : Dataset + { + /// Initializes a new instance of DynamicsAXResourceDataset. + /// Linked service reference. + /// The path of the Dynamics AX OData entity. Type: string (or Expression with resultType string). + public DynamicsAXResourceDataset(LinkedServiceReference linkedServiceName, object path) : base(linkedServiceName) + { + if (linkedServiceName == null) + { + throw new ArgumentNullException(nameof(linkedServiceName)); + } + if (path == null) + { + throw new ArgumentNullException(nameof(path)); + } + + Path = path; + Type = "DynamicsAXResource"; + } + + /// Initializes a new instance of DynamicsAXResourceDataset. + /// Type of dataset. + /// Dataset description. + /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. + /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. + /// Linked service reference. + /// Parameters for dataset. + /// List of tags that can be used for describing the Dataset. + /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. + /// . + /// The path of the Dynamics AX OData entity. Type: string (or Expression with resultType string). + internal DynamicsAXResourceDataset(string type, string description, object structure, object schema, LinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary additionalProperties, object path) : base(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) + { + Path = path; + Type = type ?? "DynamicsAXResource"; + } + + /// The path of the Dynamics AX OData entity. Type: string (or Expression with resultType string). + public object Path { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DynamicsAuthenticationType.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DynamicsAuthenticationType.cs new file mode 100644 index 000000000000..2df203fa965c --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DynamicsAuthenticationType.cs @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// The authentication type to connect to Dynamics server. 'Office365' for online scenario, 'Ifd' for on-premises with Ifd scenario, 'AADServicePrincipal' for Server-To-Server authentication in online scenario. Type: string (or Expression with resultType string). + public readonly partial struct DynamicsAuthenticationType : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + public DynamicsAuthenticationType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string Office365Value = "Office365"; + private const string IfdValue = "Ifd"; + private const string AADServicePrincipalValue = "AADServicePrincipal"; + + /// Office365. + public static DynamicsAuthenticationType Office365 { get; } = new DynamicsAuthenticationType(Office365Value); + /// Ifd. + public static DynamicsAuthenticationType Ifd { get; } = new DynamicsAuthenticationType(IfdValue); + /// AADServicePrincipal. + public static DynamicsAuthenticationType AADServicePrincipal { get; } = new DynamicsAuthenticationType(AADServicePrincipalValue); + /// Determines if two values are the same. + public static bool operator ==(DynamicsAuthenticationType left, DynamicsAuthenticationType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DynamicsAuthenticationType left, DynamicsAuthenticationType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator DynamicsAuthenticationType(string value) => new DynamicsAuthenticationType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DynamicsAuthenticationType other && Equals(other); + /// + public bool Equals(DynamicsAuthenticationType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DynamicsCrmEntityDataset.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DynamicsCrmEntityDataset.Serialization.cs new file mode 100644 index 000000000000..152083476395 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DynamicsCrmEntityDataset.Serialization.cs @@ -0,0 +1,213 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class DynamicsCrmEntityDataset : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Structure != null) + { + writer.WritePropertyName("structure"); + writer.WriteObjectValue(Structure); + } + if (Schema != null) + { + writer.WritePropertyName("schema"); + writer.WriteObjectValue(Schema); + } + writer.WritePropertyName("linkedServiceName"); + writer.WriteObjectValue(LinkedServiceName); + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Folder != null) + { + writer.WritePropertyName("folder"); + writer.WriteObjectValue(Folder); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + if (EntityName != null) + { + writer.WritePropertyName("entityName"); + writer.WriteObjectValue(EntityName); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static DynamicsCrmEntityDataset DeserializeDynamicsCrmEntityDataset(JsonElement element) + { + string type = default; + string description = default; + object structure = default; + object schema = default; + LinkedServiceReference linkedServiceName = default; + IDictionary parameters = default; + IList annotations = default; + DatasetFolder folder = default; + object entityName = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("structure")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + structure = property.Value.GetObject(); + continue; + } + if (property.NameEquals("schema")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + schema = property.Value.GetObject(); + continue; + } + if (property.NameEquals("linkedServiceName")) + { + linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("folder")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + folder = DatasetFolder.DeserializeDatasetFolder(property.Value); + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("entityName")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + entityName = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new DynamicsCrmEntityDataset(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties, entityName); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DynamicsCrmEntityDataset.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DynamicsCrmEntityDataset.cs new file mode 100644 index 000000000000..28474d7fb152 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DynamicsCrmEntityDataset.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// The Dynamics CRM entity dataset. + public partial class DynamicsCrmEntityDataset : Dataset + { + /// Initializes a new instance of DynamicsCrmEntityDataset. + /// Linked service reference. + public DynamicsCrmEntityDataset(LinkedServiceReference linkedServiceName) : base(linkedServiceName) + { + if (linkedServiceName == null) + { + throw new ArgumentNullException(nameof(linkedServiceName)); + } + + Type = "DynamicsCrmEntity"; + } + + /// Initializes a new instance of DynamicsCrmEntityDataset. + /// Type of dataset. + /// Dataset description. + /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. + /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. + /// Linked service reference. + /// Parameters for dataset. + /// List of tags that can be used for describing the Dataset. + /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. + /// . + /// The logical name of the entity. Type: string (or Expression with resultType string). + internal DynamicsCrmEntityDataset(string type, string description, object structure, object schema, LinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary additionalProperties, object entityName) : base(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) + { + EntityName = entityName; + Type = type ?? "DynamicsCrmEntity"; + } + + /// The logical name of the entity. Type: string (or Expression with resultType string). + public object EntityName { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DynamicsCrmLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DynamicsCrmLinkedService.Serialization.cs new file mode 100644 index 000000000000..ee761540b194 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DynamicsCrmLinkedService.Serialization.cs @@ -0,0 +1,326 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class DynamicsCrmLinkedService : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (ConnectVia != null) + { + writer.WritePropertyName("connectVia"); + writer.WriteObjectValue(ConnectVia); + } + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + writer.WritePropertyName("deploymentType"); + writer.WriteStringValue(DeploymentType.ToString()); + if (HostName != null) + { + writer.WritePropertyName("hostName"); + writer.WriteObjectValue(HostName); + } + if (Port != null) + { + writer.WritePropertyName("port"); + writer.WriteObjectValue(Port); + } + if (ServiceUri != null) + { + writer.WritePropertyName("serviceUri"); + writer.WriteObjectValue(ServiceUri); + } + if (OrganizationName != null) + { + writer.WritePropertyName("organizationName"); + writer.WriteObjectValue(OrganizationName); + } + writer.WritePropertyName("authenticationType"); + writer.WriteStringValue(AuthenticationType.ToString()); + if (Username != null) + { + writer.WritePropertyName("username"); + writer.WriteObjectValue(Username); + } + if (Password != null) + { + writer.WritePropertyName("password"); + writer.WriteObjectValue(Password); + } + if (ServicePrincipalId != null) + { + writer.WritePropertyName("servicePrincipalId"); + writer.WriteObjectValue(ServicePrincipalId); + } + if (ServicePrincipalCredentialType != null) + { + writer.WritePropertyName("servicePrincipalCredentialType"); + writer.WriteStringValue(ServicePrincipalCredentialType.Value.ToString()); + } + if (ServicePrincipalCredential != null) + { + writer.WritePropertyName("servicePrincipalCredential"); + writer.WriteObjectValue(ServicePrincipalCredential); + } + if (EncryptedCredential != null) + { + writer.WritePropertyName("encryptedCredential"); + writer.WriteObjectValue(EncryptedCredential); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static DynamicsCrmLinkedService DeserializeDynamicsCrmLinkedService(JsonElement element) + { + string type = default; + IntegrationRuntimeReference connectVia = default; + string description = default; + IDictionary parameters = default; + IList annotations = default; + DynamicsDeploymentType deploymentType = default; + object hostName = default; + object port = default; + object serviceUri = default; + object organizationName = default; + DynamicsAuthenticationType authenticationType = default; + object username = default; + SecretBase password = default; + object servicePrincipalId = default; + DynamicsServicePrincipalCredentialType? servicePrincipalCredentialType = default; + SecretBase servicePrincipalCredential = default; + object encryptedCredential = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("connectVia")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("deploymentType")) + { + deploymentType = new DynamicsDeploymentType(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("hostName")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + hostName = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("port")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + port = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("serviceUri")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + serviceUri = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("organizationName")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + organizationName = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("authenticationType")) + { + authenticationType = new DynamicsAuthenticationType(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("username")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + username = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("password")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + password = SecretBase.DeserializeSecretBase(property0.Value); + continue; + } + if (property0.NameEquals("servicePrincipalId")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + servicePrincipalId = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("servicePrincipalCredentialType")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + servicePrincipalCredentialType = new DynamicsServicePrincipalCredentialType(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("servicePrincipalCredential")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + servicePrincipalCredential = SecretBase.DeserializeSecretBase(property0.Value); + continue; + } + if (property0.NameEquals("encryptedCredential")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + encryptedCredential = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new DynamicsCrmLinkedService(type, connectVia, description, parameters, annotations, additionalProperties, deploymentType, hostName, port, serviceUri, organizationName, authenticationType, username, password, servicePrincipalId, servicePrincipalCredentialType, servicePrincipalCredential, encryptedCredential); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DynamicsCrmLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DynamicsCrmLinkedService.cs new file mode 100644 index 000000000000..5400195b681a --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DynamicsCrmLinkedService.cs @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Dynamics CRM linked service. + public partial class DynamicsCrmLinkedService : LinkedService + { + /// Initializes a new instance of DynamicsCrmLinkedService. + /// The deployment type of the Dynamics CRM instance. 'Online' for Dynamics CRM Online and 'OnPremisesWithIfd' for Dynamics CRM on-premises with Ifd. Type: string (or Expression with resultType string). + /// The authentication type to connect to Dynamics CRM server. 'Office365' for online scenario, 'Ifd' for on-premises with Ifd scenario, 'AADServicePrincipal' for Server-To-Server authentication in online scenario. Type: string (or Expression with resultType string). + public DynamicsCrmLinkedService(DynamicsDeploymentType deploymentType, DynamicsAuthenticationType authenticationType) + { + DeploymentType = deploymentType; + AuthenticationType = authenticationType; + Type = "DynamicsCrm"; + } + + /// Initializes a new instance of DynamicsCrmLinkedService. + /// Type of linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for describing the linked service. + /// . + /// The deployment type of the Dynamics CRM instance. 'Online' for Dynamics CRM Online and 'OnPremisesWithIfd' for Dynamics CRM on-premises with Ifd. Type: string (or Expression with resultType string). + /// The host name of the on-premises Dynamics CRM server. The property is required for on-prem and not allowed for online. Type: string (or Expression with resultType string). + /// The port of on-premises Dynamics CRM server. The property is required for on-prem and not allowed for online. Default is 443. Type: integer (or Expression with resultType integer), minimum: 0. + /// The URL to the Microsoft Dynamics CRM server. The property is required for on-line and not allowed for on-prem. Type: string (or Expression with resultType string). + /// The organization name of the Dynamics CRM instance. The property is required for on-prem and required for online when there are more than one Dynamics CRM instances associated with the user. Type: string (or Expression with resultType string). + /// The authentication type to connect to Dynamics CRM server. 'Office365' for online scenario, 'Ifd' for on-premises with Ifd scenario, 'AADServicePrincipal' for Server-To-Server authentication in online scenario. Type: string (or Expression with resultType string). + /// User name to access the Dynamics CRM instance. Type: string (or Expression with resultType string). + /// Password to access the Dynamics CRM instance. + /// The client ID of the application in Azure Active Directory used for Server-To-Server authentication. Type: string (or Expression with resultType string). + /// The service principal credential type to use in Server-To-Server authentication. 'ServicePrincipalKey' for key/secret, 'ServicePrincipalCert' for certificate. Type: string (or Expression with resultType string). + /// The credential of the service principal object in Azure Active Directory. If servicePrincipalCredentialType is 'ServicePrincipalKey', servicePrincipalCredential can be SecureString or AzureKeyVaultSecretReference. If servicePrincipalCredentialType is 'ServicePrincipalCert', servicePrincipalCredential can only be AzureKeyVaultSecretReference. + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + internal DynamicsCrmLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, DynamicsDeploymentType deploymentType, object hostName, object port, object serviceUri, object organizationName, DynamicsAuthenticationType authenticationType, object username, SecretBase password, object servicePrincipalId, DynamicsServicePrincipalCredentialType? servicePrincipalCredentialType, SecretBase servicePrincipalCredential, object encryptedCredential) : base(type, connectVia, description, parameters, annotations, additionalProperties) + { + DeploymentType = deploymentType; + HostName = hostName; + Port = port; + ServiceUri = serviceUri; + OrganizationName = organizationName; + AuthenticationType = authenticationType; + Username = username; + Password = password; + ServicePrincipalId = servicePrincipalId; + ServicePrincipalCredentialType = servicePrincipalCredentialType; + ServicePrincipalCredential = servicePrincipalCredential; + EncryptedCredential = encryptedCredential; + Type = type ?? "DynamicsCrm"; + } + + /// The deployment type of the Dynamics CRM instance. 'Online' for Dynamics CRM Online and 'OnPremisesWithIfd' for Dynamics CRM on-premises with Ifd. Type: string (or Expression with resultType string). + public DynamicsDeploymentType DeploymentType { get; set; } + /// The host name of the on-premises Dynamics CRM server. The property is required for on-prem and not allowed for online. Type: string (or Expression with resultType string). + public object HostName { get; set; } + /// The port of on-premises Dynamics CRM server. The property is required for on-prem and not allowed for online. Default is 443. Type: integer (or Expression with resultType integer), minimum: 0. + public object Port { get; set; } + /// The URL to the Microsoft Dynamics CRM server. The property is required for on-line and not allowed for on-prem. Type: string (or Expression with resultType string). + public object ServiceUri { get; set; } + /// The organization name of the Dynamics CRM instance. The property is required for on-prem and required for online when there are more than one Dynamics CRM instances associated with the user. Type: string (or Expression with resultType string). + public object OrganizationName { get; set; } + /// The authentication type to connect to Dynamics CRM server. 'Office365' for online scenario, 'Ifd' for on-premises with Ifd scenario, 'AADServicePrincipal' for Server-To-Server authentication in online scenario. Type: string (or Expression with resultType string). + public DynamicsAuthenticationType AuthenticationType { get; set; } + /// User name to access the Dynamics CRM instance. Type: string (or Expression with resultType string). + public object Username { get; set; } + /// Password to access the Dynamics CRM instance. + public SecretBase Password { get; set; } + /// The client ID of the application in Azure Active Directory used for Server-To-Server authentication. Type: string (or Expression with resultType string). + public object ServicePrincipalId { get; set; } + /// The service principal credential type to use in Server-To-Server authentication. 'ServicePrincipalKey' for key/secret, 'ServicePrincipalCert' for certificate. Type: string (or Expression with resultType string). + public DynamicsServicePrincipalCredentialType? ServicePrincipalCredentialType { get; set; } + /// The credential of the service principal object in Azure Active Directory. If servicePrincipalCredentialType is 'ServicePrincipalKey', servicePrincipalCredential can be SecureString or AzureKeyVaultSecretReference. If servicePrincipalCredentialType is 'ServicePrincipalCert', servicePrincipalCredential can only be AzureKeyVaultSecretReference. + public SecretBase ServicePrincipalCredential { get; set; } + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + public object EncryptedCredential { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DynamicsDeploymentType.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DynamicsDeploymentType.cs new file mode 100644 index 000000000000..49c70b9530f8 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DynamicsDeploymentType.cs @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// The deployment type of the Dynamics instance. 'Online' for Dynamics Online and 'OnPremisesWithIfd' for Dynamics on-premises with Ifd. Type: string (or Expression with resultType string). + public readonly partial struct DynamicsDeploymentType : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + public DynamicsDeploymentType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string OnlineValue = "Online"; + private const string OnPremisesWithIfdValue = "OnPremisesWithIfd"; + + /// Online. + public static DynamicsDeploymentType Online { get; } = new DynamicsDeploymentType(OnlineValue); + /// OnPremisesWithIfd. + public static DynamicsDeploymentType OnPremisesWithIfd { get; } = new DynamicsDeploymentType(OnPremisesWithIfdValue); + /// Determines if two values are the same. + public static bool operator ==(DynamicsDeploymentType left, DynamicsDeploymentType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DynamicsDeploymentType left, DynamicsDeploymentType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator DynamicsDeploymentType(string value) => new DynamicsDeploymentType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DynamicsDeploymentType other && Equals(other); + /// + public bool Equals(DynamicsDeploymentType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DynamicsEntityDataset.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DynamicsEntityDataset.Serialization.cs new file mode 100644 index 000000000000..f3a144dbb0d4 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DynamicsEntityDataset.Serialization.cs @@ -0,0 +1,213 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class DynamicsEntityDataset : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Structure != null) + { + writer.WritePropertyName("structure"); + writer.WriteObjectValue(Structure); + } + if (Schema != null) + { + writer.WritePropertyName("schema"); + writer.WriteObjectValue(Schema); + } + writer.WritePropertyName("linkedServiceName"); + writer.WriteObjectValue(LinkedServiceName); + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Folder != null) + { + writer.WritePropertyName("folder"); + writer.WriteObjectValue(Folder); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + if (EntityName != null) + { + writer.WritePropertyName("entityName"); + writer.WriteObjectValue(EntityName); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static DynamicsEntityDataset DeserializeDynamicsEntityDataset(JsonElement element) + { + string type = default; + string description = default; + object structure = default; + object schema = default; + LinkedServiceReference linkedServiceName = default; + IDictionary parameters = default; + IList annotations = default; + DatasetFolder folder = default; + object entityName = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("structure")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + structure = property.Value.GetObject(); + continue; + } + if (property.NameEquals("schema")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + schema = property.Value.GetObject(); + continue; + } + if (property.NameEquals("linkedServiceName")) + { + linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("folder")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + folder = DatasetFolder.DeserializeDatasetFolder(property.Value); + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("entityName")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + entityName = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new DynamicsEntityDataset(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties, entityName); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DynamicsEntityDataset.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DynamicsEntityDataset.cs new file mode 100644 index 000000000000..280002adc2fb --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DynamicsEntityDataset.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// The Dynamics entity dataset. + public partial class DynamicsEntityDataset : Dataset + { + /// Initializes a new instance of DynamicsEntityDataset. + /// Linked service reference. + public DynamicsEntityDataset(LinkedServiceReference linkedServiceName) : base(linkedServiceName) + { + if (linkedServiceName == null) + { + throw new ArgumentNullException(nameof(linkedServiceName)); + } + + Type = "DynamicsEntity"; + } + + /// Initializes a new instance of DynamicsEntityDataset. + /// Type of dataset. + /// Dataset description. + /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. + /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. + /// Linked service reference. + /// Parameters for dataset. + /// List of tags that can be used for describing the Dataset. + /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. + /// . + /// The logical name of the entity. Type: string (or Expression with resultType string). + internal DynamicsEntityDataset(string type, string description, object structure, object schema, LinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary additionalProperties, object entityName) : base(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) + { + EntityName = entityName; + Type = type ?? "DynamicsEntity"; + } + + /// The logical name of the entity. Type: string (or Expression with resultType string). + public object EntityName { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DynamicsLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DynamicsLinkedService.Serialization.cs new file mode 100644 index 000000000000..06e47c66aeef --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DynamicsLinkedService.Serialization.cs @@ -0,0 +1,326 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class DynamicsLinkedService : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (ConnectVia != null) + { + writer.WritePropertyName("connectVia"); + writer.WriteObjectValue(ConnectVia); + } + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + writer.WritePropertyName("deploymentType"); + writer.WriteStringValue(DeploymentType.ToString()); + if (HostName != null) + { + writer.WritePropertyName("hostName"); + writer.WriteStringValue(HostName); + } + if (Port != null) + { + writer.WritePropertyName("port"); + writer.WriteStringValue(Port); + } + if (ServiceUri != null) + { + writer.WritePropertyName("serviceUri"); + writer.WriteStringValue(ServiceUri); + } + if (OrganizationName != null) + { + writer.WritePropertyName("organizationName"); + writer.WriteStringValue(OrganizationName); + } + writer.WritePropertyName("authenticationType"); + writer.WriteStringValue(AuthenticationType.ToString()); + if (Username != null) + { + writer.WritePropertyName("username"); + writer.WriteObjectValue(Username); + } + if (Password != null) + { + writer.WritePropertyName("password"); + writer.WriteObjectValue(Password); + } + if (ServicePrincipalId != null) + { + writer.WritePropertyName("servicePrincipalId"); + writer.WriteObjectValue(ServicePrincipalId); + } + if (ServicePrincipalCredentialType != null) + { + writer.WritePropertyName("servicePrincipalCredentialType"); + writer.WriteStringValue(ServicePrincipalCredentialType.Value.ToString()); + } + if (ServicePrincipalCredential != null) + { + writer.WritePropertyName("servicePrincipalCredential"); + writer.WriteObjectValue(ServicePrincipalCredential); + } + if (EncryptedCredential != null) + { + writer.WritePropertyName("encryptedCredential"); + writer.WriteObjectValue(EncryptedCredential); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static DynamicsLinkedService DeserializeDynamicsLinkedService(JsonElement element) + { + string type = default; + IntegrationRuntimeReference connectVia = default; + string description = default; + IDictionary parameters = default; + IList annotations = default; + DynamicsDeploymentType deploymentType = default; + string hostName = default; + string port = default; + string serviceUri = default; + string organizationName = default; + DynamicsAuthenticationType authenticationType = default; + object username = default; + SecretBase password = default; + object servicePrincipalId = default; + DynamicsServicePrincipalCredentialType? servicePrincipalCredentialType = default; + SecretBase servicePrincipalCredential = default; + object encryptedCredential = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("connectVia")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("deploymentType")) + { + deploymentType = new DynamicsDeploymentType(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("hostName")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + hostName = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("port")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + port = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("serviceUri")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + serviceUri = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("organizationName")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + organizationName = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("authenticationType")) + { + authenticationType = new DynamicsAuthenticationType(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("username")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + username = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("password")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + password = SecretBase.DeserializeSecretBase(property0.Value); + continue; + } + if (property0.NameEquals("servicePrincipalId")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + servicePrincipalId = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("servicePrincipalCredentialType")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + servicePrincipalCredentialType = new DynamicsServicePrincipalCredentialType(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("servicePrincipalCredential")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + servicePrincipalCredential = SecretBase.DeserializeSecretBase(property0.Value); + continue; + } + if (property0.NameEquals("encryptedCredential")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + encryptedCredential = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new DynamicsLinkedService(type, connectVia, description, parameters, annotations, additionalProperties, deploymentType, hostName, port, serviceUri, organizationName, authenticationType, username, password, servicePrincipalId, servicePrincipalCredentialType, servicePrincipalCredential, encryptedCredential); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DynamicsLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DynamicsLinkedService.cs new file mode 100644 index 000000000000..760795fa1d38 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DynamicsLinkedService.cs @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Dynamics linked service. + public partial class DynamicsLinkedService : LinkedService + { + /// Initializes a new instance of DynamicsLinkedService. + /// The deployment type of the Dynamics instance. 'Online' for Dynamics Online and 'OnPremisesWithIfd' for Dynamics on-premises with Ifd. Type: string (or Expression with resultType string). + /// The authentication type to connect to Dynamics server. 'Office365' for online scenario, 'Ifd' for on-premises with Ifd scenario, 'AADServicePrincipal' for Server-To-Server authentication in online scenario. Type: string (or Expression with resultType string). + public DynamicsLinkedService(DynamicsDeploymentType deploymentType, DynamicsAuthenticationType authenticationType) + { + DeploymentType = deploymentType; + AuthenticationType = authenticationType; + Type = "Dynamics"; + } + + /// Initializes a new instance of DynamicsLinkedService. + /// Type of linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for describing the linked service. + /// . + /// The deployment type of the Dynamics instance. 'Online' for Dynamics Online and 'OnPremisesWithIfd' for Dynamics on-premises with Ifd. Type: string (or Expression with resultType string). + /// The host name of the on-premises Dynamics server. The property is required for on-prem and not allowed for online. Type: string (or Expression with resultType string). + /// The port of on-premises Dynamics server. The property is required for on-prem and not allowed for online. Default is 443. Type: integer (or Expression with resultType integer), minimum: 0. + /// The URL to the Microsoft Dynamics server. The property is required for on-line and not allowed for on-prem. Type: string (or Expression with resultType string). + /// The organization name of the Dynamics instance. The property is required for on-prem and required for online when there are more than one Dynamics instances associated with the user. Type: string (or Expression with resultType string). + /// The authentication type to connect to Dynamics server. 'Office365' for online scenario, 'Ifd' for on-premises with Ifd scenario, 'AADServicePrincipal' for Server-To-Server authentication in online scenario. Type: string (or Expression with resultType string). + /// User name to access the Dynamics instance. Type: string (or Expression with resultType string). + /// Password to access the Dynamics instance. + /// The client ID of the application in Azure Active Directory used for Server-To-Server authentication. Type: string (or Expression with resultType string). + /// The service principal credential type to use in Server-To-Server authentication. 'ServicePrincipalKey' for key/secret, 'ServicePrincipalCert' for certificate. Type: string (or Expression with resultType string). + /// The credential of the service principal object in Azure Active Directory. If servicePrincipalCredentialType is 'ServicePrincipalKey', servicePrincipalCredential can be SecureString or AzureKeyVaultSecretReference. If servicePrincipalCredentialType is 'ServicePrincipalCert', servicePrincipalCredential can only be AzureKeyVaultSecretReference. + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + internal DynamicsLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, DynamicsDeploymentType deploymentType, string hostName, string port, string serviceUri, string organizationName, DynamicsAuthenticationType authenticationType, object username, SecretBase password, object servicePrincipalId, DynamicsServicePrincipalCredentialType? servicePrincipalCredentialType, SecretBase servicePrincipalCredential, object encryptedCredential) : base(type, connectVia, description, parameters, annotations, additionalProperties) + { + DeploymentType = deploymentType; + HostName = hostName; + Port = port; + ServiceUri = serviceUri; + OrganizationName = organizationName; + AuthenticationType = authenticationType; + Username = username; + Password = password; + ServicePrincipalId = servicePrincipalId; + ServicePrincipalCredentialType = servicePrincipalCredentialType; + ServicePrincipalCredential = servicePrincipalCredential; + EncryptedCredential = encryptedCredential; + Type = type ?? "Dynamics"; + } + + /// The deployment type of the Dynamics instance. 'Online' for Dynamics Online and 'OnPremisesWithIfd' for Dynamics on-premises with Ifd. Type: string (or Expression with resultType string). + public DynamicsDeploymentType DeploymentType { get; set; } + /// The host name of the on-premises Dynamics server. The property is required for on-prem and not allowed for online. Type: string (or Expression with resultType string). + public string HostName { get; set; } + /// The port of on-premises Dynamics server. The property is required for on-prem and not allowed for online. Default is 443. Type: integer (or Expression with resultType integer), minimum: 0. + public string Port { get; set; } + /// The URL to the Microsoft Dynamics server. The property is required for on-line and not allowed for on-prem. Type: string (or Expression with resultType string). + public string ServiceUri { get; set; } + /// The organization name of the Dynamics instance. The property is required for on-prem and required for online when there are more than one Dynamics instances associated with the user. Type: string (or Expression with resultType string). + public string OrganizationName { get; set; } + /// The authentication type to connect to Dynamics server. 'Office365' for online scenario, 'Ifd' for on-premises with Ifd scenario, 'AADServicePrincipal' for Server-To-Server authentication in online scenario. Type: string (or Expression with resultType string). + public DynamicsAuthenticationType AuthenticationType { get; set; } + /// User name to access the Dynamics instance. Type: string (or Expression with resultType string). + public object Username { get; set; } + /// Password to access the Dynamics instance. + public SecretBase Password { get; set; } + /// The client ID of the application in Azure Active Directory used for Server-To-Server authentication. Type: string (or Expression with resultType string). + public object ServicePrincipalId { get; set; } + /// The service principal credential type to use in Server-To-Server authentication. 'ServicePrincipalKey' for key/secret, 'ServicePrincipalCert' for certificate. Type: string (or Expression with resultType string). + public DynamicsServicePrincipalCredentialType? ServicePrincipalCredentialType { get; set; } + /// The credential of the service principal object in Azure Active Directory. If servicePrincipalCredentialType is 'ServicePrincipalKey', servicePrincipalCredential can be SecureString or AzureKeyVaultSecretReference. If servicePrincipalCredentialType is 'ServicePrincipalCert', servicePrincipalCredential can only be AzureKeyVaultSecretReference. + public SecretBase ServicePrincipalCredential { get; set; } + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + public object EncryptedCredential { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DynamicsServicePrincipalCredentialType.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DynamicsServicePrincipalCredentialType.cs new file mode 100644 index 000000000000..53a7d71f464a --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DynamicsServicePrincipalCredentialType.cs @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// The service principal credential type to use in Server-To-Server authentication. 'ServicePrincipalKey' for key/secret, 'ServicePrincipalCert' for certificate. Type: string (or Expression with resultType string). + public readonly partial struct DynamicsServicePrincipalCredentialType : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + public DynamicsServicePrincipalCredentialType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ServicePrincipalKeyValue = "ServicePrincipalKey"; + private const string ServicePrincipalCertValue = "ServicePrincipalCert"; + + /// ServicePrincipalKey. + public static DynamicsServicePrincipalCredentialType ServicePrincipalKey { get; } = new DynamicsServicePrincipalCredentialType(ServicePrincipalKeyValue); + /// ServicePrincipalCert. + public static DynamicsServicePrincipalCredentialType ServicePrincipalCert { get; } = new DynamicsServicePrincipalCredentialType(ServicePrincipalCertValue); + /// Determines if two values are the same. + public static bool operator ==(DynamicsServicePrincipalCredentialType left, DynamicsServicePrincipalCredentialType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DynamicsServicePrincipalCredentialType left, DynamicsServicePrincipalCredentialType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator DynamicsServicePrincipalCredentialType(string value) => new DynamicsServicePrincipalCredentialType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DynamicsServicePrincipalCredentialType other && Equals(other); + /// + public bool Equals(DynamicsServicePrincipalCredentialType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/EloquaLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/EloquaLinkedService.Serialization.cs new file mode 100644 index 000000000000..acc1aeedadef --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/EloquaLinkedService.Serialization.cs @@ -0,0 +1,251 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class EloquaLinkedService : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (ConnectVia != null) + { + writer.WritePropertyName("connectVia"); + writer.WriteObjectValue(ConnectVia); + } + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + writer.WritePropertyName("endpoint"); + writer.WriteObjectValue(Endpoint); + writer.WritePropertyName("username"); + writer.WriteObjectValue(Username); + if (Password != null) + { + writer.WritePropertyName("password"); + writer.WriteObjectValue(Password); + } + if (UseEncryptedEndpoints != null) + { + writer.WritePropertyName("useEncryptedEndpoints"); + writer.WriteObjectValue(UseEncryptedEndpoints); + } + if (UseHostVerification != null) + { + writer.WritePropertyName("useHostVerification"); + writer.WriteObjectValue(UseHostVerification); + } + if (UsePeerVerification != null) + { + writer.WritePropertyName("usePeerVerification"); + writer.WriteObjectValue(UsePeerVerification); + } + if (EncryptedCredential != null) + { + writer.WritePropertyName("encryptedCredential"); + writer.WriteObjectValue(EncryptedCredential); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static EloquaLinkedService DeserializeEloquaLinkedService(JsonElement element) + { + string type = default; + IntegrationRuntimeReference connectVia = default; + string description = default; + IDictionary parameters = default; + IList annotations = default; + object endpoint = default; + object username = default; + SecretBase password = default; + object useEncryptedEndpoints = default; + object useHostVerification = default; + object usePeerVerification = default; + object encryptedCredential = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("connectVia")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("endpoint")) + { + endpoint = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("username")) + { + username = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("password")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + password = SecretBase.DeserializeSecretBase(property0.Value); + continue; + } + if (property0.NameEquals("useEncryptedEndpoints")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + useEncryptedEndpoints = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("useHostVerification")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + useHostVerification = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("usePeerVerification")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + usePeerVerification = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("encryptedCredential")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + encryptedCredential = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new EloquaLinkedService(type, connectVia, description, parameters, annotations, additionalProperties, endpoint, username, password, useEncryptedEndpoints, useHostVerification, usePeerVerification, encryptedCredential); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/EloquaLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/EloquaLinkedService.cs new file mode 100644 index 000000000000..b4edda74f949 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/EloquaLinkedService.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Eloqua server linked service. + public partial class EloquaLinkedService : LinkedService + { + /// Initializes a new instance of EloquaLinkedService. + /// The endpoint of the Eloqua server. (i.e. eloqua.example.com). + /// The site name and user name of your Eloqua account in the form: sitename/username. (i.e. Eloqua/Alice). + public EloquaLinkedService(object endpoint, object username) + { + if (endpoint == null) + { + throw new ArgumentNullException(nameof(endpoint)); + } + if (username == null) + { + throw new ArgumentNullException(nameof(username)); + } + + Endpoint = endpoint; + Username = username; + Type = "Eloqua"; + } + + /// Initializes a new instance of EloquaLinkedService. + /// Type of linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for describing the linked service. + /// . + /// The endpoint of the Eloqua server. (i.e. eloqua.example.com). + /// The site name and user name of your Eloqua account in the form: sitename/username. (i.e. Eloqua/Alice). + /// The password corresponding to the user name. + /// Specifies whether the data source endpoints are encrypted using HTTPS. The default value is true. + /// Specifies whether to require the host name in the server's certificate to match the host name of the server when connecting over SSL. The default value is true. + /// Specifies whether to verify the identity of the server when connecting over SSL. The default value is true. + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + internal EloquaLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object endpoint, object username, SecretBase password, object useEncryptedEndpoints, object useHostVerification, object usePeerVerification, object encryptedCredential) : base(type, connectVia, description, parameters, annotations, additionalProperties) + { + Endpoint = endpoint; + Username = username; + Password = password; + UseEncryptedEndpoints = useEncryptedEndpoints; + UseHostVerification = useHostVerification; + UsePeerVerification = usePeerVerification; + EncryptedCredential = encryptedCredential; + Type = type ?? "Eloqua"; + } + + /// The endpoint of the Eloqua server. (i.e. eloqua.example.com). + public object Endpoint { get; set; } + /// The site name and user name of your Eloqua account in the form: sitename/username. (i.e. Eloqua/Alice). + public object Username { get; set; } + /// The password corresponding to the user name. + public SecretBase Password { get; set; } + /// Specifies whether the data source endpoints are encrypted using HTTPS. The default value is true. + public object UseEncryptedEndpoints { get; set; } + /// Specifies whether to require the host name in the server's certificate to match the host name of the server when connecting over SSL. The default value is true. + public object UseHostVerification { get; set; } + /// Specifies whether to verify the identity of the server when connecting over SSL. The default value is true. + public object UsePeerVerification { get; set; } + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + public object EncryptedCredential { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/EloquaObjectDataset.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/EloquaObjectDataset.Serialization.cs new file mode 100644 index 000000000000..1db0cd0511cd --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/EloquaObjectDataset.Serialization.cs @@ -0,0 +1,213 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class EloquaObjectDataset : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Structure != null) + { + writer.WritePropertyName("structure"); + writer.WriteObjectValue(Structure); + } + if (Schema != null) + { + writer.WritePropertyName("schema"); + writer.WriteObjectValue(Schema); + } + writer.WritePropertyName("linkedServiceName"); + writer.WriteObjectValue(LinkedServiceName); + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Folder != null) + { + writer.WritePropertyName("folder"); + writer.WriteObjectValue(Folder); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + if (TableName != null) + { + writer.WritePropertyName("tableName"); + writer.WriteObjectValue(TableName); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static EloquaObjectDataset DeserializeEloquaObjectDataset(JsonElement element) + { + string type = default; + string description = default; + object structure = default; + object schema = default; + LinkedServiceReference linkedServiceName = default; + IDictionary parameters = default; + IList annotations = default; + DatasetFolder folder = default; + object tableName = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("structure")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + structure = property.Value.GetObject(); + continue; + } + if (property.NameEquals("schema")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + schema = property.Value.GetObject(); + continue; + } + if (property.NameEquals("linkedServiceName")) + { + linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("folder")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + folder = DatasetFolder.DeserializeDatasetFolder(property.Value); + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("tableName")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + tableName = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new EloquaObjectDataset(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties, tableName); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/EloquaObjectDataset.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/EloquaObjectDataset.cs new file mode 100644 index 000000000000..3a41d774973e --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/EloquaObjectDataset.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Eloqua server dataset. + public partial class EloquaObjectDataset : Dataset + { + /// Initializes a new instance of EloquaObjectDataset. + /// Linked service reference. + public EloquaObjectDataset(LinkedServiceReference linkedServiceName) : base(linkedServiceName) + { + if (linkedServiceName == null) + { + throw new ArgumentNullException(nameof(linkedServiceName)); + } + + Type = "EloquaObject"; + } + + /// Initializes a new instance of EloquaObjectDataset. + /// Type of dataset. + /// Dataset description. + /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. + /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. + /// Linked service reference. + /// Parameters for dataset. + /// List of tags that can be used for describing the Dataset. + /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. + /// . + /// The table name. Type: string (or Expression with resultType string). + internal EloquaObjectDataset(string type, string description, object structure, object schema, LinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary additionalProperties, object tableName) : base(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) + { + TableName = tableName; + Type = type ?? "EloquaObject"; + } + + /// The table name. Type: string (or Expression with resultType string). + public object TableName { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/EvaluateDataFlowExpressionRequest.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/EvaluateDataFlowExpressionRequest.cs new file mode 100644 index 000000000000..13aab2565c8e --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/EvaluateDataFlowExpressionRequest.cs @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Request body structure for data flow expression preview. + internal partial class EvaluateDataFlowExpressionRequest + { + /// Initializes a new instance of EvaluateDataFlowExpressionRequest. + internal EvaluateDataFlowExpressionRequest() + { + } + + /// Initializes a new instance of EvaluateDataFlowExpressionRequest. + /// The ID of data flow debug session. + /// The data flow which contains the debug session. + /// The output stream name. + /// The row limit for preview request. + /// The expression for preview. + internal EvaluateDataFlowExpressionRequest(string sessionId, string dataFlowName, string streamName, int? rowLimits, string expression) + { + SessionId = sessionId; + DataFlowName = dataFlowName; + StreamName = streamName; + RowLimits = rowLimits; + Expression = expression; + } + + /// The ID of data flow debug session. + public string SessionId { get; set; } + /// The data flow which contains the debug session. + public string DataFlowName { get; set; } + /// The output stream name. + public string StreamName { get; set; } + /// The row limit for preview request. + public int? RowLimits { get; set; } + /// The expression for preview. + public string Expression { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/EventSubscriptionStatus.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/EventSubscriptionStatus.cs new file mode 100644 index 000000000000..f15b1315d574 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/EventSubscriptionStatus.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Event Subscription Status. + public readonly partial struct EventSubscriptionStatus : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + public EventSubscriptionStatus(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string EnabledValue = "Enabled"; + private const string ProvisioningValue = "Provisioning"; + private const string DeprovisioningValue = "Deprovisioning"; + private const string DisabledValue = "Disabled"; + private const string UnknownValue = "Unknown"; + + /// Enabled. + public static EventSubscriptionStatus Enabled { get; } = new EventSubscriptionStatus(EnabledValue); + /// Provisioning. + public static EventSubscriptionStatus Provisioning { get; } = new EventSubscriptionStatus(ProvisioningValue); + /// Deprovisioning. + public static EventSubscriptionStatus Deprovisioning { get; } = new EventSubscriptionStatus(DeprovisioningValue); + /// Disabled. + public static EventSubscriptionStatus Disabled { get; } = new EventSubscriptionStatus(DisabledValue); + /// Unknown. + public static EventSubscriptionStatus Unknown { get; } = new EventSubscriptionStatus(UnknownValue); + /// Determines if two values are the same. + public static bool operator ==(EventSubscriptionStatus left, EventSubscriptionStatus right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(EventSubscriptionStatus left, EventSubscriptionStatus right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator EventSubscriptionStatus(string value) => new EventSubscriptionStatus(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is EventSubscriptionStatus other && Equals(other); + /// + public bool Equals(EventSubscriptionStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ExecuteDataFlowActivity.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ExecuteDataFlowActivity.Serialization.cs new file mode 100644 index 000000000000..85c246382be8 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ExecuteDataFlowActivity.Serialization.cs @@ -0,0 +1,235 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class ExecuteDataFlowActivity : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (LinkedServiceName != null) + { + writer.WritePropertyName("linkedServiceName"); + writer.WriteObjectValue(LinkedServiceName); + } + if (Policy != null) + { + writer.WritePropertyName("policy"); + writer.WriteObjectValue(Policy); + } + writer.WritePropertyName("name"); + writer.WriteStringValue(Name); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (DependsOn != null) + { + writer.WritePropertyName("dependsOn"); + writer.WriteStartArray(); + foreach (var item in DependsOn) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (UserProperties != null) + { + writer.WritePropertyName("userProperties"); + writer.WriteStartArray(); + foreach (var item in UserProperties) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + writer.WritePropertyName("dataFlow"); + writer.WriteObjectValue(DataFlow); + if (Staging != null) + { + writer.WritePropertyName("staging"); + writer.WriteObjectValue(Staging); + } + if (IntegrationRuntime != null) + { + writer.WritePropertyName("integrationRuntime"); + writer.WriteObjectValue(IntegrationRuntime); + } + if (Compute != null) + { + writer.WritePropertyName("compute"); + writer.WriteObjectValue(Compute); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static ExecuteDataFlowActivity DeserializeExecuteDataFlowActivity(JsonElement element) + { + LinkedServiceReference linkedServiceName = default; + ActivityPolicy policy = default; + string name = default; + string type = default; + string description = default; + IList dependsOn = default; + IList userProperties = default; + DataFlowReference dataFlow = default; + DataFlowStagingInfo staging = default; + IntegrationRuntimeReference integrationRuntime = default; + ExecuteDataFlowActivityTypePropertiesCompute compute = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("linkedServiceName")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value); + continue; + } + if (property.NameEquals("policy")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + policy = ActivityPolicy.DeserializeActivityPolicy(property.Value); + continue; + } + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("dependsOn")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(ActivityDependency.DeserializeActivityDependency(item)); + } + } + dependsOn = array; + continue; + } + if (property.NameEquals("userProperties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(UserProperty.DeserializeUserProperty(item)); + } + } + userProperties = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("dataFlow")) + { + dataFlow = DataFlowReference.DeserializeDataFlowReference(property0.Value); + continue; + } + if (property0.NameEquals("staging")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + staging = DataFlowStagingInfo.DeserializeDataFlowStagingInfo(property0.Value); + continue; + } + if (property0.NameEquals("integrationRuntime")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + integrationRuntime = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property0.Value); + continue; + } + if (property0.NameEquals("compute")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + compute = ExecuteDataFlowActivityTypePropertiesCompute.DeserializeExecuteDataFlowActivityTypePropertiesCompute(property0.Value); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new ExecuteDataFlowActivity(name, type, description, dependsOn, userProperties, additionalProperties, linkedServiceName, policy, dataFlow, staging, integrationRuntime, compute); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ExecuteDataFlowActivity.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ExecuteDataFlowActivity.cs new file mode 100644 index 000000000000..3cce1746f5e2 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ExecuteDataFlowActivity.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Execute data flow activity. + public partial class ExecuteDataFlowActivity : ExecutionActivity + { + /// Initializes a new instance of ExecuteDataFlowActivity. + /// Activity name. + /// Data flow reference. + public ExecuteDataFlowActivity(string name, DataFlowReference dataFlow) : base(name) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (dataFlow == null) + { + throw new ArgumentNullException(nameof(dataFlow)); + } + + DataFlow = dataFlow; + Type = "ExecuteDataFlow"; + } + + /// Initializes a new instance of ExecuteDataFlowActivity. + /// Activity name. + /// Type of activity. + /// Activity description. + /// Activity depends on condition. + /// Activity user properties. + /// . + /// Linked service reference. + /// Activity policy. + /// Data flow reference. + /// Staging info for execute data flow activity. + /// The integration runtime reference. + /// Compute properties for data flow activity. + internal ExecuteDataFlowActivity(string name, string type, string description, IList dependsOn, IList userProperties, IDictionary additionalProperties, LinkedServiceReference linkedServiceName, ActivityPolicy policy, DataFlowReference dataFlow, DataFlowStagingInfo staging, IntegrationRuntimeReference integrationRuntime, ExecuteDataFlowActivityTypePropertiesCompute compute) : base(name, type, description, dependsOn, userProperties, additionalProperties, linkedServiceName, policy) + { + DataFlow = dataFlow; + Staging = staging; + IntegrationRuntime = integrationRuntime; + Compute = compute; + Type = type ?? "ExecuteDataFlow"; + } + + /// Data flow reference. + public DataFlowReference DataFlow { get; set; } + /// Staging info for execute data flow activity. + public DataFlowStagingInfo Staging { get; set; } + /// The integration runtime reference. + public IntegrationRuntimeReference IntegrationRuntime { get; set; } + /// Compute properties for data flow activity. + public ExecuteDataFlowActivityTypePropertiesCompute Compute { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ExecuteDataFlowActivityTypePropertiesCompute.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ExecuteDataFlowActivityTypePropertiesCompute.Serialization.cs new file mode 100644 index 000000000000..6fb142328c9b --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ExecuteDataFlowActivityTypePropertiesCompute.Serialization.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class ExecuteDataFlowActivityTypePropertiesCompute : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (ComputeType != null) + { + writer.WritePropertyName("computeType"); + writer.WriteStringValue(ComputeType.Value.ToString()); + } + if (CoreCount != null) + { + writer.WritePropertyName("coreCount"); + writer.WriteNumberValue(CoreCount.Value); + } + writer.WriteEndObject(); + } + + internal static ExecuteDataFlowActivityTypePropertiesCompute DeserializeExecuteDataFlowActivityTypePropertiesCompute(JsonElement element) + { + DataFlowComputeType? computeType = default; + int? coreCount = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("computeType")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + computeType = new DataFlowComputeType(property.Value.GetString()); + continue; + } + if (property.NameEquals("coreCount")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + coreCount = property.Value.GetInt32(); + continue; + } + } + return new ExecuteDataFlowActivityTypePropertiesCompute(computeType, coreCount); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ExecuteDataFlowActivityTypePropertiesCompute.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ExecuteDataFlowActivityTypePropertiesCompute.cs new file mode 100644 index 000000000000..6f57d4964249 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ExecuteDataFlowActivityTypePropertiesCompute.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Compute properties for data flow activity. + public partial class ExecuteDataFlowActivityTypePropertiesCompute + { + /// Initializes a new instance of ExecuteDataFlowActivityTypePropertiesCompute. + public ExecuteDataFlowActivityTypePropertiesCompute() + { + } + + /// Initializes a new instance of ExecuteDataFlowActivityTypePropertiesCompute. + /// Compute type of the cluster which will execute data flow job. + /// Core count of the cluster which will execute data flow job. Supported values are: 8, 16, 32, 48, 80, 144 and 272. + internal ExecuteDataFlowActivityTypePropertiesCompute(DataFlowComputeType? computeType, int? coreCount) + { + ComputeType = computeType; + CoreCount = coreCount; + } + + /// Compute type of the cluster which will execute data flow job. + public DataFlowComputeType? ComputeType { get; set; } + /// Core count of the cluster which will execute data flow job. Supported values are: 8, 16, 32, 48, 80, 144 and 272. + public int? CoreCount { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ExecutePipelineActivity.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ExecutePipelineActivity.Serialization.cs new file mode 100644 index 000000000000..674617cd0fda --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ExecutePipelineActivity.Serialization.cs @@ -0,0 +1,208 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class ExecutePipelineActivity : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("name"); + writer.WriteStringValue(Name); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (DependsOn != null) + { + writer.WritePropertyName("dependsOn"); + writer.WriteStartArray(); + foreach (var item in DependsOn) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (UserProperties != null) + { + writer.WritePropertyName("userProperties"); + writer.WriteStartArray(); + foreach (var item in UserProperties) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + writer.WritePropertyName("pipeline"); + writer.WriteObjectValue(Pipeline); + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (WaitOnCompletion != null) + { + writer.WritePropertyName("waitOnCompletion"); + writer.WriteBooleanValue(WaitOnCompletion.Value); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static ExecutePipelineActivity DeserializeExecutePipelineActivity(JsonElement element) + { + string name = default; + string type = default; + string description = default; + IList dependsOn = default; + IList userProperties = default; + PipelineReference pipeline = default; + IDictionary parameters = default; + bool? waitOnCompletion = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("dependsOn")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(ActivityDependency.DeserializeActivityDependency(item)); + } + } + dependsOn = array; + continue; + } + if (property.NameEquals("userProperties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(UserProperty.DeserializeUserProperty(item)); + } + } + userProperties = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("pipeline")) + { + pipeline = PipelineReference.DeserializePipelineReference(property0.Value); + continue; + } + if (property0.NameEquals("parameters")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property1 in property0.Value.EnumerateObject()) + { + if (property1.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property1.Name, null); + } + else + { + dictionary.Add(property1.Name, property1.Value.GetObject()); + } + } + parameters = dictionary; + continue; + } + if (property0.NameEquals("waitOnCompletion")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + waitOnCompletion = property0.Value.GetBoolean(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new ExecutePipelineActivity(name, type, description, dependsOn, userProperties, additionalProperties, pipeline, parameters, waitOnCompletion); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ExecutePipelineActivity.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ExecutePipelineActivity.cs new file mode 100644 index 000000000000..54a9bf926ec6 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ExecutePipelineActivity.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Execute pipeline activity. + public partial class ExecutePipelineActivity : Activity + { + /// Initializes a new instance of ExecutePipelineActivity. + /// Activity name. + /// Pipeline reference. + public ExecutePipelineActivity(string name, PipelineReference pipeline) : base(name) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (pipeline == null) + { + throw new ArgumentNullException(nameof(pipeline)); + } + + Pipeline = pipeline; + Type = "ExecutePipeline"; + } + + /// Initializes a new instance of ExecutePipelineActivity. + /// Activity name. + /// Type of activity. + /// Activity description. + /// Activity depends on condition. + /// Activity user properties. + /// . + /// Pipeline reference. + /// Pipeline parameters. + /// Defines whether activity execution will wait for the dependent pipeline execution to finish. Default is false. + internal ExecutePipelineActivity(string name, string type, string description, IList dependsOn, IList userProperties, IDictionary additionalProperties, PipelineReference pipeline, IDictionary parameters, bool? waitOnCompletion) : base(name, type, description, dependsOn, userProperties, additionalProperties) + { + Pipeline = pipeline; + Parameters = parameters; + WaitOnCompletion = waitOnCompletion; + Type = type ?? "ExecutePipeline"; + } + + /// Pipeline reference. + public PipelineReference Pipeline { get; set; } + /// Pipeline parameters. + public IDictionary Parameters { get; set; } + /// Defines whether activity execution will wait for the dependent pipeline execution to finish. Default is false. + public bool? WaitOnCompletion { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ExecuteSsisPackageActivity.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ExecuteSsisPackageActivity.Serialization.cs new file mode 100644 index 000000000000..22506d9fde04 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ExecuteSsisPackageActivity.Serialization.cs @@ -0,0 +1,438 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class ExecuteSsisPackageActivity : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (LinkedServiceName != null) + { + writer.WritePropertyName("linkedServiceName"); + writer.WriteObjectValue(LinkedServiceName); + } + if (Policy != null) + { + writer.WritePropertyName("policy"); + writer.WriteObjectValue(Policy); + } + writer.WritePropertyName("name"); + writer.WriteStringValue(Name); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (DependsOn != null) + { + writer.WritePropertyName("dependsOn"); + writer.WriteStartArray(); + foreach (var item in DependsOn) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (UserProperties != null) + { + writer.WritePropertyName("userProperties"); + writer.WriteStartArray(); + foreach (var item in UserProperties) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + writer.WritePropertyName("packageLocation"); + writer.WriteObjectValue(PackageLocation); + if (Runtime != null) + { + writer.WritePropertyName("runtime"); + writer.WriteObjectValue(Runtime); + } + if (LoggingLevel != null) + { + writer.WritePropertyName("loggingLevel"); + writer.WriteObjectValue(LoggingLevel); + } + if (EnvironmentPath != null) + { + writer.WritePropertyName("environmentPath"); + writer.WriteObjectValue(EnvironmentPath); + } + if (ExecutionCredential != null) + { + writer.WritePropertyName("executionCredential"); + writer.WriteObjectValue(ExecutionCredential); + } + writer.WritePropertyName("connectVia"); + writer.WriteObjectValue(ConnectVia); + if (ProjectParameters != null) + { + writer.WritePropertyName("projectParameters"); + writer.WriteStartObject(); + foreach (var item in ProjectParameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (PackageParameters != null) + { + writer.WritePropertyName("packageParameters"); + writer.WriteStartObject(); + foreach (var item in PackageParameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (ProjectConnectionManagers != null) + { + writer.WritePropertyName("projectConnectionManagers"); + writer.WriteStartObject(); + foreach (var item in ProjectConnectionManagers) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (PackageConnectionManagers != null) + { + writer.WritePropertyName("packageConnectionManagers"); + writer.WriteStartObject(); + foreach (var item in PackageConnectionManagers) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (PropertyOverrides != null) + { + writer.WritePropertyName("propertyOverrides"); + writer.WriteStartObject(); + foreach (var item in PropertyOverrides) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (LogLocation != null) + { + writer.WritePropertyName("logLocation"); + writer.WriteObjectValue(LogLocation); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static ExecuteSsisPackageActivity DeserializeExecuteSsisPackageActivity(JsonElement element) + { + LinkedServiceReference linkedServiceName = default; + ActivityPolicy policy = default; + string name = default; + string type = default; + string description = default; + IList dependsOn = default; + IList userProperties = default; + SsisPackageLocation packageLocation = default; + object runtime = default; + object loggingLevel = default; + object environmentPath = default; + SsisExecutionCredential executionCredential = default; + IntegrationRuntimeReference connectVia = default; + IDictionary projectParameters = default; + IDictionary packageParameters = default; + IDictionary projectConnectionManagers = default; + IDictionary packageConnectionManagers = default; + IDictionary propertyOverrides = default; + SsisLogLocation logLocation = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("linkedServiceName")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value); + continue; + } + if (property.NameEquals("policy")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + policy = ActivityPolicy.DeserializeActivityPolicy(property.Value); + continue; + } + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("dependsOn")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(ActivityDependency.DeserializeActivityDependency(item)); + } + } + dependsOn = array; + continue; + } + if (property.NameEquals("userProperties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(UserProperty.DeserializeUserProperty(item)); + } + } + userProperties = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("packageLocation")) + { + packageLocation = SsisPackageLocation.DeserializeSsisPackageLocation(property0.Value); + continue; + } + if (property0.NameEquals("runtime")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + runtime = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("loggingLevel")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + loggingLevel = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("environmentPath")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + environmentPath = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("executionCredential")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + executionCredential = SsisExecutionCredential.DeserializeSsisExecutionCredential(property0.Value); + continue; + } + if (property0.NameEquals("connectVia")) + { + connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property0.Value); + continue; + } + if (property0.NameEquals("projectParameters")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property1 in property0.Value.EnumerateObject()) + { + if (property1.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property1.Name, null); + } + else + { + dictionary.Add(property1.Name, SsisExecutionParameter.DeserializeSsisExecutionParameter(property1.Value)); + } + } + projectParameters = dictionary; + continue; + } + if (property0.NameEquals("packageParameters")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property1 in property0.Value.EnumerateObject()) + { + if (property1.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property1.Name, null); + } + else + { + dictionary.Add(property1.Name, SsisExecutionParameter.DeserializeSsisExecutionParameter(property1.Value)); + } + } + packageParameters = dictionary; + continue; + } + if (property0.NameEquals("projectConnectionManagers")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property1 in property0.Value.EnumerateObject()) + { + if (property1.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property1.Name, null); + } + else + { + dictionary.Add(property1.Name, property1.Value.GetObject()); + } + } + projectConnectionManagers = dictionary; + continue; + } + if (property0.NameEquals("packageConnectionManagers")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property1 in property0.Value.EnumerateObject()) + { + if (property1.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property1.Name, null); + } + else + { + dictionary.Add(property1.Name, property1.Value.GetObject()); + } + } + packageConnectionManagers = dictionary; + continue; + } + if (property0.NameEquals("propertyOverrides")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property1 in property0.Value.EnumerateObject()) + { + if (property1.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property1.Name, null); + } + else + { + dictionary.Add(property1.Name, SsisPropertyOverride.DeserializeSsisPropertyOverride(property1.Value)); + } + } + propertyOverrides = dictionary; + continue; + } + if (property0.NameEquals("logLocation")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + logLocation = SsisLogLocation.DeserializeSsisLogLocation(property0.Value); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new ExecuteSsisPackageActivity(name, type, description, dependsOn, userProperties, additionalProperties, linkedServiceName, policy, packageLocation, runtime, loggingLevel, environmentPath, executionCredential, connectVia, projectParameters, packageParameters, projectConnectionManagers, packageConnectionManagers, propertyOverrides, logLocation); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ExecuteSsisPackageActivity.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ExecuteSsisPackageActivity.cs new file mode 100644 index 000000000000..984dc4f3cc54 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ExecuteSsisPackageActivity.cs @@ -0,0 +1,103 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Execute SSIS package activity. + public partial class ExecuteSsisPackageActivity : ExecutionActivity + { + /// Initializes a new instance of ExecuteSsisPackageActivity. + /// Activity name. + /// SSIS package location. + /// The integration runtime reference. + public ExecuteSsisPackageActivity(string name, SsisPackageLocation packageLocation, IntegrationRuntimeReference connectVia) : base(name) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (packageLocation == null) + { + throw new ArgumentNullException(nameof(packageLocation)); + } + if (connectVia == null) + { + throw new ArgumentNullException(nameof(connectVia)); + } + + PackageLocation = packageLocation; + ConnectVia = connectVia; + Type = "ExecuteSSISPackage"; + } + + /// Initializes a new instance of ExecuteSsisPackageActivity. + /// Activity name. + /// Type of activity. + /// Activity description. + /// Activity depends on condition. + /// Activity user properties. + /// . + /// Linked service reference. + /// Activity policy. + /// SSIS package location. + /// Specifies the runtime to execute SSIS package. The value should be "x86" or "x64". Type: string (or Expression with resultType string). + /// The logging level of SSIS package execution. Type: string (or Expression with resultType string). + /// The environment path to execute the SSIS package. Type: string (or Expression with resultType string). + /// The package execution credential. + /// The integration runtime reference. + /// The project level parameters to execute the SSIS package. + /// The package level parameters to execute the SSIS package. + /// The project level connection managers to execute the SSIS package. + /// The package level connection managers to execute the SSIS package. + /// The property overrides to execute the SSIS package. + /// SSIS package execution log location. + internal ExecuteSsisPackageActivity(string name, string type, string description, IList dependsOn, IList userProperties, IDictionary additionalProperties, LinkedServiceReference linkedServiceName, ActivityPolicy policy, SsisPackageLocation packageLocation, object runtime, object loggingLevel, object environmentPath, SsisExecutionCredential executionCredential, IntegrationRuntimeReference connectVia, IDictionary projectParameters, IDictionary packageParameters, IDictionary projectConnectionManagers, IDictionary packageConnectionManagers, IDictionary propertyOverrides, SsisLogLocation logLocation) : base(name, type, description, dependsOn, userProperties, additionalProperties, linkedServiceName, policy) + { + PackageLocation = packageLocation; + Runtime = runtime; + LoggingLevel = loggingLevel; + EnvironmentPath = environmentPath; + ExecutionCredential = executionCredential; + ConnectVia = connectVia; + ProjectParameters = projectParameters; + PackageParameters = packageParameters; + ProjectConnectionManagers = projectConnectionManagers; + PackageConnectionManagers = packageConnectionManagers; + PropertyOverrides = propertyOverrides; + LogLocation = logLocation; + Type = type ?? "ExecuteSSISPackage"; + } + + /// SSIS package location. + public SsisPackageLocation PackageLocation { get; set; } + /// Specifies the runtime to execute SSIS package. The value should be "x86" or "x64". Type: string (or Expression with resultType string). + public object Runtime { get; set; } + /// The logging level of SSIS package execution. Type: string (or Expression with resultType string). + public object LoggingLevel { get; set; } + /// The environment path to execute the SSIS package. Type: string (or Expression with resultType string). + public object EnvironmentPath { get; set; } + /// The package execution credential. + public SsisExecutionCredential ExecutionCredential { get; set; } + /// The integration runtime reference. + public IntegrationRuntimeReference ConnectVia { get; set; } + /// The project level parameters to execute the SSIS package. + public IDictionary ProjectParameters { get; set; } + /// The package level parameters to execute the SSIS package. + public IDictionary PackageParameters { get; set; } + /// The project level connection managers to execute the SSIS package. + public IDictionary ProjectConnectionManagers { get; set; } + /// The package level connection managers to execute the SSIS package. + public IDictionary PackageConnectionManagers { get; set; } + /// The property overrides to execute the SSIS package. + public IDictionary PropertyOverrides { get; set; } + /// SSIS package execution log location. + public SsisLogLocation LogLocation { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ExecutionActivity.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ExecutionActivity.Serialization.cs new file mode 100644 index 000000000000..42e89de64c17 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ExecutionActivity.Serialization.cs @@ -0,0 +1,201 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class ExecutionActivity : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (LinkedServiceName != null) + { + writer.WritePropertyName("linkedServiceName"); + writer.WriteObjectValue(LinkedServiceName); + } + if (Policy != null) + { + writer.WritePropertyName("policy"); + writer.WriteObjectValue(Policy); + } + writer.WritePropertyName("name"); + writer.WriteStringValue(Name); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (DependsOn != null) + { + writer.WritePropertyName("dependsOn"); + writer.WriteStartArray(); + foreach (var item in DependsOn) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (UserProperties != null) + { + writer.WritePropertyName("userProperties"); + writer.WriteStartArray(); + foreach (var item in UserProperties) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static ExecutionActivity DeserializeExecutionActivity(JsonElement element) + { + if (element.TryGetProperty("type", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "AzureDataExplorerCommand": return AzureDataExplorerCommandActivity.DeserializeAzureDataExplorerCommandActivity(element); + case "AzureFunctionActivity": return AzureFunctionActivity.DeserializeAzureFunctionActivity(element); + case "AzureMLBatchExecution": return AzureMLBatchExecutionActivity.DeserializeAzureMLBatchExecutionActivity(element); + case "AzureMLExecutePipeline": return AzureMLExecutePipelineActivity.DeserializeAzureMLExecutePipelineActivity(element); + case "AzureMLUpdateResource": return AzureMLUpdateResourceActivity.DeserializeAzureMLUpdateResourceActivity(element); + case "Copy": return CopyActivity.DeserializeCopyActivity(element); + case "Custom": return CustomActivity.DeserializeCustomActivity(element); + case "DataLakeAnalyticsU-SQL": return DataLakeAnalyticsUsqlActivity.DeserializeDataLakeAnalyticsUsqlActivity(element); + case "DatabricksNotebook": return DatabricksNotebookActivity.DeserializeDatabricksNotebookActivity(element); + case "DatabricksSparkJar": return DatabricksSparkJarActivity.DeserializeDatabricksSparkJarActivity(element); + case "DatabricksSparkPython": return DatabricksSparkPythonActivity.DeserializeDatabricksSparkPythonActivity(element); + case "Delete": return DeleteActivity.DeserializeDeleteActivity(element); + case "ExecuteDataFlow": return ExecuteDataFlowActivity.DeserializeExecuteDataFlowActivity(element); + case "ExecuteSSISPackage": return ExecuteSsisPackageActivity.DeserializeExecuteSsisPackageActivity(element); + case "GetMetadata": return GetMetadataActivity.DeserializeGetMetadataActivity(element); + case "HDInsightHive": return HDInsightHiveActivity.DeserializeHDInsightHiveActivity(element); + case "HDInsightMapReduce": return HDInsightMapReduceActivity.DeserializeHDInsightMapReduceActivity(element); + case "HDInsightPig": return HDInsightPigActivity.DeserializeHDInsightPigActivity(element); + case "HDInsightSpark": return HDInsightSparkActivity.DeserializeHDInsightSparkActivity(element); + case "HDInsightStreaming": return HDInsightStreamingActivity.DeserializeHDInsightStreamingActivity(element); + case "Lookup": return LookupActivity.DeserializeLookupActivity(element); + case "SqlServerStoredProcedure": return SqlServerStoredProcedureActivity.DeserializeSqlServerStoredProcedureActivity(element); + case "WebActivity": return WebActivity.DeserializeWebActivity(element); + } + } + LinkedServiceReference linkedServiceName = default; + ActivityPolicy policy = default; + string name = default; + string type = default; + string description = default; + IList dependsOn = default; + IList userProperties = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("linkedServiceName")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value); + continue; + } + if (property.NameEquals("policy")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + policy = ActivityPolicy.DeserializeActivityPolicy(property.Value); + continue; + } + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("dependsOn")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(ActivityDependency.DeserializeActivityDependency(item)); + } + } + dependsOn = array; + continue; + } + if (property.NameEquals("userProperties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(UserProperty.DeserializeUserProperty(item)); + } + } + userProperties = array; + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new ExecutionActivity(name, type, description, dependsOn, userProperties, additionalProperties, linkedServiceName, policy); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ExecutionActivity.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ExecutionActivity.cs new file mode 100644 index 000000000000..18a35f2a17cf --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ExecutionActivity.cs @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Base class for all execution activities. + public partial class ExecutionActivity : Activity + { + /// Initializes a new instance of ExecutionActivity. + /// Activity name. + public ExecutionActivity(string name) : base(name) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + + Type = "Execution"; + } + + /// Initializes a new instance of ExecutionActivity. + /// Activity name. + /// Type of activity. + /// Activity description. + /// Activity depends on condition. + /// Activity user properties. + /// . + /// Linked service reference. + /// Activity policy. + internal ExecutionActivity(string name, string type, string description, IList dependsOn, IList userProperties, IDictionary additionalProperties, LinkedServiceReference linkedServiceName, ActivityPolicy policy) : base(name, type, description, dependsOn, userProperties, additionalProperties) + { + LinkedServiceName = linkedServiceName; + Policy = policy; + Type = type ?? "Execution"; + } + + /// Linked service reference. + public LinkedServiceReference LinkedServiceName { get; set; } + /// Activity policy. + public ActivityPolicy Policy { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ExposureControlRequest.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ExposureControlRequest.cs new file mode 100644 index 000000000000..7c4b16ec38ad --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ExposureControlRequest.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// The exposure control request. + internal partial class ExposureControlRequest + { + /// Initializes a new instance of ExposureControlRequest. + internal ExposureControlRequest() + { + } + + /// Initializes a new instance of ExposureControlRequest. + /// The feature name. + /// The feature type. + internal ExposureControlRequest(string featureName, string featureType) + { + FeatureName = featureName; + FeatureType = featureType; + } + + /// The feature name. + public string FeatureName { get; set; } + /// The feature type. + public string FeatureType { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ExposureControlResponse.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ExposureControlResponse.cs new file mode 100644 index 000000000000..60c4f027b9ea --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ExposureControlResponse.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// The exposure control response. + internal partial class ExposureControlResponse + { + /// Initializes a new instance of ExposureControlResponse. + internal ExposureControlResponse() + { + } + + /// Initializes a new instance of ExposureControlResponse. + /// The feature name. + /// The feature value. + internal ExposureControlResponse(string featureName, string value) + { + FeatureName = featureName; + Value = value; + } + + /// The feature name. + public string FeatureName { get; } + /// The feature value. + public string Value { get; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/Expression.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/Expression.Serialization.cs new file mode 100644 index 000000000000..80ed14139f16 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/Expression.Serialization.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class Expression : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + writer.WritePropertyName("value"); + writer.WriteStringValue(Value); + writer.WriteEndObject(); + } + + internal static Expression DeserializeExpression(JsonElement element) + { + string type = default; + string value = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("value")) + { + value = property.Value.GetString(); + continue; + } + } + return new Expression(type, value); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/Expression.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/Expression.cs new file mode 100644 index 000000000000..84574bc29fd8 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/Expression.cs @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Azure Synapse expression definition. + public partial class Expression + { + /// Initializes a new instance of Expression. + /// Expression value. + public Expression(string value) + { + if (value == null) + { + throw new ArgumentNullException(nameof(value)); + } + + Type = "Expression"; + Value = value; + } + + /// Initializes a new instance of Expression. + /// Expression type. + /// Expression value. + internal Expression(string type, string value) + { + Type = type; + Value = value; + } + + /// Expression type. + public string Type { get; set; } + /// Expression value. + public string Value { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/FileServerLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/FileServerLinkedService.Serialization.cs new file mode 100644 index 000000000000..d40cc72e0de3 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/FileServerLinkedService.Serialization.cs @@ -0,0 +1,213 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class FileServerLinkedService : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (ConnectVia != null) + { + writer.WritePropertyName("connectVia"); + writer.WriteObjectValue(ConnectVia); + } + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + writer.WritePropertyName("host"); + writer.WriteObjectValue(Host); + if (UserId != null) + { + writer.WritePropertyName("userId"); + writer.WriteObjectValue(UserId); + } + if (Password != null) + { + writer.WritePropertyName("password"); + writer.WriteObjectValue(Password); + } + if (EncryptedCredential != null) + { + writer.WritePropertyName("encryptedCredential"); + writer.WriteObjectValue(EncryptedCredential); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static FileServerLinkedService DeserializeFileServerLinkedService(JsonElement element) + { + string type = default; + IntegrationRuntimeReference connectVia = default; + string description = default; + IDictionary parameters = default; + IList annotations = default; + object host = default; + object userId = default; + SecretBase password = default; + object encryptedCredential = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("connectVia")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("host")) + { + host = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("userId")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + userId = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("password")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + password = SecretBase.DeserializeSecretBase(property0.Value); + continue; + } + if (property0.NameEquals("encryptedCredential")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + encryptedCredential = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new FileServerLinkedService(type, connectVia, description, parameters, annotations, additionalProperties, host, userId, password, encryptedCredential); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/FileServerLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/FileServerLinkedService.cs new file mode 100644 index 000000000000..133dbb0f899b --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/FileServerLinkedService.cs @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// File system linked service. + public partial class FileServerLinkedService : LinkedService + { + /// Initializes a new instance of FileServerLinkedService. + /// Host name of the server. Type: string (or Expression with resultType string). + public FileServerLinkedService(object host) + { + if (host == null) + { + throw new ArgumentNullException(nameof(host)); + } + + Host = host; + Type = "FileServer"; + } + + /// Initializes a new instance of FileServerLinkedService. + /// Type of linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for describing the linked service. + /// . + /// Host name of the server. Type: string (or Expression with resultType string). + /// User ID to logon the server. Type: string (or Expression with resultType string). + /// Password to logon the server. + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + internal FileServerLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object host, object userId, SecretBase password, object encryptedCredential) : base(type, connectVia, description, parameters, annotations, additionalProperties) + { + Host = host; + UserId = userId; + Password = password; + EncryptedCredential = encryptedCredential; + Type = type ?? "FileServer"; + } + + /// Host name of the server. Type: string (or Expression with resultType string). + public object Host { get; set; } + /// User ID to logon the server. Type: string (or Expression with resultType string). + public object UserId { get; set; } + /// Password to logon the server. + public SecretBase Password { get; set; } + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + public object EncryptedCredential { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/FilterActivity.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/FilterActivity.Serialization.cs new file mode 100644 index 000000000000..e1c93413da14 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/FilterActivity.Serialization.cs @@ -0,0 +1,168 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class FilterActivity : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("name"); + writer.WriteStringValue(Name); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (DependsOn != null) + { + writer.WritePropertyName("dependsOn"); + writer.WriteStartArray(); + foreach (var item in DependsOn) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (UserProperties != null) + { + writer.WritePropertyName("userProperties"); + writer.WriteStartArray(); + foreach (var item in UserProperties) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + writer.WritePropertyName("items"); + writer.WriteObjectValue(Items); + writer.WritePropertyName("condition"); + writer.WriteObjectValue(Condition); + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static FilterActivity DeserializeFilterActivity(JsonElement element) + { + string name = default; + string type = default; + string description = default; + IList dependsOn = default; + IList userProperties = default; + Expression items = default; + Expression condition = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("dependsOn")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(ActivityDependency.DeserializeActivityDependency(item)); + } + } + dependsOn = array; + continue; + } + if (property.NameEquals("userProperties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(UserProperty.DeserializeUserProperty(item)); + } + } + userProperties = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("items")) + { + items = Expression.DeserializeExpression(property0.Value); + continue; + } + if (property0.NameEquals("condition")) + { + condition = Expression.DeserializeExpression(property0.Value); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new FilterActivity(name, type, description, dependsOn, userProperties, additionalProperties, items, condition); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/FilterActivity.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/FilterActivity.cs new file mode 100644 index 000000000000..d7771de69fee --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/FilterActivity.cs @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Filter and return results from input array based on the conditions. + public partial class FilterActivity : Activity + { + /// Initializes a new instance of FilterActivity. + /// Activity name. + /// Input array on which filter should be applied. + /// Condition to be used for filtering the input. + public FilterActivity(string name, Expression items, Expression condition) : base(name) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (items == null) + { + throw new ArgumentNullException(nameof(items)); + } + if (condition == null) + { + throw new ArgumentNullException(nameof(condition)); + } + + Items = items; + Condition = condition; + Type = "Filter"; + } + + /// Initializes a new instance of FilterActivity. + /// Activity name. + /// Type of activity. + /// Activity description. + /// Activity depends on condition. + /// Activity user properties. + /// . + /// Input array on which filter should be applied. + /// Condition to be used for filtering the input. + internal FilterActivity(string name, string type, string description, IList dependsOn, IList userProperties, IDictionary additionalProperties, Expression items, Expression condition) : base(name, type, description, dependsOn, userProperties, additionalProperties) + { + Items = items; + Condition = condition; + Type = type ?? "Filter"; + } + + /// Input array on which filter should be applied. + public Expression Items { get; set; } + /// Condition to be used for filtering the input. + public Expression Condition { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ForEachActivity.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ForEachActivity.Serialization.cs new file mode 100644 index 000000000000..f016c9cc7b78 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ForEachActivity.Serialization.cs @@ -0,0 +1,215 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class ForEachActivity : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("name"); + writer.WriteStringValue(Name); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (DependsOn != null) + { + writer.WritePropertyName("dependsOn"); + writer.WriteStartArray(); + foreach (var item in DependsOn) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (UserProperties != null) + { + writer.WritePropertyName("userProperties"); + writer.WriteStartArray(); + foreach (var item in UserProperties) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + if (IsSequential != null) + { + writer.WritePropertyName("isSequential"); + writer.WriteBooleanValue(IsSequential.Value); + } + if (BatchCount != null) + { + writer.WritePropertyName("batchCount"); + writer.WriteNumberValue(BatchCount.Value); + } + writer.WritePropertyName("items"); + writer.WriteObjectValue(Items); + writer.WritePropertyName("activities"); + writer.WriteStartArray(); + foreach (var item in Activities) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static ForEachActivity DeserializeForEachActivity(JsonElement element) + { + string name = default; + string type = default; + string description = default; + IList dependsOn = default; + IList userProperties = default; + bool? isSequential = default; + int? batchCount = default; + Expression items = default; + IList activities = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("dependsOn")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(ActivityDependency.DeserializeActivityDependency(item)); + } + } + dependsOn = array; + continue; + } + if (property.NameEquals("userProperties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(UserProperty.DeserializeUserProperty(item)); + } + } + userProperties = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("isSequential")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isSequential = property0.Value.GetBoolean(); + continue; + } + if (property0.NameEquals("batchCount")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + batchCount = property0.Value.GetInt32(); + continue; + } + if (property0.NameEquals("items")) + { + items = Expression.DeserializeExpression(property0.Value); + continue; + } + if (property0.NameEquals("activities")) + { + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(DeserializeActivity(item)); + } + } + activities = array; + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new ForEachActivity(name, type, description, dependsOn, userProperties, additionalProperties, isSequential, batchCount, items, activities); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ForEachActivity.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ForEachActivity.cs new file mode 100644 index 000000000000..ec11a687ab01 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ForEachActivity.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// This activity is used for iterating over a collection and execute given activities. + public partial class ForEachActivity : Activity + { + /// Initializes a new instance of ForEachActivity. + /// Activity name. + /// Collection to iterate. + /// List of activities to execute . + public ForEachActivity(string name, Expression items, IEnumerable activities) : base(name) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (items == null) + { + throw new ArgumentNullException(nameof(items)); + } + if (activities == null) + { + throw new ArgumentNullException(nameof(activities)); + } + + Items = items; + Activities = activities.ToArray(); + Type = "ForEach"; + } + + /// Initializes a new instance of ForEachActivity. + /// Activity name. + /// Type of activity. + /// Activity description. + /// Activity depends on condition. + /// Activity user properties. + /// . + /// Should the loop be executed in sequence or in parallel (max 50). + /// Batch count to be used for controlling the number of parallel execution (when isSequential is set to false). + /// Collection to iterate. + /// List of activities to execute . + internal ForEachActivity(string name, string type, string description, IList dependsOn, IList userProperties, IDictionary additionalProperties, bool? isSequential, int? batchCount, Expression items, IList activities) : base(name, type, description, dependsOn, userProperties, additionalProperties) + { + IsSequential = isSequential; + BatchCount = batchCount; + Items = items; + Activities = activities; + Type = type ?? "ForEach"; + } + + /// Should the loop be executed in sequence or in parallel (max 50). + public bool? IsSequential { get; set; } + /// Batch count to be used for controlling the number of parallel execution (when isSequential is set to false). + public int? BatchCount { get; set; } + /// Collection to iterate. + public Expression Items { get; set; } + /// List of activities to execute . + public IList Activities { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/FtpAuthenticationType.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/FtpAuthenticationType.cs new file mode 100644 index 000000000000..262a8389b579 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/FtpAuthenticationType.cs @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// The authentication type to be used to connect to the FTP server. + public readonly partial struct FtpAuthenticationType : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + public FtpAuthenticationType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string BasicValue = "Basic"; + private const string AnonymousValue = "Anonymous"; + + /// Basic. + public static FtpAuthenticationType Basic { get; } = new FtpAuthenticationType(BasicValue); + /// Anonymous. + public static FtpAuthenticationType Anonymous { get; } = new FtpAuthenticationType(AnonymousValue); + /// Determines if two values are the same. + public static bool operator ==(FtpAuthenticationType left, FtpAuthenticationType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(FtpAuthenticationType left, FtpAuthenticationType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator FtpAuthenticationType(string value) => new FtpAuthenticationType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is FtpAuthenticationType other && Equals(other); + /// + public bool Equals(FtpAuthenticationType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/FtpServerLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/FtpServerLinkedService.Serialization.cs new file mode 100644 index 000000000000..632bf039fec1 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/FtpServerLinkedService.Serialization.cs @@ -0,0 +1,273 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class FtpServerLinkedService : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (ConnectVia != null) + { + writer.WritePropertyName("connectVia"); + writer.WriteObjectValue(ConnectVia); + } + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + writer.WritePropertyName("host"); + writer.WriteObjectValue(Host); + if (Port != null) + { + writer.WritePropertyName("port"); + writer.WriteObjectValue(Port); + } + if (AuthenticationType != null) + { + writer.WritePropertyName("authenticationType"); + writer.WriteStringValue(AuthenticationType.Value.ToString()); + } + if (UserName != null) + { + writer.WritePropertyName("userName"); + writer.WriteObjectValue(UserName); + } + if (Password != null) + { + writer.WritePropertyName("password"); + writer.WriteObjectValue(Password); + } + if (EncryptedCredential != null) + { + writer.WritePropertyName("encryptedCredential"); + writer.WriteObjectValue(EncryptedCredential); + } + if (EnableSsl != null) + { + writer.WritePropertyName("enableSsl"); + writer.WriteObjectValue(EnableSsl); + } + if (EnableServerCertificateValidation != null) + { + writer.WritePropertyName("enableServerCertificateValidation"); + writer.WriteObjectValue(EnableServerCertificateValidation); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static FtpServerLinkedService DeserializeFtpServerLinkedService(JsonElement element) + { + string type = default; + IntegrationRuntimeReference connectVia = default; + string description = default; + IDictionary parameters = default; + IList annotations = default; + object host = default; + object port = default; + FtpAuthenticationType? authenticationType = default; + object userName = default; + SecretBase password = default; + object encryptedCredential = default; + object enableSsl = default; + object enableServerCertificateValidation = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("connectVia")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("host")) + { + host = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("port")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + port = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("authenticationType")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + authenticationType = new FtpAuthenticationType(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("userName")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + userName = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("password")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + password = SecretBase.DeserializeSecretBase(property0.Value); + continue; + } + if (property0.NameEquals("encryptedCredential")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + encryptedCredential = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("enableSsl")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + enableSsl = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("enableServerCertificateValidation")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + enableServerCertificateValidation = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new FtpServerLinkedService(type, connectVia, description, parameters, annotations, additionalProperties, host, port, authenticationType, userName, password, encryptedCredential, enableSsl, enableServerCertificateValidation); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/FtpServerLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/FtpServerLinkedService.cs new file mode 100644 index 000000000000..fdff61adbec6 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/FtpServerLinkedService.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// A FTP server Linked Service. + public partial class FtpServerLinkedService : LinkedService + { + /// Initializes a new instance of FtpServerLinkedService. + /// Host name of the FTP server. Type: string (or Expression with resultType string). + public FtpServerLinkedService(object host) + { + if (host == null) + { + throw new ArgumentNullException(nameof(host)); + } + + Host = host; + Type = "FtpServer"; + } + + /// Initializes a new instance of FtpServerLinkedService. + /// Type of linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for describing the linked service. + /// . + /// Host name of the FTP server. Type: string (or Expression with resultType string). + /// The TCP port number that the FTP server uses to listen for client connections. Default value is 21. Type: integer (or Expression with resultType integer), minimum: 0. + /// The authentication type to be used to connect to the FTP server. + /// Username to logon the FTP server. Type: string (or Expression with resultType string). + /// Password to logon the FTP server. + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + /// If true, connect to the FTP server over SSL/TLS channel. Default value is true. Type: boolean (or Expression with resultType boolean). + /// If true, validate the FTP server SSL certificate when connect over SSL/TLS channel. Default value is true. Type: boolean (or Expression with resultType boolean). + internal FtpServerLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object host, object port, FtpAuthenticationType? authenticationType, object userName, SecretBase password, object encryptedCredential, object enableSsl, object enableServerCertificateValidation) : base(type, connectVia, description, parameters, annotations, additionalProperties) + { + Host = host; + Port = port; + AuthenticationType = authenticationType; + UserName = userName; + Password = password; + EncryptedCredential = encryptedCredential; + EnableSsl = enableSsl; + EnableServerCertificateValidation = enableServerCertificateValidation; + Type = type ?? "FtpServer"; + } + + /// Host name of the FTP server. Type: string (or Expression with resultType string). + public object Host { get; set; } + /// The TCP port number that the FTP server uses to listen for client connections. Default value is 21. Type: integer (or Expression with resultType integer), minimum: 0. + public object Port { get; set; } + /// The authentication type to be used to connect to the FTP server. + public FtpAuthenticationType? AuthenticationType { get; set; } + /// Username to logon the FTP server. Type: string (or Expression with resultType string). + public object UserName { get; set; } + /// Password to logon the FTP server. + public SecretBase Password { get; set; } + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + public object EncryptedCredential { get; set; } + /// If true, connect to the FTP server over SSL/TLS channel. Default value is true. Type: boolean (or Expression with resultType boolean). + public object EnableSsl { get; set; } + /// If true, validate the FTP server SSL certificate when connect over SSL/TLS channel. Default value is true. Type: boolean (or Expression with resultType boolean). + public object EnableServerCertificateValidation { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/GetMetadataActivity.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/GetMetadataActivity.Serialization.cs new file mode 100644 index 000000000000..3d6ed5820f00 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/GetMetadataActivity.Serialization.cs @@ -0,0 +1,222 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class GetMetadataActivity : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (LinkedServiceName != null) + { + writer.WritePropertyName("linkedServiceName"); + writer.WriteObjectValue(LinkedServiceName); + } + if (Policy != null) + { + writer.WritePropertyName("policy"); + writer.WriteObjectValue(Policy); + } + writer.WritePropertyName("name"); + writer.WriteStringValue(Name); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (DependsOn != null) + { + writer.WritePropertyName("dependsOn"); + writer.WriteStartArray(); + foreach (var item in DependsOn) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (UserProperties != null) + { + writer.WritePropertyName("userProperties"); + writer.WriteStartArray(); + foreach (var item in UserProperties) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + writer.WritePropertyName("dataset"); + writer.WriteObjectValue(Dataset); + if (FieldList != null) + { + writer.WritePropertyName("fieldList"); + writer.WriteStartArray(); + foreach (var item in FieldList) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static GetMetadataActivity DeserializeGetMetadataActivity(JsonElement element) + { + LinkedServiceReference linkedServiceName = default; + ActivityPolicy policy = default; + string name = default; + string type = default; + string description = default; + IList dependsOn = default; + IList userProperties = default; + DatasetReference dataset = default; + IList fieldList = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("linkedServiceName")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value); + continue; + } + if (property.NameEquals("policy")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + policy = ActivityPolicy.DeserializeActivityPolicy(property.Value); + continue; + } + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("dependsOn")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(ActivityDependency.DeserializeActivityDependency(item)); + } + } + dependsOn = array; + continue; + } + if (property.NameEquals("userProperties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(UserProperty.DeserializeUserProperty(item)); + } + } + userProperties = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("dataset")) + { + dataset = DatasetReference.DeserializeDatasetReference(property0.Value); + continue; + } + if (property0.NameEquals("fieldList")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + fieldList = array; + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new GetMetadataActivity(name, type, description, dependsOn, userProperties, additionalProperties, linkedServiceName, policy, dataset, fieldList); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/GetMetadataActivity.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/GetMetadataActivity.cs new file mode 100644 index 000000000000..afad8c58eddb --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/GetMetadataActivity.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Activity to get metadata of dataset. + public partial class GetMetadataActivity : ExecutionActivity + { + /// Initializes a new instance of GetMetadataActivity. + /// Activity name. + /// GetMetadata activity dataset reference. + public GetMetadataActivity(string name, DatasetReference dataset) : base(name) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (dataset == null) + { + throw new ArgumentNullException(nameof(dataset)); + } + + Dataset = dataset; + Type = "GetMetadata"; + } + + /// Initializes a new instance of GetMetadataActivity. + /// Activity name. + /// Type of activity. + /// Activity description. + /// Activity depends on condition. + /// Activity user properties. + /// . + /// Linked service reference. + /// Activity policy. + /// GetMetadata activity dataset reference. + /// Fields of metadata to get from dataset. + internal GetMetadataActivity(string name, string type, string description, IList dependsOn, IList userProperties, IDictionary additionalProperties, LinkedServiceReference linkedServiceName, ActivityPolicy policy, DatasetReference dataset, IList fieldList) : base(name, type, description, dependsOn, userProperties, additionalProperties, linkedServiceName, policy) + { + Dataset = dataset; + FieldList = fieldList; + Type = type ?? "GetMetadata"; + } + + /// GetMetadata activity dataset reference. + public DatasetReference Dataset { get; set; } + /// Fields of metadata to get from dataset. + public IList FieldList { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/GetSsisObjectMetadataRequest.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/GetSsisObjectMetadataRequest.cs new file mode 100644 index 000000000000..8a5ce372aa3f --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/GetSsisObjectMetadataRequest.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// The request payload of get SSIS object metadata. + internal partial class GetSsisObjectMetadataRequest + { + /// Initializes a new instance of GetSsisObjectMetadataRequest. + internal GetSsisObjectMetadataRequest() + { + } + + /// Initializes a new instance of GetSsisObjectMetadataRequest. + /// Metadata path. + internal GetSsisObjectMetadataRequest(string metadataPath) + { + MetadataPath = metadataPath; + } + + /// Metadata path. + public string MetadataPath { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/GoogleAdWordsAuthenticationType.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/GoogleAdWordsAuthenticationType.cs new file mode 100644 index 000000000000..2d46ed8ddc8b --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/GoogleAdWordsAuthenticationType.cs @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// The OAuth 2.0 authentication mechanism used for authentication. ServiceAuthentication can only be used on self-hosted IR. + public readonly partial struct GoogleAdWordsAuthenticationType : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + public GoogleAdWordsAuthenticationType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ServiceAuthenticationValue = "ServiceAuthentication"; + private const string UserAuthenticationValue = "UserAuthentication"; + + /// ServiceAuthentication. + public static GoogleAdWordsAuthenticationType ServiceAuthentication { get; } = new GoogleAdWordsAuthenticationType(ServiceAuthenticationValue); + /// UserAuthentication. + public static GoogleAdWordsAuthenticationType UserAuthentication { get; } = new GoogleAdWordsAuthenticationType(UserAuthenticationValue); + /// Determines if two values are the same. + public static bool operator ==(GoogleAdWordsAuthenticationType left, GoogleAdWordsAuthenticationType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(GoogleAdWordsAuthenticationType left, GoogleAdWordsAuthenticationType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator GoogleAdWordsAuthenticationType(string value) => new GoogleAdWordsAuthenticationType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is GoogleAdWordsAuthenticationType other && Equals(other); + /// + public bool Equals(GoogleAdWordsAuthenticationType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/GoogleAdWordsLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/GoogleAdWordsLinkedService.Serialization.cs new file mode 100644 index 000000000000..b4326ec7fa55 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/GoogleAdWordsLinkedService.Serialization.cs @@ -0,0 +1,304 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class GoogleAdWordsLinkedService : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (ConnectVia != null) + { + writer.WritePropertyName("connectVia"); + writer.WriteObjectValue(ConnectVia); + } + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + writer.WritePropertyName("clientCustomerID"); + writer.WriteObjectValue(ClientCustomerID); + writer.WritePropertyName("developerToken"); + writer.WriteObjectValue(DeveloperToken); + writer.WritePropertyName("authenticationType"); + writer.WriteStringValue(AuthenticationType.ToString()); + if (RefreshToken != null) + { + writer.WritePropertyName("refreshToken"); + writer.WriteObjectValue(RefreshToken); + } + if (ClientId != null) + { + writer.WritePropertyName("clientId"); + writer.WriteObjectValue(ClientId); + } + if (ClientSecret != null) + { + writer.WritePropertyName("clientSecret"); + writer.WriteObjectValue(ClientSecret); + } + if (Email != null) + { + writer.WritePropertyName("email"); + writer.WriteObjectValue(Email); + } + if (KeyFilePath != null) + { + writer.WritePropertyName("keyFilePath"); + writer.WriteObjectValue(KeyFilePath); + } + if (TrustedCertPath != null) + { + writer.WritePropertyName("trustedCertPath"); + writer.WriteObjectValue(TrustedCertPath); + } + if (UseSystemTrustStore != null) + { + writer.WritePropertyName("useSystemTrustStore"); + writer.WriteObjectValue(UseSystemTrustStore); + } + if (EncryptedCredential != null) + { + writer.WritePropertyName("encryptedCredential"); + writer.WriteObjectValue(EncryptedCredential); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static GoogleAdWordsLinkedService DeserializeGoogleAdWordsLinkedService(JsonElement element) + { + string type = default; + IntegrationRuntimeReference connectVia = default; + string description = default; + IDictionary parameters = default; + IList annotations = default; + object clientCustomerID = default; + SecretBase developerToken = default; + GoogleAdWordsAuthenticationType authenticationType = default; + SecretBase refreshToken = default; + object clientId = default; + SecretBase clientSecret = default; + object email = default; + object keyFilePath = default; + object trustedCertPath = default; + object useSystemTrustStore = default; + object encryptedCredential = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("connectVia")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("clientCustomerID")) + { + clientCustomerID = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("developerToken")) + { + developerToken = SecretBase.DeserializeSecretBase(property0.Value); + continue; + } + if (property0.NameEquals("authenticationType")) + { + authenticationType = new GoogleAdWordsAuthenticationType(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("refreshToken")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + refreshToken = SecretBase.DeserializeSecretBase(property0.Value); + continue; + } + if (property0.NameEquals("clientId")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + clientId = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("clientSecret")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + clientSecret = SecretBase.DeserializeSecretBase(property0.Value); + continue; + } + if (property0.NameEquals("email")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + email = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("keyFilePath")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + keyFilePath = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("trustedCertPath")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + trustedCertPath = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("useSystemTrustStore")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + useSystemTrustStore = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("encryptedCredential")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + encryptedCredential = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new GoogleAdWordsLinkedService(type, connectVia, description, parameters, annotations, additionalProperties, clientCustomerID, developerToken, authenticationType, refreshToken, clientId, clientSecret, email, keyFilePath, trustedCertPath, useSystemTrustStore, encryptedCredential); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/GoogleAdWordsLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/GoogleAdWordsLinkedService.cs new file mode 100644 index 000000000000..a7e0b48cb2ed --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/GoogleAdWordsLinkedService.cs @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Google AdWords service linked service. + public partial class GoogleAdWordsLinkedService : LinkedService + { + /// Initializes a new instance of GoogleAdWordsLinkedService. + /// The Client customer ID of the AdWords account that you want to fetch report data for. + /// The developer token associated with the manager account that you use to grant access to the AdWords API. + /// The OAuth 2.0 authentication mechanism used for authentication. ServiceAuthentication can only be used on self-hosted IR. + public GoogleAdWordsLinkedService(object clientCustomerID, SecretBase developerToken, GoogleAdWordsAuthenticationType authenticationType) + { + if (clientCustomerID == null) + { + throw new ArgumentNullException(nameof(clientCustomerID)); + } + if (developerToken == null) + { + throw new ArgumentNullException(nameof(developerToken)); + } + + ClientCustomerID = clientCustomerID; + DeveloperToken = developerToken; + AuthenticationType = authenticationType; + Type = "GoogleAdWords"; + } + + /// Initializes a new instance of GoogleAdWordsLinkedService. + /// Type of linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for describing the linked service. + /// . + /// The Client customer ID of the AdWords account that you want to fetch report data for. + /// The developer token associated with the manager account that you use to grant access to the AdWords API. + /// The OAuth 2.0 authentication mechanism used for authentication. ServiceAuthentication can only be used on self-hosted IR. + /// The refresh token obtained from Google for authorizing access to AdWords for UserAuthentication. + /// The client id of the google application used to acquire the refresh token. Type: string (or Expression with resultType string). + /// The client secret of the google application used to acquire the refresh token. + /// The service account email ID that is used for ServiceAuthentication and can only be used on self-hosted IR. + /// The full path to the .p12 key file that is used to authenticate the service account email address and can only be used on self-hosted IR. + /// The full path of the .pem file containing trusted CA certificates for verifying the server when connecting over SSL. This property can only be set when using SSL on self-hosted IR. The default value is the cacerts.pem file installed with the IR. + /// Specifies whether to use a CA certificate from the system trust store or from a specified PEM file. The default value is false. + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + internal GoogleAdWordsLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object clientCustomerID, SecretBase developerToken, GoogleAdWordsAuthenticationType authenticationType, SecretBase refreshToken, object clientId, SecretBase clientSecret, object email, object keyFilePath, object trustedCertPath, object useSystemTrustStore, object encryptedCredential) : base(type, connectVia, description, parameters, annotations, additionalProperties) + { + ClientCustomerID = clientCustomerID; + DeveloperToken = developerToken; + AuthenticationType = authenticationType; + RefreshToken = refreshToken; + ClientId = clientId; + ClientSecret = clientSecret; + Email = email; + KeyFilePath = keyFilePath; + TrustedCertPath = trustedCertPath; + UseSystemTrustStore = useSystemTrustStore; + EncryptedCredential = encryptedCredential; + Type = type ?? "GoogleAdWords"; + } + + /// The Client customer ID of the AdWords account that you want to fetch report data for. + public object ClientCustomerID { get; set; } + /// The developer token associated with the manager account that you use to grant access to the AdWords API. + public SecretBase DeveloperToken { get; set; } + /// The OAuth 2.0 authentication mechanism used for authentication. ServiceAuthentication can only be used on self-hosted IR. + public GoogleAdWordsAuthenticationType AuthenticationType { get; set; } + /// The refresh token obtained from Google for authorizing access to AdWords for UserAuthentication. + public SecretBase RefreshToken { get; set; } + /// The client id of the google application used to acquire the refresh token. Type: string (or Expression with resultType string). + public object ClientId { get; set; } + /// The client secret of the google application used to acquire the refresh token. + public SecretBase ClientSecret { get; set; } + /// The service account email ID that is used for ServiceAuthentication and can only be used on self-hosted IR. + public object Email { get; set; } + /// The full path to the .p12 key file that is used to authenticate the service account email address and can only be used on self-hosted IR. + public object KeyFilePath { get; set; } + /// The full path of the .pem file containing trusted CA certificates for verifying the server when connecting over SSL. This property can only be set when using SSL on self-hosted IR. The default value is the cacerts.pem file installed with the IR. + public object TrustedCertPath { get; set; } + /// Specifies whether to use a CA certificate from the system trust store or from a specified PEM file. The default value is false. + public object UseSystemTrustStore { get; set; } + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + public object EncryptedCredential { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/GoogleAdWordsObjectDataset.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/GoogleAdWordsObjectDataset.Serialization.cs new file mode 100644 index 000000000000..87abda4ee638 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/GoogleAdWordsObjectDataset.Serialization.cs @@ -0,0 +1,213 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class GoogleAdWordsObjectDataset : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Structure != null) + { + writer.WritePropertyName("structure"); + writer.WriteObjectValue(Structure); + } + if (Schema != null) + { + writer.WritePropertyName("schema"); + writer.WriteObjectValue(Schema); + } + writer.WritePropertyName("linkedServiceName"); + writer.WriteObjectValue(LinkedServiceName); + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Folder != null) + { + writer.WritePropertyName("folder"); + writer.WriteObjectValue(Folder); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + if (TableName != null) + { + writer.WritePropertyName("tableName"); + writer.WriteObjectValue(TableName); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static GoogleAdWordsObjectDataset DeserializeGoogleAdWordsObjectDataset(JsonElement element) + { + string type = default; + string description = default; + object structure = default; + object schema = default; + LinkedServiceReference linkedServiceName = default; + IDictionary parameters = default; + IList annotations = default; + DatasetFolder folder = default; + object tableName = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("structure")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + structure = property.Value.GetObject(); + continue; + } + if (property.NameEquals("schema")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + schema = property.Value.GetObject(); + continue; + } + if (property.NameEquals("linkedServiceName")) + { + linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("folder")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + folder = DatasetFolder.DeserializeDatasetFolder(property.Value); + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("tableName")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + tableName = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new GoogleAdWordsObjectDataset(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties, tableName); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/GoogleAdWordsObjectDataset.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/GoogleAdWordsObjectDataset.cs new file mode 100644 index 000000000000..bd5f30b004f5 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/GoogleAdWordsObjectDataset.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Google AdWords service dataset. + public partial class GoogleAdWordsObjectDataset : Dataset + { + /// Initializes a new instance of GoogleAdWordsObjectDataset. + /// Linked service reference. + public GoogleAdWordsObjectDataset(LinkedServiceReference linkedServiceName) : base(linkedServiceName) + { + if (linkedServiceName == null) + { + throw new ArgumentNullException(nameof(linkedServiceName)); + } + + Type = "GoogleAdWordsObject"; + } + + /// Initializes a new instance of GoogleAdWordsObjectDataset. + /// Type of dataset. + /// Dataset description. + /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. + /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. + /// Linked service reference. + /// Parameters for dataset. + /// List of tags that can be used for describing the Dataset. + /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. + /// . + /// The table name. Type: string (or Expression with resultType string). + internal GoogleAdWordsObjectDataset(string type, string description, object structure, object schema, LinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary additionalProperties, object tableName) : base(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) + { + TableName = tableName; + Type = type ?? "GoogleAdWordsObject"; + } + + /// The table name. Type: string (or Expression with resultType string). + public object TableName { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/GoogleBigQueryAuthenticationType.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/GoogleBigQueryAuthenticationType.cs new file mode 100644 index 000000000000..7fb0c84fa34b --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/GoogleBigQueryAuthenticationType.cs @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// The OAuth 2.0 authentication mechanism used for authentication. ServiceAuthentication can only be used on self-hosted IR. + public readonly partial struct GoogleBigQueryAuthenticationType : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + public GoogleBigQueryAuthenticationType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ServiceAuthenticationValue = "ServiceAuthentication"; + private const string UserAuthenticationValue = "UserAuthentication"; + + /// ServiceAuthentication. + public static GoogleBigQueryAuthenticationType ServiceAuthentication { get; } = new GoogleBigQueryAuthenticationType(ServiceAuthenticationValue); + /// UserAuthentication. + public static GoogleBigQueryAuthenticationType UserAuthentication { get; } = new GoogleBigQueryAuthenticationType(UserAuthenticationValue); + /// Determines if two values are the same. + public static bool operator ==(GoogleBigQueryAuthenticationType left, GoogleBigQueryAuthenticationType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(GoogleBigQueryAuthenticationType left, GoogleBigQueryAuthenticationType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator GoogleBigQueryAuthenticationType(string value) => new GoogleBigQueryAuthenticationType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is GoogleBigQueryAuthenticationType other && Equals(other); + /// + public bool Equals(GoogleBigQueryAuthenticationType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/GoogleBigQueryLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/GoogleBigQueryLinkedService.Serialization.cs new file mode 100644 index 000000000000..de1a95f60be0 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/GoogleBigQueryLinkedService.Serialization.cs @@ -0,0 +1,326 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class GoogleBigQueryLinkedService : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (ConnectVia != null) + { + writer.WritePropertyName("connectVia"); + writer.WriteObjectValue(ConnectVia); + } + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + writer.WritePropertyName("project"); + writer.WriteObjectValue(Project); + if (AdditionalProjects != null) + { + writer.WritePropertyName("additionalProjects"); + writer.WriteObjectValue(AdditionalProjects); + } + if (RequestGoogleDriveScope != null) + { + writer.WritePropertyName("requestGoogleDriveScope"); + writer.WriteObjectValue(RequestGoogleDriveScope); + } + writer.WritePropertyName("authenticationType"); + writer.WriteStringValue(AuthenticationType.ToString()); + if (RefreshToken != null) + { + writer.WritePropertyName("refreshToken"); + writer.WriteObjectValue(RefreshToken); + } + if (ClientId != null) + { + writer.WritePropertyName("clientId"); + writer.WriteObjectValue(ClientId); + } + if (ClientSecret != null) + { + writer.WritePropertyName("clientSecret"); + writer.WriteObjectValue(ClientSecret); + } + if (Email != null) + { + writer.WritePropertyName("email"); + writer.WriteObjectValue(Email); + } + if (KeyFilePath != null) + { + writer.WritePropertyName("keyFilePath"); + writer.WriteObjectValue(KeyFilePath); + } + if (TrustedCertPath != null) + { + writer.WritePropertyName("trustedCertPath"); + writer.WriteObjectValue(TrustedCertPath); + } + if (UseSystemTrustStore != null) + { + writer.WritePropertyName("useSystemTrustStore"); + writer.WriteObjectValue(UseSystemTrustStore); + } + if (EncryptedCredential != null) + { + writer.WritePropertyName("encryptedCredential"); + writer.WriteObjectValue(EncryptedCredential); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static GoogleBigQueryLinkedService DeserializeGoogleBigQueryLinkedService(JsonElement element) + { + string type = default; + IntegrationRuntimeReference connectVia = default; + string description = default; + IDictionary parameters = default; + IList annotations = default; + object project = default; + object additionalProjects = default; + object requestGoogleDriveScope = default; + GoogleBigQueryAuthenticationType authenticationType = default; + SecretBase refreshToken = default; + object clientId = default; + SecretBase clientSecret = default; + object email = default; + object keyFilePath = default; + object trustedCertPath = default; + object useSystemTrustStore = default; + object encryptedCredential = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("connectVia")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("project")) + { + project = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("additionalProjects")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + additionalProjects = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("requestGoogleDriveScope")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + requestGoogleDriveScope = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("authenticationType")) + { + authenticationType = new GoogleBigQueryAuthenticationType(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("refreshToken")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + refreshToken = SecretBase.DeserializeSecretBase(property0.Value); + continue; + } + if (property0.NameEquals("clientId")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + clientId = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("clientSecret")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + clientSecret = SecretBase.DeserializeSecretBase(property0.Value); + continue; + } + if (property0.NameEquals("email")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + email = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("keyFilePath")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + keyFilePath = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("trustedCertPath")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + trustedCertPath = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("useSystemTrustStore")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + useSystemTrustStore = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("encryptedCredential")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + encryptedCredential = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new GoogleBigQueryLinkedService(type, connectVia, description, parameters, annotations, additionalProperties, project, additionalProjects, requestGoogleDriveScope, authenticationType, refreshToken, clientId, clientSecret, email, keyFilePath, trustedCertPath, useSystemTrustStore, encryptedCredential); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/GoogleBigQueryLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/GoogleBigQueryLinkedService.cs new file mode 100644 index 000000000000..bd22777c8c8d --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/GoogleBigQueryLinkedService.cs @@ -0,0 +1,92 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Google BigQuery service linked service. + public partial class GoogleBigQueryLinkedService : LinkedService + { + /// Initializes a new instance of GoogleBigQueryLinkedService. + /// The default BigQuery project to query against. + /// The OAuth 2.0 authentication mechanism used for authentication. ServiceAuthentication can only be used on self-hosted IR. + public GoogleBigQueryLinkedService(object project, GoogleBigQueryAuthenticationType authenticationType) + { + if (project == null) + { + throw new ArgumentNullException(nameof(project)); + } + + Project = project; + AuthenticationType = authenticationType; + Type = "GoogleBigQuery"; + } + + /// Initializes a new instance of GoogleBigQueryLinkedService. + /// Type of linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for describing the linked service. + /// . + /// The default BigQuery project to query against. + /// A comma-separated list of public BigQuery projects to access. + /// Whether to request access to Google Drive. Allowing Google Drive access enables support for federated tables that combine BigQuery data with data from Google Drive. The default value is false. + /// The OAuth 2.0 authentication mechanism used for authentication. ServiceAuthentication can only be used on self-hosted IR. + /// The refresh token obtained from Google for authorizing access to BigQuery for UserAuthentication. + /// The client id of the google application used to acquire the refresh token. Type: string (or Expression with resultType string). + /// The client secret of the google application used to acquire the refresh token. + /// The service account email ID that is used for ServiceAuthentication and can only be used on self-hosted IR. + /// The full path to the .p12 key file that is used to authenticate the service account email address and can only be used on self-hosted IR. + /// The full path of the .pem file containing trusted CA certificates for verifying the server when connecting over SSL. This property can only be set when using SSL on self-hosted IR. The default value is the cacerts.pem file installed with the IR. + /// Specifies whether to use a CA certificate from the system trust store or from a specified PEM file. The default value is false. + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + internal GoogleBigQueryLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object project, object additionalProjects, object requestGoogleDriveScope, GoogleBigQueryAuthenticationType authenticationType, SecretBase refreshToken, object clientId, SecretBase clientSecret, object email, object keyFilePath, object trustedCertPath, object useSystemTrustStore, object encryptedCredential) : base(type, connectVia, description, parameters, annotations, additionalProperties) + { + Project = project; + AdditionalProjects = additionalProjects; + RequestGoogleDriveScope = requestGoogleDriveScope; + AuthenticationType = authenticationType; + RefreshToken = refreshToken; + ClientId = clientId; + ClientSecret = clientSecret; + Email = email; + KeyFilePath = keyFilePath; + TrustedCertPath = trustedCertPath; + UseSystemTrustStore = useSystemTrustStore; + EncryptedCredential = encryptedCredential; + Type = type ?? "GoogleBigQuery"; + } + + /// The default BigQuery project to query against. + public object Project { get; set; } + /// A comma-separated list of public BigQuery projects to access. + public object AdditionalProjects { get; set; } + /// Whether to request access to Google Drive. Allowing Google Drive access enables support for federated tables that combine BigQuery data with data from Google Drive. The default value is false. + public object RequestGoogleDriveScope { get; set; } + /// The OAuth 2.0 authentication mechanism used for authentication. ServiceAuthentication can only be used on self-hosted IR. + public GoogleBigQueryAuthenticationType AuthenticationType { get; set; } + /// The refresh token obtained from Google for authorizing access to BigQuery for UserAuthentication. + public SecretBase RefreshToken { get; set; } + /// The client id of the google application used to acquire the refresh token. Type: string (or Expression with resultType string). + public object ClientId { get; set; } + /// The client secret of the google application used to acquire the refresh token. + public SecretBase ClientSecret { get; set; } + /// The service account email ID that is used for ServiceAuthentication and can only be used on self-hosted IR. + public object Email { get; set; } + /// The full path to the .p12 key file that is used to authenticate the service account email address and can only be used on self-hosted IR. + public object KeyFilePath { get; set; } + /// The full path of the .pem file containing trusted CA certificates for verifying the server when connecting over SSL. This property can only be set when using SSL on self-hosted IR. The default value is the cacerts.pem file installed with the IR. + public object TrustedCertPath { get; set; } + /// Specifies whether to use a CA certificate from the system trust store or from a specified PEM file. The default value is false. + public object UseSystemTrustStore { get; set; } + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + public object EncryptedCredential { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/GoogleBigQueryObjectDataset.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/GoogleBigQueryObjectDataset.Serialization.cs new file mode 100644 index 000000000000..a7e52cf58b64 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/GoogleBigQueryObjectDataset.Serialization.cs @@ -0,0 +1,243 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class GoogleBigQueryObjectDataset : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Structure != null) + { + writer.WritePropertyName("structure"); + writer.WriteObjectValue(Structure); + } + if (Schema != null) + { + writer.WritePropertyName("schema"); + writer.WriteObjectValue(Schema); + } + writer.WritePropertyName("linkedServiceName"); + writer.WriteObjectValue(LinkedServiceName); + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Folder != null) + { + writer.WritePropertyName("folder"); + writer.WriteObjectValue(Folder); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + if (TableName != null) + { + writer.WritePropertyName("tableName"); + writer.WriteObjectValue(TableName); + } + if (Table != null) + { + writer.WritePropertyName("table"); + writer.WriteObjectValue(Table); + } + if (Dataset != null) + { + writer.WritePropertyName("dataset"); + writer.WriteObjectValue(Dataset); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static GoogleBigQueryObjectDataset DeserializeGoogleBigQueryObjectDataset(JsonElement element) + { + string type = default; + string description = default; + object structure = default; + object schema = default; + LinkedServiceReference linkedServiceName = default; + IDictionary parameters = default; + IList annotations = default; + DatasetFolder folder = default; + object tableName = default; + object table = default; + object dataset = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("structure")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + structure = property.Value.GetObject(); + continue; + } + if (property.NameEquals("schema")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + schema = property.Value.GetObject(); + continue; + } + if (property.NameEquals("linkedServiceName")) + { + linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("folder")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + folder = DatasetFolder.DeserializeDatasetFolder(property.Value); + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("tableName")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + tableName = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("table")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + table = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("dataset")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dataset = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new GoogleBigQueryObjectDataset(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties, tableName, table, dataset); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/GoogleBigQueryObjectDataset.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/GoogleBigQueryObjectDataset.cs new file mode 100644 index 000000000000..de3c37476ce5 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/GoogleBigQueryObjectDataset.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Google BigQuery service dataset. + public partial class GoogleBigQueryObjectDataset : Dataset + { + /// Initializes a new instance of GoogleBigQueryObjectDataset. + /// Linked service reference. + public GoogleBigQueryObjectDataset(LinkedServiceReference linkedServiceName) : base(linkedServiceName) + { + if (linkedServiceName == null) + { + throw new ArgumentNullException(nameof(linkedServiceName)); + } + + Type = "GoogleBigQueryObject"; + } + + /// Initializes a new instance of GoogleBigQueryObjectDataset. + /// Type of dataset. + /// Dataset description. + /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. + /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. + /// Linked service reference. + /// Parameters for dataset. + /// List of tags that can be used for describing the Dataset. + /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. + /// . + /// This property will be retired. Please consider using database + table properties instead. + /// The table name of the Google BigQuery. Type: string (or Expression with resultType string). + /// The database name of the Google BigQuery. Type: string (or Expression with resultType string). + internal GoogleBigQueryObjectDataset(string type, string description, object structure, object schema, LinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary additionalProperties, object tableName, object table, object dataset) : base(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) + { + TableName = tableName; + Table = table; + Dataset = dataset; + Type = type ?? "GoogleBigQueryObject"; + } + + /// This property will be retired. Please consider using database + table properties instead. + public object TableName { get; set; } + /// The table name of the Google BigQuery. Type: string (or Expression with resultType string). + public object Table { get; set; } + /// The database name of the Google BigQuery. Type: string (or Expression with resultType string). + public object Dataset { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/GoogleCloudStorageLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/GoogleCloudStorageLinkedService.Serialization.cs new file mode 100644 index 000000000000..e84bbbd22a58 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/GoogleCloudStorageLinkedService.Serialization.cs @@ -0,0 +1,220 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class GoogleCloudStorageLinkedService : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (ConnectVia != null) + { + writer.WritePropertyName("connectVia"); + writer.WriteObjectValue(ConnectVia); + } + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + if (AccessKeyId != null) + { + writer.WritePropertyName("accessKeyId"); + writer.WriteObjectValue(AccessKeyId); + } + if (SecretAccessKey != null) + { + writer.WritePropertyName("secretAccessKey"); + writer.WriteObjectValue(SecretAccessKey); + } + if (ServiceUrl != null) + { + writer.WritePropertyName("serviceUrl"); + writer.WriteObjectValue(ServiceUrl); + } + if (EncryptedCredential != null) + { + writer.WritePropertyName("encryptedCredential"); + writer.WriteObjectValue(EncryptedCredential); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static GoogleCloudStorageLinkedService DeserializeGoogleCloudStorageLinkedService(JsonElement element) + { + string type = default; + IntegrationRuntimeReference connectVia = default; + string description = default; + IDictionary parameters = default; + IList annotations = default; + object accessKeyId = default; + SecretBase secretAccessKey = default; + object serviceUrl = default; + object encryptedCredential = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("connectVia")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("accessKeyId")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + accessKeyId = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("secretAccessKey")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + secretAccessKey = SecretBase.DeserializeSecretBase(property0.Value); + continue; + } + if (property0.NameEquals("serviceUrl")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + serviceUrl = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("encryptedCredential")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + encryptedCredential = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new GoogleCloudStorageLinkedService(type, connectVia, description, parameters, annotations, additionalProperties, accessKeyId, secretAccessKey, serviceUrl, encryptedCredential); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/GoogleCloudStorageLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/GoogleCloudStorageLinkedService.cs new file mode 100644 index 000000000000..fd239b06e628 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/GoogleCloudStorageLinkedService.cs @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Linked service for Google Cloud Storage. + public partial class GoogleCloudStorageLinkedService : LinkedService + { + /// Initializes a new instance of GoogleCloudStorageLinkedService. + public GoogleCloudStorageLinkedService() + { + Type = "GoogleCloudStorage"; + } + + /// Initializes a new instance of GoogleCloudStorageLinkedService. + /// Type of linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for describing the linked service. + /// . + /// The access key identifier of the Google Cloud Storage Identity and Access Management (IAM) user. Type: string (or Expression with resultType string). + /// The secret access key of the Google Cloud Storage Identity and Access Management (IAM) user. + /// This value specifies the endpoint to access with the Google Cloud Storage Connector. This is an optional property; change it only if you want to try a different service endpoint or want to switch between https and http. Type: string (or Expression with resultType string). + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + internal GoogleCloudStorageLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object accessKeyId, SecretBase secretAccessKey, object serviceUrl, object encryptedCredential) : base(type, connectVia, description, parameters, annotations, additionalProperties) + { + AccessKeyId = accessKeyId; + SecretAccessKey = secretAccessKey; + ServiceUrl = serviceUrl; + EncryptedCredential = encryptedCredential; + Type = type ?? "GoogleCloudStorage"; + } + + /// The access key identifier of the Google Cloud Storage Identity and Access Management (IAM) user. Type: string (or Expression with resultType string). + public object AccessKeyId { get; set; } + /// The secret access key of the Google Cloud Storage Identity and Access Management (IAM) user. + public SecretBase SecretAccessKey { get; set; } + /// This value specifies the endpoint to access with the Google Cloud Storage Connector. This is an optional property; change it only if you want to try a different service endpoint or want to switch between https and http. Type: string (or Expression with resultType string). + public object ServiceUrl { get; set; } + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + public object EncryptedCredential { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/GreenplumLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/GreenplumLinkedService.Serialization.cs new file mode 100644 index 000000000000..d6dc56c35af9 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/GreenplumLinkedService.Serialization.cs @@ -0,0 +1,205 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class GreenplumLinkedService : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (ConnectVia != null) + { + writer.WritePropertyName("connectVia"); + writer.WriteObjectValue(ConnectVia); + } + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + if (ConnectionString != null) + { + writer.WritePropertyName("connectionString"); + writer.WriteObjectValue(ConnectionString); + } + if (Pwd != null) + { + writer.WritePropertyName("pwd"); + writer.WriteObjectValue(Pwd); + } + if (EncryptedCredential != null) + { + writer.WritePropertyName("encryptedCredential"); + writer.WriteObjectValue(EncryptedCredential); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static GreenplumLinkedService DeserializeGreenplumLinkedService(JsonElement element) + { + string type = default; + IntegrationRuntimeReference connectVia = default; + string description = default; + IDictionary parameters = default; + IList annotations = default; + object connectionString = default; + AzureKeyVaultSecretReference pwd = default; + object encryptedCredential = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("connectVia")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("connectionString")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectionString = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("pwd")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + pwd = AzureKeyVaultSecretReference.DeserializeAzureKeyVaultSecretReference(property0.Value); + continue; + } + if (property0.NameEquals("encryptedCredential")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + encryptedCredential = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new GreenplumLinkedService(type, connectVia, description, parameters, annotations, additionalProperties, connectionString, pwd, encryptedCredential); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/GreenplumLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/GreenplumLinkedService.cs new file mode 100644 index 000000000000..beead1f56353 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/GreenplumLinkedService.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Greenplum Database linked service. + public partial class GreenplumLinkedService : LinkedService + { + /// Initializes a new instance of GreenplumLinkedService. + public GreenplumLinkedService() + { + Type = "Greenplum"; + } + + /// Initializes a new instance of GreenplumLinkedService. + /// Type of linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for describing the linked service. + /// . + /// An ODBC connection string. Type: string, SecureString or AzureKeyVaultSecretReference. + /// The Azure key vault secret reference of password in connection string. + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + internal GreenplumLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object connectionString, AzureKeyVaultSecretReference pwd, object encryptedCredential) : base(type, connectVia, description, parameters, annotations, additionalProperties) + { + ConnectionString = connectionString; + Pwd = pwd; + EncryptedCredential = encryptedCredential; + Type = type ?? "Greenplum"; + } + + /// An ODBC connection string. Type: string, SecureString or AzureKeyVaultSecretReference. + public object ConnectionString { get; set; } + /// The Azure key vault secret reference of password in connection string. + public AzureKeyVaultSecretReference Pwd { get; set; } + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + public object EncryptedCredential { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/GreenplumTableDataset.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/GreenplumTableDataset.Serialization.cs new file mode 100644 index 000000000000..f64aa73b6c67 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/GreenplumTableDataset.Serialization.cs @@ -0,0 +1,243 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class GreenplumTableDataset : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Structure != null) + { + writer.WritePropertyName("structure"); + writer.WriteObjectValue(Structure); + } + if (Schema != null) + { + writer.WritePropertyName("schema"); + writer.WriteObjectValue(Schema); + } + writer.WritePropertyName("linkedServiceName"); + writer.WriteObjectValue(LinkedServiceName); + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Folder != null) + { + writer.WritePropertyName("folder"); + writer.WriteObjectValue(Folder); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + if (TableName != null) + { + writer.WritePropertyName("tableName"); + writer.WriteObjectValue(TableName); + } + if (Table != null) + { + writer.WritePropertyName("table"); + writer.WriteObjectValue(Table); + } + if (SchemaTypePropertiesSchema != null) + { + writer.WritePropertyName("schema"); + writer.WriteObjectValue(SchemaTypePropertiesSchema); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static GreenplumTableDataset DeserializeGreenplumTableDataset(JsonElement element) + { + string type = default; + string description = default; + object structure = default; + object schema = default; + LinkedServiceReference linkedServiceName = default; + IDictionary parameters = default; + IList annotations = default; + DatasetFolder folder = default; + object tableName = default; + object table = default; + object schema0 = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("structure")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + structure = property.Value.GetObject(); + continue; + } + if (property.NameEquals("schema")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + schema = property.Value.GetObject(); + continue; + } + if (property.NameEquals("linkedServiceName")) + { + linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("folder")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + folder = DatasetFolder.DeserializeDatasetFolder(property.Value); + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("tableName")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + tableName = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("table")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + table = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("schema")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + schema0 = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new GreenplumTableDataset(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties, tableName, table, schema0); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/GreenplumTableDataset.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/GreenplumTableDataset.cs new file mode 100644 index 000000000000..6fc7bbd1f066 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/GreenplumTableDataset.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Greenplum Database dataset. + public partial class GreenplumTableDataset : Dataset + { + /// Initializes a new instance of GreenplumTableDataset. + /// Linked service reference. + public GreenplumTableDataset(LinkedServiceReference linkedServiceName) : base(linkedServiceName) + { + if (linkedServiceName == null) + { + throw new ArgumentNullException(nameof(linkedServiceName)); + } + + Type = "GreenplumTable"; + } + + /// Initializes a new instance of GreenplumTableDataset. + /// Type of dataset. + /// Dataset description. + /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. + /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. + /// Linked service reference. + /// Parameters for dataset. + /// List of tags that can be used for describing the Dataset. + /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. + /// . + /// This property will be retired. Please consider using schema + table properties instead. + /// The table name of Greenplum. Type: string (or Expression with resultType string). + /// The schema name of Greenplum. Type: string (or Expression with resultType string). + internal GreenplumTableDataset(string type, string description, object structure, object schema, LinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary additionalProperties, object tableName, object table, object schemaTypePropertiesSchema) : base(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) + { + TableName = tableName; + Table = table; + SchemaTypePropertiesSchema = schemaTypePropertiesSchema; + Type = type ?? "GreenplumTable"; + } + + /// This property will be retired. Please consider using schema + table properties instead. + public object TableName { get; set; } + /// The table name of Greenplum. Type: string (or Expression with resultType string). + public object Table { get; set; } + /// The schema name of Greenplum. Type: string (or Expression with resultType string). + public object SchemaTypePropertiesSchema { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HBaseAuthenticationType.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HBaseAuthenticationType.cs new file mode 100644 index 000000000000..491874490436 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HBaseAuthenticationType.cs @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// The authentication mechanism to use to connect to the HBase server. + public readonly partial struct HBaseAuthenticationType : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + public HBaseAuthenticationType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AnonymousValue = "Anonymous"; + private const string BasicValue = "Basic"; + + /// Anonymous. + public static HBaseAuthenticationType Anonymous { get; } = new HBaseAuthenticationType(AnonymousValue); + /// Basic. + public static HBaseAuthenticationType Basic { get; } = new HBaseAuthenticationType(BasicValue); + /// Determines if two values are the same. + public static bool operator ==(HBaseAuthenticationType left, HBaseAuthenticationType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(HBaseAuthenticationType left, HBaseAuthenticationType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator HBaseAuthenticationType(string value) => new HBaseAuthenticationType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is HBaseAuthenticationType other && Equals(other); + /// + public bool Equals(HBaseAuthenticationType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HBaseLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HBaseLinkedService.Serialization.cs new file mode 100644 index 000000000000..eb49c70f2584 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HBaseLinkedService.Serialization.cs @@ -0,0 +1,311 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class HBaseLinkedService : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (ConnectVia != null) + { + writer.WritePropertyName("connectVia"); + writer.WriteObjectValue(ConnectVia); + } + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + writer.WritePropertyName("host"); + writer.WriteObjectValue(Host); + if (Port != null) + { + writer.WritePropertyName("port"); + writer.WriteObjectValue(Port); + } + if (HttpPath != null) + { + writer.WritePropertyName("httpPath"); + writer.WriteObjectValue(HttpPath); + } + writer.WritePropertyName("authenticationType"); + writer.WriteStringValue(AuthenticationType.ToString()); + if (Username != null) + { + writer.WritePropertyName("username"); + writer.WriteObjectValue(Username); + } + if (Password != null) + { + writer.WritePropertyName("password"); + writer.WriteObjectValue(Password); + } + if (EnableSsl != null) + { + writer.WritePropertyName("enableSsl"); + writer.WriteObjectValue(EnableSsl); + } + if (TrustedCertPath != null) + { + writer.WritePropertyName("trustedCertPath"); + writer.WriteObjectValue(TrustedCertPath); + } + if (AllowHostNameCNMismatch != null) + { + writer.WritePropertyName("allowHostNameCNMismatch"); + writer.WriteObjectValue(AllowHostNameCNMismatch); + } + if (AllowSelfSignedServerCert != null) + { + writer.WritePropertyName("allowSelfSignedServerCert"); + writer.WriteObjectValue(AllowSelfSignedServerCert); + } + if (EncryptedCredential != null) + { + writer.WritePropertyName("encryptedCredential"); + writer.WriteObjectValue(EncryptedCredential); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static HBaseLinkedService DeserializeHBaseLinkedService(JsonElement element) + { + string type = default; + IntegrationRuntimeReference connectVia = default; + string description = default; + IDictionary parameters = default; + IList annotations = default; + object host = default; + object port = default; + object httpPath = default; + HBaseAuthenticationType authenticationType = default; + object username = default; + SecretBase password = default; + object enableSsl = default; + object trustedCertPath = default; + object allowHostNameCNMismatch = default; + object allowSelfSignedServerCert = default; + object encryptedCredential = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("connectVia")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("host")) + { + host = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("port")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + port = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("httpPath")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + httpPath = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("authenticationType")) + { + authenticationType = new HBaseAuthenticationType(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("username")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + username = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("password")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + password = SecretBase.DeserializeSecretBase(property0.Value); + continue; + } + if (property0.NameEquals("enableSsl")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + enableSsl = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("trustedCertPath")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + trustedCertPath = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("allowHostNameCNMismatch")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + allowHostNameCNMismatch = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("allowSelfSignedServerCert")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + allowSelfSignedServerCert = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("encryptedCredential")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + encryptedCredential = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new HBaseLinkedService(type, connectVia, description, parameters, annotations, additionalProperties, host, port, httpPath, authenticationType, username, password, enableSsl, trustedCertPath, allowHostNameCNMismatch, allowSelfSignedServerCert, encryptedCredential); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HBaseLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HBaseLinkedService.cs new file mode 100644 index 000000000000..8cb4e5866696 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HBaseLinkedService.cs @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// HBase server linked service. + public partial class HBaseLinkedService : LinkedService + { + /// Initializes a new instance of HBaseLinkedService. + /// The IP address or host name of the HBase server. (i.e. 192.168.222.160). + /// The authentication mechanism to use to connect to the HBase server. + public HBaseLinkedService(object host, HBaseAuthenticationType authenticationType) + { + if (host == null) + { + throw new ArgumentNullException(nameof(host)); + } + + Host = host; + AuthenticationType = authenticationType; + Type = "HBase"; + } + + /// Initializes a new instance of HBaseLinkedService. + /// Type of linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for describing the linked service. + /// . + /// The IP address or host name of the HBase server. (i.e. 192.168.222.160). + /// The TCP port that the HBase instance uses to listen for client connections. The default value is 9090. + /// The partial URL corresponding to the HBase server. (i.e. /gateway/sandbox/hbase/version). + /// The authentication mechanism to use to connect to the HBase server. + /// The user name used to connect to the HBase instance. + /// The password corresponding to the user name. + /// Specifies whether the connections to the server are encrypted using SSL. The default value is false. + /// The full path of the .pem file containing trusted CA certificates for verifying the server when connecting over SSL. This property can only be set when using SSL on self-hosted IR. The default value is the cacerts.pem file installed with the IR. + /// Specifies whether to require a CA-issued SSL certificate name to match the host name of the server when connecting over SSL. The default value is false. + /// Specifies whether to allow self-signed certificates from the server. The default value is false. + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + internal HBaseLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object host, object port, object httpPath, HBaseAuthenticationType authenticationType, object username, SecretBase password, object enableSsl, object trustedCertPath, object allowHostNameCNMismatch, object allowSelfSignedServerCert, object encryptedCredential) : base(type, connectVia, description, parameters, annotations, additionalProperties) + { + Host = host; + Port = port; + HttpPath = httpPath; + AuthenticationType = authenticationType; + Username = username; + Password = password; + EnableSsl = enableSsl; + TrustedCertPath = trustedCertPath; + AllowHostNameCNMismatch = allowHostNameCNMismatch; + AllowSelfSignedServerCert = allowSelfSignedServerCert; + EncryptedCredential = encryptedCredential; + Type = type ?? "HBase"; + } + + /// The IP address or host name of the HBase server. (i.e. 192.168.222.160). + public object Host { get; set; } + /// The TCP port that the HBase instance uses to listen for client connections. The default value is 9090. + public object Port { get; set; } + /// The partial URL corresponding to the HBase server. (i.e. /gateway/sandbox/hbase/version). + public object HttpPath { get; set; } + /// The authentication mechanism to use to connect to the HBase server. + public HBaseAuthenticationType AuthenticationType { get; set; } + /// The user name used to connect to the HBase instance. + public object Username { get; set; } + /// The password corresponding to the user name. + public SecretBase Password { get; set; } + /// Specifies whether the connections to the server are encrypted using SSL. The default value is false. + public object EnableSsl { get; set; } + /// The full path of the .pem file containing trusted CA certificates for verifying the server when connecting over SSL. This property can only be set when using SSL on self-hosted IR. The default value is the cacerts.pem file installed with the IR. + public object TrustedCertPath { get; set; } + /// Specifies whether to require a CA-issued SSL certificate name to match the host name of the server when connecting over SSL. The default value is false. + public object AllowHostNameCNMismatch { get; set; } + /// Specifies whether to allow self-signed certificates from the server. The default value is false. + public object AllowSelfSignedServerCert { get; set; } + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + public object EncryptedCredential { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HBaseObjectDataset.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HBaseObjectDataset.Serialization.cs new file mode 100644 index 000000000000..85033f73de47 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HBaseObjectDataset.Serialization.cs @@ -0,0 +1,213 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class HBaseObjectDataset : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Structure != null) + { + writer.WritePropertyName("structure"); + writer.WriteObjectValue(Structure); + } + if (Schema != null) + { + writer.WritePropertyName("schema"); + writer.WriteObjectValue(Schema); + } + writer.WritePropertyName("linkedServiceName"); + writer.WriteObjectValue(LinkedServiceName); + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Folder != null) + { + writer.WritePropertyName("folder"); + writer.WriteObjectValue(Folder); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + if (TableName != null) + { + writer.WritePropertyName("tableName"); + writer.WriteObjectValue(TableName); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static HBaseObjectDataset DeserializeHBaseObjectDataset(JsonElement element) + { + string type = default; + string description = default; + object structure = default; + object schema = default; + LinkedServiceReference linkedServiceName = default; + IDictionary parameters = default; + IList annotations = default; + DatasetFolder folder = default; + object tableName = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("structure")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + structure = property.Value.GetObject(); + continue; + } + if (property.NameEquals("schema")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + schema = property.Value.GetObject(); + continue; + } + if (property.NameEquals("linkedServiceName")) + { + linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("folder")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + folder = DatasetFolder.DeserializeDatasetFolder(property.Value); + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("tableName")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + tableName = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new HBaseObjectDataset(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties, tableName); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HBaseObjectDataset.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HBaseObjectDataset.cs new file mode 100644 index 000000000000..d27f5e541b9d --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HBaseObjectDataset.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// HBase server dataset. + public partial class HBaseObjectDataset : Dataset + { + /// Initializes a new instance of HBaseObjectDataset. + /// Linked service reference. + public HBaseObjectDataset(LinkedServiceReference linkedServiceName) : base(linkedServiceName) + { + if (linkedServiceName == null) + { + throw new ArgumentNullException(nameof(linkedServiceName)); + } + + Type = "HBaseObject"; + } + + /// Initializes a new instance of HBaseObjectDataset. + /// Type of dataset. + /// Dataset description. + /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. + /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. + /// Linked service reference. + /// Parameters for dataset. + /// List of tags that can be used for describing the Dataset. + /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. + /// . + /// The table name. Type: string (or Expression with resultType string). + internal HBaseObjectDataset(string type, string description, object structure, object schema, LinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary additionalProperties, object tableName) : base(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) + { + TableName = tableName; + Type = type ?? "HBaseObject"; + } + + /// The table name. Type: string (or Expression with resultType string). + public object TableName { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HDInsightActivityDebugInfoOption.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HDInsightActivityDebugInfoOption.cs new file mode 100644 index 000000000000..126b98487f58 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HDInsightActivityDebugInfoOption.cs @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// The HDInsightActivityDebugInfoOption settings to use. + public readonly partial struct HDInsightActivityDebugInfoOption : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + public HDInsightActivityDebugInfoOption(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NoneValue = "None"; + private const string AlwaysValue = "Always"; + private const string FailureValue = "Failure"; + + /// None. + public static HDInsightActivityDebugInfoOption None { get; } = new HDInsightActivityDebugInfoOption(NoneValue); + /// Always. + public static HDInsightActivityDebugInfoOption Always { get; } = new HDInsightActivityDebugInfoOption(AlwaysValue); + /// Failure. + public static HDInsightActivityDebugInfoOption Failure { get; } = new HDInsightActivityDebugInfoOption(FailureValue); + /// Determines if two values are the same. + public static bool operator ==(HDInsightActivityDebugInfoOption left, HDInsightActivityDebugInfoOption right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(HDInsightActivityDebugInfoOption left, HDInsightActivityDebugInfoOption right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator HDInsightActivityDebugInfoOption(string value) => new HDInsightActivityDebugInfoOption(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is HDInsightActivityDebugInfoOption other && Equals(other); + /// + public bool Equals(HDInsightActivityDebugInfoOption other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HDInsightHiveActivity.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HDInsightHiveActivity.Serialization.cs new file mode 100644 index 000000000000..ba5fa0c8d2c9 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HDInsightHiveActivity.Serialization.cs @@ -0,0 +1,371 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class HDInsightHiveActivity : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (LinkedServiceName != null) + { + writer.WritePropertyName("linkedServiceName"); + writer.WriteObjectValue(LinkedServiceName); + } + if (Policy != null) + { + writer.WritePropertyName("policy"); + writer.WriteObjectValue(Policy); + } + writer.WritePropertyName("name"); + writer.WriteStringValue(Name); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (DependsOn != null) + { + writer.WritePropertyName("dependsOn"); + writer.WriteStartArray(); + foreach (var item in DependsOn) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (UserProperties != null) + { + writer.WritePropertyName("userProperties"); + writer.WriteStartArray(); + foreach (var item in UserProperties) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + if (StorageLinkedServices != null) + { + writer.WritePropertyName("storageLinkedServices"); + writer.WriteStartArray(); + foreach (var item in StorageLinkedServices) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Arguments != null) + { + writer.WritePropertyName("arguments"); + writer.WriteStartArray(); + foreach (var item in Arguments) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (GetDebugInfo != null) + { + writer.WritePropertyName("getDebugInfo"); + writer.WriteStringValue(GetDebugInfo.Value.ToString()); + } + if (ScriptPath != null) + { + writer.WritePropertyName("scriptPath"); + writer.WriteObjectValue(ScriptPath); + } + if (ScriptLinkedService != null) + { + writer.WritePropertyName("scriptLinkedService"); + writer.WriteObjectValue(ScriptLinkedService); + } + if (Defines != null) + { + writer.WritePropertyName("defines"); + writer.WriteStartObject(); + foreach (var item in Defines) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Variables != null) + { + writer.WritePropertyName("variables"); + writer.WriteStartArray(); + foreach (var item in Variables) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (QueryTimeout != null) + { + writer.WritePropertyName("queryTimeout"); + writer.WriteNumberValue(QueryTimeout.Value); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static HDInsightHiveActivity DeserializeHDInsightHiveActivity(JsonElement element) + { + LinkedServiceReference linkedServiceName = default; + ActivityPolicy policy = default; + string name = default; + string type = default; + string description = default; + IList dependsOn = default; + IList userProperties = default; + IList storageLinkedServices = default; + IList arguments = default; + HDInsightActivityDebugInfoOption? getDebugInfo = default; + object scriptPath = default; + LinkedServiceReference scriptLinkedService = default; + IDictionary defines = default; + IList variables = default; + int? queryTimeout = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("linkedServiceName")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value); + continue; + } + if (property.NameEquals("policy")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + policy = ActivityPolicy.DeserializeActivityPolicy(property.Value); + continue; + } + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("dependsOn")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(ActivityDependency.DeserializeActivityDependency(item)); + } + } + dependsOn = array; + continue; + } + if (property.NameEquals("userProperties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(UserProperty.DeserializeUserProperty(item)); + } + } + userProperties = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("storageLinkedServices")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(LinkedServiceReference.DeserializeLinkedServiceReference(item)); + } + } + storageLinkedServices = array; + continue; + } + if (property0.NameEquals("arguments")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + arguments = array; + continue; + } + if (property0.NameEquals("getDebugInfo")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + getDebugInfo = new HDInsightActivityDebugInfoOption(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("scriptPath")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + scriptPath = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("scriptLinkedService")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + scriptLinkedService = LinkedServiceReference.DeserializeLinkedServiceReference(property0.Value); + continue; + } + if (property0.NameEquals("defines")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property1 in property0.Value.EnumerateObject()) + { + if (property1.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property1.Name, null); + } + else + { + dictionary.Add(property1.Name, property1.Value.GetObject()); + } + } + defines = dictionary; + continue; + } + if (property0.NameEquals("variables")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + variables = array; + continue; + } + if (property0.NameEquals("queryTimeout")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + queryTimeout = property0.Value.GetInt32(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new HDInsightHiveActivity(name, type, description, dependsOn, userProperties, additionalProperties, linkedServiceName, policy, storageLinkedServices, arguments, getDebugInfo, scriptPath, scriptLinkedService, defines, variables, queryTimeout); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HDInsightHiveActivity.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HDInsightHiveActivity.cs new file mode 100644 index 000000000000..712266f99a37 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HDInsightHiveActivity.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// HDInsight Hive activity type. + public partial class HDInsightHiveActivity : ExecutionActivity + { + /// Initializes a new instance of HDInsightHiveActivity. + /// Activity name. + public HDInsightHiveActivity(string name) : base(name) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + + Type = "HDInsightHive"; + } + + /// Initializes a new instance of HDInsightHiveActivity. + /// Activity name. + /// Type of activity. + /// Activity description. + /// Activity depends on condition. + /// Activity user properties. + /// . + /// Linked service reference. + /// Activity policy. + /// Storage linked service references. + /// User specified arguments to HDInsightActivity. + /// Debug info option. + /// Script path. Type: string (or Expression with resultType string). + /// Script linked service reference. + /// Allows user to specify defines for Hive job request. + /// User specified arguments under hivevar namespace. + /// Query timeout value (in minutes). Effective when the HDInsight cluster is with ESP (Enterprise Security Package). + internal HDInsightHiveActivity(string name, string type, string description, IList dependsOn, IList userProperties, IDictionary additionalProperties, LinkedServiceReference linkedServiceName, ActivityPolicy policy, IList storageLinkedServices, IList arguments, HDInsightActivityDebugInfoOption? getDebugInfo, object scriptPath, LinkedServiceReference scriptLinkedService, IDictionary defines, IList variables, int? queryTimeout) : base(name, type, description, dependsOn, userProperties, additionalProperties, linkedServiceName, policy) + { + StorageLinkedServices = storageLinkedServices; + Arguments = arguments; + GetDebugInfo = getDebugInfo; + ScriptPath = scriptPath; + ScriptLinkedService = scriptLinkedService; + Defines = defines; + Variables = variables; + QueryTimeout = queryTimeout; + Type = type ?? "HDInsightHive"; + } + + /// Storage linked service references. + public IList StorageLinkedServices { get; set; } + /// User specified arguments to HDInsightActivity. + public IList Arguments { get; set; } + /// Debug info option. + public HDInsightActivityDebugInfoOption? GetDebugInfo { get; set; } + /// Script path. Type: string (or Expression with resultType string). + public object ScriptPath { get; set; } + /// Script linked service reference. + public LinkedServiceReference ScriptLinkedService { get; set; } + /// Allows user to specify defines for Hive job request. + public IDictionary Defines { get; set; } + /// User specified arguments under hivevar namespace. + public IList Variables { get; set; } + /// Query timeout value (in minutes). Effective when the HDInsight cluster is with ESP (Enterprise Security Package). + public int? QueryTimeout { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HDInsightLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HDInsightLinkedService.Serialization.cs new file mode 100644 index 000000000000..7f74541f3f93 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HDInsightLinkedService.Serialization.cs @@ -0,0 +1,273 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class HDInsightLinkedService : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (ConnectVia != null) + { + writer.WritePropertyName("connectVia"); + writer.WriteObjectValue(ConnectVia); + } + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + writer.WritePropertyName("clusterUri"); + writer.WriteObjectValue(ClusterUri); + if (UserName != null) + { + writer.WritePropertyName("userName"); + writer.WriteObjectValue(UserName); + } + if (Password != null) + { + writer.WritePropertyName("password"); + writer.WriteObjectValue(Password); + } + if (LinkedServiceName != null) + { + writer.WritePropertyName("linkedServiceName"); + writer.WriteObjectValue(LinkedServiceName); + } + if (HcatalogLinkedServiceName != null) + { + writer.WritePropertyName("hcatalogLinkedServiceName"); + writer.WriteObjectValue(HcatalogLinkedServiceName); + } + if (EncryptedCredential != null) + { + writer.WritePropertyName("encryptedCredential"); + writer.WriteObjectValue(EncryptedCredential); + } + if (IsEspEnabled != null) + { + writer.WritePropertyName("isEspEnabled"); + writer.WriteObjectValue(IsEspEnabled); + } + if (FileSystem != null) + { + writer.WritePropertyName("fileSystem"); + writer.WriteObjectValue(FileSystem); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static HDInsightLinkedService DeserializeHDInsightLinkedService(JsonElement element) + { + string type = default; + IntegrationRuntimeReference connectVia = default; + string description = default; + IDictionary parameters = default; + IList annotations = default; + object clusterUri = default; + object userName = default; + SecretBase password = default; + LinkedServiceReference linkedServiceName = default; + LinkedServiceReference hcatalogLinkedServiceName = default; + object encryptedCredential = default; + object isEspEnabled = default; + object fileSystem = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("connectVia")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("clusterUri")) + { + clusterUri = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("userName")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + userName = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("password")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + password = SecretBase.DeserializeSecretBase(property0.Value); + continue; + } + if (property0.NameEquals("linkedServiceName")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property0.Value); + continue; + } + if (property0.NameEquals("hcatalogLinkedServiceName")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + hcatalogLinkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property0.Value); + continue; + } + if (property0.NameEquals("encryptedCredential")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + encryptedCredential = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("isEspEnabled")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isEspEnabled = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("fileSystem")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + fileSystem = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new HDInsightLinkedService(type, connectVia, description, parameters, annotations, additionalProperties, clusterUri, userName, password, linkedServiceName, hcatalogLinkedServiceName, encryptedCredential, isEspEnabled, fileSystem); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HDInsightLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HDInsightLinkedService.cs new file mode 100644 index 000000000000..9124be6cb05d --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HDInsightLinkedService.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// HDInsight linked service. + public partial class HDInsightLinkedService : LinkedService + { + /// Initializes a new instance of HDInsightLinkedService. + /// HDInsight cluster URI. Type: string (or Expression with resultType string). + public HDInsightLinkedService(object clusterUri) + { + if (clusterUri == null) + { + throw new ArgumentNullException(nameof(clusterUri)); + } + + ClusterUri = clusterUri; + Type = "HDInsight"; + } + + /// Initializes a new instance of HDInsightLinkedService. + /// Type of linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for describing the linked service. + /// . + /// HDInsight cluster URI. Type: string (or Expression with resultType string). + /// HDInsight cluster user name. Type: string (or Expression with resultType string). + /// HDInsight cluster password. + /// The Azure Storage linked service reference. + /// A reference to the Azure SQL linked service that points to the HCatalog database. + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + /// Specify if the HDInsight is created with ESP (Enterprise Security Package). Type: Boolean. + /// Specify the FileSystem if the main storage for the HDInsight is ADLS Gen2. Type: string (or Expression with resultType string). + internal HDInsightLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object clusterUri, object userName, SecretBase password, LinkedServiceReference linkedServiceName, LinkedServiceReference hcatalogLinkedServiceName, object encryptedCredential, object isEspEnabled, object fileSystem) : base(type, connectVia, description, parameters, annotations, additionalProperties) + { + ClusterUri = clusterUri; + UserName = userName; + Password = password; + LinkedServiceName = linkedServiceName; + HcatalogLinkedServiceName = hcatalogLinkedServiceName; + EncryptedCredential = encryptedCredential; + IsEspEnabled = isEspEnabled; + FileSystem = fileSystem; + Type = type ?? "HDInsight"; + } + + /// HDInsight cluster URI. Type: string (or Expression with resultType string). + public object ClusterUri { get; set; } + /// HDInsight cluster user name. Type: string (or Expression with resultType string). + public object UserName { get; set; } + /// HDInsight cluster password. + public SecretBase Password { get; set; } + /// The Azure Storage linked service reference. + public LinkedServiceReference LinkedServiceName { get; set; } + /// A reference to the Azure SQL linked service that points to the HCatalog database. + public LinkedServiceReference HcatalogLinkedServiceName { get; set; } + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + public object EncryptedCredential { get; set; } + /// Specify if the HDInsight is created with ESP (Enterprise Security Package). Type: Boolean. + public object IsEspEnabled { get; set; } + /// Specify the FileSystem if the main storage for the HDInsight is ADLS Gen2. Type: string (or Expression with resultType string). + public object FileSystem { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HDInsightMapReduceActivity.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HDInsightMapReduceActivity.Serialization.cs new file mode 100644 index 000000000000..8b10d9b1d46f --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HDInsightMapReduceActivity.Serialization.cs @@ -0,0 +1,357 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class HDInsightMapReduceActivity : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (LinkedServiceName != null) + { + writer.WritePropertyName("linkedServiceName"); + writer.WriteObjectValue(LinkedServiceName); + } + if (Policy != null) + { + writer.WritePropertyName("policy"); + writer.WriteObjectValue(Policy); + } + writer.WritePropertyName("name"); + writer.WriteStringValue(Name); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (DependsOn != null) + { + writer.WritePropertyName("dependsOn"); + writer.WriteStartArray(); + foreach (var item in DependsOn) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (UserProperties != null) + { + writer.WritePropertyName("userProperties"); + writer.WriteStartArray(); + foreach (var item in UserProperties) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + if (StorageLinkedServices != null) + { + writer.WritePropertyName("storageLinkedServices"); + writer.WriteStartArray(); + foreach (var item in StorageLinkedServices) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Arguments != null) + { + writer.WritePropertyName("arguments"); + writer.WriteStartArray(); + foreach (var item in Arguments) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (GetDebugInfo != null) + { + writer.WritePropertyName("getDebugInfo"); + writer.WriteStringValue(GetDebugInfo.Value.ToString()); + } + writer.WritePropertyName("className"); + writer.WriteObjectValue(ClassName); + writer.WritePropertyName("jarFilePath"); + writer.WriteObjectValue(JarFilePath); + if (JarLinkedService != null) + { + writer.WritePropertyName("jarLinkedService"); + writer.WriteObjectValue(JarLinkedService); + } + if (JarLibs != null) + { + writer.WritePropertyName("jarLibs"); + writer.WriteStartArray(); + foreach (var item in JarLibs) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Defines != null) + { + writer.WritePropertyName("defines"); + writer.WriteStartObject(); + foreach (var item in Defines) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static HDInsightMapReduceActivity DeserializeHDInsightMapReduceActivity(JsonElement element) + { + LinkedServiceReference linkedServiceName = default; + ActivityPolicy policy = default; + string name = default; + string type = default; + string description = default; + IList dependsOn = default; + IList userProperties = default; + IList storageLinkedServices = default; + IList arguments = default; + HDInsightActivityDebugInfoOption? getDebugInfo = default; + object className = default; + object jarFilePath = default; + LinkedServiceReference jarLinkedService = default; + IList jarLibs = default; + IDictionary defines = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("linkedServiceName")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value); + continue; + } + if (property.NameEquals("policy")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + policy = ActivityPolicy.DeserializeActivityPolicy(property.Value); + continue; + } + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("dependsOn")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(ActivityDependency.DeserializeActivityDependency(item)); + } + } + dependsOn = array; + continue; + } + if (property.NameEquals("userProperties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(UserProperty.DeserializeUserProperty(item)); + } + } + userProperties = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("storageLinkedServices")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(LinkedServiceReference.DeserializeLinkedServiceReference(item)); + } + } + storageLinkedServices = array; + continue; + } + if (property0.NameEquals("arguments")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + arguments = array; + continue; + } + if (property0.NameEquals("getDebugInfo")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + getDebugInfo = new HDInsightActivityDebugInfoOption(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("className")) + { + className = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("jarFilePath")) + { + jarFilePath = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("jarLinkedService")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + jarLinkedService = LinkedServiceReference.DeserializeLinkedServiceReference(property0.Value); + continue; + } + if (property0.NameEquals("jarLibs")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + jarLibs = array; + continue; + } + if (property0.NameEquals("defines")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property1 in property0.Value.EnumerateObject()) + { + if (property1.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property1.Name, null); + } + else + { + dictionary.Add(property1.Name, property1.Value.GetObject()); + } + } + defines = dictionary; + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new HDInsightMapReduceActivity(name, type, description, dependsOn, userProperties, additionalProperties, linkedServiceName, policy, storageLinkedServices, arguments, getDebugInfo, className, jarFilePath, jarLinkedService, jarLibs, defines); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HDInsightMapReduceActivity.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HDInsightMapReduceActivity.cs new file mode 100644 index 000000000000..35175b4868b0 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HDInsightMapReduceActivity.cs @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// HDInsight MapReduce activity type. + public partial class HDInsightMapReduceActivity : ExecutionActivity + { + /// Initializes a new instance of HDInsightMapReduceActivity. + /// Activity name. + /// Class name. Type: string (or Expression with resultType string). + /// Jar path. Type: string (or Expression with resultType string). + public HDInsightMapReduceActivity(string name, object className, object jarFilePath) : base(name) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (className == null) + { + throw new ArgumentNullException(nameof(className)); + } + if (jarFilePath == null) + { + throw new ArgumentNullException(nameof(jarFilePath)); + } + + ClassName = className; + JarFilePath = jarFilePath; + Type = "HDInsightMapReduce"; + } + + /// Initializes a new instance of HDInsightMapReduceActivity. + /// Activity name. + /// Type of activity. + /// Activity description. + /// Activity depends on condition. + /// Activity user properties. + /// . + /// Linked service reference. + /// Activity policy. + /// Storage linked service references. + /// User specified arguments to HDInsightActivity. + /// Debug info option. + /// Class name. Type: string (or Expression with resultType string). + /// Jar path. Type: string (or Expression with resultType string). + /// Jar linked service reference. + /// Jar libs. + /// Allows user to specify defines for the MapReduce job request. + internal HDInsightMapReduceActivity(string name, string type, string description, IList dependsOn, IList userProperties, IDictionary additionalProperties, LinkedServiceReference linkedServiceName, ActivityPolicy policy, IList storageLinkedServices, IList arguments, HDInsightActivityDebugInfoOption? getDebugInfo, object className, object jarFilePath, LinkedServiceReference jarLinkedService, IList jarLibs, IDictionary defines) : base(name, type, description, dependsOn, userProperties, additionalProperties, linkedServiceName, policy) + { + StorageLinkedServices = storageLinkedServices; + Arguments = arguments; + GetDebugInfo = getDebugInfo; + ClassName = className; + JarFilePath = jarFilePath; + JarLinkedService = jarLinkedService; + JarLibs = jarLibs; + Defines = defines; + Type = type ?? "HDInsightMapReduce"; + } + + /// Storage linked service references. + public IList StorageLinkedServices { get; set; } + /// User specified arguments to HDInsightActivity. + public IList Arguments { get; set; } + /// Debug info option. + public HDInsightActivityDebugInfoOption? GetDebugInfo { get; set; } + /// Class name. Type: string (or Expression with resultType string). + public object ClassName { get; set; } + /// Jar path. Type: string (or Expression with resultType string). + public object JarFilePath { get; set; } + /// Jar linked service reference. + public LinkedServiceReference JarLinkedService { get; set; } + /// Jar libs. + public IList JarLibs { get; set; } + /// Allows user to specify defines for the MapReduce job request. + public IDictionary Defines { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HDInsightOnDemandLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HDInsightOnDemandLinkedService.Serialization.cs new file mode 100644 index 000000000000..534182001567 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HDInsightOnDemandLinkedService.Serialization.cs @@ -0,0 +1,640 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class HDInsightOnDemandLinkedService : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (ConnectVia != null) + { + writer.WritePropertyName("connectVia"); + writer.WriteObjectValue(ConnectVia); + } + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + writer.WritePropertyName("clusterSize"); + writer.WriteObjectValue(ClusterSize); + writer.WritePropertyName("timeToLive"); + writer.WriteObjectValue(TimeToLive); + writer.WritePropertyName("version"); + writer.WriteObjectValue(Version); + writer.WritePropertyName("linkedServiceName"); + writer.WriteObjectValue(LinkedServiceName); + writer.WritePropertyName("hostSubscriptionId"); + writer.WriteObjectValue(HostSubscriptionId); + if (ServicePrincipalId != null) + { + writer.WritePropertyName("servicePrincipalId"); + writer.WriteObjectValue(ServicePrincipalId); + } + if (ServicePrincipalKey != null) + { + writer.WritePropertyName("servicePrincipalKey"); + writer.WriteObjectValue(ServicePrincipalKey); + } + writer.WritePropertyName("tenant"); + writer.WriteObjectValue(Tenant); + writer.WritePropertyName("clusterResourceGroup"); + writer.WriteObjectValue(ClusterResourceGroup); + if (ClusterNamePrefix != null) + { + writer.WritePropertyName("clusterNamePrefix"); + writer.WriteObjectValue(ClusterNamePrefix); + } + if (ClusterUserName != null) + { + writer.WritePropertyName("clusterUserName"); + writer.WriteObjectValue(ClusterUserName); + } + if (ClusterPassword != null) + { + writer.WritePropertyName("clusterPassword"); + writer.WriteObjectValue(ClusterPassword); + } + if (ClusterSshUserName != null) + { + writer.WritePropertyName("clusterSshUserName"); + writer.WriteObjectValue(ClusterSshUserName); + } + if (ClusterSshPassword != null) + { + writer.WritePropertyName("clusterSshPassword"); + writer.WriteObjectValue(ClusterSshPassword); + } + if (AdditionalLinkedServiceNames != null) + { + writer.WritePropertyName("additionalLinkedServiceNames"); + writer.WriteStartArray(); + foreach (var item in AdditionalLinkedServiceNames) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (HcatalogLinkedServiceName != null) + { + writer.WritePropertyName("hcatalogLinkedServiceName"); + writer.WriteObjectValue(HcatalogLinkedServiceName); + } + if (ClusterType != null) + { + writer.WritePropertyName("clusterType"); + writer.WriteObjectValue(ClusterType); + } + if (SparkVersion != null) + { + writer.WritePropertyName("sparkVersion"); + writer.WriteObjectValue(SparkVersion); + } + if (CoreConfiguration != null) + { + writer.WritePropertyName("coreConfiguration"); + writer.WriteObjectValue(CoreConfiguration); + } + if (HBaseConfiguration != null) + { + writer.WritePropertyName("hBaseConfiguration"); + writer.WriteObjectValue(HBaseConfiguration); + } + if (HdfsConfiguration != null) + { + writer.WritePropertyName("hdfsConfiguration"); + writer.WriteObjectValue(HdfsConfiguration); + } + if (HiveConfiguration != null) + { + writer.WritePropertyName("hiveConfiguration"); + writer.WriteObjectValue(HiveConfiguration); + } + if (MapReduceConfiguration != null) + { + writer.WritePropertyName("mapReduceConfiguration"); + writer.WriteObjectValue(MapReduceConfiguration); + } + if (OozieConfiguration != null) + { + writer.WritePropertyName("oozieConfiguration"); + writer.WriteObjectValue(OozieConfiguration); + } + if (StormConfiguration != null) + { + writer.WritePropertyName("stormConfiguration"); + writer.WriteObjectValue(StormConfiguration); + } + if (YarnConfiguration != null) + { + writer.WritePropertyName("yarnConfiguration"); + writer.WriteObjectValue(YarnConfiguration); + } + if (EncryptedCredential != null) + { + writer.WritePropertyName("encryptedCredential"); + writer.WriteObjectValue(EncryptedCredential); + } + if (HeadNodeSize != null) + { + writer.WritePropertyName("headNodeSize"); + writer.WriteObjectValue(HeadNodeSize); + } + if (DataNodeSize != null) + { + writer.WritePropertyName("dataNodeSize"); + writer.WriteObjectValue(DataNodeSize); + } + if (ZookeeperNodeSize != null) + { + writer.WritePropertyName("zookeeperNodeSize"); + writer.WriteObjectValue(ZookeeperNodeSize); + } + if (ScriptActions != null) + { + writer.WritePropertyName("scriptActions"); + writer.WriteStartArray(); + foreach (var item in ScriptActions) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (VirtualNetworkId != null) + { + writer.WritePropertyName("virtualNetworkId"); + writer.WriteObjectValue(VirtualNetworkId); + } + if (SubnetName != null) + { + writer.WritePropertyName("subnetName"); + writer.WriteObjectValue(SubnetName); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static HDInsightOnDemandLinkedService DeserializeHDInsightOnDemandLinkedService(JsonElement element) + { + string type = default; + IntegrationRuntimeReference connectVia = default; + string description = default; + IDictionary parameters = default; + IList annotations = default; + object clusterSize = default; + object timeToLive = default; + object version = default; + LinkedServiceReference linkedServiceName = default; + object hostSubscriptionId = default; + object servicePrincipalId = default; + SecretBase servicePrincipalKey = default; + object tenant = default; + object clusterResourceGroup = default; + object clusterNamePrefix = default; + object clusterUserName = default; + SecretBase clusterPassword = default; + object clusterSshUserName = default; + SecretBase clusterSshPassword = default; + IList additionalLinkedServiceNames = default; + LinkedServiceReference hcatalogLinkedServiceName = default; + object clusterType = default; + object sparkVersion = default; + object coreConfiguration = default; + object hBaseConfiguration = default; + object hdfsConfiguration = default; + object hiveConfiguration = default; + object mapReduceConfiguration = default; + object oozieConfiguration = default; + object stormConfiguration = default; + object yarnConfiguration = default; + object encryptedCredential = default; + object headNodeSize = default; + object dataNodeSize = default; + object zookeeperNodeSize = default; + IList scriptActions = default; + object virtualNetworkId = default; + object subnetName = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("connectVia")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("clusterSize")) + { + clusterSize = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("timeToLive")) + { + timeToLive = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("version")) + { + version = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("linkedServiceName")) + { + linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property0.Value); + continue; + } + if (property0.NameEquals("hostSubscriptionId")) + { + hostSubscriptionId = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("servicePrincipalId")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + servicePrincipalId = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("servicePrincipalKey")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + servicePrincipalKey = SecretBase.DeserializeSecretBase(property0.Value); + continue; + } + if (property0.NameEquals("tenant")) + { + tenant = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("clusterResourceGroup")) + { + clusterResourceGroup = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("clusterNamePrefix")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + clusterNamePrefix = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("clusterUserName")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + clusterUserName = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("clusterPassword")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + clusterPassword = SecretBase.DeserializeSecretBase(property0.Value); + continue; + } + if (property0.NameEquals("clusterSshUserName")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + clusterSshUserName = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("clusterSshPassword")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + clusterSshPassword = SecretBase.DeserializeSecretBase(property0.Value); + continue; + } + if (property0.NameEquals("additionalLinkedServiceNames")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(LinkedServiceReference.DeserializeLinkedServiceReference(item)); + } + } + additionalLinkedServiceNames = array; + continue; + } + if (property0.NameEquals("hcatalogLinkedServiceName")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + hcatalogLinkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property0.Value); + continue; + } + if (property0.NameEquals("clusterType")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + clusterType = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("sparkVersion")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sparkVersion = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("coreConfiguration")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + coreConfiguration = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("hBaseConfiguration")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + hBaseConfiguration = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("hdfsConfiguration")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + hdfsConfiguration = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("hiveConfiguration")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + hiveConfiguration = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("mapReduceConfiguration")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + mapReduceConfiguration = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("oozieConfiguration")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + oozieConfiguration = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("stormConfiguration")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + stormConfiguration = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("yarnConfiguration")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + yarnConfiguration = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("encryptedCredential")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + encryptedCredential = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("headNodeSize")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + headNodeSize = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("dataNodeSize")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dataNodeSize = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("zookeeperNodeSize")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + zookeeperNodeSize = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("scriptActions")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(ScriptAction.DeserializeScriptAction(item)); + } + } + scriptActions = array; + continue; + } + if (property0.NameEquals("virtualNetworkId")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + virtualNetworkId = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("subnetName")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + subnetName = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new HDInsightOnDemandLinkedService(type, connectVia, description, parameters, annotations, additionalProperties, clusterSize, timeToLive, version, linkedServiceName, hostSubscriptionId, servicePrincipalId, servicePrincipalKey, tenant, clusterResourceGroup, clusterNamePrefix, clusterUserName, clusterPassword, clusterSshUserName, clusterSshPassword, additionalLinkedServiceNames, hcatalogLinkedServiceName, clusterType, sparkVersion, coreConfiguration, hBaseConfiguration, hdfsConfiguration, hiveConfiguration, mapReduceConfiguration, oozieConfiguration, stormConfiguration, yarnConfiguration, encryptedCredential, headNodeSize, dataNodeSize, zookeeperNodeSize, scriptActions, virtualNetworkId, subnetName); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HDInsightOnDemandLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HDInsightOnDemandLinkedService.cs new file mode 100644 index 000000000000..5cfd0b841f7e --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HDInsightOnDemandLinkedService.cs @@ -0,0 +1,210 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// HDInsight ondemand linked service. + public partial class HDInsightOnDemandLinkedService : LinkedService + { + /// Initializes a new instance of HDInsightOnDemandLinkedService. + /// Number of worker/data nodes in the cluster. Suggestion value: 4. Type: string (or Expression with resultType string). + /// The allowed idle time for the on-demand HDInsight cluster. Specifies how long the on-demand HDInsight cluster stays alive after completion of an activity run if there are no other active jobs in the cluster. The minimum value is 5 mins. Type: string (or Expression with resultType string). + /// Version of the HDInsight cluster.  Type: string (or Expression with resultType string). + /// Azure Storage linked service to be used by the on-demand cluster for storing and processing data. + /// The customer’s subscription to host the cluster. Type: string (or Expression with resultType string). + /// The Tenant id/name to which the service principal belongs. Type: string (or Expression with resultType string). + /// The resource group where the cluster belongs. Type: string (or Expression with resultType string). + public HDInsightOnDemandLinkedService(object clusterSize, object timeToLive, object version, LinkedServiceReference linkedServiceName, object hostSubscriptionId, object tenant, object clusterResourceGroup) + { + if (clusterSize == null) + { + throw new ArgumentNullException(nameof(clusterSize)); + } + if (timeToLive == null) + { + throw new ArgumentNullException(nameof(timeToLive)); + } + if (version == null) + { + throw new ArgumentNullException(nameof(version)); + } + if (linkedServiceName == null) + { + throw new ArgumentNullException(nameof(linkedServiceName)); + } + if (hostSubscriptionId == null) + { + throw new ArgumentNullException(nameof(hostSubscriptionId)); + } + if (tenant == null) + { + throw new ArgumentNullException(nameof(tenant)); + } + if (clusterResourceGroup == null) + { + throw new ArgumentNullException(nameof(clusterResourceGroup)); + } + + ClusterSize = clusterSize; + TimeToLive = timeToLive; + Version = version; + LinkedServiceName = linkedServiceName; + HostSubscriptionId = hostSubscriptionId; + Tenant = tenant; + ClusterResourceGroup = clusterResourceGroup; + Type = "HDInsightOnDemand"; + } + + /// Initializes a new instance of HDInsightOnDemandLinkedService. + /// Type of linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for describing the linked service. + /// . + /// Number of worker/data nodes in the cluster. Suggestion value: 4. Type: string (or Expression with resultType string). + /// The allowed idle time for the on-demand HDInsight cluster. Specifies how long the on-demand HDInsight cluster stays alive after completion of an activity run if there are no other active jobs in the cluster. The minimum value is 5 mins. Type: string (or Expression with resultType string). + /// Version of the HDInsight cluster.  Type: string (or Expression with resultType string). + /// Azure Storage linked service to be used by the on-demand cluster for storing and processing data. + /// The customer’s subscription to host the cluster. Type: string (or Expression with resultType string). + /// The service principal id for the hostSubscriptionId. Type: string (or Expression with resultType string). + /// The key for the service principal id. + /// The Tenant id/name to which the service principal belongs. Type: string (or Expression with resultType string). + /// The resource group where the cluster belongs. Type: string (or Expression with resultType string). + /// The prefix of cluster name, postfix will be distinct with timestamp. Type: string (or Expression with resultType string). + /// The username to access the cluster. Type: string (or Expression with resultType string). + /// The password to access the cluster. + /// The username to SSH remotely connect to cluster’s node (for Linux). Type: string (or Expression with resultType string). + /// The password to SSH remotely connect cluster’s node (for Linux). + /// Specifies additional storage accounts for the HDInsight linked service so that the Data Factory service can register them on your behalf. + /// The name of Azure SQL linked service that point to the HCatalog database. The on-demand HDInsight cluster is created by using the Azure SQL database as the metastore. + /// The cluster type. Type: string (or Expression with resultType string). + /// The version of spark if the cluster type is 'spark'. Type: string (or Expression with resultType string). + /// Specifies the core configuration parameters (as in core-site.xml) for the HDInsight cluster to be created. + /// Specifies the HBase configuration parameters (hbase-site.xml) for the HDInsight cluster. + /// Specifies the HDFS configuration parameters (hdfs-site.xml) for the HDInsight cluster. + /// Specifies the hive configuration parameters (hive-site.xml) for the HDInsight cluster. + /// Specifies the MapReduce configuration parameters (mapred-site.xml) for the HDInsight cluster. + /// Specifies the Oozie configuration parameters (oozie-site.xml) for the HDInsight cluster. + /// Specifies the Storm configuration parameters (storm-site.xml) for the HDInsight cluster. + /// Specifies the Yarn configuration parameters (yarn-site.xml) for the HDInsight cluster. + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + /// Specifies the size of the head node for the HDInsight cluster. + /// Specifies the size of the data node for the HDInsight cluster. + /// Specifies the size of the Zoo Keeper node for the HDInsight cluster. + /// Custom script actions to run on HDI ondemand cluster once it's up. Please refer to https://docs.microsoft.com/en-us/azure/hdinsight/hdinsight-hadoop-customize-cluster-linux?toc=%2Fen-us%2Fazure%2Fhdinsight%2Fr-server%2FTOC.json&bc=%2Fen-us%2Fazure%2Fbread%2Ftoc.json#understanding-script-actions. + /// The ARM resource ID for the vNet to which the cluster should be joined after creation. Type: string (or Expression with resultType string). + /// The ARM resource ID for the subnet in the vNet. If virtualNetworkId was specified, then this property is required. Type: string (or Expression with resultType string). + internal HDInsightOnDemandLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object clusterSize, object timeToLive, object version, LinkedServiceReference linkedServiceName, object hostSubscriptionId, object servicePrincipalId, SecretBase servicePrincipalKey, object tenant, object clusterResourceGroup, object clusterNamePrefix, object clusterUserName, SecretBase clusterPassword, object clusterSshUserName, SecretBase clusterSshPassword, IList additionalLinkedServiceNames, LinkedServiceReference hcatalogLinkedServiceName, object clusterType, object sparkVersion, object coreConfiguration, object hBaseConfiguration, object hdfsConfiguration, object hiveConfiguration, object mapReduceConfiguration, object oozieConfiguration, object stormConfiguration, object yarnConfiguration, object encryptedCredential, object headNodeSize, object dataNodeSize, object zookeeperNodeSize, IList scriptActions, object virtualNetworkId, object subnetName) : base(type, connectVia, description, parameters, annotations, additionalProperties) + { + ClusterSize = clusterSize; + TimeToLive = timeToLive; + Version = version; + LinkedServiceName = linkedServiceName; + HostSubscriptionId = hostSubscriptionId; + ServicePrincipalId = servicePrincipalId; + ServicePrincipalKey = servicePrincipalKey; + Tenant = tenant; + ClusterResourceGroup = clusterResourceGroup; + ClusterNamePrefix = clusterNamePrefix; + ClusterUserName = clusterUserName; + ClusterPassword = clusterPassword; + ClusterSshUserName = clusterSshUserName; + ClusterSshPassword = clusterSshPassword; + AdditionalLinkedServiceNames = additionalLinkedServiceNames; + HcatalogLinkedServiceName = hcatalogLinkedServiceName; + ClusterType = clusterType; + SparkVersion = sparkVersion; + CoreConfiguration = coreConfiguration; + HBaseConfiguration = hBaseConfiguration; + HdfsConfiguration = hdfsConfiguration; + HiveConfiguration = hiveConfiguration; + MapReduceConfiguration = mapReduceConfiguration; + OozieConfiguration = oozieConfiguration; + StormConfiguration = stormConfiguration; + YarnConfiguration = yarnConfiguration; + EncryptedCredential = encryptedCredential; + HeadNodeSize = headNodeSize; + DataNodeSize = dataNodeSize; + ZookeeperNodeSize = zookeeperNodeSize; + ScriptActions = scriptActions; + VirtualNetworkId = virtualNetworkId; + SubnetName = subnetName; + Type = type ?? "HDInsightOnDemand"; + } + + /// Number of worker/data nodes in the cluster. Suggestion value: 4. Type: string (or Expression with resultType string). + public object ClusterSize { get; set; } + /// The allowed idle time for the on-demand HDInsight cluster. Specifies how long the on-demand HDInsight cluster stays alive after completion of an activity run if there are no other active jobs in the cluster. The minimum value is 5 mins. Type: string (or Expression with resultType string). + public object TimeToLive { get; set; } + /// Version of the HDInsight cluster.  Type: string (or Expression with resultType string). + public object Version { get; set; } + /// Azure Storage linked service to be used by the on-demand cluster for storing and processing data. + public LinkedServiceReference LinkedServiceName { get; set; } + /// The customer’s subscription to host the cluster. Type: string (or Expression with resultType string). + public object HostSubscriptionId { get; set; } + /// The service principal id for the hostSubscriptionId. Type: string (or Expression with resultType string). + public object ServicePrincipalId { get; set; } + /// The key for the service principal id. + public SecretBase ServicePrincipalKey { get; set; } + /// The Tenant id/name to which the service principal belongs. Type: string (or Expression with resultType string). + public object Tenant { get; set; } + /// The resource group where the cluster belongs. Type: string (or Expression with resultType string). + public object ClusterResourceGroup { get; set; } + /// The prefix of cluster name, postfix will be distinct with timestamp. Type: string (or Expression with resultType string). + public object ClusterNamePrefix { get; set; } + /// The username to access the cluster. Type: string (or Expression with resultType string). + public object ClusterUserName { get; set; } + /// The password to access the cluster. + public SecretBase ClusterPassword { get; set; } + /// The username to SSH remotely connect to cluster’s node (for Linux). Type: string (or Expression with resultType string). + public object ClusterSshUserName { get; set; } + /// The password to SSH remotely connect cluster’s node (for Linux). + public SecretBase ClusterSshPassword { get; set; } + /// Specifies additional storage accounts for the HDInsight linked service so that the Data Factory service can register them on your behalf. + public IList AdditionalLinkedServiceNames { get; set; } + /// The name of Azure SQL linked service that point to the HCatalog database. The on-demand HDInsight cluster is created by using the Azure SQL database as the metastore. + public LinkedServiceReference HcatalogLinkedServiceName { get; set; } + /// The cluster type. Type: string (or Expression with resultType string). + public object ClusterType { get; set; } + /// The version of spark if the cluster type is 'spark'. Type: string (or Expression with resultType string). + public object SparkVersion { get; set; } + /// Specifies the core configuration parameters (as in core-site.xml) for the HDInsight cluster to be created. + public object CoreConfiguration { get; set; } + /// Specifies the HBase configuration parameters (hbase-site.xml) for the HDInsight cluster. + public object HBaseConfiguration { get; set; } + /// Specifies the HDFS configuration parameters (hdfs-site.xml) for the HDInsight cluster. + public object HdfsConfiguration { get; set; } + /// Specifies the hive configuration parameters (hive-site.xml) for the HDInsight cluster. + public object HiveConfiguration { get; set; } + /// Specifies the MapReduce configuration parameters (mapred-site.xml) for the HDInsight cluster. + public object MapReduceConfiguration { get; set; } + /// Specifies the Oozie configuration parameters (oozie-site.xml) for the HDInsight cluster. + public object OozieConfiguration { get; set; } + /// Specifies the Storm configuration parameters (storm-site.xml) for the HDInsight cluster. + public object StormConfiguration { get; set; } + /// Specifies the Yarn configuration parameters (yarn-site.xml) for the HDInsight cluster. + public object YarnConfiguration { get; set; } + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + public object EncryptedCredential { get; set; } + /// Specifies the size of the head node for the HDInsight cluster. + public object HeadNodeSize { get; set; } + /// Specifies the size of the data node for the HDInsight cluster. + public object DataNodeSize { get; set; } + /// Specifies the size of the Zoo Keeper node for the HDInsight cluster. + public object ZookeeperNodeSize { get; set; } + /// Custom script actions to run on HDI ondemand cluster once it's up. Please refer to https://docs.microsoft.com/en-us/azure/hdinsight/hdinsight-hadoop-customize-cluster-linux?toc=%2Fen-us%2Fazure%2Fhdinsight%2Fr-server%2FTOC.json&bc=%2Fen-us%2Fazure%2Fbread%2Ftoc.json#understanding-script-actions. + public IList ScriptActions { get; set; } + /// The ARM resource ID for the vNet to which the cluster should be joined after creation. Type: string (or Expression with resultType string). + public object VirtualNetworkId { get; set; } + /// The ARM resource ID for the subnet in the vNet. If virtualNetworkId was specified, then this property is required. Type: string (or Expression with resultType string). + public object SubnetName { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HDInsightPigActivity.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HDInsightPigActivity.Serialization.cs new file mode 100644 index 000000000000..730602c538eb --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HDInsightPigActivity.Serialization.cs @@ -0,0 +1,307 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class HDInsightPigActivity : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (LinkedServiceName != null) + { + writer.WritePropertyName("linkedServiceName"); + writer.WriteObjectValue(LinkedServiceName); + } + if (Policy != null) + { + writer.WritePropertyName("policy"); + writer.WriteObjectValue(Policy); + } + writer.WritePropertyName("name"); + writer.WriteStringValue(Name); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (DependsOn != null) + { + writer.WritePropertyName("dependsOn"); + writer.WriteStartArray(); + foreach (var item in DependsOn) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (UserProperties != null) + { + writer.WritePropertyName("userProperties"); + writer.WriteStartArray(); + foreach (var item in UserProperties) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + if (StorageLinkedServices != null) + { + writer.WritePropertyName("storageLinkedServices"); + writer.WriteStartArray(); + foreach (var item in StorageLinkedServices) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Arguments != null) + { + writer.WritePropertyName("arguments"); + writer.WriteObjectValue(Arguments); + } + if (GetDebugInfo != null) + { + writer.WritePropertyName("getDebugInfo"); + writer.WriteStringValue(GetDebugInfo.Value.ToString()); + } + if (ScriptPath != null) + { + writer.WritePropertyName("scriptPath"); + writer.WriteObjectValue(ScriptPath); + } + if (ScriptLinkedService != null) + { + writer.WritePropertyName("scriptLinkedService"); + writer.WriteObjectValue(ScriptLinkedService); + } + if (Defines != null) + { + writer.WritePropertyName("defines"); + writer.WriteStartObject(); + foreach (var item in Defines) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static HDInsightPigActivity DeserializeHDInsightPigActivity(JsonElement element) + { + LinkedServiceReference linkedServiceName = default; + ActivityPolicy policy = default; + string name = default; + string type = default; + string description = default; + IList dependsOn = default; + IList userProperties = default; + IList storageLinkedServices = default; + object arguments = default; + HDInsightActivityDebugInfoOption? getDebugInfo = default; + object scriptPath = default; + LinkedServiceReference scriptLinkedService = default; + IDictionary defines = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("linkedServiceName")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value); + continue; + } + if (property.NameEquals("policy")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + policy = ActivityPolicy.DeserializeActivityPolicy(property.Value); + continue; + } + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("dependsOn")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(ActivityDependency.DeserializeActivityDependency(item)); + } + } + dependsOn = array; + continue; + } + if (property.NameEquals("userProperties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(UserProperty.DeserializeUserProperty(item)); + } + } + userProperties = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("storageLinkedServices")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(LinkedServiceReference.DeserializeLinkedServiceReference(item)); + } + } + storageLinkedServices = array; + continue; + } + if (property0.NameEquals("arguments")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + arguments = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("getDebugInfo")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + getDebugInfo = new HDInsightActivityDebugInfoOption(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("scriptPath")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + scriptPath = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("scriptLinkedService")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + scriptLinkedService = LinkedServiceReference.DeserializeLinkedServiceReference(property0.Value); + continue; + } + if (property0.NameEquals("defines")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property1 in property0.Value.EnumerateObject()) + { + if (property1.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property1.Name, null); + } + else + { + dictionary.Add(property1.Name, property1.Value.GetObject()); + } + } + defines = dictionary; + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new HDInsightPigActivity(name, type, description, dependsOn, userProperties, additionalProperties, linkedServiceName, policy, storageLinkedServices, arguments, getDebugInfo, scriptPath, scriptLinkedService, defines); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HDInsightPigActivity.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HDInsightPigActivity.cs new file mode 100644 index 000000000000..5f2b23647e4b --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HDInsightPigActivity.cs @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// HDInsight Pig activity type. + public partial class HDInsightPigActivity : ExecutionActivity + { + /// Initializes a new instance of HDInsightPigActivity. + /// Activity name. + public HDInsightPigActivity(string name) : base(name) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + + Type = "HDInsightPig"; + } + + /// Initializes a new instance of HDInsightPigActivity. + /// Activity name. + /// Type of activity. + /// Activity description. + /// Activity depends on condition. + /// Activity user properties. + /// . + /// Linked service reference. + /// Activity policy. + /// Storage linked service references. + /// User specified arguments to HDInsightActivity. Type: array (or Expression with resultType array). + /// Debug info option. + /// Script path. Type: string (or Expression with resultType string). + /// Script linked service reference. + /// Allows user to specify defines for Pig job request. + internal HDInsightPigActivity(string name, string type, string description, IList dependsOn, IList userProperties, IDictionary additionalProperties, LinkedServiceReference linkedServiceName, ActivityPolicy policy, IList storageLinkedServices, object arguments, HDInsightActivityDebugInfoOption? getDebugInfo, object scriptPath, LinkedServiceReference scriptLinkedService, IDictionary defines) : base(name, type, description, dependsOn, userProperties, additionalProperties, linkedServiceName, policy) + { + StorageLinkedServices = storageLinkedServices; + Arguments = arguments; + GetDebugInfo = getDebugInfo; + ScriptPath = scriptPath; + ScriptLinkedService = scriptLinkedService; + Defines = defines; + Type = type ?? "HDInsightPig"; + } + + /// Storage linked service references. + public IList StorageLinkedServices { get; set; } + /// User specified arguments to HDInsightActivity. Type: array (or Expression with resultType array). + public object Arguments { get; set; } + /// Debug info option. + public HDInsightActivityDebugInfoOption? GetDebugInfo { get; set; } + /// Script path. Type: string (or Expression with resultType string). + public object ScriptPath { get; set; } + /// Script linked service reference. + public LinkedServiceReference ScriptLinkedService { get; set; } + /// Allows user to specify defines for Pig job request. + public IDictionary Defines { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HDInsightSparkActivity.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HDInsightSparkActivity.Serialization.cs new file mode 100644 index 000000000000..eadf95cdda0a --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HDInsightSparkActivity.Serialization.cs @@ -0,0 +1,323 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class HDInsightSparkActivity : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (LinkedServiceName != null) + { + writer.WritePropertyName("linkedServiceName"); + writer.WriteObjectValue(LinkedServiceName); + } + if (Policy != null) + { + writer.WritePropertyName("policy"); + writer.WriteObjectValue(Policy); + } + writer.WritePropertyName("name"); + writer.WriteStringValue(Name); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (DependsOn != null) + { + writer.WritePropertyName("dependsOn"); + writer.WriteStartArray(); + foreach (var item in DependsOn) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (UserProperties != null) + { + writer.WritePropertyName("userProperties"); + writer.WriteStartArray(); + foreach (var item in UserProperties) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + writer.WritePropertyName("rootPath"); + writer.WriteObjectValue(RootPath); + writer.WritePropertyName("entryFilePath"); + writer.WriteObjectValue(EntryFilePath); + if (Arguments != null) + { + writer.WritePropertyName("arguments"); + writer.WriteStartArray(); + foreach (var item in Arguments) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (GetDebugInfo != null) + { + writer.WritePropertyName("getDebugInfo"); + writer.WriteStringValue(GetDebugInfo.Value.ToString()); + } + if (SparkJobLinkedService != null) + { + writer.WritePropertyName("sparkJobLinkedService"); + writer.WriteObjectValue(SparkJobLinkedService); + } + if (ClassName != null) + { + writer.WritePropertyName("className"); + writer.WriteStringValue(ClassName); + } + if (ProxyUser != null) + { + writer.WritePropertyName("proxyUser"); + writer.WriteObjectValue(ProxyUser); + } + if (SparkConfig != null) + { + writer.WritePropertyName("sparkConfig"); + writer.WriteStartObject(); + foreach (var item in SparkConfig) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static HDInsightSparkActivity DeserializeHDInsightSparkActivity(JsonElement element) + { + LinkedServiceReference linkedServiceName = default; + ActivityPolicy policy = default; + string name = default; + string type = default; + string description = default; + IList dependsOn = default; + IList userProperties = default; + object rootPath = default; + object entryFilePath = default; + IList arguments = default; + HDInsightActivityDebugInfoOption? getDebugInfo = default; + LinkedServiceReference sparkJobLinkedService = default; + string className = default; + object proxyUser = default; + IDictionary sparkConfig = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("linkedServiceName")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value); + continue; + } + if (property.NameEquals("policy")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + policy = ActivityPolicy.DeserializeActivityPolicy(property.Value); + continue; + } + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("dependsOn")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(ActivityDependency.DeserializeActivityDependency(item)); + } + } + dependsOn = array; + continue; + } + if (property.NameEquals("userProperties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(UserProperty.DeserializeUserProperty(item)); + } + } + userProperties = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("rootPath")) + { + rootPath = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("entryFilePath")) + { + entryFilePath = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("arguments")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + arguments = array; + continue; + } + if (property0.NameEquals("getDebugInfo")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + getDebugInfo = new HDInsightActivityDebugInfoOption(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("sparkJobLinkedService")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sparkJobLinkedService = LinkedServiceReference.DeserializeLinkedServiceReference(property0.Value); + continue; + } + if (property0.NameEquals("className")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + className = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("proxyUser")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + proxyUser = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("sparkConfig")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property1 in property0.Value.EnumerateObject()) + { + if (property1.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property1.Name, null); + } + else + { + dictionary.Add(property1.Name, property1.Value.GetObject()); + } + } + sparkConfig = dictionary; + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new HDInsightSparkActivity(name, type, description, dependsOn, userProperties, additionalProperties, linkedServiceName, policy, rootPath, entryFilePath, arguments, getDebugInfo, sparkJobLinkedService, className, proxyUser, sparkConfig); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HDInsightSparkActivity.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HDInsightSparkActivity.cs new file mode 100644 index 000000000000..f0af6faff9d5 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HDInsightSparkActivity.cs @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// HDInsight Spark activity. + public partial class HDInsightSparkActivity : ExecutionActivity + { + /// Initializes a new instance of HDInsightSparkActivity. + /// Activity name. + /// The root path in 'sparkJobLinkedService' for all the job’s files. Type: string (or Expression with resultType string). + /// The relative path to the root folder of the code/package to be executed. Type: string (or Expression with resultType string). + public HDInsightSparkActivity(string name, object rootPath, object entryFilePath) : base(name) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (rootPath == null) + { + throw new ArgumentNullException(nameof(rootPath)); + } + if (entryFilePath == null) + { + throw new ArgumentNullException(nameof(entryFilePath)); + } + + RootPath = rootPath; + EntryFilePath = entryFilePath; + Type = "HDInsightSpark"; + } + + /// Initializes a new instance of HDInsightSparkActivity. + /// Activity name. + /// Type of activity. + /// Activity description. + /// Activity depends on condition. + /// Activity user properties. + /// . + /// Linked service reference. + /// Activity policy. + /// The root path in 'sparkJobLinkedService' for all the job’s files. Type: string (or Expression with resultType string). + /// The relative path to the root folder of the code/package to be executed. Type: string (or Expression with resultType string). + /// The user-specified arguments to HDInsightSparkActivity. + /// Debug info option. + /// The storage linked service for uploading the entry file and dependencies, and for receiving logs. + /// The application's Java/Spark main class. + /// The user to impersonate that will execute the job. Type: string (or Expression with resultType string). + /// Spark configuration property. + internal HDInsightSparkActivity(string name, string type, string description, IList dependsOn, IList userProperties, IDictionary additionalProperties, LinkedServiceReference linkedServiceName, ActivityPolicy policy, object rootPath, object entryFilePath, IList arguments, HDInsightActivityDebugInfoOption? getDebugInfo, LinkedServiceReference sparkJobLinkedService, string className, object proxyUser, IDictionary sparkConfig) : base(name, type, description, dependsOn, userProperties, additionalProperties, linkedServiceName, policy) + { + RootPath = rootPath; + EntryFilePath = entryFilePath; + Arguments = arguments; + GetDebugInfo = getDebugInfo; + SparkJobLinkedService = sparkJobLinkedService; + ClassName = className; + ProxyUser = proxyUser; + SparkConfig = sparkConfig; + Type = type ?? "HDInsightSpark"; + } + + /// The root path in 'sparkJobLinkedService' for all the job’s files. Type: string (or Expression with resultType string). + public object RootPath { get; set; } + /// The relative path to the root folder of the code/package to be executed. Type: string (or Expression with resultType string). + public object EntryFilePath { get; set; } + /// The user-specified arguments to HDInsightSparkActivity. + public IList Arguments { get; set; } + /// Debug info option. + public HDInsightActivityDebugInfoOption? GetDebugInfo { get; set; } + /// The storage linked service for uploading the entry file and dependencies, and for receiving logs. + public LinkedServiceReference SparkJobLinkedService { get; set; } + /// The application's Java/Spark main class. + public string ClassName { get; set; } + /// The user to impersonate that will execute the job. Type: string (or Expression with resultType string). + public object ProxyUser { get; set; } + /// Spark configuration property. + public IDictionary SparkConfig { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HDInsightStreamingActivity.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HDInsightStreamingActivity.Serialization.cs new file mode 100644 index 000000000000..5da92e24104e --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HDInsightStreamingActivity.Serialization.cs @@ -0,0 +1,413 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class HDInsightStreamingActivity : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (LinkedServiceName != null) + { + writer.WritePropertyName("linkedServiceName"); + writer.WriteObjectValue(LinkedServiceName); + } + if (Policy != null) + { + writer.WritePropertyName("policy"); + writer.WriteObjectValue(Policy); + } + writer.WritePropertyName("name"); + writer.WriteStringValue(Name); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (DependsOn != null) + { + writer.WritePropertyName("dependsOn"); + writer.WriteStartArray(); + foreach (var item in DependsOn) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (UserProperties != null) + { + writer.WritePropertyName("userProperties"); + writer.WriteStartArray(); + foreach (var item in UserProperties) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + if (StorageLinkedServices != null) + { + writer.WritePropertyName("storageLinkedServices"); + writer.WriteStartArray(); + foreach (var item in StorageLinkedServices) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Arguments != null) + { + writer.WritePropertyName("arguments"); + writer.WriteStartArray(); + foreach (var item in Arguments) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (GetDebugInfo != null) + { + writer.WritePropertyName("getDebugInfo"); + writer.WriteStringValue(GetDebugInfo.Value.ToString()); + } + writer.WritePropertyName("mapper"); + writer.WriteObjectValue(Mapper); + writer.WritePropertyName("reducer"); + writer.WriteObjectValue(Reducer); + writer.WritePropertyName("input"); + writer.WriteObjectValue(Input); + writer.WritePropertyName("output"); + writer.WriteObjectValue(Output); + writer.WritePropertyName("filePaths"); + writer.WriteStartArray(); + foreach (var item in FilePaths) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + if (FileLinkedService != null) + { + writer.WritePropertyName("fileLinkedService"); + writer.WriteObjectValue(FileLinkedService); + } + if (Combiner != null) + { + writer.WritePropertyName("combiner"); + writer.WriteObjectValue(Combiner); + } + if (CommandEnvironment != null) + { + writer.WritePropertyName("commandEnvironment"); + writer.WriteStartArray(); + foreach (var item in CommandEnvironment) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Defines != null) + { + writer.WritePropertyName("defines"); + writer.WriteStartObject(); + foreach (var item in Defines) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static HDInsightStreamingActivity DeserializeHDInsightStreamingActivity(JsonElement element) + { + LinkedServiceReference linkedServiceName = default; + ActivityPolicy policy = default; + string name = default; + string type = default; + string description = default; + IList dependsOn = default; + IList userProperties = default; + IList storageLinkedServices = default; + IList arguments = default; + HDInsightActivityDebugInfoOption? getDebugInfo = default; + object mapper = default; + object reducer = default; + object input = default; + object output = default; + IList filePaths = default; + LinkedServiceReference fileLinkedService = default; + object combiner = default; + IList commandEnvironment = default; + IDictionary defines = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("linkedServiceName")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value); + continue; + } + if (property.NameEquals("policy")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + policy = ActivityPolicy.DeserializeActivityPolicy(property.Value); + continue; + } + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("dependsOn")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(ActivityDependency.DeserializeActivityDependency(item)); + } + } + dependsOn = array; + continue; + } + if (property.NameEquals("userProperties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(UserProperty.DeserializeUserProperty(item)); + } + } + userProperties = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("storageLinkedServices")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(LinkedServiceReference.DeserializeLinkedServiceReference(item)); + } + } + storageLinkedServices = array; + continue; + } + if (property0.NameEquals("arguments")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + arguments = array; + continue; + } + if (property0.NameEquals("getDebugInfo")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + getDebugInfo = new HDInsightActivityDebugInfoOption(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("mapper")) + { + mapper = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("reducer")) + { + reducer = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("input")) + { + input = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("output")) + { + output = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("filePaths")) + { + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + filePaths = array; + continue; + } + if (property0.NameEquals("fileLinkedService")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + fileLinkedService = LinkedServiceReference.DeserializeLinkedServiceReference(property0.Value); + continue; + } + if (property0.NameEquals("combiner")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + combiner = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("commandEnvironment")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + commandEnvironment = array; + continue; + } + if (property0.NameEquals("defines")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property1 in property0.Value.EnumerateObject()) + { + if (property1.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property1.Name, null); + } + else + { + dictionary.Add(property1.Name, property1.Value.GetObject()); + } + } + defines = dictionary; + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new HDInsightStreamingActivity(name, type, description, dependsOn, userProperties, additionalProperties, linkedServiceName, policy, storageLinkedServices, arguments, getDebugInfo, mapper, reducer, input, output, filePaths, fileLinkedService, combiner, commandEnvironment, defines); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HDInsightStreamingActivity.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HDInsightStreamingActivity.cs new file mode 100644 index 000000000000..717cc4799fc5 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HDInsightStreamingActivity.cs @@ -0,0 +1,122 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// HDInsight streaming activity type. + public partial class HDInsightStreamingActivity : ExecutionActivity + { + /// Initializes a new instance of HDInsightStreamingActivity. + /// Activity name. + /// Mapper executable name. Type: string (or Expression with resultType string). + /// Reducer executable name. Type: string (or Expression with resultType string). + /// Input blob path. Type: string (or Expression with resultType string). + /// Output blob path. Type: string (or Expression with resultType string). + /// Paths to streaming job files. Can be directories. + public HDInsightStreamingActivity(string name, object mapper, object reducer, object input, object output, IEnumerable filePaths) : base(name) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (mapper == null) + { + throw new ArgumentNullException(nameof(mapper)); + } + if (reducer == null) + { + throw new ArgumentNullException(nameof(reducer)); + } + if (input == null) + { + throw new ArgumentNullException(nameof(input)); + } + if (output == null) + { + throw new ArgumentNullException(nameof(output)); + } + if (filePaths == null) + { + throw new ArgumentNullException(nameof(filePaths)); + } + + Mapper = mapper; + Reducer = reducer; + Input = input; + Output = output; + FilePaths = filePaths.ToArray(); + Type = "HDInsightStreaming"; + } + + /// Initializes a new instance of HDInsightStreamingActivity. + /// Activity name. + /// Type of activity. + /// Activity description. + /// Activity depends on condition. + /// Activity user properties. + /// . + /// Linked service reference. + /// Activity policy. + /// Storage linked service references. + /// User specified arguments to HDInsightActivity. + /// Debug info option. + /// Mapper executable name. Type: string (or Expression with resultType string). + /// Reducer executable name. Type: string (or Expression with resultType string). + /// Input blob path. Type: string (or Expression with resultType string). + /// Output blob path. Type: string (or Expression with resultType string). + /// Paths to streaming job files. Can be directories. + /// Linked service reference where the files are located. + /// Combiner executable name. Type: string (or Expression with resultType string). + /// Command line environment values. + /// Allows user to specify defines for streaming job request. + internal HDInsightStreamingActivity(string name, string type, string description, IList dependsOn, IList userProperties, IDictionary additionalProperties, LinkedServiceReference linkedServiceName, ActivityPolicy policy, IList storageLinkedServices, IList arguments, HDInsightActivityDebugInfoOption? getDebugInfo, object mapper, object reducer, object input, object output, IList filePaths, LinkedServiceReference fileLinkedService, object combiner, IList commandEnvironment, IDictionary defines) : base(name, type, description, dependsOn, userProperties, additionalProperties, linkedServiceName, policy) + { + StorageLinkedServices = storageLinkedServices; + Arguments = arguments; + GetDebugInfo = getDebugInfo; + Mapper = mapper; + Reducer = reducer; + Input = input; + Output = output; + FilePaths = filePaths; + FileLinkedService = fileLinkedService; + Combiner = combiner; + CommandEnvironment = commandEnvironment; + Defines = defines; + Type = type ?? "HDInsightStreaming"; + } + + /// Storage linked service references. + public IList StorageLinkedServices { get; set; } + /// User specified arguments to HDInsightActivity. + public IList Arguments { get; set; } + /// Debug info option. + public HDInsightActivityDebugInfoOption? GetDebugInfo { get; set; } + /// Mapper executable name. Type: string (or Expression with resultType string). + public object Mapper { get; set; } + /// Reducer executable name. Type: string (or Expression with resultType string). + public object Reducer { get; set; } + /// Input blob path. Type: string (or Expression with resultType string). + public object Input { get; set; } + /// Output blob path. Type: string (or Expression with resultType string). + public object Output { get; set; } + /// Paths to streaming job files. Can be directories. + public IList FilePaths { get; set; } + /// Linked service reference where the files are located. + public LinkedServiceReference FileLinkedService { get; set; } + /// Combiner executable name. Type: string (or Expression with resultType string). + public object Combiner { get; set; } + /// Command line environment values. + public IList CommandEnvironment { get; set; } + /// Allows user to specify defines for streaming job request. + public IDictionary Defines { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HdfsLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HdfsLinkedService.Serialization.cs new file mode 100644 index 000000000000..a7f7dc4e2c03 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HdfsLinkedService.Serialization.cs @@ -0,0 +1,228 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class HdfsLinkedService : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (ConnectVia != null) + { + writer.WritePropertyName("connectVia"); + writer.WriteObjectValue(ConnectVia); + } + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + writer.WritePropertyName("url"); + writer.WriteObjectValue(Url); + if (AuthenticationType != null) + { + writer.WritePropertyName("authenticationType"); + writer.WriteObjectValue(AuthenticationType); + } + if (EncryptedCredential != null) + { + writer.WritePropertyName("encryptedCredential"); + writer.WriteObjectValue(EncryptedCredential); + } + if (UserName != null) + { + writer.WritePropertyName("userName"); + writer.WriteObjectValue(UserName); + } + if (Password != null) + { + writer.WritePropertyName("password"); + writer.WriteObjectValue(Password); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static HdfsLinkedService DeserializeHdfsLinkedService(JsonElement element) + { + string type = default; + IntegrationRuntimeReference connectVia = default; + string description = default; + IDictionary parameters = default; + IList annotations = default; + object url = default; + object authenticationType = default; + object encryptedCredential = default; + object userName = default; + SecretBase password = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("connectVia")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("url")) + { + url = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("authenticationType")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + authenticationType = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("encryptedCredential")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + encryptedCredential = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("userName")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + userName = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("password")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + password = SecretBase.DeserializeSecretBase(property0.Value); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new HdfsLinkedService(type, connectVia, description, parameters, annotations, additionalProperties, url, authenticationType, encryptedCredential, userName, password); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HdfsLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HdfsLinkedService.cs new file mode 100644 index 000000000000..b11dbfdd81f4 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HdfsLinkedService.cs @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Hadoop Distributed File System (HDFS) linked service. + public partial class HdfsLinkedService : LinkedService + { + /// Initializes a new instance of HdfsLinkedService. + /// The URL of the HDFS service endpoint, e.g. http://myhostname:50070/webhdfs/v1 . Type: string (or Expression with resultType string). + public HdfsLinkedService(object url) + { + if (url == null) + { + throw new ArgumentNullException(nameof(url)); + } + + Url = url; + Type = "Hdfs"; + } + + /// Initializes a new instance of HdfsLinkedService. + /// Type of linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for describing the linked service. + /// . + /// The URL of the HDFS service endpoint, e.g. http://myhostname:50070/webhdfs/v1 . Type: string (or Expression with resultType string). + /// Type of authentication used to connect to the HDFS. Possible values are: Anonymous and Windows. Type: string (or Expression with resultType string). + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + /// User name for Windows authentication. Type: string (or Expression with resultType string). + /// Password for Windows authentication. + internal HdfsLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object url, object authenticationType, object encryptedCredential, object userName, SecretBase password) : base(type, connectVia, description, parameters, annotations, additionalProperties) + { + Url = url; + AuthenticationType = authenticationType; + EncryptedCredential = encryptedCredential; + UserName = userName; + Password = password; + Type = type ?? "Hdfs"; + } + + /// The URL of the HDFS service endpoint, e.g. http://myhostname:50070/webhdfs/v1 . Type: string (or Expression with resultType string). + public object Url { get; set; } + /// Type of authentication used to connect to the HDFS. Possible values are: Anonymous and Windows. Type: string (or Expression with resultType string). + public object AuthenticationType { get; set; } + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + public object EncryptedCredential { get; set; } + /// User name for Windows authentication. Type: string (or Expression with resultType string). + public object UserName { get; set; } + /// Password for Windows authentication. + public SecretBase Password { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HdiNodeTypes.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HdiNodeTypes.cs new file mode 100644 index 000000000000..2a9e132da5eb --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HdiNodeTypes.cs @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// The node types on which the script action should be executed. + public readonly partial struct HdiNodeTypes : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + public HdiNodeTypes(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string HeadnodeValue = "Headnode"; + private const string WorkernodeValue = "Workernode"; + private const string ZookeeperValue = "Zookeeper"; + + /// Headnode. + public static HdiNodeTypes Headnode { get; } = new HdiNodeTypes(HeadnodeValue); + /// Workernode. + public static HdiNodeTypes Workernode { get; } = new HdiNodeTypes(WorkernodeValue); + /// Zookeeper. + public static HdiNodeTypes Zookeeper { get; } = new HdiNodeTypes(ZookeeperValue); + /// Determines if two values are the same. + public static bool operator ==(HdiNodeTypes left, HdiNodeTypes right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(HdiNodeTypes left, HdiNodeTypes right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator HdiNodeTypes(string value) => new HdiNodeTypes(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is HdiNodeTypes other && Equals(other); + /// + public bool Equals(HdiNodeTypes other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HiveAuthenticationType.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HiveAuthenticationType.cs new file mode 100644 index 000000000000..a2cbf4d7a1cd --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HiveAuthenticationType.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// The authentication method used to access the Hive server. + public readonly partial struct HiveAuthenticationType : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + public HiveAuthenticationType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AnonymousValue = "Anonymous"; + private const string UsernameValue = "Username"; + private const string UsernameAndPasswordValue = "UsernameAndPassword"; + private const string WindowsAzureHDInsightServiceValue = "WindowsAzureHDInsightService"; + + /// Anonymous. + public static HiveAuthenticationType Anonymous { get; } = new HiveAuthenticationType(AnonymousValue); + /// Username. + public static HiveAuthenticationType Username { get; } = new HiveAuthenticationType(UsernameValue); + /// UsernameAndPassword. + public static HiveAuthenticationType UsernameAndPassword { get; } = new HiveAuthenticationType(UsernameAndPasswordValue); + /// WindowsAzureHDInsightService. + public static HiveAuthenticationType WindowsAzureHDInsightService { get; } = new HiveAuthenticationType(WindowsAzureHDInsightServiceValue); + /// Determines if two values are the same. + public static bool operator ==(HiveAuthenticationType left, HiveAuthenticationType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(HiveAuthenticationType left, HiveAuthenticationType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator HiveAuthenticationType(string value) => new HiveAuthenticationType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is HiveAuthenticationType other && Equals(other); + /// + public bool Equals(HiveAuthenticationType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HiveLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HiveLinkedService.Serialization.cs new file mode 100644 index 000000000000..ab0e4787af8b --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HiveLinkedService.Serialization.cs @@ -0,0 +1,401 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class HiveLinkedService : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (ConnectVia != null) + { + writer.WritePropertyName("connectVia"); + writer.WriteObjectValue(ConnectVia); + } + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + writer.WritePropertyName("host"); + writer.WriteObjectValue(Host); + if (Port != null) + { + writer.WritePropertyName("port"); + writer.WriteObjectValue(Port); + } + if (ServerType != null) + { + writer.WritePropertyName("serverType"); + writer.WriteStringValue(ServerType.Value.ToString()); + } + if (ThriftTransportProtocol != null) + { + writer.WritePropertyName("thriftTransportProtocol"); + writer.WriteStringValue(ThriftTransportProtocol.Value.ToString()); + } + writer.WritePropertyName("authenticationType"); + writer.WriteStringValue(AuthenticationType.ToString()); + if (ServiceDiscoveryMode != null) + { + writer.WritePropertyName("serviceDiscoveryMode"); + writer.WriteObjectValue(ServiceDiscoveryMode); + } + if (ZooKeeperNameSpace != null) + { + writer.WritePropertyName("zooKeeperNameSpace"); + writer.WriteObjectValue(ZooKeeperNameSpace); + } + if (UseNativeQuery != null) + { + writer.WritePropertyName("useNativeQuery"); + writer.WriteObjectValue(UseNativeQuery); + } + if (Username != null) + { + writer.WritePropertyName("username"); + writer.WriteObjectValue(Username); + } + if (Password != null) + { + writer.WritePropertyName("password"); + writer.WriteObjectValue(Password); + } + if (HttpPath != null) + { + writer.WritePropertyName("httpPath"); + writer.WriteObjectValue(HttpPath); + } + if (EnableSsl != null) + { + writer.WritePropertyName("enableSsl"); + writer.WriteObjectValue(EnableSsl); + } + if (TrustedCertPath != null) + { + writer.WritePropertyName("trustedCertPath"); + writer.WriteObjectValue(TrustedCertPath); + } + if (UseSystemTrustStore != null) + { + writer.WritePropertyName("useSystemTrustStore"); + writer.WriteObjectValue(UseSystemTrustStore); + } + if (AllowHostNameCNMismatch != null) + { + writer.WritePropertyName("allowHostNameCNMismatch"); + writer.WriteObjectValue(AllowHostNameCNMismatch); + } + if (AllowSelfSignedServerCert != null) + { + writer.WritePropertyName("allowSelfSignedServerCert"); + writer.WriteObjectValue(AllowSelfSignedServerCert); + } + if (EncryptedCredential != null) + { + writer.WritePropertyName("encryptedCredential"); + writer.WriteObjectValue(EncryptedCredential); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static HiveLinkedService DeserializeHiveLinkedService(JsonElement element) + { + string type = default; + IntegrationRuntimeReference connectVia = default; + string description = default; + IDictionary parameters = default; + IList annotations = default; + object host = default; + object port = default; + HiveServerType? serverType = default; + HiveThriftTransportProtocol? thriftTransportProtocol = default; + HiveAuthenticationType authenticationType = default; + object serviceDiscoveryMode = default; + object zooKeeperNameSpace = default; + object useNativeQuery = default; + object username = default; + SecretBase password = default; + object httpPath = default; + object enableSsl = default; + object trustedCertPath = default; + object useSystemTrustStore = default; + object allowHostNameCNMismatch = default; + object allowSelfSignedServerCert = default; + object encryptedCredential = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("connectVia")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("host")) + { + host = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("port")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + port = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("serverType")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + serverType = new HiveServerType(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("thriftTransportProtocol")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + thriftTransportProtocol = new HiveThriftTransportProtocol(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("authenticationType")) + { + authenticationType = new HiveAuthenticationType(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("serviceDiscoveryMode")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + serviceDiscoveryMode = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("zooKeeperNameSpace")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + zooKeeperNameSpace = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("useNativeQuery")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + useNativeQuery = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("username")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + username = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("password")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + password = SecretBase.DeserializeSecretBase(property0.Value); + continue; + } + if (property0.NameEquals("httpPath")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + httpPath = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("enableSsl")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + enableSsl = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("trustedCertPath")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + trustedCertPath = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("useSystemTrustStore")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + useSystemTrustStore = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("allowHostNameCNMismatch")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + allowHostNameCNMismatch = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("allowSelfSignedServerCert")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + allowSelfSignedServerCert = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("encryptedCredential")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + encryptedCredential = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new HiveLinkedService(type, connectVia, description, parameters, annotations, additionalProperties, host, port, serverType, thriftTransportProtocol, authenticationType, serviceDiscoveryMode, zooKeeperNameSpace, useNativeQuery, username, password, httpPath, enableSsl, trustedCertPath, useSystemTrustStore, allowHostNameCNMismatch, allowSelfSignedServerCert, encryptedCredential); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HiveLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HiveLinkedService.cs new file mode 100644 index 000000000000..585ddf15bee4 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HiveLinkedService.cs @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Hive Server linked service. + public partial class HiveLinkedService : LinkedService + { + /// Initializes a new instance of HiveLinkedService. + /// IP address or host name of the Hive server, separated by ';' for multiple hosts (only when serviceDiscoveryMode is enable). + /// The authentication method used to access the Hive server. + public HiveLinkedService(object host, HiveAuthenticationType authenticationType) + { + if (host == null) + { + throw new ArgumentNullException(nameof(host)); + } + + Host = host; + AuthenticationType = authenticationType; + Type = "Hive"; + } + + /// Initializes a new instance of HiveLinkedService. + /// Type of linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for describing the linked service. + /// . + /// IP address or host name of the Hive server, separated by ';' for multiple hosts (only when serviceDiscoveryMode is enable). + /// The TCP port that the Hive server uses to listen for client connections. + /// The type of Hive server. + /// The transport protocol to use in the Thrift layer. + /// The authentication method used to access the Hive server. + /// true to indicate using the ZooKeeper service, false not. + /// The namespace on ZooKeeper under which Hive Server 2 nodes are added. + /// Specifies whether the driver uses native HiveQL queries,or converts them into an equivalent form in HiveQL. + /// The user name that you use to access Hive Server. + /// The password corresponding to the user name that you provided in the Username field. + /// The partial URL corresponding to the Hive server. + /// Specifies whether the connections to the server are encrypted using SSL. The default value is false. + /// The full path of the .pem file containing trusted CA certificates for verifying the server when connecting over SSL. This property can only be set when using SSL on self-hosted IR. The default value is the cacerts.pem file installed with the IR. + /// Specifies whether to use a CA certificate from the system trust store or from a specified PEM file. The default value is false. + /// Specifies whether to require a CA-issued SSL certificate name to match the host name of the server when connecting over SSL. The default value is false. + /// Specifies whether to allow self-signed certificates from the server. The default value is false. + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + internal HiveLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object host, object port, HiveServerType? serverType, HiveThriftTransportProtocol? thriftTransportProtocol, HiveAuthenticationType authenticationType, object serviceDiscoveryMode, object zooKeeperNameSpace, object useNativeQuery, object username, SecretBase password, object httpPath, object enableSsl, object trustedCertPath, object useSystemTrustStore, object allowHostNameCNMismatch, object allowSelfSignedServerCert, object encryptedCredential) : base(type, connectVia, description, parameters, annotations, additionalProperties) + { + Host = host; + Port = port; + ServerType = serverType; + ThriftTransportProtocol = thriftTransportProtocol; + AuthenticationType = authenticationType; + ServiceDiscoveryMode = serviceDiscoveryMode; + ZooKeeperNameSpace = zooKeeperNameSpace; + UseNativeQuery = useNativeQuery; + Username = username; + Password = password; + HttpPath = httpPath; + EnableSsl = enableSsl; + TrustedCertPath = trustedCertPath; + UseSystemTrustStore = useSystemTrustStore; + AllowHostNameCNMismatch = allowHostNameCNMismatch; + AllowSelfSignedServerCert = allowSelfSignedServerCert; + EncryptedCredential = encryptedCredential; + Type = type ?? "Hive"; + } + + /// IP address or host name of the Hive server, separated by ';' for multiple hosts (only when serviceDiscoveryMode is enable). + public object Host { get; set; } + /// The TCP port that the Hive server uses to listen for client connections. + public object Port { get; set; } + /// The type of Hive server. + public HiveServerType? ServerType { get; set; } + /// The transport protocol to use in the Thrift layer. + public HiveThriftTransportProtocol? ThriftTransportProtocol { get; set; } + /// The authentication method used to access the Hive server. + public HiveAuthenticationType AuthenticationType { get; set; } + /// true to indicate using the ZooKeeper service, false not. + public object ServiceDiscoveryMode { get; set; } + /// The namespace on ZooKeeper under which Hive Server 2 nodes are added. + public object ZooKeeperNameSpace { get; set; } + /// Specifies whether the driver uses native HiveQL queries,or converts them into an equivalent form in HiveQL. + public object UseNativeQuery { get; set; } + /// The user name that you use to access Hive Server. + public object Username { get; set; } + /// The password corresponding to the user name that you provided in the Username field. + public SecretBase Password { get; set; } + /// The partial URL corresponding to the Hive server. + public object HttpPath { get; set; } + /// Specifies whether the connections to the server are encrypted using SSL. The default value is false. + public object EnableSsl { get; set; } + /// The full path of the .pem file containing trusted CA certificates for verifying the server when connecting over SSL. This property can only be set when using SSL on self-hosted IR. The default value is the cacerts.pem file installed with the IR. + public object TrustedCertPath { get; set; } + /// Specifies whether to use a CA certificate from the system trust store or from a specified PEM file. The default value is false. + public object UseSystemTrustStore { get; set; } + /// Specifies whether to require a CA-issued SSL certificate name to match the host name of the server when connecting over SSL. The default value is false. + public object AllowHostNameCNMismatch { get; set; } + /// Specifies whether to allow self-signed certificates from the server. The default value is false. + public object AllowSelfSignedServerCert { get; set; } + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + public object EncryptedCredential { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HiveObjectDataset.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HiveObjectDataset.Serialization.cs new file mode 100644 index 000000000000..ec31e489d3a4 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HiveObjectDataset.Serialization.cs @@ -0,0 +1,243 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class HiveObjectDataset : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Structure != null) + { + writer.WritePropertyName("structure"); + writer.WriteObjectValue(Structure); + } + if (Schema != null) + { + writer.WritePropertyName("schema"); + writer.WriteObjectValue(Schema); + } + writer.WritePropertyName("linkedServiceName"); + writer.WriteObjectValue(LinkedServiceName); + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Folder != null) + { + writer.WritePropertyName("folder"); + writer.WriteObjectValue(Folder); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + if (TableName != null) + { + writer.WritePropertyName("tableName"); + writer.WriteObjectValue(TableName); + } + if (Table != null) + { + writer.WritePropertyName("table"); + writer.WriteObjectValue(Table); + } + if (SchemaTypePropertiesSchema != null) + { + writer.WritePropertyName("schema"); + writer.WriteObjectValue(SchemaTypePropertiesSchema); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static HiveObjectDataset DeserializeHiveObjectDataset(JsonElement element) + { + string type = default; + string description = default; + object structure = default; + object schema = default; + LinkedServiceReference linkedServiceName = default; + IDictionary parameters = default; + IList annotations = default; + DatasetFolder folder = default; + object tableName = default; + object table = default; + object schema0 = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("structure")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + structure = property.Value.GetObject(); + continue; + } + if (property.NameEquals("schema")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + schema = property.Value.GetObject(); + continue; + } + if (property.NameEquals("linkedServiceName")) + { + linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("folder")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + folder = DatasetFolder.DeserializeDatasetFolder(property.Value); + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("tableName")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + tableName = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("table")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + table = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("schema")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + schema0 = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new HiveObjectDataset(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties, tableName, table, schema0); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HiveObjectDataset.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HiveObjectDataset.cs new file mode 100644 index 000000000000..2a57c8071efd --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HiveObjectDataset.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Hive Server dataset. + public partial class HiveObjectDataset : Dataset + { + /// Initializes a new instance of HiveObjectDataset. + /// Linked service reference. + public HiveObjectDataset(LinkedServiceReference linkedServiceName) : base(linkedServiceName) + { + if (linkedServiceName == null) + { + throw new ArgumentNullException(nameof(linkedServiceName)); + } + + Type = "HiveObject"; + } + + /// Initializes a new instance of HiveObjectDataset. + /// Type of dataset. + /// Dataset description. + /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. + /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. + /// Linked service reference. + /// Parameters for dataset. + /// List of tags that can be used for describing the Dataset. + /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. + /// . + /// This property will be retired. Please consider using schema + table properties instead. + /// The table name of the Hive. Type: string (or Expression with resultType string). + /// The schema name of the Hive. Type: string (or Expression with resultType string). + internal HiveObjectDataset(string type, string description, object structure, object schema, LinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary additionalProperties, object tableName, object table, object schemaTypePropertiesSchema) : base(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) + { + TableName = tableName; + Table = table; + SchemaTypePropertiesSchema = schemaTypePropertiesSchema; + Type = type ?? "HiveObject"; + } + + /// This property will be retired. Please consider using schema + table properties instead. + public object TableName { get; set; } + /// The table name of the Hive. Type: string (or Expression with resultType string). + public object Table { get; set; } + /// The schema name of the Hive. Type: string (or Expression with resultType string). + public object SchemaTypePropertiesSchema { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HiveServerType.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HiveServerType.cs new file mode 100644 index 000000000000..8ba039654cb3 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HiveServerType.cs @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// The type of Hive server. + public readonly partial struct HiveServerType : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + public HiveServerType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string HiveServer1Value = "HiveServer1"; + private const string HiveServer2Value = "HiveServer2"; + private const string HiveThriftServerValue = "HiveThriftServer"; + + /// HiveServer1. + public static HiveServerType HiveServer1 { get; } = new HiveServerType(HiveServer1Value); + /// HiveServer2. + public static HiveServerType HiveServer2 { get; } = new HiveServerType(HiveServer2Value); + /// HiveThriftServer. + public static HiveServerType HiveThriftServer { get; } = new HiveServerType(HiveThriftServerValue); + /// Determines if two values are the same. + public static bool operator ==(HiveServerType left, HiveServerType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(HiveServerType left, HiveServerType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator HiveServerType(string value) => new HiveServerType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is HiveServerType other && Equals(other); + /// + public bool Equals(HiveServerType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HiveThriftTransportProtocol.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HiveThriftTransportProtocol.cs new file mode 100644 index 000000000000..40603e0007f3 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HiveThriftTransportProtocol.cs @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// The transport protocol to use in the Thrift layer. + public readonly partial struct HiveThriftTransportProtocol : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + public HiveThriftTransportProtocol(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string BinaryValue = "Binary"; + private const string SaslValue = "SASL"; + private const string HttpValue = "HTTP "; + + /// Binary. + public static HiveThriftTransportProtocol Binary { get; } = new HiveThriftTransportProtocol(BinaryValue); + /// SASL. + public static HiveThriftTransportProtocol Sasl { get; } = new HiveThriftTransportProtocol(SaslValue); + /// HTTP. + public static HiveThriftTransportProtocol Http { get; } = new HiveThriftTransportProtocol(HttpValue); + /// Determines if two values are the same. + public static bool operator ==(HiveThriftTransportProtocol left, HiveThriftTransportProtocol right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(HiveThriftTransportProtocol left, HiveThriftTransportProtocol right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator HiveThriftTransportProtocol(string value) => new HiveThriftTransportProtocol(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is HiveThriftTransportProtocol other && Equals(other); + /// + public bool Equals(HiveThriftTransportProtocol other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HttpAuthenticationType.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HttpAuthenticationType.cs new file mode 100644 index 000000000000..ecd54f8097e9 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HttpAuthenticationType.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// The authentication type to be used to connect to the HTTP server. + public readonly partial struct HttpAuthenticationType : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + public HttpAuthenticationType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string BasicValue = "Basic"; + private const string AnonymousValue = "Anonymous"; + private const string DigestValue = "Digest"; + private const string WindowsValue = "Windows"; + private const string ClientCertificateValue = "ClientCertificate"; + + /// Basic. + public static HttpAuthenticationType Basic { get; } = new HttpAuthenticationType(BasicValue); + /// Anonymous. + public static HttpAuthenticationType Anonymous { get; } = new HttpAuthenticationType(AnonymousValue); + /// Digest. + public static HttpAuthenticationType Digest { get; } = new HttpAuthenticationType(DigestValue); + /// Windows. + public static HttpAuthenticationType Windows { get; } = new HttpAuthenticationType(WindowsValue); + /// ClientCertificate. + public static HttpAuthenticationType ClientCertificate { get; } = new HttpAuthenticationType(ClientCertificateValue); + /// Determines if two values are the same. + public static bool operator ==(HttpAuthenticationType left, HttpAuthenticationType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(HttpAuthenticationType left, HttpAuthenticationType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator HttpAuthenticationType(string value) => new HttpAuthenticationType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is HttpAuthenticationType other && Equals(other); + /// + public bool Equals(HttpAuthenticationType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HttpLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HttpLinkedService.Serialization.cs new file mode 100644 index 000000000000..6eed31a1cc0d --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HttpLinkedService.Serialization.cs @@ -0,0 +1,273 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class HttpLinkedService : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (ConnectVia != null) + { + writer.WritePropertyName("connectVia"); + writer.WriteObjectValue(ConnectVia); + } + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + writer.WritePropertyName("url"); + writer.WriteObjectValue(Url); + if (AuthenticationType != null) + { + writer.WritePropertyName("authenticationType"); + writer.WriteStringValue(AuthenticationType.Value.ToString()); + } + if (UserName != null) + { + writer.WritePropertyName("userName"); + writer.WriteObjectValue(UserName); + } + if (Password != null) + { + writer.WritePropertyName("password"); + writer.WriteObjectValue(Password); + } + if (EmbeddedCertData != null) + { + writer.WritePropertyName("embeddedCertData"); + writer.WriteObjectValue(EmbeddedCertData); + } + if (CertThumbprint != null) + { + writer.WritePropertyName("certThumbprint"); + writer.WriteObjectValue(CertThumbprint); + } + if (EncryptedCredential != null) + { + writer.WritePropertyName("encryptedCredential"); + writer.WriteObjectValue(EncryptedCredential); + } + if (EnableServerCertificateValidation != null) + { + writer.WritePropertyName("enableServerCertificateValidation"); + writer.WriteObjectValue(EnableServerCertificateValidation); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static HttpLinkedService DeserializeHttpLinkedService(JsonElement element) + { + string type = default; + IntegrationRuntimeReference connectVia = default; + string description = default; + IDictionary parameters = default; + IList annotations = default; + object url = default; + HttpAuthenticationType? authenticationType = default; + object userName = default; + SecretBase password = default; + object embeddedCertData = default; + object certThumbprint = default; + object encryptedCredential = default; + object enableServerCertificateValidation = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("connectVia")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("url")) + { + url = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("authenticationType")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + authenticationType = new HttpAuthenticationType(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("userName")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + userName = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("password")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + password = SecretBase.DeserializeSecretBase(property0.Value); + continue; + } + if (property0.NameEquals("embeddedCertData")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + embeddedCertData = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("certThumbprint")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + certThumbprint = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("encryptedCredential")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + encryptedCredential = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("enableServerCertificateValidation")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + enableServerCertificateValidation = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new HttpLinkedService(type, connectVia, description, parameters, annotations, additionalProperties, url, authenticationType, userName, password, embeddedCertData, certThumbprint, encryptedCredential, enableServerCertificateValidation); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HttpLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HttpLinkedService.cs new file mode 100644 index 000000000000..cefdd385e023 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HttpLinkedService.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Linked service for an HTTP source. + public partial class HttpLinkedService : LinkedService + { + /// Initializes a new instance of HttpLinkedService. + /// The base URL of the HTTP endpoint, e.g. http://www.microsoft.com. Type: string (or Expression with resultType string). + public HttpLinkedService(object url) + { + if (url == null) + { + throw new ArgumentNullException(nameof(url)); + } + + Url = url; + Type = "HttpServer"; + } + + /// Initializes a new instance of HttpLinkedService. + /// Type of linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for describing the linked service. + /// . + /// The base URL of the HTTP endpoint, e.g. http://www.microsoft.com. Type: string (or Expression with resultType string). + /// The authentication type to be used to connect to the HTTP server. + /// User name for Basic, Digest, or Windows authentication. Type: string (or Expression with resultType string). + /// Password for Basic, Digest, Windows, or ClientCertificate with EmbeddedCertData authentication. + /// Base64 encoded certificate data for ClientCertificate authentication. For on-premises copy with ClientCertificate authentication, either CertThumbprint or EmbeddedCertData/Password should be specified. Type: string (or Expression with resultType string). + /// Thumbprint of certificate for ClientCertificate authentication. Only valid for on-premises copy. For on-premises copy with ClientCertificate authentication, either CertThumbprint or EmbeddedCertData/Password should be specified. Type: string (or Expression with resultType string). + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + /// If true, validate the HTTPS server SSL certificate. Default value is true. Type: boolean (or Expression with resultType boolean). + internal HttpLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object url, HttpAuthenticationType? authenticationType, object userName, SecretBase password, object embeddedCertData, object certThumbprint, object encryptedCredential, object enableServerCertificateValidation) : base(type, connectVia, description, parameters, annotations, additionalProperties) + { + Url = url; + AuthenticationType = authenticationType; + UserName = userName; + Password = password; + EmbeddedCertData = embeddedCertData; + CertThumbprint = certThumbprint; + EncryptedCredential = encryptedCredential; + EnableServerCertificateValidation = enableServerCertificateValidation; + Type = type ?? "HttpServer"; + } + + /// The base URL of the HTTP endpoint, e.g. http://www.microsoft.com. Type: string (or Expression with resultType string). + public object Url { get; set; } + /// The authentication type to be used to connect to the HTTP server. + public HttpAuthenticationType? AuthenticationType { get; set; } + /// User name for Basic, Digest, or Windows authentication. Type: string (or Expression with resultType string). + public object UserName { get; set; } + /// Password for Basic, Digest, Windows, or ClientCertificate with EmbeddedCertData authentication. + public SecretBase Password { get; set; } + /// Base64 encoded certificate data for ClientCertificate authentication. For on-premises copy with ClientCertificate authentication, either CertThumbprint or EmbeddedCertData/Password should be specified. Type: string (or Expression with resultType string). + public object EmbeddedCertData { get; set; } + /// Thumbprint of certificate for ClientCertificate authentication. Only valid for on-premises copy. For on-premises copy with ClientCertificate authentication, either CertThumbprint or EmbeddedCertData/Password should be specified. Type: string (or Expression with resultType string). + public object CertThumbprint { get; set; } + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + public object EncryptedCredential { get; set; } + /// If true, validate the HTTPS server SSL certificate. Default value is true. Type: boolean (or Expression with resultType boolean). + public object EnableServerCertificateValidation { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HubspotLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HubspotLinkedService.Serialization.cs new file mode 100644 index 000000000000..8f8fb2f9aae5 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HubspotLinkedService.Serialization.cs @@ -0,0 +1,273 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class HubspotLinkedService : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (ConnectVia != null) + { + writer.WritePropertyName("connectVia"); + writer.WriteObjectValue(ConnectVia); + } + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + writer.WritePropertyName("clientId"); + writer.WriteObjectValue(ClientId); + if (ClientSecret != null) + { + writer.WritePropertyName("clientSecret"); + writer.WriteObjectValue(ClientSecret); + } + if (AccessToken != null) + { + writer.WritePropertyName("accessToken"); + writer.WriteObjectValue(AccessToken); + } + if (RefreshToken != null) + { + writer.WritePropertyName("refreshToken"); + writer.WriteObjectValue(RefreshToken); + } + if (UseEncryptedEndpoints != null) + { + writer.WritePropertyName("useEncryptedEndpoints"); + writer.WriteObjectValue(UseEncryptedEndpoints); + } + if (UseHostVerification != null) + { + writer.WritePropertyName("useHostVerification"); + writer.WriteObjectValue(UseHostVerification); + } + if (UsePeerVerification != null) + { + writer.WritePropertyName("usePeerVerification"); + writer.WriteObjectValue(UsePeerVerification); + } + if (EncryptedCredential != null) + { + writer.WritePropertyName("encryptedCredential"); + writer.WriteObjectValue(EncryptedCredential); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static HubspotLinkedService DeserializeHubspotLinkedService(JsonElement element) + { + string type = default; + IntegrationRuntimeReference connectVia = default; + string description = default; + IDictionary parameters = default; + IList annotations = default; + object clientId = default; + SecretBase clientSecret = default; + SecretBase accessToken = default; + SecretBase refreshToken = default; + object useEncryptedEndpoints = default; + object useHostVerification = default; + object usePeerVerification = default; + object encryptedCredential = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("connectVia")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("clientId")) + { + clientId = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("clientSecret")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + clientSecret = SecretBase.DeserializeSecretBase(property0.Value); + continue; + } + if (property0.NameEquals("accessToken")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + accessToken = SecretBase.DeserializeSecretBase(property0.Value); + continue; + } + if (property0.NameEquals("refreshToken")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + refreshToken = SecretBase.DeserializeSecretBase(property0.Value); + continue; + } + if (property0.NameEquals("useEncryptedEndpoints")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + useEncryptedEndpoints = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("useHostVerification")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + useHostVerification = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("usePeerVerification")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + usePeerVerification = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("encryptedCredential")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + encryptedCredential = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new HubspotLinkedService(type, connectVia, description, parameters, annotations, additionalProperties, clientId, clientSecret, accessToken, refreshToken, useEncryptedEndpoints, useHostVerification, usePeerVerification, encryptedCredential); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HubspotLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HubspotLinkedService.cs new file mode 100644 index 000000000000..2b2e89e23006 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HubspotLinkedService.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Hubspot Service linked service. + public partial class HubspotLinkedService : LinkedService + { + /// Initializes a new instance of HubspotLinkedService. + /// The client ID associated with your Hubspot application. + public HubspotLinkedService(object clientId) + { + if (clientId == null) + { + throw new ArgumentNullException(nameof(clientId)); + } + + ClientId = clientId; + Type = "Hubspot"; + } + + /// Initializes a new instance of HubspotLinkedService. + /// Type of linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for describing the linked service. + /// . + /// The client ID associated with your Hubspot application. + /// The client secret associated with your Hubspot application. + /// The access token obtained when initially authenticating your OAuth integration. + /// The refresh token obtained when initially authenticating your OAuth integration. + /// Specifies whether the data source endpoints are encrypted using HTTPS. The default value is true. + /// Specifies whether to require the host name in the server's certificate to match the host name of the server when connecting over SSL. The default value is true. + /// Specifies whether to verify the identity of the server when connecting over SSL. The default value is true. + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + internal HubspotLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object clientId, SecretBase clientSecret, SecretBase accessToken, SecretBase refreshToken, object useEncryptedEndpoints, object useHostVerification, object usePeerVerification, object encryptedCredential) : base(type, connectVia, description, parameters, annotations, additionalProperties) + { + ClientId = clientId; + ClientSecret = clientSecret; + AccessToken = accessToken; + RefreshToken = refreshToken; + UseEncryptedEndpoints = useEncryptedEndpoints; + UseHostVerification = useHostVerification; + UsePeerVerification = usePeerVerification; + EncryptedCredential = encryptedCredential; + Type = type ?? "Hubspot"; + } + + /// The client ID associated with your Hubspot application. + public object ClientId { get; set; } + /// The client secret associated with your Hubspot application. + public SecretBase ClientSecret { get; set; } + /// The access token obtained when initially authenticating your OAuth integration. + public SecretBase AccessToken { get; set; } + /// The refresh token obtained when initially authenticating your OAuth integration. + public SecretBase RefreshToken { get; set; } + /// Specifies whether the data source endpoints are encrypted using HTTPS. The default value is true. + public object UseEncryptedEndpoints { get; set; } + /// Specifies whether to require the host name in the server's certificate to match the host name of the server when connecting over SSL. The default value is true. + public object UseHostVerification { get; set; } + /// Specifies whether to verify the identity of the server when connecting over SSL. The default value is true. + public object UsePeerVerification { get; set; } + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + public object EncryptedCredential { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HubspotObjectDataset.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HubspotObjectDataset.Serialization.cs new file mode 100644 index 000000000000..598448ce5a45 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HubspotObjectDataset.Serialization.cs @@ -0,0 +1,213 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class HubspotObjectDataset : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Structure != null) + { + writer.WritePropertyName("structure"); + writer.WriteObjectValue(Structure); + } + if (Schema != null) + { + writer.WritePropertyName("schema"); + writer.WriteObjectValue(Schema); + } + writer.WritePropertyName("linkedServiceName"); + writer.WriteObjectValue(LinkedServiceName); + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Folder != null) + { + writer.WritePropertyName("folder"); + writer.WriteObjectValue(Folder); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + if (TableName != null) + { + writer.WritePropertyName("tableName"); + writer.WriteObjectValue(TableName); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static HubspotObjectDataset DeserializeHubspotObjectDataset(JsonElement element) + { + string type = default; + string description = default; + object structure = default; + object schema = default; + LinkedServiceReference linkedServiceName = default; + IDictionary parameters = default; + IList annotations = default; + DatasetFolder folder = default; + object tableName = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("structure")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + structure = property.Value.GetObject(); + continue; + } + if (property.NameEquals("schema")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + schema = property.Value.GetObject(); + continue; + } + if (property.NameEquals("linkedServiceName")) + { + linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("folder")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + folder = DatasetFolder.DeserializeDatasetFolder(property.Value); + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("tableName")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + tableName = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new HubspotObjectDataset(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties, tableName); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HubspotObjectDataset.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HubspotObjectDataset.cs new file mode 100644 index 000000000000..d4e4f481735c --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HubspotObjectDataset.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Hubspot Service dataset. + public partial class HubspotObjectDataset : Dataset + { + /// Initializes a new instance of HubspotObjectDataset. + /// Linked service reference. + public HubspotObjectDataset(LinkedServiceReference linkedServiceName) : base(linkedServiceName) + { + if (linkedServiceName == null) + { + throw new ArgumentNullException(nameof(linkedServiceName)); + } + + Type = "HubspotObject"; + } + + /// Initializes a new instance of HubspotObjectDataset. + /// Type of dataset. + /// Dataset description. + /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. + /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. + /// Linked service reference. + /// Parameters for dataset. + /// List of tags that can be used for describing the Dataset. + /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. + /// . + /// The table name. Type: string (or Expression with resultType string). + internal HubspotObjectDataset(string type, string description, object structure, object schema, LinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary additionalProperties, object tableName) : base(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) + { + TableName = tableName; + Type = type ?? "HubspotObject"; + } + + /// The table name. Type: string (or Expression with resultType string). + public object TableName { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/IfConditionActivity.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/IfConditionActivity.Serialization.cs new file mode 100644 index 000000000000..5e36d47df976 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/IfConditionActivity.Serialization.cs @@ -0,0 +1,224 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class IfConditionActivity : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("name"); + writer.WriteStringValue(Name); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (DependsOn != null) + { + writer.WritePropertyName("dependsOn"); + writer.WriteStartArray(); + foreach (var item in DependsOn) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (UserProperties != null) + { + writer.WritePropertyName("userProperties"); + writer.WriteStartArray(); + foreach (var item in UserProperties) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + writer.WritePropertyName("expression"); + writer.WriteObjectValue(Expression); + if (IfTrueActivities != null) + { + writer.WritePropertyName("ifTrueActivities"); + writer.WriteStartArray(); + foreach (var item in IfTrueActivities) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (IfFalseActivities != null) + { + writer.WritePropertyName("ifFalseActivities"); + writer.WriteStartArray(); + foreach (var item in IfFalseActivities) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static IfConditionActivity DeserializeIfConditionActivity(JsonElement element) + { + string name = default; + string type = default; + string description = default; + IList dependsOn = default; + IList userProperties = default; + Expression expression = default; + IList ifTrueActivities = default; + IList ifFalseActivities = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("dependsOn")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(ActivityDependency.DeserializeActivityDependency(item)); + } + } + dependsOn = array; + continue; + } + if (property.NameEquals("userProperties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(UserProperty.DeserializeUserProperty(item)); + } + } + userProperties = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("expression")) + { + expression = Expression.DeserializeExpression(property0.Value); + continue; + } + if (property0.NameEquals("ifTrueActivities")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(DeserializeActivity(item)); + } + } + ifTrueActivities = array; + continue; + } + if (property0.NameEquals("ifFalseActivities")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(DeserializeActivity(item)); + } + } + ifFalseActivities = array; + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new IfConditionActivity(name, type, description, dependsOn, userProperties, additionalProperties, expression, ifTrueActivities, ifFalseActivities); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/IfConditionActivity.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/IfConditionActivity.cs new file mode 100644 index 000000000000..12f5a405045b --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/IfConditionActivity.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// This activity evaluates a boolean expression and executes either the activities under the ifTrueActivities property or the ifFalseActivities property depending on the result of the expression. + public partial class IfConditionActivity : Activity + { + /// Initializes a new instance of IfConditionActivity. + /// Activity name. + /// An expression that would evaluate to Boolean. This is used to determine the block of activities (ifTrueActivities or ifFalseActivities) that will be executed. + public IfConditionActivity(string name, Expression expression) : base(name) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (expression == null) + { + throw new ArgumentNullException(nameof(expression)); + } + + Expression = expression; + Type = "IfCondition"; + } + + /// Initializes a new instance of IfConditionActivity. + /// Activity name. + /// Type of activity. + /// Activity description. + /// Activity depends on condition. + /// Activity user properties. + /// . + /// An expression that would evaluate to Boolean. This is used to determine the block of activities (ifTrueActivities or ifFalseActivities) that will be executed. + /// List of activities to execute if expression is evaluated to true. This is an optional property and if not provided, the activity will exit without any action. + /// List of activities to execute if expression is evaluated to false. This is an optional property and if not provided, the activity will exit without any action. + internal IfConditionActivity(string name, string type, string description, IList dependsOn, IList userProperties, IDictionary additionalProperties, Expression expression, IList ifTrueActivities, IList ifFalseActivities) : base(name, type, description, dependsOn, userProperties, additionalProperties) + { + Expression = expression; + IfTrueActivities = ifTrueActivities; + IfFalseActivities = ifFalseActivities; + Type = type ?? "IfCondition"; + } + + /// An expression that would evaluate to Boolean. This is used to determine the block of activities (ifTrueActivities or ifFalseActivities) that will be executed. + public Expression Expression { get; set; } + /// List of activities to execute if expression is evaluated to true. This is an optional property and if not provided, the activity will exit without any action. + public IList IfTrueActivities { get; set; } + /// List of activities to execute if expression is evaluated to false. This is an optional property and if not provided, the activity will exit without any action. + public IList IfFalseActivities { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ImpalaAuthenticationType.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ImpalaAuthenticationType.cs new file mode 100644 index 000000000000..175fa0183901 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ImpalaAuthenticationType.cs @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// The authentication type to use. + public readonly partial struct ImpalaAuthenticationType : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + public ImpalaAuthenticationType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AnonymousValue = "Anonymous"; + private const string SaslUsernameValue = "SASLUsername"; + private const string UsernameAndPasswordValue = "UsernameAndPassword"; + + /// Anonymous. + public static ImpalaAuthenticationType Anonymous { get; } = new ImpalaAuthenticationType(AnonymousValue); + /// SASLUsername. + public static ImpalaAuthenticationType SaslUsername { get; } = new ImpalaAuthenticationType(SaslUsernameValue); + /// UsernameAndPassword. + public static ImpalaAuthenticationType UsernameAndPassword { get; } = new ImpalaAuthenticationType(UsernameAndPasswordValue); + /// Determines if two values are the same. + public static bool operator ==(ImpalaAuthenticationType left, ImpalaAuthenticationType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ImpalaAuthenticationType left, ImpalaAuthenticationType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator ImpalaAuthenticationType(string value) => new ImpalaAuthenticationType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ImpalaAuthenticationType other && Equals(other); + /// + public bool Equals(ImpalaAuthenticationType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ImpalaLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ImpalaLinkedService.Serialization.cs new file mode 100644 index 000000000000..35295516ba6f --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ImpalaLinkedService.Serialization.cs @@ -0,0 +1,311 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class ImpalaLinkedService : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (ConnectVia != null) + { + writer.WritePropertyName("connectVia"); + writer.WriteObjectValue(ConnectVia); + } + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + writer.WritePropertyName("host"); + writer.WriteObjectValue(Host); + if (Port != null) + { + writer.WritePropertyName("port"); + writer.WriteObjectValue(Port); + } + writer.WritePropertyName("authenticationType"); + writer.WriteStringValue(AuthenticationType.ToString()); + if (Username != null) + { + writer.WritePropertyName("username"); + writer.WriteObjectValue(Username); + } + if (Password != null) + { + writer.WritePropertyName("password"); + writer.WriteObjectValue(Password); + } + if (EnableSsl != null) + { + writer.WritePropertyName("enableSsl"); + writer.WriteObjectValue(EnableSsl); + } + if (TrustedCertPath != null) + { + writer.WritePropertyName("trustedCertPath"); + writer.WriteObjectValue(TrustedCertPath); + } + if (UseSystemTrustStore != null) + { + writer.WritePropertyName("useSystemTrustStore"); + writer.WriteObjectValue(UseSystemTrustStore); + } + if (AllowHostNameCNMismatch != null) + { + writer.WritePropertyName("allowHostNameCNMismatch"); + writer.WriteObjectValue(AllowHostNameCNMismatch); + } + if (AllowSelfSignedServerCert != null) + { + writer.WritePropertyName("allowSelfSignedServerCert"); + writer.WriteObjectValue(AllowSelfSignedServerCert); + } + if (EncryptedCredential != null) + { + writer.WritePropertyName("encryptedCredential"); + writer.WriteObjectValue(EncryptedCredential); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static ImpalaLinkedService DeserializeImpalaLinkedService(JsonElement element) + { + string type = default; + IntegrationRuntimeReference connectVia = default; + string description = default; + IDictionary parameters = default; + IList annotations = default; + object host = default; + object port = default; + ImpalaAuthenticationType authenticationType = default; + object username = default; + SecretBase password = default; + object enableSsl = default; + object trustedCertPath = default; + object useSystemTrustStore = default; + object allowHostNameCNMismatch = default; + object allowSelfSignedServerCert = default; + object encryptedCredential = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("connectVia")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("host")) + { + host = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("port")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + port = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("authenticationType")) + { + authenticationType = new ImpalaAuthenticationType(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("username")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + username = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("password")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + password = SecretBase.DeserializeSecretBase(property0.Value); + continue; + } + if (property0.NameEquals("enableSsl")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + enableSsl = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("trustedCertPath")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + trustedCertPath = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("useSystemTrustStore")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + useSystemTrustStore = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("allowHostNameCNMismatch")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + allowHostNameCNMismatch = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("allowSelfSignedServerCert")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + allowSelfSignedServerCert = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("encryptedCredential")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + encryptedCredential = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new ImpalaLinkedService(type, connectVia, description, parameters, annotations, additionalProperties, host, port, authenticationType, username, password, enableSsl, trustedCertPath, useSystemTrustStore, allowHostNameCNMismatch, allowSelfSignedServerCert, encryptedCredential); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ImpalaLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ImpalaLinkedService.cs new file mode 100644 index 000000000000..88135ed76faa --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ImpalaLinkedService.cs @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Impala server linked service. + public partial class ImpalaLinkedService : LinkedService + { + /// Initializes a new instance of ImpalaLinkedService. + /// The IP address or host name of the Impala server. (i.e. 192.168.222.160). + /// The authentication type to use. + public ImpalaLinkedService(object host, ImpalaAuthenticationType authenticationType) + { + if (host == null) + { + throw new ArgumentNullException(nameof(host)); + } + + Host = host; + AuthenticationType = authenticationType; + Type = "Impala"; + } + + /// Initializes a new instance of ImpalaLinkedService. + /// Type of linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for describing the linked service. + /// . + /// The IP address or host name of the Impala server. (i.e. 192.168.222.160). + /// The TCP port that the Impala server uses to listen for client connections. The default value is 21050. + /// The authentication type to use. + /// The user name used to access the Impala server. The default value is anonymous when using SASLUsername. + /// The password corresponding to the user name when using UsernameAndPassword. + /// Specifies whether the connections to the server are encrypted using SSL. The default value is false. + /// The full path of the .pem file containing trusted CA certificates for verifying the server when connecting over SSL. This property can only be set when using SSL on self-hosted IR. The default value is the cacerts.pem file installed with the IR. + /// Specifies whether to use a CA certificate from the system trust store or from a specified PEM file. The default value is false. + /// Specifies whether to require a CA-issued SSL certificate name to match the host name of the server when connecting over SSL. The default value is false. + /// Specifies whether to allow self-signed certificates from the server. The default value is false. + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + internal ImpalaLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object host, object port, ImpalaAuthenticationType authenticationType, object username, SecretBase password, object enableSsl, object trustedCertPath, object useSystemTrustStore, object allowHostNameCNMismatch, object allowSelfSignedServerCert, object encryptedCredential) : base(type, connectVia, description, parameters, annotations, additionalProperties) + { + Host = host; + Port = port; + AuthenticationType = authenticationType; + Username = username; + Password = password; + EnableSsl = enableSsl; + TrustedCertPath = trustedCertPath; + UseSystemTrustStore = useSystemTrustStore; + AllowHostNameCNMismatch = allowHostNameCNMismatch; + AllowSelfSignedServerCert = allowSelfSignedServerCert; + EncryptedCredential = encryptedCredential; + Type = type ?? "Impala"; + } + + /// The IP address or host name of the Impala server. (i.e. 192.168.222.160). + public object Host { get; set; } + /// The TCP port that the Impala server uses to listen for client connections. The default value is 21050. + public object Port { get; set; } + /// The authentication type to use. + public ImpalaAuthenticationType AuthenticationType { get; set; } + /// The user name used to access the Impala server. The default value is anonymous when using SASLUsername. + public object Username { get; set; } + /// The password corresponding to the user name when using UsernameAndPassword. + public SecretBase Password { get; set; } + /// Specifies whether the connections to the server are encrypted using SSL. The default value is false. + public object EnableSsl { get; set; } + /// The full path of the .pem file containing trusted CA certificates for verifying the server when connecting over SSL. This property can only be set when using SSL on self-hosted IR. The default value is the cacerts.pem file installed with the IR. + public object TrustedCertPath { get; set; } + /// Specifies whether to use a CA certificate from the system trust store or from a specified PEM file. The default value is false. + public object UseSystemTrustStore { get; set; } + /// Specifies whether to require a CA-issued SSL certificate name to match the host name of the server when connecting over SSL. The default value is false. + public object AllowHostNameCNMismatch { get; set; } + /// Specifies whether to allow self-signed certificates from the server. The default value is false. + public object AllowSelfSignedServerCert { get; set; } + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + public object EncryptedCredential { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ImpalaObjectDataset.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ImpalaObjectDataset.Serialization.cs new file mode 100644 index 000000000000..9bcc7295935b --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ImpalaObjectDataset.Serialization.cs @@ -0,0 +1,243 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class ImpalaObjectDataset : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Structure != null) + { + writer.WritePropertyName("structure"); + writer.WriteObjectValue(Structure); + } + if (Schema != null) + { + writer.WritePropertyName("schema"); + writer.WriteObjectValue(Schema); + } + writer.WritePropertyName("linkedServiceName"); + writer.WriteObjectValue(LinkedServiceName); + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Folder != null) + { + writer.WritePropertyName("folder"); + writer.WriteObjectValue(Folder); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + if (TableName != null) + { + writer.WritePropertyName("tableName"); + writer.WriteObjectValue(TableName); + } + if (Table != null) + { + writer.WritePropertyName("table"); + writer.WriteObjectValue(Table); + } + if (SchemaTypePropertiesSchema != null) + { + writer.WritePropertyName("schema"); + writer.WriteObjectValue(SchemaTypePropertiesSchema); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static ImpalaObjectDataset DeserializeImpalaObjectDataset(JsonElement element) + { + string type = default; + string description = default; + object structure = default; + object schema = default; + LinkedServiceReference linkedServiceName = default; + IDictionary parameters = default; + IList annotations = default; + DatasetFolder folder = default; + object tableName = default; + object table = default; + object schema0 = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("structure")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + structure = property.Value.GetObject(); + continue; + } + if (property.NameEquals("schema")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + schema = property.Value.GetObject(); + continue; + } + if (property.NameEquals("linkedServiceName")) + { + linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("folder")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + folder = DatasetFolder.DeserializeDatasetFolder(property.Value); + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("tableName")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + tableName = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("table")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + table = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("schema")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + schema0 = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new ImpalaObjectDataset(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties, tableName, table, schema0); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ImpalaObjectDataset.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ImpalaObjectDataset.cs new file mode 100644 index 000000000000..2ff922d7a2f5 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ImpalaObjectDataset.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Impala server dataset. + public partial class ImpalaObjectDataset : Dataset + { + /// Initializes a new instance of ImpalaObjectDataset. + /// Linked service reference. + public ImpalaObjectDataset(LinkedServiceReference linkedServiceName) : base(linkedServiceName) + { + if (linkedServiceName == null) + { + throw new ArgumentNullException(nameof(linkedServiceName)); + } + + Type = "ImpalaObject"; + } + + /// Initializes a new instance of ImpalaObjectDataset. + /// Type of dataset. + /// Dataset description. + /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. + /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. + /// Linked service reference. + /// Parameters for dataset. + /// List of tags that can be used for describing the Dataset. + /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. + /// . + /// This property will be retired. Please consider using schema + table properties instead. + /// The table name of the Impala. Type: string (or Expression with resultType string). + /// The schema name of the Impala. Type: string (or Expression with resultType string). + internal ImpalaObjectDataset(string type, string description, object structure, object schema, LinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary additionalProperties, object tableName, object table, object schemaTypePropertiesSchema) : base(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) + { + TableName = tableName; + Table = table; + SchemaTypePropertiesSchema = schemaTypePropertiesSchema; + Type = type ?? "ImpalaObject"; + } + + /// This property will be retired. Please consider using schema + table properties instead. + public object TableName { get; set; } + /// The table name of the Impala. Type: string (or Expression with resultType string). + public object Table { get; set; } + /// The schema name of the Impala. Type: string (or Expression with resultType string). + public object SchemaTypePropertiesSchema { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/InformixLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/InformixLinkedService.Serialization.cs new file mode 100644 index 000000000000..c0345e3dd92e --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/InformixLinkedService.Serialization.cs @@ -0,0 +1,243 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class InformixLinkedService : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (ConnectVia != null) + { + writer.WritePropertyName("connectVia"); + writer.WriteObjectValue(ConnectVia); + } + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + writer.WritePropertyName("connectionString"); + writer.WriteObjectValue(ConnectionString); + if (AuthenticationType != null) + { + writer.WritePropertyName("authenticationType"); + writer.WriteObjectValue(AuthenticationType); + } + if (Credential != null) + { + writer.WritePropertyName("credential"); + writer.WriteObjectValue(Credential); + } + if (UserName != null) + { + writer.WritePropertyName("userName"); + writer.WriteObjectValue(UserName); + } + if (Password != null) + { + writer.WritePropertyName("password"); + writer.WriteObjectValue(Password); + } + if (EncryptedCredential != null) + { + writer.WritePropertyName("encryptedCredential"); + writer.WriteObjectValue(EncryptedCredential); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static InformixLinkedService DeserializeInformixLinkedService(JsonElement element) + { + string type = default; + IntegrationRuntimeReference connectVia = default; + string description = default; + IDictionary parameters = default; + IList annotations = default; + object connectionString = default; + object authenticationType = default; + SecretBase credential = default; + object userName = default; + SecretBase password = default; + object encryptedCredential = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("connectVia")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("connectionString")) + { + connectionString = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("authenticationType")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + authenticationType = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("credential")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + credential = SecretBase.DeserializeSecretBase(property0.Value); + continue; + } + if (property0.NameEquals("userName")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + userName = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("password")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + password = SecretBase.DeserializeSecretBase(property0.Value); + continue; + } + if (property0.NameEquals("encryptedCredential")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + encryptedCredential = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new InformixLinkedService(type, connectVia, description, parameters, annotations, additionalProperties, connectionString, authenticationType, credential, userName, password, encryptedCredential); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/InformixLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/InformixLinkedService.cs new file mode 100644 index 000000000000..c8e804ab817f --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/InformixLinkedService.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Informix linked service. + public partial class InformixLinkedService : LinkedService + { + /// Initializes a new instance of InformixLinkedService. + /// The non-access credential portion of the connection string as well as an optional encrypted credential. Type: string, SecureString or AzureKeyVaultSecretReference. + public InformixLinkedService(object connectionString) + { + if (connectionString == null) + { + throw new ArgumentNullException(nameof(connectionString)); + } + + ConnectionString = connectionString; + Type = "Informix"; + } + + /// Initializes a new instance of InformixLinkedService. + /// Type of linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for describing the linked service. + /// . + /// The non-access credential portion of the connection string as well as an optional encrypted credential. Type: string, SecureString or AzureKeyVaultSecretReference. + /// Type of authentication used to connect to the Informix as ODBC data store. Possible values are: Anonymous and Basic. Type: string (or Expression with resultType string). + /// The access credential portion of the connection string specified in driver-specific property-value format. + /// User name for Basic authentication. Type: string (or Expression with resultType string). + /// Password for Basic authentication. + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + internal InformixLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object connectionString, object authenticationType, SecretBase credential, object userName, SecretBase password, object encryptedCredential) : base(type, connectVia, description, parameters, annotations, additionalProperties) + { + ConnectionString = connectionString; + AuthenticationType = authenticationType; + Credential = credential; + UserName = userName; + Password = password; + EncryptedCredential = encryptedCredential; + Type = type ?? "Informix"; + } + + /// The non-access credential portion of the connection string as well as an optional encrypted credential. Type: string, SecureString or AzureKeyVaultSecretReference. + public object ConnectionString { get; set; } + /// Type of authentication used to connect to the Informix as ODBC data store. Possible values are: Anonymous and Basic. Type: string (or Expression with resultType string). + public object AuthenticationType { get; set; } + /// The access credential portion of the connection string specified in driver-specific property-value format. + public SecretBase Credential { get; set; } + /// User name for Basic authentication. Type: string (or Expression with resultType string). + public object UserName { get; set; } + /// Password for Basic authentication. + public SecretBase Password { get; set; } + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + public object EncryptedCredential { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/InformixTableDataset.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/InformixTableDataset.Serialization.cs new file mode 100644 index 000000000000..409e781be76f --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/InformixTableDataset.Serialization.cs @@ -0,0 +1,213 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class InformixTableDataset : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Structure != null) + { + writer.WritePropertyName("structure"); + writer.WriteObjectValue(Structure); + } + if (Schema != null) + { + writer.WritePropertyName("schema"); + writer.WriteObjectValue(Schema); + } + writer.WritePropertyName("linkedServiceName"); + writer.WriteObjectValue(LinkedServiceName); + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Folder != null) + { + writer.WritePropertyName("folder"); + writer.WriteObjectValue(Folder); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + if (TableName != null) + { + writer.WritePropertyName("tableName"); + writer.WriteObjectValue(TableName); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static InformixTableDataset DeserializeInformixTableDataset(JsonElement element) + { + string type = default; + string description = default; + object structure = default; + object schema = default; + LinkedServiceReference linkedServiceName = default; + IDictionary parameters = default; + IList annotations = default; + DatasetFolder folder = default; + object tableName = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("structure")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + structure = property.Value.GetObject(); + continue; + } + if (property.NameEquals("schema")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + schema = property.Value.GetObject(); + continue; + } + if (property.NameEquals("linkedServiceName")) + { + linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("folder")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + folder = DatasetFolder.DeserializeDatasetFolder(property.Value); + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("tableName")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + tableName = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new InformixTableDataset(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties, tableName); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/InformixTableDataset.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/InformixTableDataset.cs new file mode 100644 index 000000000000..c3aa482abd4d --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/InformixTableDataset.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// The Informix table dataset. + public partial class InformixTableDataset : Dataset + { + /// Initializes a new instance of InformixTableDataset. + /// Linked service reference. + public InformixTableDataset(LinkedServiceReference linkedServiceName) : base(linkedServiceName) + { + if (linkedServiceName == null) + { + throw new ArgumentNullException(nameof(linkedServiceName)); + } + + Type = "InformixTable"; + } + + /// Initializes a new instance of InformixTableDataset. + /// Type of dataset. + /// Dataset description. + /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. + /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. + /// Linked service reference. + /// Parameters for dataset. + /// List of tags that can be used for describing the Dataset. + /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. + /// . + /// The Informix table name. Type: string (or Expression with resultType string). + internal InformixTableDataset(string type, string description, object structure, object schema, LinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary additionalProperties, object tableName) : base(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) + { + TableName = tableName; + Type = type ?? "InformixTable"; + } + + /// The Informix table name. Type: string (or Expression with resultType string). + public object TableName { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/IntegrationRuntimeReference.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/IntegrationRuntimeReference.Serialization.cs new file mode 100644 index 000000000000..0f58e0a4a1b6 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/IntegrationRuntimeReference.Serialization.cs @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class IntegrationRuntimeReference : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + writer.WritePropertyName("referenceName"); + writer.WriteStringValue(ReferenceName); + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WriteEndObject(); + } + + internal static IntegrationRuntimeReference DeserializeIntegrationRuntimeReference(JsonElement element) + { + string type = default; + string referenceName = default; + IDictionary parameters = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("referenceName")) + { + referenceName = property.Value.GetString(); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, property0.Value.GetObject()); + } + } + parameters = dictionary; + continue; + } + } + return new IntegrationRuntimeReference(type, referenceName, parameters); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/IntegrationRuntimeReference.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/IntegrationRuntimeReference.cs new file mode 100644 index 000000000000..825102b2c2e2 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/IntegrationRuntimeReference.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Integration runtime reference type. + public partial class IntegrationRuntimeReference + { + /// Initializes a new instance of IntegrationRuntimeReference. + /// Reference integration runtime name. + public IntegrationRuntimeReference(string referenceName) + { + if (referenceName == null) + { + throw new ArgumentNullException(nameof(referenceName)); + } + + Type = "IntegrationRuntimeReference"; + ReferenceName = referenceName; + } + + /// Initializes a new instance of IntegrationRuntimeReference. + /// Type of integration runtime. + /// Reference integration runtime name. + /// Arguments for integration runtime. + internal IntegrationRuntimeReference(string type, string referenceName, IDictionary parameters) + { + Type = type; + ReferenceName = referenceName; + Parameters = parameters; + } + + /// Type of integration runtime. + public string Type { get; set; } + /// Reference integration runtime name. + public string ReferenceName { get; set; } + /// Arguments for integration runtime. + public IDictionary Parameters { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/JiraLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/JiraLinkedService.Serialization.cs new file mode 100644 index 000000000000..f9c51c201d48 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/JiraLinkedService.Serialization.cs @@ -0,0 +1,266 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class JiraLinkedService : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (ConnectVia != null) + { + writer.WritePropertyName("connectVia"); + writer.WriteObjectValue(ConnectVia); + } + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + writer.WritePropertyName("host"); + writer.WriteObjectValue(Host); + if (Port != null) + { + writer.WritePropertyName("port"); + writer.WriteObjectValue(Port); + } + writer.WritePropertyName("username"); + writer.WriteObjectValue(Username); + if (Password != null) + { + writer.WritePropertyName("password"); + writer.WriteObjectValue(Password); + } + if (UseEncryptedEndpoints != null) + { + writer.WritePropertyName("useEncryptedEndpoints"); + writer.WriteObjectValue(UseEncryptedEndpoints); + } + if (UseHostVerification != null) + { + writer.WritePropertyName("useHostVerification"); + writer.WriteObjectValue(UseHostVerification); + } + if (UsePeerVerification != null) + { + writer.WritePropertyName("usePeerVerification"); + writer.WriteObjectValue(UsePeerVerification); + } + if (EncryptedCredential != null) + { + writer.WritePropertyName("encryptedCredential"); + writer.WriteObjectValue(EncryptedCredential); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static JiraLinkedService DeserializeJiraLinkedService(JsonElement element) + { + string type = default; + IntegrationRuntimeReference connectVia = default; + string description = default; + IDictionary parameters = default; + IList annotations = default; + object host = default; + object port = default; + object username = default; + SecretBase password = default; + object useEncryptedEndpoints = default; + object useHostVerification = default; + object usePeerVerification = default; + object encryptedCredential = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("connectVia")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("host")) + { + host = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("port")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + port = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("username")) + { + username = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("password")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + password = SecretBase.DeserializeSecretBase(property0.Value); + continue; + } + if (property0.NameEquals("useEncryptedEndpoints")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + useEncryptedEndpoints = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("useHostVerification")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + useHostVerification = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("usePeerVerification")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + usePeerVerification = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("encryptedCredential")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + encryptedCredential = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new JiraLinkedService(type, connectVia, description, parameters, annotations, additionalProperties, host, port, username, password, useEncryptedEndpoints, useHostVerification, usePeerVerification, encryptedCredential); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/JiraLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/JiraLinkedService.cs new file mode 100644 index 000000000000..a092ee117e49 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/JiraLinkedService.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Jira Service linked service. + public partial class JiraLinkedService : LinkedService + { + /// Initializes a new instance of JiraLinkedService. + /// The IP address or host name of the Jira service. (e.g. jira.example.com). + /// The user name that you use to access Jira Service. + public JiraLinkedService(object host, object username) + { + if (host == null) + { + throw new ArgumentNullException(nameof(host)); + } + if (username == null) + { + throw new ArgumentNullException(nameof(username)); + } + + Host = host; + Username = username; + Type = "Jira"; + } + + /// Initializes a new instance of JiraLinkedService. + /// Type of linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for describing the linked service. + /// . + /// The IP address or host name of the Jira service. (e.g. jira.example.com). + /// The TCP port that the Jira server uses to listen for client connections. The default value is 443 if connecting through HTTPS, or 8080 if connecting through HTTP. + /// The user name that you use to access Jira Service. + /// The password corresponding to the user name that you provided in the username field. + /// Specifies whether the data source endpoints are encrypted using HTTPS. The default value is true. + /// Specifies whether to require the host name in the server's certificate to match the host name of the server when connecting over SSL. The default value is true. + /// Specifies whether to verify the identity of the server when connecting over SSL. The default value is true. + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + internal JiraLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object host, object port, object username, SecretBase password, object useEncryptedEndpoints, object useHostVerification, object usePeerVerification, object encryptedCredential) : base(type, connectVia, description, parameters, annotations, additionalProperties) + { + Host = host; + Port = port; + Username = username; + Password = password; + UseEncryptedEndpoints = useEncryptedEndpoints; + UseHostVerification = useHostVerification; + UsePeerVerification = usePeerVerification; + EncryptedCredential = encryptedCredential; + Type = type ?? "Jira"; + } + + /// The IP address or host name of the Jira service. (e.g. jira.example.com). + public object Host { get; set; } + /// The TCP port that the Jira server uses to listen for client connections. The default value is 443 if connecting through HTTPS, or 8080 if connecting through HTTP. + public object Port { get; set; } + /// The user name that you use to access Jira Service. + public object Username { get; set; } + /// The password corresponding to the user name that you provided in the username field. + public SecretBase Password { get; set; } + /// Specifies whether the data source endpoints are encrypted using HTTPS. The default value is true. + public object UseEncryptedEndpoints { get; set; } + /// Specifies whether to require the host name in the server's certificate to match the host name of the server when connecting over SSL. The default value is true. + public object UseHostVerification { get; set; } + /// Specifies whether to verify the identity of the server when connecting over SSL. The default value is true. + public object UsePeerVerification { get; set; } + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + public object EncryptedCredential { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/JiraObjectDataset.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/JiraObjectDataset.Serialization.cs new file mode 100644 index 000000000000..d541ee476142 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/JiraObjectDataset.Serialization.cs @@ -0,0 +1,213 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class JiraObjectDataset : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Structure != null) + { + writer.WritePropertyName("structure"); + writer.WriteObjectValue(Structure); + } + if (Schema != null) + { + writer.WritePropertyName("schema"); + writer.WriteObjectValue(Schema); + } + writer.WritePropertyName("linkedServiceName"); + writer.WriteObjectValue(LinkedServiceName); + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Folder != null) + { + writer.WritePropertyName("folder"); + writer.WriteObjectValue(Folder); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + if (TableName != null) + { + writer.WritePropertyName("tableName"); + writer.WriteObjectValue(TableName); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static JiraObjectDataset DeserializeJiraObjectDataset(JsonElement element) + { + string type = default; + string description = default; + object structure = default; + object schema = default; + LinkedServiceReference linkedServiceName = default; + IDictionary parameters = default; + IList annotations = default; + DatasetFolder folder = default; + object tableName = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("structure")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + structure = property.Value.GetObject(); + continue; + } + if (property.NameEquals("schema")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + schema = property.Value.GetObject(); + continue; + } + if (property.NameEquals("linkedServiceName")) + { + linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("folder")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + folder = DatasetFolder.DeserializeDatasetFolder(property.Value); + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("tableName")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + tableName = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new JiraObjectDataset(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties, tableName); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/JiraObjectDataset.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/JiraObjectDataset.cs new file mode 100644 index 000000000000..a0cc91ec8065 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/JiraObjectDataset.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Jira Service dataset. + public partial class JiraObjectDataset : Dataset + { + /// Initializes a new instance of JiraObjectDataset. + /// Linked service reference. + public JiraObjectDataset(LinkedServiceReference linkedServiceName) : base(linkedServiceName) + { + if (linkedServiceName == null) + { + throw new ArgumentNullException(nameof(linkedServiceName)); + } + + Type = "JiraObject"; + } + + /// Initializes a new instance of JiraObjectDataset. + /// Type of dataset. + /// Dataset description. + /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. + /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. + /// Linked service reference. + /// Parameters for dataset. + /// List of tags that can be used for describing the Dataset. + /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. + /// . + /// The table name. Type: string (or Expression with resultType string). + internal JiraObjectDataset(string type, string description, object structure, object schema, LinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary additionalProperties, object tableName) : base(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) + { + TableName = tableName; + Type = type ?? "JiraObject"; + } + + /// The table name. Type: string (or Expression with resultType string). + public object TableName { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/JsonDataset.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/JsonDataset.Serialization.cs new file mode 100644 index 000000000000..9eb4b6cdc521 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/JsonDataset.Serialization.cs @@ -0,0 +1,243 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class JsonDataset : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Structure != null) + { + writer.WritePropertyName("structure"); + writer.WriteObjectValue(Structure); + } + if (Schema != null) + { + writer.WritePropertyName("schema"); + writer.WriteObjectValue(Schema); + } + writer.WritePropertyName("linkedServiceName"); + writer.WriteObjectValue(LinkedServiceName); + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Folder != null) + { + writer.WritePropertyName("folder"); + writer.WriteObjectValue(Folder); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + if (Location != null) + { + writer.WritePropertyName("location"); + writer.WriteObjectValue(Location); + } + if (EncodingName != null) + { + writer.WritePropertyName("encodingName"); + writer.WriteObjectValue(EncodingName); + } + if (Compression != null) + { + writer.WritePropertyName("compression"); + writer.WriteObjectValue(Compression); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static JsonDataset DeserializeJsonDataset(JsonElement element) + { + string type = default; + string description = default; + object structure = default; + object schema = default; + LinkedServiceReference linkedServiceName = default; + IDictionary parameters = default; + IList annotations = default; + DatasetFolder folder = default; + DatasetLocation location = default; + object encodingName = default; + DatasetCompression compression = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("structure")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + structure = property.Value.GetObject(); + continue; + } + if (property.NameEquals("schema")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + schema = property.Value.GetObject(); + continue; + } + if (property.NameEquals("linkedServiceName")) + { + linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("folder")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + folder = DatasetFolder.DeserializeDatasetFolder(property.Value); + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("location")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + location = DatasetLocation.DeserializeDatasetLocation(property0.Value); + continue; + } + if (property0.NameEquals("encodingName")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + encodingName = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("compression")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + compression = DatasetCompression.DeserializeDatasetCompression(property0.Value); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new JsonDataset(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties, location, encodingName, compression); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/JsonDataset.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/JsonDataset.cs new file mode 100644 index 000000000000..3631635993db --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/JsonDataset.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Json dataset. + public partial class JsonDataset : Dataset + { + /// Initializes a new instance of JsonDataset. + /// Linked service reference. + public JsonDataset(LinkedServiceReference linkedServiceName) : base(linkedServiceName) + { + if (linkedServiceName == null) + { + throw new ArgumentNullException(nameof(linkedServiceName)); + } + + Type = "Json"; + } + + /// Initializes a new instance of JsonDataset. + /// Type of dataset. + /// Dataset description. + /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. + /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. + /// Linked service reference. + /// Parameters for dataset. + /// List of tags that can be used for describing the Dataset. + /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. + /// . + /// The location of the json data storage. + /// The code page name of the preferred encoding. If not specified, the default value is UTF-8, unless BOM denotes another Unicode encoding. Refer to the name column of the table in the following link to set supported values: https://msdn.microsoft.com/library/system.text.encoding.aspx. Type: string (or Expression with resultType string). + /// The data compression method used for the json dataset. + internal JsonDataset(string type, string description, object structure, object schema, LinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary additionalProperties, DatasetLocation location, object encodingName, DatasetCompression compression) : base(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) + { + Location = location; + EncodingName = encodingName; + Compression = compression; + Type = type ?? "Json"; + } + + /// The location of the json data storage. + public DatasetLocation Location { get; set; } + /// The code page name of the preferred encoding. If not specified, the default value is UTF-8, unless BOM denotes another Unicode encoding. Refer to the name column of the table in the following link to set supported values: https://msdn.microsoft.com/library/system.text.encoding.aspx. Type: string (or Expression with resultType string). + public object EncodingName { get; set; } + /// The data compression method used for the json dataset. + public DatasetCompression Compression { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/LinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/LinkedService.Serialization.cs new file mode 100644 index 000000000000..ff6ce875f7c9 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/LinkedService.Serialization.cs @@ -0,0 +1,250 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class LinkedService : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (ConnectVia != null) + { + writer.WritePropertyName("connectVia"); + writer.WriteObjectValue(ConnectVia); + } + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static LinkedService DeserializeLinkedService(JsonElement element) + { + if (element.TryGetProperty("type", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "AmazonMWS": return AmazonMWSLinkedService.DeserializeAmazonMWSLinkedService(element); + case "AmazonRedshift": return AmazonRedshiftLinkedService.DeserializeAmazonRedshiftLinkedService(element); + case "AmazonS3": return AmazonS3LinkedService.DeserializeAmazonS3LinkedService(element); + case "AzureBatch": return AzureBatchLinkedService.DeserializeAzureBatchLinkedService(element); + case "AzureBlobFS": return AzureBlobFSLinkedService.DeserializeAzureBlobFSLinkedService(element); + case "AzureBlobStorage": return AzureBlobStorageLinkedService.DeserializeAzureBlobStorageLinkedService(element); + case "AzureDataExplorer": return AzureDataExplorerLinkedService.DeserializeAzureDataExplorerLinkedService(element); + case "AzureDataLakeAnalytics": return AzureDataLakeAnalyticsLinkedService.DeserializeAzureDataLakeAnalyticsLinkedService(element); + case "AzureDataLakeStore": return AzureDataLakeStoreLinkedService.DeserializeAzureDataLakeStoreLinkedService(element); + case "AzureDatabricks": return AzureDatabricksLinkedService.DeserializeAzureDatabricksLinkedService(element); + case "AzureFileStorage": return AzureFileStorageLinkedService.DeserializeAzureFileStorageLinkedService(element); + case "AzureFunction": return AzureFunctionLinkedService.DeserializeAzureFunctionLinkedService(element); + case "AzureKeyVault": return AzureKeyVaultLinkedService.DeserializeAzureKeyVaultLinkedService(element); + case "AzureML": return AzureMLLinkedService.DeserializeAzureMLLinkedService(element); + case "AzureMLService": return AzureMLServiceLinkedService.DeserializeAzureMLServiceLinkedService(element); + case "AzureMariaDB": return AzureMariaDBLinkedService.DeserializeAzureMariaDBLinkedService(element); + case "AzureMySql": return AzureMySqlLinkedService.DeserializeAzureMySqlLinkedService(element); + case "AzurePostgreSql": return AzurePostgreSqlLinkedService.DeserializeAzurePostgreSqlLinkedService(element); + case "AzureSearch": return AzureSearchLinkedService.DeserializeAzureSearchLinkedService(element); + case "AzureSqlDW": return AzureSqlDWLinkedService.DeserializeAzureSqlDWLinkedService(element); + case "AzureSqlDatabase": return AzureSqlDatabaseLinkedService.DeserializeAzureSqlDatabaseLinkedService(element); + case "AzureSqlMI": return AzureSqlMILinkedService.DeserializeAzureSqlMILinkedService(element); + case "AzureStorage": return AzureStorageLinkedService.DeserializeAzureStorageLinkedService(element); + case "AzureTableStorage": return AzureTableStorageLinkedService.DeserializeAzureTableStorageLinkedService(element); + case "Cassandra": return CassandraLinkedService.DeserializeCassandraLinkedService(element); + case "CommonDataServiceForApps": return CommonDataServiceForAppsLinkedService.DeserializeCommonDataServiceForAppsLinkedService(element); + case "Concur": return ConcurLinkedService.DeserializeConcurLinkedService(element); + case "CosmosDb": return CosmosDbLinkedService.DeserializeCosmosDbLinkedService(element); + case "CosmosDbMongoDbApi": return CosmosDbMongoDbApiLinkedService.DeserializeCosmosDbMongoDbApiLinkedService(element); + case "Couchbase": return CouchbaseLinkedService.DeserializeCouchbaseLinkedService(element); + case "CustomDataSource": return CustomDataSourceLinkedService.DeserializeCustomDataSourceLinkedService(element); + case "Db2": return Db2LinkedService.DeserializeDb2LinkedService(element); + case "Drill": return DrillLinkedService.DeserializeDrillLinkedService(element); + case "Dynamics": return DynamicsLinkedService.DeserializeDynamicsLinkedService(element); + case "DynamicsAX": return DynamicsAXLinkedService.DeserializeDynamicsAXLinkedService(element); + case "DynamicsCrm": return DynamicsCrmLinkedService.DeserializeDynamicsCrmLinkedService(element); + case "Eloqua": return EloquaLinkedService.DeserializeEloquaLinkedService(element); + case "FileServer": return FileServerLinkedService.DeserializeFileServerLinkedService(element); + case "FtpServer": return FtpServerLinkedService.DeserializeFtpServerLinkedService(element); + case "GoogleAdWords": return GoogleAdWordsLinkedService.DeserializeGoogleAdWordsLinkedService(element); + case "GoogleBigQuery": return GoogleBigQueryLinkedService.DeserializeGoogleBigQueryLinkedService(element); + case "GoogleCloudStorage": return GoogleCloudStorageLinkedService.DeserializeGoogleCloudStorageLinkedService(element); + case "Greenplum": return GreenplumLinkedService.DeserializeGreenplumLinkedService(element); + case "HBase": return HBaseLinkedService.DeserializeHBaseLinkedService(element); + case "HDInsight": return HDInsightLinkedService.DeserializeHDInsightLinkedService(element); + case "HDInsightOnDemand": return HDInsightOnDemandLinkedService.DeserializeHDInsightOnDemandLinkedService(element); + case "Hdfs": return HdfsLinkedService.DeserializeHdfsLinkedService(element); + case "Hive": return HiveLinkedService.DeserializeHiveLinkedService(element); + case "HttpServer": return HttpLinkedService.DeserializeHttpLinkedService(element); + case "Hubspot": return HubspotLinkedService.DeserializeHubspotLinkedService(element); + case "Impala": return ImpalaLinkedService.DeserializeImpalaLinkedService(element); + case "Informix": return InformixLinkedService.DeserializeInformixLinkedService(element); + case "Jira": return JiraLinkedService.DeserializeJiraLinkedService(element); + case "Magento": return MagentoLinkedService.DeserializeMagentoLinkedService(element); + case "MariaDB": return MariaDBLinkedService.DeserializeMariaDBLinkedService(element); + case "Marketo": return MarketoLinkedService.DeserializeMarketoLinkedService(element); + case "MicrosoftAccess": return MicrosoftAccessLinkedService.DeserializeMicrosoftAccessLinkedService(element); + case "MongoDb": return MongoDbLinkedService.DeserializeMongoDbLinkedService(element); + case "MongoDbV2": return MongoDbV2LinkedService.DeserializeMongoDbV2LinkedService(element); + case "MySql": return MySqlLinkedService.DeserializeMySqlLinkedService(element); + case "Netezza": return NetezzaLinkedService.DeserializeNetezzaLinkedService(element); + case "OData": return ODataLinkedService.DeserializeODataLinkedService(element); + case "Odbc": return OdbcLinkedService.DeserializeOdbcLinkedService(element); + case "Office365": return Office365LinkedService.DeserializeOffice365LinkedService(element); + case "Oracle": return OracleLinkedService.DeserializeOracleLinkedService(element); + case "OracleServiceCloud": return OracleServiceCloudLinkedService.DeserializeOracleServiceCloudLinkedService(element); + case "Paypal": return PaypalLinkedService.DeserializePaypalLinkedService(element); + case "Phoenix": return PhoenixLinkedService.DeserializePhoenixLinkedService(element); + case "PostgreSql": return PostgreSqlLinkedService.DeserializePostgreSqlLinkedService(element); + case "Presto": return PrestoLinkedService.DeserializePrestoLinkedService(element); + case "QuickBooks": return QuickBooksLinkedService.DeserializeQuickBooksLinkedService(element); + case "Responsys": return ResponsysLinkedService.DeserializeResponsysLinkedService(element); + case "RestService": return RestServiceLinkedService.DeserializeRestServiceLinkedService(element); + case "Salesforce": return SalesforceLinkedService.DeserializeSalesforceLinkedService(element); + case "SalesforceMarketingCloud": return SalesforceMarketingCloudLinkedService.DeserializeSalesforceMarketingCloudLinkedService(element); + case "SalesforceServiceCloud": return SalesforceServiceCloudLinkedService.DeserializeSalesforceServiceCloudLinkedService(element); + case "SapBW": return SapBWLinkedService.DeserializeSapBWLinkedService(element); + case "SapCloudForCustomer": return SapCloudForCustomerLinkedService.DeserializeSapCloudForCustomerLinkedService(element); + case "SapEcc": return SapEccLinkedService.DeserializeSapEccLinkedService(element); + case "SapHana": return SapHanaLinkedService.DeserializeSapHanaLinkedService(element); + case "SapOpenHub": return SapOpenHubLinkedService.DeserializeSapOpenHubLinkedService(element); + case "SapTable": return SapTableLinkedService.DeserializeSapTableLinkedService(element); + case "ServiceNow": return ServiceNowLinkedService.DeserializeServiceNowLinkedService(element); + case "Sftp": return SftpServerLinkedService.DeserializeSftpServerLinkedService(element); + case "Shopify": return ShopifyLinkedService.DeserializeShopifyLinkedService(element); + case "Spark": return SparkLinkedService.DeserializeSparkLinkedService(element); + case "SqlServer": return SqlServerLinkedService.DeserializeSqlServerLinkedService(element); + case "Square": return SquareLinkedService.DeserializeSquareLinkedService(element); + case "Sybase": return SybaseLinkedService.DeserializeSybaseLinkedService(element); + case "Teradata": return TeradataLinkedService.DeserializeTeradataLinkedService(element); + case "Vertica": return VerticaLinkedService.DeserializeVerticaLinkedService(element); + case "Web": return WebLinkedService.DeserializeWebLinkedService(element); + case "Xero": return XeroLinkedService.DeserializeXeroLinkedService(element); + case "Zoho": return ZohoLinkedService.DeserializeZohoLinkedService(element); + } + } + string type = default; + IntegrationRuntimeReference connectVia = default; + string description = default; + IDictionary parameters = default; + IList annotations = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("connectVia")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new LinkedService(type, connectVia, description, parameters, annotations, additionalProperties); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/LinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/LinkedService.cs new file mode 100644 index 000000000000..5e8ff600c719 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/LinkedService.cs @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// The Azure Synapse nested object which contains the information and credential which can be used to connect with related store or compute resource. + public partial class LinkedService : IDictionary + { + /// Initializes a new instance of LinkedService. + public LinkedService() + { + AdditionalProperties = new Dictionary(); + Type = "LinkedService"; + } + + /// Initializes a new instance of LinkedService. + /// Type of linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for describing the linked service. + /// . + internal LinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties) + { + Type = type ?? "LinkedService"; + ConnectVia = connectVia; + Description = description; + Parameters = parameters; + Annotations = annotations; + AdditionalProperties = additionalProperties ?? new Dictionary(); + } + + /// Type of linked service. + internal string Type { get; set; } + /// The integration runtime reference. + public IntegrationRuntimeReference ConnectVia { get; set; } + /// Linked service description. + public string Description { get; set; } + /// Parameters for linked service. + public IDictionary Parameters { get; set; } + /// List of tags that can be used for describing the linked service. + public IList Annotations { get; set; } + internal IDictionary AdditionalProperties { get; } + /// + public IEnumerator> GetEnumerator() => AdditionalProperties.GetEnumerator(); + /// + IEnumerator IEnumerable.GetEnumerator() => AdditionalProperties.GetEnumerator(); + /// + public bool TryGetValue(string key, out object value) => AdditionalProperties.TryGetValue(key, out value); + /// + public bool ContainsKey(string key) => AdditionalProperties.ContainsKey(key); + /// + public ICollection Keys => AdditionalProperties.Keys; + /// + public ICollection Values => AdditionalProperties.Values; + /// + int ICollection>.Count => AdditionalProperties.Count; + /// + public void Add(string key, object value) => AdditionalProperties.Add(key, value); + /// + public bool Remove(string key) => AdditionalProperties.Remove(key); + /// + bool ICollection>.IsReadOnly => AdditionalProperties.IsReadOnly; + /// + void ICollection>.Add(KeyValuePair value) => AdditionalProperties.Add(value); + /// + bool ICollection>.Remove(KeyValuePair value) => AdditionalProperties.Remove(value); + /// + bool ICollection>.Contains(KeyValuePair value) => AdditionalProperties.Contains(value); + /// + void ICollection>.CopyTo(KeyValuePair[] destination, int offset) => AdditionalProperties.CopyTo(destination, offset); + /// + void ICollection>.Clear() => AdditionalProperties.Clear(); + /// + public object this[string key] + { + get => AdditionalProperties[key]; + set => AdditionalProperties[key] = value; + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/LinkedServiceDebugResource.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/LinkedServiceDebugResource.Serialization.cs new file mode 100644 index 000000000000..df7c9c86408a --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/LinkedServiceDebugResource.Serialization.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class LinkedServiceDebugResource : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("properties"); + writer.WriteObjectValue(Properties); + if (Name != null) + { + writer.WritePropertyName("name"); + writer.WriteStringValue(Name); + } + writer.WriteEndObject(); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/LinkedServiceDebugResource.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/LinkedServiceDebugResource.cs new file mode 100644 index 000000000000..71743d0ad1a7 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/LinkedServiceDebugResource.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Linked service debug resource. + public partial class LinkedServiceDebugResource : SubResourceDebugResource + { + /// Initializes a new instance of LinkedServiceDebugResource. + /// Properties of linked service. + public LinkedServiceDebugResource(LinkedService properties) + { + if (properties == null) + { + throw new ArgumentNullException(nameof(properties)); + } + + Properties = properties; + } + + /// Initializes a new instance of LinkedServiceDebugResource. + /// The resource name. + /// Properties of linked service. + internal LinkedServiceDebugResource(string name, LinkedService properties) : base(name) + { + Properties = properties; + } + + /// Properties of linked service. + public LinkedService Properties { get; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/LinkedServiceListResponse.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/LinkedServiceListResponse.Serialization.cs new file mode 100644 index 000000000000..a787bf6b873c --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/LinkedServiceListResponse.Serialization.cs @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class LinkedServiceListResponse + { + internal static LinkedServiceListResponse DeserializeLinkedServiceListResponse(JsonElement element) + { + IReadOnlyList value = default; + string nextLink = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value")) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(LinkedServiceResource.DeserializeLinkedServiceResource(item)); + } + } + value = array; + continue; + } + if (property.NameEquals("nextLink")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = property.Value.GetString(); + continue; + } + } + return new LinkedServiceListResponse(value, nextLink); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/LinkedServiceListResponse.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/LinkedServiceListResponse.cs new file mode 100644 index 000000000000..70ef607a71f7 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/LinkedServiceListResponse.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// A list of linked service resources. + public partial class LinkedServiceListResponse + { + /// Initializes a new instance of LinkedServiceListResponse. + /// List of linked services. + internal LinkedServiceListResponse(IEnumerable value) + { + if (value == null) + { + throw new ArgumentNullException(nameof(value)); + } + + Value = value.ToArray(); + } + + /// Initializes a new instance of LinkedServiceListResponse. + /// List of linked services. + /// The link to the next page of results, if any remaining results exist. + internal LinkedServiceListResponse(IReadOnlyList value, string nextLink) + { + Value = value; + NextLink = nextLink; + } + + /// List of linked services. + public IReadOnlyList Value { get; } + /// The link to the next page of results, if any remaining results exist. + public string NextLink { get; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/LinkedServiceReference.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/LinkedServiceReference.Serialization.cs new file mode 100644 index 000000000000..de5643657b60 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/LinkedServiceReference.Serialization.cs @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class LinkedServiceReference : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + writer.WritePropertyName("referenceName"); + writer.WriteStringValue(ReferenceName); + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WriteEndObject(); + } + + internal static LinkedServiceReference DeserializeLinkedServiceReference(JsonElement element) + { + string type = default; + string referenceName = default; + IDictionary parameters = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("referenceName")) + { + referenceName = property.Value.GetString(); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, property0.Value.GetObject()); + } + } + parameters = dictionary; + continue; + } + } + return new LinkedServiceReference(type, referenceName, parameters); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/LinkedServiceReference.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/LinkedServiceReference.cs new file mode 100644 index 000000000000..a8056758ea3c --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/LinkedServiceReference.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Linked service reference type. + public partial class LinkedServiceReference + { + /// Initializes a new instance of LinkedServiceReference. + /// Reference LinkedService name. + public LinkedServiceReference(string referenceName) + { + if (referenceName == null) + { + throw new ArgumentNullException(nameof(referenceName)); + } + + Type = "LinkedServiceReference"; + ReferenceName = referenceName; + } + + /// Initializes a new instance of LinkedServiceReference. + /// Linked service reference type. + /// Reference LinkedService name. + /// Arguments for LinkedService. + internal LinkedServiceReference(string type, string referenceName, IDictionary parameters) + { + Type = type; + ReferenceName = referenceName; + Parameters = parameters; + } + + /// Linked service reference type. + public string Type { get; set; } + /// Reference LinkedService name. + public string ReferenceName { get; set; } + /// Arguments for LinkedService. + public IDictionary Parameters { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/LinkedServiceResource.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/LinkedServiceResource.Serialization.cs new file mode 100644 index 000000000000..399e216ad616 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/LinkedServiceResource.Serialization.cs @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class LinkedServiceResource : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("properties"); + writer.WriteObjectValue(Properties); + if (Id != null) + { + writer.WritePropertyName("id"); + writer.WriteStringValue(Id); + } + if (Name != null) + { + writer.WritePropertyName("name"); + writer.WriteStringValue(Name); + } + if (Type != null) + { + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + } + if (Etag != null) + { + writer.WritePropertyName("etag"); + writer.WriteStringValue(Etag); + } + writer.WriteEndObject(); + } + + internal static LinkedServiceResource DeserializeLinkedServiceResource(JsonElement element) + { + LinkedService properties = default; + string id = default; + string name = default; + string type = default; + string etag = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties")) + { + properties = LinkedService.DeserializeLinkedService(property.Value); + continue; + } + if (property.NameEquals("id")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("name")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("etag")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + etag = property.Value.GetString(); + continue; + } + } + return new LinkedServiceResource(id, name, type, etag, properties); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/LinkedServiceResource.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/LinkedServiceResource.cs new file mode 100644 index 000000000000..2d598008444d --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/LinkedServiceResource.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Linked service resource type. + public partial class LinkedServiceResource : SubResource + { + /// Initializes a new instance of LinkedServiceResource. + /// Properties of linked service. + public LinkedServiceResource(LinkedService properties) + { + if (properties == null) + { + throw new ArgumentNullException(nameof(properties)); + } + + Properties = properties; + } + + /// Initializes a new instance of LinkedServiceResource. + /// The resource identifier. + /// The resource name. + /// The resource type. + /// Etag identifies change in the resource. + /// Properties of linked service. + internal LinkedServiceResource(string id, string name, string type, string etag, LinkedService properties) : base(id, name, type, etag) + { + Properties = properties; + } + + /// Properties of linked service. + public LinkedService Properties { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/LogStorageSettings.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/LogStorageSettings.Serialization.cs new file mode 100644 index 000000000000..29381cc787ff --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/LogStorageSettings.Serialization.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class LogStorageSettings : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("linkedServiceName"); + writer.WriteObjectValue(LinkedServiceName); + if (Path != null) + { + writer.WritePropertyName("path"); + writer.WriteObjectValue(Path); + } + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static LogStorageSettings DeserializeLogStorageSettings(JsonElement element) + { + LinkedServiceReference linkedServiceName = default; + object path = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("linkedServiceName")) + { + linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value); + continue; + } + if (property.NameEquals("path")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + path = property.Value.GetObject(); + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new LogStorageSettings(linkedServiceName, path, additionalProperties); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/LogStorageSettings.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/LogStorageSettings.cs new file mode 100644 index 000000000000..09698890680d --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/LogStorageSettings.cs @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Log storage settings. + public partial class LogStorageSettings : IDictionary + { + /// Initializes a new instance of LogStorageSettings. + /// Log storage linked service reference. + public LogStorageSettings(LinkedServiceReference linkedServiceName) + { + if (linkedServiceName == null) + { + throw new ArgumentNullException(nameof(linkedServiceName)); + } + + LinkedServiceName = linkedServiceName; + AdditionalProperties = new Dictionary(); + } + + /// Initializes a new instance of LogStorageSettings. + /// Log storage linked service reference. + /// The path to storage for storing detailed logs of activity execution. Type: string (or Expression with resultType string). + /// . + internal LogStorageSettings(LinkedServiceReference linkedServiceName, object path, IDictionary additionalProperties) + { + LinkedServiceName = linkedServiceName; + Path = path; + AdditionalProperties = additionalProperties ?? new Dictionary(); + } + + /// Log storage linked service reference. + public LinkedServiceReference LinkedServiceName { get; set; } + /// The path to storage for storing detailed logs of activity execution. Type: string (or Expression with resultType string). + public object Path { get; set; } + internal IDictionary AdditionalProperties { get; } + /// + public IEnumerator> GetEnumerator() => AdditionalProperties.GetEnumerator(); + /// + IEnumerator IEnumerable.GetEnumerator() => AdditionalProperties.GetEnumerator(); + /// + public bool TryGetValue(string key, out object value) => AdditionalProperties.TryGetValue(key, out value); + /// + public bool ContainsKey(string key) => AdditionalProperties.ContainsKey(key); + /// + public ICollection Keys => AdditionalProperties.Keys; + /// + public ICollection Values => AdditionalProperties.Values; + /// + int ICollection>.Count => AdditionalProperties.Count; + /// + public void Add(string key, object value) => AdditionalProperties.Add(key, value); + /// + public bool Remove(string key) => AdditionalProperties.Remove(key); + /// + bool ICollection>.IsReadOnly => AdditionalProperties.IsReadOnly; + /// + void ICollection>.Add(KeyValuePair value) => AdditionalProperties.Add(value); + /// + bool ICollection>.Remove(KeyValuePair value) => AdditionalProperties.Remove(value); + /// + bool ICollection>.Contains(KeyValuePair value) => AdditionalProperties.Contains(value); + /// + void ICollection>.CopyTo(KeyValuePair[] destination, int offset) => AdditionalProperties.CopyTo(destination, offset); + /// + void ICollection>.Clear() => AdditionalProperties.Clear(); + /// + public object this[string key] + { + get => AdditionalProperties[key]; + set => AdditionalProperties[key] = value; + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/LookupActivity.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/LookupActivity.Serialization.cs new file mode 100644 index 000000000000..547e250770e1 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/LookupActivity.Serialization.cs @@ -0,0 +1,213 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class LookupActivity : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (LinkedServiceName != null) + { + writer.WritePropertyName("linkedServiceName"); + writer.WriteObjectValue(LinkedServiceName); + } + if (Policy != null) + { + writer.WritePropertyName("policy"); + writer.WriteObjectValue(Policy); + } + writer.WritePropertyName("name"); + writer.WriteStringValue(Name); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (DependsOn != null) + { + writer.WritePropertyName("dependsOn"); + writer.WriteStartArray(); + foreach (var item in DependsOn) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (UserProperties != null) + { + writer.WritePropertyName("userProperties"); + writer.WriteStartArray(); + foreach (var item in UserProperties) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + writer.WritePropertyName("source"); + writer.WriteObjectValue(Source); + writer.WritePropertyName("dataset"); + writer.WriteObjectValue(Dataset); + if (FirstRowOnly != null) + { + writer.WritePropertyName("firstRowOnly"); + writer.WriteObjectValue(FirstRowOnly); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static LookupActivity DeserializeLookupActivity(JsonElement element) + { + LinkedServiceReference linkedServiceName = default; + ActivityPolicy policy = default; + string name = default; + string type = default; + string description = default; + IList dependsOn = default; + IList userProperties = default; + CopySource source = default; + DatasetReference dataset = default; + object firstRowOnly = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("linkedServiceName")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value); + continue; + } + if (property.NameEquals("policy")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + policy = ActivityPolicy.DeserializeActivityPolicy(property.Value); + continue; + } + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("dependsOn")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(ActivityDependency.DeserializeActivityDependency(item)); + } + } + dependsOn = array; + continue; + } + if (property.NameEquals("userProperties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(UserProperty.DeserializeUserProperty(item)); + } + } + userProperties = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("source")) + { + source = CopySource.DeserializeCopySource(property0.Value); + continue; + } + if (property0.NameEquals("dataset")) + { + dataset = DatasetReference.DeserializeDatasetReference(property0.Value); + continue; + } + if (property0.NameEquals("firstRowOnly")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + firstRowOnly = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new LookupActivity(name, type, description, dependsOn, userProperties, additionalProperties, linkedServiceName, policy, source, dataset, firstRowOnly); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/LookupActivity.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/LookupActivity.cs new file mode 100644 index 000000000000..378d3f86b254 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/LookupActivity.cs @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Lookup activity. + public partial class LookupActivity : ExecutionActivity + { + /// Initializes a new instance of LookupActivity. + /// Activity name. + /// Dataset-specific source properties, same as copy activity source. + /// Lookup activity dataset reference. + public LookupActivity(string name, CopySource source, DatasetReference dataset) : base(name) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (source == null) + { + throw new ArgumentNullException(nameof(source)); + } + if (dataset == null) + { + throw new ArgumentNullException(nameof(dataset)); + } + + Source = source; + Dataset = dataset; + Type = "Lookup"; + } + + /// Initializes a new instance of LookupActivity. + /// Activity name. + /// Type of activity. + /// Activity description. + /// Activity depends on condition. + /// Activity user properties. + /// . + /// Linked service reference. + /// Activity policy. + /// Dataset-specific source properties, same as copy activity source. + /// Lookup activity dataset reference. + /// Whether to return first row or all rows. Default value is true. Type: boolean (or Expression with resultType boolean). + internal LookupActivity(string name, string type, string description, IList dependsOn, IList userProperties, IDictionary additionalProperties, LinkedServiceReference linkedServiceName, ActivityPolicy policy, CopySource source, DatasetReference dataset, object firstRowOnly) : base(name, type, description, dependsOn, userProperties, additionalProperties, linkedServiceName, policy) + { + Source = source; + Dataset = dataset; + FirstRowOnly = firstRowOnly; + Type = type ?? "Lookup"; + } + + /// Dataset-specific source properties, same as copy activity source. + public CopySource Source { get; set; } + /// Lookup activity dataset reference. + public DatasetReference Dataset { get; set; } + /// Whether to return first row or all rows. Default value is true. Type: boolean (or Expression with resultType boolean). + public object FirstRowOnly { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MagentoLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MagentoLinkedService.Serialization.cs new file mode 100644 index 000000000000..f9880d9e1fa3 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MagentoLinkedService.Serialization.cs @@ -0,0 +1,243 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class MagentoLinkedService : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (ConnectVia != null) + { + writer.WritePropertyName("connectVia"); + writer.WriteObjectValue(ConnectVia); + } + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + writer.WritePropertyName("host"); + writer.WriteObjectValue(Host); + if (AccessToken != null) + { + writer.WritePropertyName("accessToken"); + writer.WriteObjectValue(AccessToken); + } + if (UseEncryptedEndpoints != null) + { + writer.WritePropertyName("useEncryptedEndpoints"); + writer.WriteObjectValue(UseEncryptedEndpoints); + } + if (UseHostVerification != null) + { + writer.WritePropertyName("useHostVerification"); + writer.WriteObjectValue(UseHostVerification); + } + if (UsePeerVerification != null) + { + writer.WritePropertyName("usePeerVerification"); + writer.WriteObjectValue(UsePeerVerification); + } + if (EncryptedCredential != null) + { + writer.WritePropertyName("encryptedCredential"); + writer.WriteObjectValue(EncryptedCredential); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static MagentoLinkedService DeserializeMagentoLinkedService(JsonElement element) + { + string type = default; + IntegrationRuntimeReference connectVia = default; + string description = default; + IDictionary parameters = default; + IList annotations = default; + object host = default; + SecretBase accessToken = default; + object useEncryptedEndpoints = default; + object useHostVerification = default; + object usePeerVerification = default; + object encryptedCredential = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("connectVia")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("host")) + { + host = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("accessToken")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + accessToken = SecretBase.DeserializeSecretBase(property0.Value); + continue; + } + if (property0.NameEquals("useEncryptedEndpoints")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + useEncryptedEndpoints = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("useHostVerification")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + useHostVerification = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("usePeerVerification")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + usePeerVerification = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("encryptedCredential")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + encryptedCredential = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new MagentoLinkedService(type, connectVia, description, parameters, annotations, additionalProperties, host, accessToken, useEncryptedEndpoints, useHostVerification, usePeerVerification, encryptedCredential); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MagentoLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MagentoLinkedService.cs new file mode 100644 index 000000000000..93f9417c69ba --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MagentoLinkedService.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Magento server linked service. + public partial class MagentoLinkedService : LinkedService + { + /// Initializes a new instance of MagentoLinkedService. + /// The URL of the Magento instance. (i.e. 192.168.222.110/magento3). + public MagentoLinkedService(object host) + { + if (host == null) + { + throw new ArgumentNullException(nameof(host)); + } + + Host = host; + Type = "Magento"; + } + + /// Initializes a new instance of MagentoLinkedService. + /// Type of linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for describing the linked service. + /// . + /// The URL of the Magento instance. (i.e. 192.168.222.110/magento3). + /// The access token from Magento. + /// Specifies whether the data source endpoints are encrypted using HTTPS. The default value is true. + /// Specifies whether to require the host name in the server's certificate to match the host name of the server when connecting over SSL. The default value is true. + /// Specifies whether to verify the identity of the server when connecting over SSL. The default value is true. + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + internal MagentoLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object host, SecretBase accessToken, object useEncryptedEndpoints, object useHostVerification, object usePeerVerification, object encryptedCredential) : base(type, connectVia, description, parameters, annotations, additionalProperties) + { + Host = host; + AccessToken = accessToken; + UseEncryptedEndpoints = useEncryptedEndpoints; + UseHostVerification = useHostVerification; + UsePeerVerification = usePeerVerification; + EncryptedCredential = encryptedCredential; + Type = type ?? "Magento"; + } + + /// The URL of the Magento instance. (i.e. 192.168.222.110/magento3). + public object Host { get; set; } + /// The access token from Magento. + public SecretBase AccessToken { get; set; } + /// Specifies whether the data source endpoints are encrypted using HTTPS. The default value is true. + public object UseEncryptedEndpoints { get; set; } + /// Specifies whether to require the host name in the server's certificate to match the host name of the server when connecting over SSL. The default value is true. + public object UseHostVerification { get; set; } + /// Specifies whether to verify the identity of the server when connecting over SSL. The default value is true. + public object UsePeerVerification { get; set; } + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + public object EncryptedCredential { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MagentoObjectDataset.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MagentoObjectDataset.Serialization.cs new file mode 100644 index 000000000000..a223646fa663 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MagentoObjectDataset.Serialization.cs @@ -0,0 +1,213 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class MagentoObjectDataset : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Structure != null) + { + writer.WritePropertyName("structure"); + writer.WriteObjectValue(Structure); + } + if (Schema != null) + { + writer.WritePropertyName("schema"); + writer.WriteObjectValue(Schema); + } + writer.WritePropertyName("linkedServiceName"); + writer.WriteObjectValue(LinkedServiceName); + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Folder != null) + { + writer.WritePropertyName("folder"); + writer.WriteObjectValue(Folder); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + if (TableName != null) + { + writer.WritePropertyName("tableName"); + writer.WriteObjectValue(TableName); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static MagentoObjectDataset DeserializeMagentoObjectDataset(JsonElement element) + { + string type = default; + string description = default; + object structure = default; + object schema = default; + LinkedServiceReference linkedServiceName = default; + IDictionary parameters = default; + IList annotations = default; + DatasetFolder folder = default; + object tableName = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("structure")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + structure = property.Value.GetObject(); + continue; + } + if (property.NameEquals("schema")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + schema = property.Value.GetObject(); + continue; + } + if (property.NameEquals("linkedServiceName")) + { + linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("folder")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + folder = DatasetFolder.DeserializeDatasetFolder(property.Value); + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("tableName")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + tableName = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new MagentoObjectDataset(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties, tableName); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MagentoObjectDataset.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MagentoObjectDataset.cs new file mode 100644 index 000000000000..e32a007b9214 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MagentoObjectDataset.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Magento server dataset. + public partial class MagentoObjectDataset : Dataset + { + /// Initializes a new instance of MagentoObjectDataset. + /// Linked service reference. + public MagentoObjectDataset(LinkedServiceReference linkedServiceName) : base(linkedServiceName) + { + if (linkedServiceName == null) + { + throw new ArgumentNullException(nameof(linkedServiceName)); + } + + Type = "MagentoObject"; + } + + /// Initializes a new instance of MagentoObjectDataset. + /// Type of dataset. + /// Dataset description. + /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. + /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. + /// Linked service reference. + /// Parameters for dataset. + /// List of tags that can be used for describing the Dataset. + /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. + /// . + /// The table name. Type: string (or Expression with resultType string). + internal MagentoObjectDataset(string type, string description, object structure, object schema, LinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary additionalProperties, object tableName) : base(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) + { + TableName = tableName; + Type = type ?? "MagentoObject"; + } + + /// The table name. Type: string (or Expression with resultType string). + public object TableName { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MappingDataFlow.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MappingDataFlow.Serialization.cs new file mode 100644 index 000000000000..8260f2c096a7 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MappingDataFlow.Serialization.cs @@ -0,0 +1,221 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class MappingDataFlow : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Folder != null) + { + writer.WritePropertyName("folder"); + writer.WriteObjectValue(Folder); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + if (Sources != null) + { + writer.WritePropertyName("sources"); + writer.WriteStartArray(); + foreach (var item in Sources) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Sinks != null) + { + writer.WritePropertyName("sinks"); + writer.WriteStartArray(); + foreach (var item in Sinks) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Transformations != null) + { + writer.WritePropertyName("transformations"); + writer.WriteStartArray(); + foreach (var item in Transformations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Script != null) + { + writer.WritePropertyName("script"); + writer.WriteStringValue(Script); + } + writer.WriteEndObject(); + writer.WriteEndObject(); + } + + internal static MappingDataFlow DeserializeMappingDataFlow(JsonElement element) + { + string type = default; + string description = default; + IList annotations = default; + DataFlowFolder folder = default; + IList sources = default; + IList sinks = default; + IList transformations = default; + string script = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("folder")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + folder = DataFlowFolder.DeserializeDataFlowFolder(property.Value); + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("sources")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(DataFlowSource.DeserializeDataFlowSource(item)); + } + } + sources = array; + continue; + } + if (property0.NameEquals("sinks")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(DataFlowSink.DeserializeDataFlowSink(item)); + } + } + sinks = array; + continue; + } + if (property0.NameEquals("transformations")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(Transformation.DeserializeTransformation(item)); + } + } + transformations = array; + continue; + } + if (property0.NameEquals("script")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + script = property0.Value.GetString(); + continue; + } + } + continue; + } + } + return new MappingDataFlow(type, description, annotations, folder, sources, sinks, transformations, script); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MappingDataFlow.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MappingDataFlow.cs new file mode 100644 index 000000000000..690da24b6a9a --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MappingDataFlow.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Mapping data flow. + public partial class MappingDataFlow : DataFlow + { + /// Initializes a new instance of MappingDataFlow. + public MappingDataFlow() + { + Type = "MappingDataFlow"; + } + + /// Initializes a new instance of MappingDataFlow. + /// Type of data flow. + /// The description of the data flow. + /// List of tags that can be used for describing the data flow. + /// The folder that this data flow is in. If not specified, Data flow will appear at the root level. + /// List of sources in data flow. + /// List of sinks in data flow. + /// List of transformations in data flow. + /// DataFlow script. + internal MappingDataFlow(string type, string description, IList annotations, DataFlowFolder folder, IList sources, IList sinks, IList transformations, string script) : base(type, description, annotations, folder) + { + Sources = sources; + Sinks = sinks; + Transformations = transformations; + Script = script; + Type = type ?? "MappingDataFlow"; + } + + /// List of sources in data flow. + public IList Sources { get; set; } + /// List of sinks in data flow. + public IList Sinks { get; set; } + /// List of transformations in data flow. + public IList Transformations { get; set; } + /// DataFlow script. + public string Script { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MariaDBLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MariaDBLinkedService.Serialization.cs new file mode 100644 index 000000000000..e7aaa30e980a --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MariaDBLinkedService.Serialization.cs @@ -0,0 +1,205 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class MariaDBLinkedService : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (ConnectVia != null) + { + writer.WritePropertyName("connectVia"); + writer.WriteObjectValue(ConnectVia); + } + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + if (ConnectionString != null) + { + writer.WritePropertyName("connectionString"); + writer.WriteObjectValue(ConnectionString); + } + if (Pwd != null) + { + writer.WritePropertyName("pwd"); + writer.WriteObjectValue(Pwd); + } + if (EncryptedCredential != null) + { + writer.WritePropertyName("encryptedCredential"); + writer.WriteObjectValue(EncryptedCredential); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static MariaDBLinkedService DeserializeMariaDBLinkedService(JsonElement element) + { + string type = default; + IntegrationRuntimeReference connectVia = default; + string description = default; + IDictionary parameters = default; + IList annotations = default; + object connectionString = default; + AzureKeyVaultSecretReference pwd = default; + object encryptedCredential = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("connectVia")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("connectionString")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectionString = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("pwd")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + pwd = AzureKeyVaultSecretReference.DeserializeAzureKeyVaultSecretReference(property0.Value); + continue; + } + if (property0.NameEquals("encryptedCredential")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + encryptedCredential = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new MariaDBLinkedService(type, connectVia, description, parameters, annotations, additionalProperties, connectionString, pwd, encryptedCredential); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MariaDBLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MariaDBLinkedService.cs new file mode 100644 index 000000000000..614c7aaa2bb4 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MariaDBLinkedService.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// MariaDB server linked service. + public partial class MariaDBLinkedService : LinkedService + { + /// Initializes a new instance of MariaDBLinkedService. + public MariaDBLinkedService() + { + Type = "MariaDB"; + } + + /// Initializes a new instance of MariaDBLinkedService. + /// Type of linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for describing the linked service. + /// . + /// An ODBC connection string. Type: string, SecureString or AzureKeyVaultSecretReference. + /// The Azure key vault secret reference of password in connection string. + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + internal MariaDBLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object connectionString, AzureKeyVaultSecretReference pwd, object encryptedCredential) : base(type, connectVia, description, parameters, annotations, additionalProperties) + { + ConnectionString = connectionString; + Pwd = pwd; + EncryptedCredential = encryptedCredential; + Type = type ?? "MariaDB"; + } + + /// An ODBC connection string. Type: string, SecureString or AzureKeyVaultSecretReference. + public object ConnectionString { get; set; } + /// The Azure key vault secret reference of password in connection string. + public AzureKeyVaultSecretReference Pwd { get; set; } + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + public object EncryptedCredential { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MariaDBTableDataset.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MariaDBTableDataset.Serialization.cs new file mode 100644 index 000000000000..c26c4c5399b9 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MariaDBTableDataset.Serialization.cs @@ -0,0 +1,213 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class MariaDBTableDataset : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Structure != null) + { + writer.WritePropertyName("structure"); + writer.WriteObjectValue(Structure); + } + if (Schema != null) + { + writer.WritePropertyName("schema"); + writer.WriteObjectValue(Schema); + } + writer.WritePropertyName("linkedServiceName"); + writer.WriteObjectValue(LinkedServiceName); + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Folder != null) + { + writer.WritePropertyName("folder"); + writer.WriteObjectValue(Folder); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + if (TableName != null) + { + writer.WritePropertyName("tableName"); + writer.WriteObjectValue(TableName); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static MariaDBTableDataset DeserializeMariaDBTableDataset(JsonElement element) + { + string type = default; + string description = default; + object structure = default; + object schema = default; + LinkedServiceReference linkedServiceName = default; + IDictionary parameters = default; + IList annotations = default; + DatasetFolder folder = default; + object tableName = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("structure")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + structure = property.Value.GetObject(); + continue; + } + if (property.NameEquals("schema")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + schema = property.Value.GetObject(); + continue; + } + if (property.NameEquals("linkedServiceName")) + { + linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("folder")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + folder = DatasetFolder.DeserializeDatasetFolder(property.Value); + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("tableName")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + tableName = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new MariaDBTableDataset(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties, tableName); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MariaDBTableDataset.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MariaDBTableDataset.cs new file mode 100644 index 000000000000..0a594266dc74 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MariaDBTableDataset.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// MariaDB server dataset. + public partial class MariaDBTableDataset : Dataset + { + /// Initializes a new instance of MariaDBTableDataset. + /// Linked service reference. + public MariaDBTableDataset(LinkedServiceReference linkedServiceName) : base(linkedServiceName) + { + if (linkedServiceName == null) + { + throw new ArgumentNullException(nameof(linkedServiceName)); + } + + Type = "MariaDBTable"; + } + + /// Initializes a new instance of MariaDBTableDataset. + /// Type of dataset. + /// Dataset description. + /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. + /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. + /// Linked service reference. + /// Parameters for dataset. + /// List of tags that can be used for describing the Dataset. + /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. + /// . + /// The table name. Type: string (or Expression with resultType string). + internal MariaDBTableDataset(string type, string description, object structure, object schema, LinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary additionalProperties, object tableName) : base(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) + { + TableName = tableName; + Type = type ?? "MariaDBTable"; + } + + /// The table name. Type: string (or Expression with resultType string). + public object TableName { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MarketoLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MarketoLinkedService.Serialization.cs new file mode 100644 index 000000000000..50ef11a1d58e --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MarketoLinkedService.Serialization.cs @@ -0,0 +1,251 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class MarketoLinkedService : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (ConnectVia != null) + { + writer.WritePropertyName("connectVia"); + writer.WriteObjectValue(ConnectVia); + } + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + writer.WritePropertyName("endpoint"); + writer.WriteObjectValue(Endpoint); + writer.WritePropertyName("clientId"); + writer.WriteObjectValue(ClientId); + if (ClientSecret != null) + { + writer.WritePropertyName("clientSecret"); + writer.WriteObjectValue(ClientSecret); + } + if (UseEncryptedEndpoints != null) + { + writer.WritePropertyName("useEncryptedEndpoints"); + writer.WriteObjectValue(UseEncryptedEndpoints); + } + if (UseHostVerification != null) + { + writer.WritePropertyName("useHostVerification"); + writer.WriteObjectValue(UseHostVerification); + } + if (UsePeerVerification != null) + { + writer.WritePropertyName("usePeerVerification"); + writer.WriteObjectValue(UsePeerVerification); + } + if (EncryptedCredential != null) + { + writer.WritePropertyName("encryptedCredential"); + writer.WriteObjectValue(EncryptedCredential); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static MarketoLinkedService DeserializeMarketoLinkedService(JsonElement element) + { + string type = default; + IntegrationRuntimeReference connectVia = default; + string description = default; + IDictionary parameters = default; + IList annotations = default; + object endpoint = default; + object clientId = default; + SecretBase clientSecret = default; + object useEncryptedEndpoints = default; + object useHostVerification = default; + object usePeerVerification = default; + object encryptedCredential = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("connectVia")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("endpoint")) + { + endpoint = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("clientId")) + { + clientId = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("clientSecret")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + clientSecret = SecretBase.DeserializeSecretBase(property0.Value); + continue; + } + if (property0.NameEquals("useEncryptedEndpoints")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + useEncryptedEndpoints = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("useHostVerification")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + useHostVerification = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("usePeerVerification")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + usePeerVerification = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("encryptedCredential")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + encryptedCredential = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new MarketoLinkedService(type, connectVia, description, parameters, annotations, additionalProperties, endpoint, clientId, clientSecret, useEncryptedEndpoints, useHostVerification, usePeerVerification, encryptedCredential); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MarketoLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MarketoLinkedService.cs new file mode 100644 index 000000000000..87a970da5d32 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MarketoLinkedService.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Marketo server linked service. + public partial class MarketoLinkedService : LinkedService + { + /// Initializes a new instance of MarketoLinkedService. + /// The endpoint of the Marketo server. (i.e. 123-ABC-321.mktorest.com). + /// The client Id of your Marketo service. + public MarketoLinkedService(object endpoint, object clientId) + { + if (endpoint == null) + { + throw new ArgumentNullException(nameof(endpoint)); + } + if (clientId == null) + { + throw new ArgumentNullException(nameof(clientId)); + } + + Endpoint = endpoint; + ClientId = clientId; + Type = "Marketo"; + } + + /// Initializes a new instance of MarketoLinkedService. + /// Type of linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for describing the linked service. + /// . + /// The endpoint of the Marketo server. (i.e. 123-ABC-321.mktorest.com). + /// The client Id of your Marketo service. + /// The client secret of your Marketo service. + /// Specifies whether the data source endpoints are encrypted using HTTPS. The default value is true. + /// Specifies whether to require the host name in the server's certificate to match the host name of the server when connecting over SSL. The default value is true. + /// Specifies whether to verify the identity of the server when connecting over SSL. The default value is true. + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + internal MarketoLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object endpoint, object clientId, SecretBase clientSecret, object useEncryptedEndpoints, object useHostVerification, object usePeerVerification, object encryptedCredential) : base(type, connectVia, description, parameters, annotations, additionalProperties) + { + Endpoint = endpoint; + ClientId = clientId; + ClientSecret = clientSecret; + UseEncryptedEndpoints = useEncryptedEndpoints; + UseHostVerification = useHostVerification; + UsePeerVerification = usePeerVerification; + EncryptedCredential = encryptedCredential; + Type = type ?? "Marketo"; + } + + /// The endpoint of the Marketo server. (i.e. 123-ABC-321.mktorest.com). + public object Endpoint { get; set; } + /// The client Id of your Marketo service. + public object ClientId { get; set; } + /// The client secret of your Marketo service. + public SecretBase ClientSecret { get; set; } + /// Specifies whether the data source endpoints are encrypted using HTTPS. The default value is true. + public object UseEncryptedEndpoints { get; set; } + /// Specifies whether to require the host name in the server's certificate to match the host name of the server when connecting over SSL. The default value is true. + public object UseHostVerification { get; set; } + /// Specifies whether to verify the identity of the server when connecting over SSL. The default value is true. + public object UsePeerVerification { get; set; } + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + public object EncryptedCredential { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MarketoObjectDataset.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MarketoObjectDataset.Serialization.cs new file mode 100644 index 000000000000..57a6bc701604 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MarketoObjectDataset.Serialization.cs @@ -0,0 +1,213 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class MarketoObjectDataset : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Structure != null) + { + writer.WritePropertyName("structure"); + writer.WriteObjectValue(Structure); + } + if (Schema != null) + { + writer.WritePropertyName("schema"); + writer.WriteObjectValue(Schema); + } + writer.WritePropertyName("linkedServiceName"); + writer.WriteObjectValue(LinkedServiceName); + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Folder != null) + { + writer.WritePropertyName("folder"); + writer.WriteObjectValue(Folder); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + if (TableName != null) + { + writer.WritePropertyName("tableName"); + writer.WriteObjectValue(TableName); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static MarketoObjectDataset DeserializeMarketoObjectDataset(JsonElement element) + { + string type = default; + string description = default; + object structure = default; + object schema = default; + LinkedServiceReference linkedServiceName = default; + IDictionary parameters = default; + IList annotations = default; + DatasetFolder folder = default; + object tableName = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("structure")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + structure = property.Value.GetObject(); + continue; + } + if (property.NameEquals("schema")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + schema = property.Value.GetObject(); + continue; + } + if (property.NameEquals("linkedServiceName")) + { + linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("folder")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + folder = DatasetFolder.DeserializeDatasetFolder(property.Value); + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("tableName")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + tableName = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new MarketoObjectDataset(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties, tableName); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MarketoObjectDataset.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MarketoObjectDataset.cs new file mode 100644 index 000000000000..47325ff9c3cb --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MarketoObjectDataset.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Marketo server dataset. + public partial class MarketoObjectDataset : Dataset + { + /// Initializes a new instance of MarketoObjectDataset. + /// Linked service reference. + public MarketoObjectDataset(LinkedServiceReference linkedServiceName) : base(linkedServiceName) + { + if (linkedServiceName == null) + { + throw new ArgumentNullException(nameof(linkedServiceName)); + } + + Type = "MarketoObject"; + } + + /// Initializes a new instance of MarketoObjectDataset. + /// Type of dataset. + /// Dataset description. + /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. + /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. + /// Linked service reference. + /// Parameters for dataset. + /// List of tags that can be used for describing the Dataset. + /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. + /// . + /// The table name. Type: string (or Expression with resultType string). + internal MarketoObjectDataset(string type, string description, object structure, object schema, LinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary additionalProperties, object tableName) : base(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) + { + TableName = tableName; + Type = type ?? "MarketoObject"; + } + + /// The table name. Type: string (or Expression with resultType string). + public object TableName { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MicrosoftAccessLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MicrosoftAccessLinkedService.Serialization.cs new file mode 100644 index 000000000000..a1bc0663b858 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MicrosoftAccessLinkedService.Serialization.cs @@ -0,0 +1,243 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class MicrosoftAccessLinkedService : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (ConnectVia != null) + { + writer.WritePropertyName("connectVia"); + writer.WriteObjectValue(ConnectVia); + } + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + writer.WritePropertyName("connectionString"); + writer.WriteObjectValue(ConnectionString); + if (AuthenticationType != null) + { + writer.WritePropertyName("authenticationType"); + writer.WriteObjectValue(AuthenticationType); + } + if (Credential != null) + { + writer.WritePropertyName("credential"); + writer.WriteObjectValue(Credential); + } + if (UserName != null) + { + writer.WritePropertyName("userName"); + writer.WriteObjectValue(UserName); + } + if (Password != null) + { + writer.WritePropertyName("password"); + writer.WriteObjectValue(Password); + } + if (EncryptedCredential != null) + { + writer.WritePropertyName("encryptedCredential"); + writer.WriteObjectValue(EncryptedCredential); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static MicrosoftAccessLinkedService DeserializeMicrosoftAccessLinkedService(JsonElement element) + { + string type = default; + IntegrationRuntimeReference connectVia = default; + string description = default; + IDictionary parameters = default; + IList annotations = default; + object connectionString = default; + object authenticationType = default; + SecretBase credential = default; + object userName = default; + SecretBase password = default; + object encryptedCredential = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("connectVia")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("connectionString")) + { + connectionString = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("authenticationType")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + authenticationType = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("credential")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + credential = SecretBase.DeserializeSecretBase(property0.Value); + continue; + } + if (property0.NameEquals("userName")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + userName = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("password")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + password = SecretBase.DeserializeSecretBase(property0.Value); + continue; + } + if (property0.NameEquals("encryptedCredential")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + encryptedCredential = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new MicrosoftAccessLinkedService(type, connectVia, description, parameters, annotations, additionalProperties, connectionString, authenticationType, credential, userName, password, encryptedCredential); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MicrosoftAccessLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MicrosoftAccessLinkedService.cs new file mode 100644 index 000000000000..e60c864f11c8 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MicrosoftAccessLinkedService.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Microsoft Access linked service. + public partial class MicrosoftAccessLinkedService : LinkedService + { + /// Initializes a new instance of MicrosoftAccessLinkedService. + /// The non-access credential portion of the connection string as well as an optional encrypted credential. Type: string, SecureString or AzureKeyVaultSecretReference. + public MicrosoftAccessLinkedService(object connectionString) + { + if (connectionString == null) + { + throw new ArgumentNullException(nameof(connectionString)); + } + + ConnectionString = connectionString; + Type = "MicrosoftAccess"; + } + + /// Initializes a new instance of MicrosoftAccessLinkedService. + /// Type of linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for describing the linked service. + /// . + /// The non-access credential portion of the connection string as well as an optional encrypted credential. Type: string, SecureString or AzureKeyVaultSecretReference. + /// Type of authentication used to connect to the Microsoft Access as ODBC data store. Possible values are: Anonymous and Basic. Type: string (or Expression with resultType string). + /// The access credential portion of the connection string specified in driver-specific property-value format. + /// User name for Basic authentication. Type: string (or Expression with resultType string). + /// Password for Basic authentication. + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + internal MicrosoftAccessLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object connectionString, object authenticationType, SecretBase credential, object userName, SecretBase password, object encryptedCredential) : base(type, connectVia, description, parameters, annotations, additionalProperties) + { + ConnectionString = connectionString; + AuthenticationType = authenticationType; + Credential = credential; + UserName = userName; + Password = password; + EncryptedCredential = encryptedCredential; + Type = type ?? "MicrosoftAccess"; + } + + /// The non-access credential portion of the connection string as well as an optional encrypted credential. Type: string, SecureString or AzureKeyVaultSecretReference. + public object ConnectionString { get; set; } + /// Type of authentication used to connect to the Microsoft Access as ODBC data store. Possible values are: Anonymous and Basic. Type: string (or Expression with resultType string). + public object AuthenticationType { get; set; } + /// The access credential portion of the connection string specified in driver-specific property-value format. + public SecretBase Credential { get; set; } + /// User name for Basic authentication. Type: string (or Expression with resultType string). + public object UserName { get; set; } + /// Password for Basic authentication. + public SecretBase Password { get; set; } + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + public object EncryptedCredential { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MicrosoftAccessTableDataset.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MicrosoftAccessTableDataset.Serialization.cs new file mode 100644 index 000000000000..41dbe312e90a --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MicrosoftAccessTableDataset.Serialization.cs @@ -0,0 +1,213 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class MicrosoftAccessTableDataset : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Structure != null) + { + writer.WritePropertyName("structure"); + writer.WriteObjectValue(Structure); + } + if (Schema != null) + { + writer.WritePropertyName("schema"); + writer.WriteObjectValue(Schema); + } + writer.WritePropertyName("linkedServiceName"); + writer.WriteObjectValue(LinkedServiceName); + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Folder != null) + { + writer.WritePropertyName("folder"); + writer.WriteObjectValue(Folder); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + if (TableName != null) + { + writer.WritePropertyName("tableName"); + writer.WriteObjectValue(TableName); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static MicrosoftAccessTableDataset DeserializeMicrosoftAccessTableDataset(JsonElement element) + { + string type = default; + string description = default; + object structure = default; + object schema = default; + LinkedServiceReference linkedServiceName = default; + IDictionary parameters = default; + IList annotations = default; + DatasetFolder folder = default; + object tableName = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("structure")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + structure = property.Value.GetObject(); + continue; + } + if (property.NameEquals("schema")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + schema = property.Value.GetObject(); + continue; + } + if (property.NameEquals("linkedServiceName")) + { + linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("folder")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + folder = DatasetFolder.DeserializeDatasetFolder(property.Value); + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("tableName")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + tableName = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new MicrosoftAccessTableDataset(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties, tableName); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MicrosoftAccessTableDataset.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MicrosoftAccessTableDataset.cs new file mode 100644 index 000000000000..b127666ec2b7 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MicrosoftAccessTableDataset.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// The Microsoft Access table dataset. + public partial class MicrosoftAccessTableDataset : Dataset + { + /// Initializes a new instance of MicrosoftAccessTableDataset. + /// Linked service reference. + public MicrosoftAccessTableDataset(LinkedServiceReference linkedServiceName) : base(linkedServiceName) + { + if (linkedServiceName == null) + { + throw new ArgumentNullException(nameof(linkedServiceName)); + } + + Type = "MicrosoftAccessTable"; + } + + /// Initializes a new instance of MicrosoftAccessTableDataset. + /// Type of dataset. + /// Dataset description. + /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. + /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. + /// Linked service reference. + /// Parameters for dataset. + /// List of tags that can be used for describing the Dataset. + /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. + /// . + /// The Microsoft Access table name. Type: string (or Expression with resultType string). + internal MicrosoftAccessTableDataset(string type, string description, object structure, object schema, LinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary additionalProperties, object tableName) : base(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) + { + TableName = tableName; + Type = type ?? "MicrosoftAccessTable"; + } + + /// The Microsoft Access table name. Type: string (or Expression with resultType string). + public object TableName { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MongoDbAuthenticationType.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MongoDbAuthenticationType.cs new file mode 100644 index 000000000000..0e7b359248f8 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MongoDbAuthenticationType.cs @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// The authentication type to be used to connect to the MongoDB database. + public readonly partial struct MongoDbAuthenticationType : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + public MongoDbAuthenticationType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string BasicValue = "Basic"; + private const string AnonymousValue = "Anonymous"; + + /// Basic. + public static MongoDbAuthenticationType Basic { get; } = new MongoDbAuthenticationType(BasicValue); + /// Anonymous. + public static MongoDbAuthenticationType Anonymous { get; } = new MongoDbAuthenticationType(AnonymousValue); + /// Determines if two values are the same. + public static bool operator ==(MongoDbAuthenticationType left, MongoDbAuthenticationType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(MongoDbAuthenticationType left, MongoDbAuthenticationType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator MongoDbAuthenticationType(string value) => new MongoDbAuthenticationType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is MongoDbAuthenticationType other && Equals(other); + /// + public bool Equals(MongoDbAuthenticationType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MongoDbCollectionDataset.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MongoDbCollectionDataset.Serialization.cs new file mode 100644 index 000000000000..aba387dde630 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MongoDbCollectionDataset.Serialization.cs @@ -0,0 +1,206 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class MongoDbCollectionDataset : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Structure != null) + { + writer.WritePropertyName("structure"); + writer.WriteObjectValue(Structure); + } + if (Schema != null) + { + writer.WritePropertyName("schema"); + writer.WriteObjectValue(Schema); + } + writer.WritePropertyName("linkedServiceName"); + writer.WriteObjectValue(LinkedServiceName); + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Folder != null) + { + writer.WritePropertyName("folder"); + writer.WriteObjectValue(Folder); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + writer.WritePropertyName("collectionName"); + writer.WriteObjectValue(CollectionName); + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static MongoDbCollectionDataset DeserializeMongoDbCollectionDataset(JsonElement element) + { + string type = default; + string description = default; + object structure = default; + object schema = default; + LinkedServiceReference linkedServiceName = default; + IDictionary parameters = default; + IList annotations = default; + DatasetFolder folder = default; + object collectionName = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("structure")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + structure = property.Value.GetObject(); + continue; + } + if (property.NameEquals("schema")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + schema = property.Value.GetObject(); + continue; + } + if (property.NameEquals("linkedServiceName")) + { + linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("folder")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + folder = DatasetFolder.DeserializeDatasetFolder(property.Value); + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("collectionName")) + { + collectionName = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new MongoDbCollectionDataset(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties, collectionName); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MongoDbCollectionDataset.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MongoDbCollectionDataset.cs new file mode 100644 index 000000000000..90f637a8db50 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MongoDbCollectionDataset.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// The MongoDB database dataset. + public partial class MongoDbCollectionDataset : Dataset + { + /// Initializes a new instance of MongoDbCollectionDataset. + /// Linked service reference. + /// The table name of the MongoDB database. Type: string (or Expression with resultType string). + public MongoDbCollectionDataset(LinkedServiceReference linkedServiceName, object collectionName) : base(linkedServiceName) + { + if (linkedServiceName == null) + { + throw new ArgumentNullException(nameof(linkedServiceName)); + } + if (collectionName == null) + { + throw new ArgumentNullException(nameof(collectionName)); + } + + CollectionName = collectionName; + Type = "MongoDbCollection"; + } + + /// Initializes a new instance of MongoDbCollectionDataset. + /// Type of dataset. + /// Dataset description. + /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. + /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. + /// Linked service reference. + /// Parameters for dataset. + /// List of tags that can be used for describing the Dataset. + /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. + /// . + /// The table name of the MongoDB database. Type: string (or Expression with resultType string). + internal MongoDbCollectionDataset(string type, string description, object structure, object schema, LinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary additionalProperties, object collectionName) : base(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) + { + CollectionName = collectionName; + Type = type ?? "MongoDbCollection"; + } + + /// The table name of the MongoDB database. Type: string (or Expression with resultType string). + public object CollectionName { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MongoDbLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MongoDbLinkedService.Serialization.cs new file mode 100644 index 000000000000..b12ee1175e94 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MongoDbLinkedService.Serialization.cs @@ -0,0 +1,296 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class MongoDbLinkedService : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (ConnectVia != null) + { + writer.WritePropertyName("connectVia"); + writer.WriteObjectValue(ConnectVia); + } + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + writer.WritePropertyName("server"); + writer.WriteObjectValue(Server); + if (AuthenticationType != null) + { + writer.WritePropertyName("authenticationType"); + writer.WriteStringValue(AuthenticationType.Value.ToString()); + } + writer.WritePropertyName("databaseName"); + writer.WriteObjectValue(DatabaseName); + if (Username != null) + { + writer.WritePropertyName("username"); + writer.WriteObjectValue(Username); + } + if (Password != null) + { + writer.WritePropertyName("password"); + writer.WriteObjectValue(Password); + } + if (AuthSource != null) + { + writer.WritePropertyName("authSource"); + writer.WriteObjectValue(AuthSource); + } + if (Port != null) + { + writer.WritePropertyName("port"); + writer.WriteObjectValue(Port); + } + if (EnableSsl != null) + { + writer.WritePropertyName("enableSsl"); + writer.WriteObjectValue(EnableSsl); + } + if (AllowSelfSignedServerCert != null) + { + writer.WritePropertyName("allowSelfSignedServerCert"); + writer.WriteObjectValue(AllowSelfSignedServerCert); + } + if (EncryptedCredential != null) + { + writer.WritePropertyName("encryptedCredential"); + writer.WriteObjectValue(EncryptedCredential); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static MongoDbLinkedService DeserializeMongoDbLinkedService(JsonElement element) + { + string type = default; + IntegrationRuntimeReference connectVia = default; + string description = default; + IDictionary parameters = default; + IList annotations = default; + object server = default; + MongoDbAuthenticationType? authenticationType = default; + object databaseName = default; + object username = default; + SecretBase password = default; + object authSource = default; + object port = default; + object enableSsl = default; + object allowSelfSignedServerCert = default; + object encryptedCredential = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("connectVia")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("server")) + { + server = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("authenticationType")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + authenticationType = new MongoDbAuthenticationType(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("databaseName")) + { + databaseName = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("username")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + username = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("password")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + password = SecretBase.DeserializeSecretBase(property0.Value); + continue; + } + if (property0.NameEquals("authSource")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + authSource = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("port")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + port = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("enableSsl")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + enableSsl = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("allowSelfSignedServerCert")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + allowSelfSignedServerCert = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("encryptedCredential")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + encryptedCredential = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new MongoDbLinkedService(type, connectVia, description, parameters, annotations, additionalProperties, server, authenticationType, databaseName, username, password, authSource, port, enableSsl, allowSelfSignedServerCert, encryptedCredential); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MongoDbLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MongoDbLinkedService.cs new file mode 100644 index 000000000000..c77faf6ad383 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MongoDbLinkedService.cs @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Linked service for MongoDb data source. + public partial class MongoDbLinkedService : LinkedService + { + /// Initializes a new instance of MongoDbLinkedService. + /// The IP address or server name of the MongoDB server. Type: string (or Expression with resultType string). + /// The name of the MongoDB database that you want to access. Type: string (or Expression with resultType string). + public MongoDbLinkedService(object server, object databaseName) + { + if (server == null) + { + throw new ArgumentNullException(nameof(server)); + } + if (databaseName == null) + { + throw new ArgumentNullException(nameof(databaseName)); + } + + Server = server; + DatabaseName = databaseName; + Type = "MongoDb"; + } + + /// Initializes a new instance of MongoDbLinkedService. + /// Type of linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for describing the linked service. + /// . + /// The IP address or server name of the MongoDB server. Type: string (or Expression with resultType string). + /// The authentication type to be used to connect to the MongoDB database. + /// The name of the MongoDB database that you want to access. Type: string (or Expression with resultType string). + /// Username for authentication. Type: string (or Expression with resultType string). + /// Password for authentication. + /// Database to verify the username and password. Type: string (or Expression with resultType string). + /// The TCP port number that the MongoDB server uses to listen for client connections. The default value is 27017. Type: integer (or Expression with resultType integer), minimum: 0. + /// Specifies whether the connections to the server are encrypted using SSL. The default value is false. Type: boolean (or Expression with resultType boolean). + /// Specifies whether to allow self-signed certificates from the server. The default value is false. Type: boolean (or Expression with resultType boolean). + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + internal MongoDbLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object server, MongoDbAuthenticationType? authenticationType, object databaseName, object username, SecretBase password, object authSource, object port, object enableSsl, object allowSelfSignedServerCert, object encryptedCredential) : base(type, connectVia, description, parameters, annotations, additionalProperties) + { + Server = server; + AuthenticationType = authenticationType; + DatabaseName = databaseName; + Username = username; + Password = password; + AuthSource = authSource; + Port = port; + EnableSsl = enableSsl; + AllowSelfSignedServerCert = allowSelfSignedServerCert; + EncryptedCredential = encryptedCredential; + Type = type ?? "MongoDb"; + } + + /// The IP address or server name of the MongoDB server. Type: string (or Expression with resultType string). + public object Server { get; set; } + /// The authentication type to be used to connect to the MongoDB database. + public MongoDbAuthenticationType? AuthenticationType { get; set; } + /// The name of the MongoDB database that you want to access. Type: string (or Expression with resultType string). + public object DatabaseName { get; set; } + /// Username for authentication. Type: string (or Expression with resultType string). + public object Username { get; set; } + /// Password for authentication. + public SecretBase Password { get; set; } + /// Database to verify the username and password. Type: string (or Expression with resultType string). + public object AuthSource { get; set; } + /// The TCP port number that the MongoDB server uses to listen for client connections. The default value is 27017. Type: integer (or Expression with resultType integer), minimum: 0. + public object Port { get; set; } + /// Specifies whether the connections to the server are encrypted using SSL. The default value is false. Type: boolean (or Expression with resultType boolean). + public object EnableSsl { get; set; } + /// Specifies whether to allow self-signed certificates from the server. The default value is false. Type: boolean (or Expression with resultType boolean). + public object AllowSelfSignedServerCert { get; set; } + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + public object EncryptedCredential { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MongoDbV2CollectionDataset.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MongoDbV2CollectionDataset.Serialization.cs new file mode 100644 index 000000000000..82e96b79a709 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MongoDbV2CollectionDataset.Serialization.cs @@ -0,0 +1,206 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class MongoDbV2CollectionDataset : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Structure != null) + { + writer.WritePropertyName("structure"); + writer.WriteObjectValue(Structure); + } + if (Schema != null) + { + writer.WritePropertyName("schema"); + writer.WriteObjectValue(Schema); + } + writer.WritePropertyName("linkedServiceName"); + writer.WriteObjectValue(LinkedServiceName); + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Folder != null) + { + writer.WritePropertyName("folder"); + writer.WriteObjectValue(Folder); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + writer.WritePropertyName("collection"); + writer.WriteObjectValue(Collection); + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static MongoDbV2CollectionDataset DeserializeMongoDbV2CollectionDataset(JsonElement element) + { + string type = default; + string description = default; + object structure = default; + object schema = default; + LinkedServiceReference linkedServiceName = default; + IDictionary parameters = default; + IList annotations = default; + DatasetFolder folder = default; + object collection = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("structure")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + structure = property.Value.GetObject(); + continue; + } + if (property.NameEquals("schema")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + schema = property.Value.GetObject(); + continue; + } + if (property.NameEquals("linkedServiceName")) + { + linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("folder")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + folder = DatasetFolder.DeserializeDatasetFolder(property.Value); + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("collection")) + { + collection = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new MongoDbV2CollectionDataset(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties, collection); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MongoDbV2CollectionDataset.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MongoDbV2CollectionDataset.cs new file mode 100644 index 000000000000..7fb0aa4a80af --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MongoDbV2CollectionDataset.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// The MongoDB database dataset. + public partial class MongoDbV2CollectionDataset : Dataset + { + /// Initializes a new instance of MongoDbV2CollectionDataset. + /// Linked service reference. + /// The collection name of the MongoDB database. Type: string (or Expression with resultType string). + public MongoDbV2CollectionDataset(LinkedServiceReference linkedServiceName, object collection) : base(linkedServiceName) + { + if (linkedServiceName == null) + { + throw new ArgumentNullException(nameof(linkedServiceName)); + } + if (collection == null) + { + throw new ArgumentNullException(nameof(collection)); + } + + Collection = collection; + Type = "MongoDbV2Collection"; + } + + /// Initializes a new instance of MongoDbV2CollectionDataset. + /// Type of dataset. + /// Dataset description. + /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. + /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. + /// Linked service reference. + /// Parameters for dataset. + /// List of tags that can be used for describing the Dataset. + /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. + /// . + /// The collection name of the MongoDB database. Type: string (or Expression with resultType string). + internal MongoDbV2CollectionDataset(string type, string description, object structure, object schema, LinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary additionalProperties, object collection) : base(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) + { + Collection = collection; + Type = type ?? "MongoDbV2Collection"; + } + + /// The collection name of the MongoDB database. Type: string (or Expression with resultType string). + public object Collection { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MongoDbV2LinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MongoDbV2LinkedService.Serialization.cs new file mode 100644 index 000000000000..2293dd2fbd44 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MongoDbV2LinkedService.Serialization.cs @@ -0,0 +1,176 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class MongoDbV2LinkedService : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (ConnectVia != null) + { + writer.WritePropertyName("connectVia"); + writer.WriteObjectValue(ConnectVia); + } + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + writer.WritePropertyName("connectionString"); + writer.WriteObjectValue(ConnectionString); + writer.WritePropertyName("database"); + writer.WriteObjectValue(Database); + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static MongoDbV2LinkedService DeserializeMongoDbV2LinkedService(JsonElement element) + { + string type = default; + IntegrationRuntimeReference connectVia = default; + string description = default; + IDictionary parameters = default; + IList annotations = default; + object connectionString = default; + object database = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("connectVia")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("connectionString")) + { + connectionString = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("database")) + { + database = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new MongoDbV2LinkedService(type, connectVia, description, parameters, annotations, additionalProperties, connectionString, database); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MongoDbV2LinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MongoDbV2LinkedService.cs new file mode 100644 index 000000000000..96ed255dc582 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MongoDbV2LinkedService.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Linked service for MongoDB data source. + public partial class MongoDbV2LinkedService : LinkedService + { + /// Initializes a new instance of MongoDbV2LinkedService. + /// The MongoDB connection string. Type: string, SecureString or AzureKeyVaultSecretReference. Type: string, SecureString or AzureKeyVaultSecretReference. + /// The name of the MongoDB database that you want to access. Type: string (or Expression with resultType string). + public MongoDbV2LinkedService(object connectionString, object database) + { + if (connectionString == null) + { + throw new ArgumentNullException(nameof(connectionString)); + } + if (database == null) + { + throw new ArgumentNullException(nameof(database)); + } + + ConnectionString = connectionString; + Database = database; + Type = "MongoDbV2"; + } + + /// Initializes a new instance of MongoDbV2LinkedService. + /// Type of linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for describing the linked service. + /// . + /// The MongoDB connection string. Type: string, SecureString or AzureKeyVaultSecretReference. Type: string, SecureString or AzureKeyVaultSecretReference. + /// The name of the MongoDB database that you want to access. Type: string (or Expression with resultType string). + internal MongoDbV2LinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object connectionString, object database) : base(type, connectVia, description, parameters, annotations, additionalProperties) + { + ConnectionString = connectionString; + Database = database; + Type = type ?? "MongoDbV2"; + } + + /// The MongoDB connection string. Type: string, SecureString or AzureKeyVaultSecretReference. Type: string, SecureString or AzureKeyVaultSecretReference. + public object ConnectionString { get; set; } + /// The name of the MongoDB database that you want to access. Type: string (or Expression with resultType string). + public object Database { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MultiplePipelineTrigger.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MultiplePipelineTrigger.Serialization.cs new file mode 100644 index 000000000000..aceba2333f67 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MultiplePipelineTrigger.Serialization.cs @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class MultiplePipelineTrigger : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Pipelines != null) + { + writer.WritePropertyName("pipelines"); + writer.WriteStartArray(); + foreach (var item in Pipelines) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (RuntimeState != null) + { + writer.WritePropertyName("runtimeState"); + writer.WriteStringValue(RuntimeState.Value.ToString()); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static MultiplePipelineTrigger DeserializeMultiplePipelineTrigger(JsonElement element) + { + IList pipelines = default; + string type = default; + string description = default; + TriggerRuntimeState? runtimeState = default; + IList annotations = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("pipelines")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(TriggerPipelineReference.DeserializeTriggerPipelineReference(item)); + } + } + pipelines = array; + continue; + } + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("runtimeState")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + runtimeState = new TriggerRuntimeState(property.Value.GetString()); + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new MultiplePipelineTrigger(type, description, runtimeState, annotations, additionalProperties, pipelines); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MultiplePipelineTrigger.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MultiplePipelineTrigger.cs new file mode 100644 index 000000000000..e898fca7fcf5 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MultiplePipelineTrigger.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Base class for all triggers that support one to many model for trigger to pipeline. + public partial class MultiplePipelineTrigger : Trigger + { + /// Initializes a new instance of MultiplePipelineTrigger. + public MultiplePipelineTrigger() + { + Type = "MultiplePipelineTrigger"; + } + + /// Initializes a new instance of MultiplePipelineTrigger. + /// Trigger type. + /// Trigger description. + /// Indicates if trigger is running or not. Updated when Start/Stop APIs are called on the Trigger. + /// List of tags that can be used for describing the trigger. + /// . + /// Pipelines that need to be started. + internal MultiplePipelineTrigger(string type, string description, TriggerRuntimeState? runtimeState, IList annotations, IDictionary additionalProperties, IList pipelines) : base(type, description, runtimeState, annotations, additionalProperties) + { + Pipelines = pipelines; + Type = type ?? "MultiplePipelineTrigger"; + } + + /// Pipelines that need to be started. + public IList Pipelines { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MySqlLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MySqlLinkedService.Serialization.cs new file mode 100644 index 000000000000..252ac806ab33 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MySqlLinkedService.Serialization.cs @@ -0,0 +1,198 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class MySqlLinkedService : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (ConnectVia != null) + { + writer.WritePropertyName("connectVia"); + writer.WriteObjectValue(ConnectVia); + } + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + writer.WritePropertyName("connectionString"); + writer.WriteObjectValue(ConnectionString); + if (Password != null) + { + writer.WritePropertyName("password"); + writer.WriteObjectValue(Password); + } + if (EncryptedCredential != null) + { + writer.WritePropertyName("encryptedCredential"); + writer.WriteObjectValue(EncryptedCredential); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static MySqlLinkedService DeserializeMySqlLinkedService(JsonElement element) + { + string type = default; + IntegrationRuntimeReference connectVia = default; + string description = default; + IDictionary parameters = default; + IList annotations = default; + object connectionString = default; + AzureKeyVaultSecretReference password = default; + object encryptedCredential = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("connectVia")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("connectionString")) + { + connectionString = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("password")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + password = AzureKeyVaultSecretReference.DeserializeAzureKeyVaultSecretReference(property0.Value); + continue; + } + if (property0.NameEquals("encryptedCredential")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + encryptedCredential = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new MySqlLinkedService(type, connectVia, description, parameters, annotations, additionalProperties, connectionString, password, encryptedCredential); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MySqlLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MySqlLinkedService.cs new file mode 100644 index 000000000000..93dec4db877b --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MySqlLinkedService.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Linked service for MySQL data source. + public partial class MySqlLinkedService : LinkedService + { + /// Initializes a new instance of MySqlLinkedService. + /// The connection string. + public MySqlLinkedService(object connectionString) + { + if (connectionString == null) + { + throw new ArgumentNullException(nameof(connectionString)); + } + + ConnectionString = connectionString; + Type = "MySql"; + } + + /// Initializes a new instance of MySqlLinkedService. + /// Type of linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for describing the linked service. + /// . + /// The connection string. + /// The Azure key vault secret reference of password in connection string. + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + internal MySqlLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object connectionString, AzureKeyVaultSecretReference password, object encryptedCredential) : base(type, connectVia, description, parameters, annotations, additionalProperties) + { + ConnectionString = connectionString; + Password = password; + EncryptedCredential = encryptedCredential; + Type = type ?? "MySql"; + } + + /// The connection string. + public object ConnectionString { get; set; } + /// The Azure key vault secret reference of password in connection string. + public AzureKeyVaultSecretReference Password { get; set; } + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + public object EncryptedCredential { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MySqlTableDataset.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MySqlTableDataset.Serialization.cs new file mode 100644 index 000000000000..6cd33922b494 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MySqlTableDataset.Serialization.cs @@ -0,0 +1,213 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class MySqlTableDataset : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Structure != null) + { + writer.WritePropertyName("structure"); + writer.WriteObjectValue(Structure); + } + if (Schema != null) + { + writer.WritePropertyName("schema"); + writer.WriteObjectValue(Schema); + } + writer.WritePropertyName("linkedServiceName"); + writer.WriteObjectValue(LinkedServiceName); + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Folder != null) + { + writer.WritePropertyName("folder"); + writer.WriteObjectValue(Folder); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + if (TableName != null) + { + writer.WritePropertyName("tableName"); + writer.WriteObjectValue(TableName); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static MySqlTableDataset DeserializeMySqlTableDataset(JsonElement element) + { + string type = default; + string description = default; + object structure = default; + object schema = default; + LinkedServiceReference linkedServiceName = default; + IDictionary parameters = default; + IList annotations = default; + DatasetFolder folder = default; + object tableName = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("structure")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + structure = property.Value.GetObject(); + continue; + } + if (property.NameEquals("schema")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + schema = property.Value.GetObject(); + continue; + } + if (property.NameEquals("linkedServiceName")) + { + linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("folder")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + folder = DatasetFolder.DeserializeDatasetFolder(property.Value); + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("tableName")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + tableName = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new MySqlTableDataset(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties, tableName); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MySqlTableDataset.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MySqlTableDataset.cs new file mode 100644 index 000000000000..a71c3ef6e946 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MySqlTableDataset.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// The MySQL table dataset. + public partial class MySqlTableDataset : Dataset + { + /// Initializes a new instance of MySqlTableDataset. + /// Linked service reference. + public MySqlTableDataset(LinkedServiceReference linkedServiceName) : base(linkedServiceName) + { + if (linkedServiceName == null) + { + throw new ArgumentNullException(nameof(linkedServiceName)); + } + + Type = "MySqlTable"; + } + + /// Initializes a new instance of MySqlTableDataset. + /// Type of dataset. + /// Dataset description. + /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. + /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. + /// Linked service reference. + /// Parameters for dataset. + /// List of tags that can be used for describing the Dataset. + /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. + /// . + /// The MySQL table name. Type: string (or Expression with resultType string). + internal MySqlTableDataset(string type, string description, object structure, object schema, LinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary additionalProperties, object tableName) : base(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) + { + TableName = tableName; + Type = type ?? "MySqlTable"; + } + + /// The MySQL table name. Type: string (or Expression with resultType string). + public object TableName { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/NetezzaLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/NetezzaLinkedService.Serialization.cs new file mode 100644 index 000000000000..558026c5eeb8 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/NetezzaLinkedService.Serialization.cs @@ -0,0 +1,205 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class NetezzaLinkedService : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (ConnectVia != null) + { + writer.WritePropertyName("connectVia"); + writer.WriteObjectValue(ConnectVia); + } + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + if (ConnectionString != null) + { + writer.WritePropertyName("connectionString"); + writer.WriteObjectValue(ConnectionString); + } + if (Pwd != null) + { + writer.WritePropertyName("pwd"); + writer.WriteObjectValue(Pwd); + } + if (EncryptedCredential != null) + { + writer.WritePropertyName("encryptedCredential"); + writer.WriteObjectValue(EncryptedCredential); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static NetezzaLinkedService DeserializeNetezzaLinkedService(JsonElement element) + { + string type = default; + IntegrationRuntimeReference connectVia = default; + string description = default; + IDictionary parameters = default; + IList annotations = default; + object connectionString = default; + AzureKeyVaultSecretReference pwd = default; + object encryptedCredential = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("connectVia")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("connectionString")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectionString = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("pwd")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + pwd = AzureKeyVaultSecretReference.DeserializeAzureKeyVaultSecretReference(property0.Value); + continue; + } + if (property0.NameEquals("encryptedCredential")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + encryptedCredential = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new NetezzaLinkedService(type, connectVia, description, parameters, annotations, additionalProperties, connectionString, pwd, encryptedCredential); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/NetezzaLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/NetezzaLinkedService.cs new file mode 100644 index 000000000000..e6a3719129a2 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/NetezzaLinkedService.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Netezza linked service. + public partial class NetezzaLinkedService : LinkedService + { + /// Initializes a new instance of NetezzaLinkedService. + public NetezzaLinkedService() + { + Type = "Netezza"; + } + + /// Initializes a new instance of NetezzaLinkedService. + /// Type of linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for describing the linked service. + /// . + /// An ODBC connection string. Type: string, SecureString or AzureKeyVaultSecretReference. + /// The Azure key vault secret reference of password in connection string. + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + internal NetezzaLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object connectionString, AzureKeyVaultSecretReference pwd, object encryptedCredential) : base(type, connectVia, description, parameters, annotations, additionalProperties) + { + ConnectionString = connectionString; + Pwd = pwd; + EncryptedCredential = encryptedCredential; + Type = type ?? "Netezza"; + } + + /// An ODBC connection string. Type: string, SecureString or AzureKeyVaultSecretReference. + public object ConnectionString { get; set; } + /// The Azure key vault secret reference of password in connection string. + public AzureKeyVaultSecretReference Pwd { get; set; } + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + public object EncryptedCredential { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/NetezzaTableDataset.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/NetezzaTableDataset.Serialization.cs new file mode 100644 index 000000000000..885edd335d28 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/NetezzaTableDataset.Serialization.cs @@ -0,0 +1,243 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class NetezzaTableDataset : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Structure != null) + { + writer.WritePropertyName("structure"); + writer.WriteObjectValue(Structure); + } + if (Schema != null) + { + writer.WritePropertyName("schema"); + writer.WriteObjectValue(Schema); + } + writer.WritePropertyName("linkedServiceName"); + writer.WriteObjectValue(LinkedServiceName); + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Folder != null) + { + writer.WritePropertyName("folder"); + writer.WriteObjectValue(Folder); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + if (TableName != null) + { + writer.WritePropertyName("tableName"); + writer.WriteObjectValue(TableName); + } + if (Table != null) + { + writer.WritePropertyName("table"); + writer.WriteObjectValue(Table); + } + if (SchemaTypePropertiesSchema != null) + { + writer.WritePropertyName("schema"); + writer.WriteObjectValue(SchemaTypePropertiesSchema); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static NetezzaTableDataset DeserializeNetezzaTableDataset(JsonElement element) + { + string type = default; + string description = default; + object structure = default; + object schema = default; + LinkedServiceReference linkedServiceName = default; + IDictionary parameters = default; + IList annotations = default; + DatasetFolder folder = default; + object tableName = default; + object table = default; + object schema0 = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("structure")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + structure = property.Value.GetObject(); + continue; + } + if (property.NameEquals("schema")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + schema = property.Value.GetObject(); + continue; + } + if (property.NameEquals("linkedServiceName")) + { + linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("folder")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + folder = DatasetFolder.DeserializeDatasetFolder(property.Value); + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("tableName")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + tableName = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("table")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + table = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("schema")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + schema0 = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new NetezzaTableDataset(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties, tableName, table, schema0); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/NetezzaTableDataset.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/NetezzaTableDataset.cs new file mode 100644 index 000000000000..eaa62a9dd3fc --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/NetezzaTableDataset.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Netezza dataset. + public partial class NetezzaTableDataset : Dataset + { + /// Initializes a new instance of NetezzaTableDataset. + /// Linked service reference. + public NetezzaTableDataset(LinkedServiceReference linkedServiceName) : base(linkedServiceName) + { + if (linkedServiceName == null) + { + throw new ArgumentNullException(nameof(linkedServiceName)); + } + + Type = "NetezzaTable"; + } + + /// Initializes a new instance of NetezzaTableDataset. + /// Type of dataset. + /// Dataset description. + /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. + /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. + /// Linked service reference. + /// Parameters for dataset. + /// List of tags that can be used for describing the Dataset. + /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. + /// . + /// This property will be retired. Please consider using schema + table properties instead. + /// The table name of the Netezza. Type: string (or Expression with resultType string). + /// The schema name of the Netezza. Type: string (or Expression with resultType string). + internal NetezzaTableDataset(string type, string description, object structure, object schema, LinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary additionalProperties, object tableName, object table, object schemaTypePropertiesSchema) : base(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) + { + TableName = tableName; + Table = table; + SchemaTypePropertiesSchema = schemaTypePropertiesSchema; + Type = type ?? "NetezzaTable"; + } + + /// This property will be retired. Please consider using schema + table properties instead. + public object TableName { get; set; } + /// The table name of the Netezza. Type: string (or Expression with resultType string). + public object Table { get; set; } + /// The schema name of the Netezza. Type: string (or Expression with resultType string). + public object SchemaTypePropertiesSchema { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/Notebook.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/Notebook.Serialization.cs new file mode 100644 index 000000000000..4d974011b591 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/Notebook.Serialization.cs @@ -0,0 +1,141 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class Notebook : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (BigDataPool != null) + { + writer.WritePropertyName("bigDataPool"); + writer.WriteObjectValue(BigDataPool); + } + if (SessionProperties != null) + { + writer.WritePropertyName("sessionProperties"); + writer.WriteObjectValue(SessionProperties); + } + writer.WritePropertyName("metadata"); + writer.WriteObjectValue(Metadata); + writer.WritePropertyName("nbformat"); + writer.WriteNumberValue(Nbformat); + writer.WritePropertyName("nbformat_minor"); + writer.WriteNumberValue(NbformatMinor); + writer.WritePropertyName("cells"); + writer.WriteStartArray(); + foreach (var item in Cells) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static Notebook DeserializeNotebook(JsonElement element) + { + string description = default; + BigDataPoolReference bigDataPool = default; + NotebookSessionProperties sessionProperties = default; + NotebookMetadata metadata = default; + int nbformat = default; + int nbformatMinor = default; + IList cells = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("bigDataPool")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + bigDataPool = BigDataPoolReference.DeserializeBigDataPoolReference(property.Value); + continue; + } + if (property.NameEquals("sessionProperties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sessionProperties = NotebookSessionProperties.DeserializeNotebookSessionProperties(property.Value); + continue; + } + if (property.NameEquals("metadata")) + { + metadata = NotebookMetadata.DeserializeNotebookMetadata(property.Value); + continue; + } + if (property.NameEquals("nbformat")) + { + nbformat = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("nbformat_minor")) + { + nbformatMinor = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("cells")) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(NotebookCell.DeserializeNotebookCell(item)); + } + } + cells = array; + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new Notebook(description, bigDataPool, sessionProperties, metadata, nbformat, nbformatMinor, cells, additionalProperties); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/Notebook.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/Notebook.cs new file mode 100644 index 000000000000..980f9281a1e2 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/Notebook.cs @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Notebook. + public partial class Notebook : IDictionary + { + /// Initializes a new instance of Notebook. + /// Notebook root-level metadata. + /// Notebook format (major number). Incremented between backwards incompatible changes to the notebook format. + /// Notebook format (minor number). Incremented for backward compatible changes to the notebook format. + /// Array of cells of the current notebook. + public Notebook(NotebookMetadata metadata, int nbformat, int nbformatMinor, IEnumerable cells) + { + if (metadata == null) + { + throw new ArgumentNullException(nameof(metadata)); + } + if (cells == null) + { + throw new ArgumentNullException(nameof(cells)); + } + + Metadata = metadata; + Nbformat = nbformat; + NbformatMinor = nbformatMinor; + Cells = cells.ToArray(); + AdditionalProperties = new Dictionary(); + } + + /// Initializes a new instance of Notebook. + /// The description of the notebook. + /// Big data pool reference. + /// Session properties. + /// Notebook root-level metadata. + /// Notebook format (major number). Incremented between backwards incompatible changes to the notebook format. + /// Notebook format (minor number). Incremented for backward compatible changes to the notebook format. + /// Array of cells of the current notebook. + /// . + internal Notebook(string description, BigDataPoolReference bigDataPool, NotebookSessionProperties sessionProperties, NotebookMetadata metadata, int nbformat, int nbformatMinor, IList cells, IDictionary additionalProperties) + { + Description = description; + BigDataPool = bigDataPool; + SessionProperties = sessionProperties; + Metadata = metadata; + Nbformat = nbformat; + NbformatMinor = nbformatMinor; + Cells = cells; + AdditionalProperties = additionalProperties ?? new Dictionary(); + } + + /// The description of the notebook. + public string Description { get; set; } + /// Big data pool reference. + public BigDataPoolReference BigDataPool { get; set; } + /// Session properties. + public NotebookSessionProperties SessionProperties { get; set; } + /// Notebook root-level metadata. + public NotebookMetadata Metadata { get; set; } + /// Notebook format (major number). Incremented between backwards incompatible changes to the notebook format. + public int Nbformat { get; set; } + /// Notebook format (minor number). Incremented for backward compatible changes to the notebook format. + public int NbformatMinor { get; set; } + /// Array of cells of the current notebook. + public IList Cells { get; set; } + internal IDictionary AdditionalProperties { get; } + /// + public IEnumerator> GetEnumerator() => AdditionalProperties.GetEnumerator(); + /// + IEnumerator IEnumerable.GetEnumerator() => AdditionalProperties.GetEnumerator(); + /// + public bool TryGetValue(string key, out object value) => AdditionalProperties.TryGetValue(key, out value); + /// + public bool ContainsKey(string key) => AdditionalProperties.ContainsKey(key); + /// + public ICollection Keys => AdditionalProperties.Keys; + /// + public ICollection Values => AdditionalProperties.Values; + /// + int ICollection>.Count => AdditionalProperties.Count; + /// + public void Add(string key, object value) => AdditionalProperties.Add(key, value); + /// + public bool Remove(string key) => AdditionalProperties.Remove(key); + /// + bool ICollection>.IsReadOnly => AdditionalProperties.IsReadOnly; + /// + void ICollection>.Add(KeyValuePair value) => AdditionalProperties.Add(value); + /// + bool ICollection>.Remove(KeyValuePair value) => AdditionalProperties.Remove(value); + /// + bool ICollection>.Contains(KeyValuePair value) => AdditionalProperties.Contains(value); + /// + void ICollection>.CopyTo(KeyValuePair[] destination, int offset) => AdditionalProperties.CopyTo(destination, offset); + /// + void ICollection>.Clear() => AdditionalProperties.Clear(); + /// + public object this[string key] + { + get => AdditionalProperties[key]; + set => AdditionalProperties[key] = value; + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/NotebookCell.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/NotebookCell.Serialization.cs new file mode 100644 index 000000000000..16d948c8b13b --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/NotebookCell.Serialization.cs @@ -0,0 +1,135 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class NotebookCell : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("cell_type"); + writer.WriteStringValue(CellType); + writer.WritePropertyName("metadata"); + writer.WriteObjectValue(Metadata); + writer.WritePropertyName("source"); + writer.WriteStartArray(); + foreach (var item in Source) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + if (Attachments != null) + { + writer.WritePropertyName("attachments"); + writer.WriteObjectValue(Attachments); + } + if (Outputs != null) + { + writer.WritePropertyName("outputs"); + writer.WriteStartArray(); + foreach (var item in Outputs) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static NotebookCell DeserializeNotebookCell(JsonElement element) + { + string cellType = default; + object metadata = default; + IList source = default; + object attachments = default; + IList outputs = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("cell_type")) + { + cellType = property.Value.GetString(); + continue; + } + if (property.NameEquals("metadata")) + { + metadata = property.Value.GetObject(); + continue; + } + if (property.NameEquals("source")) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetString()); + } + } + source = array; + continue; + } + if (property.NameEquals("attachments")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + attachments = property.Value.GetObject(); + continue; + } + if (property.NameEquals("outputs")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(NotebookCellOutputItem.DeserializeNotebookCellOutputItem(item)); + } + } + outputs = array; + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new NotebookCell(cellType, metadata, source, attachments, outputs, additionalProperties); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/NotebookCell.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/NotebookCell.cs new file mode 100644 index 000000000000..ce0209fcecf9 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/NotebookCell.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Notebook cell. + public partial class NotebookCell : IDictionary + { + /// Initializes a new instance of NotebookCell. + /// String identifying the type of cell. + /// Cell-level metadata. + /// Contents of the cell, represented as an array of lines. + public NotebookCell(string cellType, object metadata, IEnumerable source) + { + if (cellType == null) + { + throw new ArgumentNullException(nameof(cellType)); + } + if (metadata == null) + { + throw new ArgumentNullException(nameof(metadata)); + } + if (source == null) + { + throw new ArgumentNullException(nameof(source)); + } + + CellType = cellType; + Metadata = metadata; + Source = source.ToArray(); + AdditionalProperties = new Dictionary(); + } + + /// Initializes a new instance of NotebookCell. + /// String identifying the type of cell. + /// Cell-level metadata. + /// Contents of the cell, represented as an array of lines. + /// Attachments associated with the cell. + /// Cell-level output items. + /// . + internal NotebookCell(string cellType, object metadata, IList source, object attachments, IList outputs, IDictionary additionalProperties) + { + CellType = cellType; + Metadata = metadata; + Source = source; + Attachments = attachments; + Outputs = outputs; + AdditionalProperties = additionalProperties ?? new Dictionary(); + } + + /// String identifying the type of cell. + public string CellType { get; set; } + /// Cell-level metadata. + public object Metadata { get; set; } + /// Contents of the cell, represented as an array of lines. + public IList Source { get; set; } + /// Attachments associated with the cell. + public object Attachments { get; set; } + /// Cell-level output items. + public IList Outputs { get; set; } + internal IDictionary AdditionalProperties { get; } + /// + public IEnumerator> GetEnumerator() => AdditionalProperties.GetEnumerator(); + /// + IEnumerator IEnumerable.GetEnumerator() => AdditionalProperties.GetEnumerator(); + /// + public bool TryGetValue(string key, out object value) => AdditionalProperties.TryGetValue(key, out value); + /// + public bool ContainsKey(string key) => AdditionalProperties.ContainsKey(key); + /// + public ICollection Keys => AdditionalProperties.Keys; + /// + public ICollection Values => AdditionalProperties.Values; + /// + int ICollection>.Count => AdditionalProperties.Count; + /// + public void Add(string key, object value) => AdditionalProperties.Add(key, value); + /// + public bool Remove(string key) => AdditionalProperties.Remove(key); + /// + bool ICollection>.IsReadOnly => AdditionalProperties.IsReadOnly; + /// + void ICollection>.Add(KeyValuePair value) => AdditionalProperties.Add(value); + /// + bool ICollection>.Remove(KeyValuePair value) => AdditionalProperties.Remove(value); + /// + bool ICollection>.Contains(KeyValuePair value) => AdditionalProperties.Contains(value); + /// + void ICollection>.CopyTo(KeyValuePair[] destination, int offset) => AdditionalProperties.CopyTo(destination, offset); + /// + void ICollection>.Clear() => AdditionalProperties.Clear(); + /// + public object this[string key] + { + get => AdditionalProperties[key]; + set => AdditionalProperties[key] = value; + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/NotebookCellOutputItem.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/NotebookCellOutputItem.Serialization.cs new file mode 100644 index 000000000000..906067bfaba5 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/NotebookCellOutputItem.Serialization.cs @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class NotebookCellOutputItem : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Name != null) + { + writer.WritePropertyName("name"); + writer.WriteStringValue(Name); + } + if (ExecutionCount != null) + { + writer.WritePropertyName("execution_count"); + writer.WriteNumberValue(ExecutionCount.Value); + } + writer.WritePropertyName("output_type"); + writer.WriteStringValue(OutputType.ToString()); + if (Text != null) + { + writer.WritePropertyName("text"); + writer.WriteObjectValue(Text); + } + if (Data != null) + { + writer.WritePropertyName("data"); + writer.WriteObjectValue(Data); + } + if (Metadata != null) + { + writer.WritePropertyName("metadata"); + writer.WriteObjectValue(Metadata); + } + writer.WriteEndObject(); + } + + internal static NotebookCellOutputItem DeserializeNotebookCellOutputItem(JsonElement element) + { + string name = default; + int? executionCount = default; + CellOutputType outputType = default; + object text = default; + object data = default; + object metadata = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("execution_count")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + executionCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("output_type")) + { + outputType = new CellOutputType(property.Value.GetString()); + continue; + } + if (property.NameEquals("text")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + text = property.Value.GetObject(); + continue; + } + if (property.NameEquals("data")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + data = property.Value.GetObject(); + continue; + } + if (property.NameEquals("metadata")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + metadata = property.Value.GetObject(); + continue; + } + } + return new NotebookCellOutputItem(name, executionCount, outputType, text, data, metadata); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/NotebookCellOutputItem.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/NotebookCellOutputItem.cs new file mode 100644 index 000000000000..cfd6fa99cfc1 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/NotebookCellOutputItem.cs @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// An item of the notebook cell execution output. + public partial class NotebookCellOutputItem + { + /// Initializes a new instance of NotebookCellOutputItem. + /// Execution, display, or stream outputs. + public NotebookCellOutputItem(CellOutputType outputType) + { + OutputType = outputType; + } + + /// Initializes a new instance of NotebookCellOutputItem. + /// For output_type=stream, determines the name of stream (stdout / stderr). + /// Execution sequence number. + /// Execution, display, or stream outputs. + /// For output_type=stream, the stream's text output, represented as a string or an array of strings. + /// Output data. Use MIME type as key, and content as value. + /// Metadata for the output item. + internal NotebookCellOutputItem(string name, int? executionCount, CellOutputType outputType, object text, object data, object metadata) + { + Name = name; + ExecutionCount = executionCount; + OutputType = outputType; + Text = text; + Data = data; + Metadata = metadata; + } + + /// For output_type=stream, determines the name of stream (stdout / stderr). + public string Name { get; set; } + /// Execution sequence number. + public int? ExecutionCount { get; set; } + /// Execution, display, or stream outputs. + public CellOutputType OutputType { get; set; } + /// For output_type=stream, the stream's text output, represented as a string or an array of strings. + public object Text { get; set; } + /// Output data. Use MIME type as key, and content as value. + public object Data { get; set; } + /// Metadata for the output item. + public object Metadata { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/NotebookKernelSpec.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/NotebookKernelSpec.Serialization.cs new file mode 100644 index 000000000000..cd94c9489fe6 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/NotebookKernelSpec.Serialization.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class NotebookKernelSpec : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("name"); + writer.WriteStringValue(Name); + writer.WritePropertyName("display_name"); + writer.WriteStringValue(DisplayName); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static NotebookKernelSpec DeserializeNotebookKernelSpec(JsonElement element) + { + string name = default; + string displayName = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("display_name")) + { + displayName = property.Value.GetString(); + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new NotebookKernelSpec(name, displayName, additionalProperties); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/NotebookKernelSpec.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/NotebookKernelSpec.cs new file mode 100644 index 000000000000..4293da99654f --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/NotebookKernelSpec.cs @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Kernel information. + public partial class NotebookKernelSpec : IDictionary + { + /// Initializes a new instance of NotebookKernelSpec. + /// Name of the kernel specification. + /// Name to display in UI. + public NotebookKernelSpec(string name, string displayName) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (displayName == null) + { + throw new ArgumentNullException(nameof(displayName)); + } + + Name = name; + DisplayName = displayName; + AdditionalProperties = new Dictionary(); + } + + /// Initializes a new instance of NotebookKernelSpec. + /// Name of the kernel specification. + /// Name to display in UI. + /// . + internal NotebookKernelSpec(string name, string displayName, IDictionary additionalProperties) + { + Name = name; + DisplayName = displayName; + AdditionalProperties = additionalProperties ?? new Dictionary(); + } + + /// Name of the kernel specification. + public string Name { get; set; } + /// Name to display in UI. + public string DisplayName { get; set; } + internal IDictionary AdditionalProperties { get; } + /// + public IEnumerator> GetEnumerator() => AdditionalProperties.GetEnumerator(); + /// + IEnumerator IEnumerable.GetEnumerator() => AdditionalProperties.GetEnumerator(); + /// + public bool TryGetValue(string key, out object value) => AdditionalProperties.TryGetValue(key, out value); + /// + public bool ContainsKey(string key) => AdditionalProperties.ContainsKey(key); + /// + public ICollection Keys => AdditionalProperties.Keys; + /// + public ICollection Values => AdditionalProperties.Values; + /// + int ICollection>.Count => AdditionalProperties.Count; + /// + public void Add(string key, object value) => AdditionalProperties.Add(key, value); + /// + public bool Remove(string key) => AdditionalProperties.Remove(key); + /// + bool ICollection>.IsReadOnly => AdditionalProperties.IsReadOnly; + /// + void ICollection>.Add(KeyValuePair value) => AdditionalProperties.Add(value); + /// + bool ICollection>.Remove(KeyValuePair value) => AdditionalProperties.Remove(value); + /// + bool ICollection>.Contains(KeyValuePair value) => AdditionalProperties.Contains(value); + /// + void ICollection>.CopyTo(KeyValuePair[] destination, int offset) => AdditionalProperties.CopyTo(destination, offset); + /// + void ICollection>.Clear() => AdditionalProperties.Clear(); + /// + public object this[string key] + { + get => AdditionalProperties[key]; + set => AdditionalProperties[key] = value; + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/NotebookLanguageInfo.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/NotebookLanguageInfo.Serialization.cs new file mode 100644 index 000000000000..23bf44dbd0af --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/NotebookLanguageInfo.Serialization.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class NotebookLanguageInfo : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("name"); + writer.WriteStringValue(Name); + if (CodemirrorMode != null) + { + writer.WritePropertyName("codemirror_mode"); + writer.WriteStringValue(CodemirrorMode); + } + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static NotebookLanguageInfo DeserializeNotebookLanguageInfo(JsonElement element) + { + string name = default; + string codemirrorMode = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("codemirror_mode")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + codemirrorMode = property.Value.GetString(); + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new NotebookLanguageInfo(name, codemirrorMode, additionalProperties); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/NotebookLanguageInfo.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/NotebookLanguageInfo.cs new file mode 100644 index 000000000000..353f4604813d --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/NotebookLanguageInfo.cs @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Language info. + public partial class NotebookLanguageInfo : IDictionary + { + /// Initializes a new instance of NotebookLanguageInfo. + /// The programming language which this kernel runs. + public NotebookLanguageInfo(string name) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + + Name = name; + AdditionalProperties = new Dictionary(); + } + + /// Initializes a new instance of NotebookLanguageInfo. + /// The programming language which this kernel runs. + /// The codemirror mode to use for code in this language. + /// . + internal NotebookLanguageInfo(string name, string codemirrorMode, IDictionary additionalProperties) + { + Name = name; + CodemirrorMode = codemirrorMode; + AdditionalProperties = additionalProperties ?? new Dictionary(); + } + + /// The programming language which this kernel runs. + public string Name { get; set; } + /// The codemirror mode to use for code in this language. + public string CodemirrorMode { get; set; } + internal IDictionary AdditionalProperties { get; } + /// + public IEnumerator> GetEnumerator() => AdditionalProperties.GetEnumerator(); + /// + IEnumerator IEnumerable.GetEnumerator() => AdditionalProperties.GetEnumerator(); + /// + public bool TryGetValue(string key, out object value) => AdditionalProperties.TryGetValue(key, out value); + /// + public bool ContainsKey(string key) => AdditionalProperties.ContainsKey(key); + /// + public ICollection Keys => AdditionalProperties.Keys; + /// + public ICollection Values => AdditionalProperties.Values; + /// + int ICollection>.Count => AdditionalProperties.Count; + /// + public void Add(string key, object value) => AdditionalProperties.Add(key, value); + /// + public bool Remove(string key) => AdditionalProperties.Remove(key); + /// + bool ICollection>.IsReadOnly => AdditionalProperties.IsReadOnly; + /// + void ICollection>.Add(KeyValuePair value) => AdditionalProperties.Add(value); + /// + bool ICollection>.Remove(KeyValuePair value) => AdditionalProperties.Remove(value); + /// + bool ICollection>.Contains(KeyValuePair value) => AdditionalProperties.Contains(value); + /// + void ICollection>.CopyTo(KeyValuePair[] destination, int offset) => AdditionalProperties.CopyTo(destination, offset); + /// + void ICollection>.Clear() => AdditionalProperties.Clear(); + /// + public object this[string key] + { + get => AdditionalProperties[key]; + set => AdditionalProperties[key] = value; + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/NotebookListResponse.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/NotebookListResponse.Serialization.cs new file mode 100644 index 000000000000..c81c75e6b679 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/NotebookListResponse.Serialization.cs @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class NotebookListResponse + { + internal static NotebookListResponse DeserializeNotebookListResponse(JsonElement element) + { + IReadOnlyList value = default; + string nextLink = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value")) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(NotebookResource.DeserializeNotebookResource(item)); + } + } + value = array; + continue; + } + if (property.NameEquals("nextLink")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = property.Value.GetString(); + continue; + } + } + return new NotebookListResponse(value, nextLink); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/NotebookListResponse.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/NotebookListResponse.cs new file mode 100644 index 000000000000..b993d45abf8c --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/NotebookListResponse.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// A list of Notebook resources. + public partial class NotebookListResponse + { + /// Initializes a new instance of NotebookListResponse. + /// List of Notebooks. + internal NotebookListResponse(IEnumerable value) + { + if (value == null) + { + throw new ArgumentNullException(nameof(value)); + } + + Value = value.ToArray(); + } + + /// Initializes a new instance of NotebookListResponse. + /// List of Notebooks. + /// The link to the next page of results, if any remaining results exist. + internal NotebookListResponse(IReadOnlyList value, string nextLink) + { + Value = value; + NextLink = nextLink; + } + + /// List of Notebooks. + public IReadOnlyList Value { get; } + /// The link to the next page of results, if any remaining results exist. + public string NextLink { get; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/NotebookMetadata.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/NotebookMetadata.Serialization.cs new file mode 100644 index 000000000000..9dc705047d68 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/NotebookMetadata.Serialization.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class NotebookMetadata : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Kernelspec != null) + { + writer.WritePropertyName("kernelspec"); + writer.WriteObjectValue(Kernelspec); + } + if (LanguageInfo != null) + { + writer.WritePropertyName("language_info"); + writer.WriteObjectValue(LanguageInfo); + } + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static NotebookMetadata DeserializeNotebookMetadata(JsonElement element) + { + NotebookKernelSpec kernelspec = default; + NotebookLanguageInfo languageInfo = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("kernelspec")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + kernelspec = NotebookKernelSpec.DeserializeNotebookKernelSpec(property.Value); + continue; + } + if (property.NameEquals("language_info")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + languageInfo = NotebookLanguageInfo.DeserializeNotebookLanguageInfo(property.Value); + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new NotebookMetadata(kernelspec, languageInfo, additionalProperties); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/NotebookMetadata.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/NotebookMetadata.cs new file mode 100644 index 000000000000..500461521ab8 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/NotebookMetadata.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Notebook root-level metadata. + public partial class NotebookMetadata : IDictionary + { + /// Initializes a new instance of NotebookMetadata. + public NotebookMetadata() + { + AdditionalProperties = new Dictionary(); + } + + /// Initializes a new instance of NotebookMetadata. + /// Kernel information. + /// Language info. + /// . + internal NotebookMetadata(NotebookKernelSpec kernelspec, NotebookLanguageInfo languageInfo, IDictionary additionalProperties) + { + Kernelspec = kernelspec; + LanguageInfo = languageInfo; + AdditionalProperties = additionalProperties ?? new Dictionary(); + } + + /// Kernel information. + public NotebookKernelSpec Kernelspec { get; set; } + /// Language info. + public NotebookLanguageInfo LanguageInfo { get; set; } + internal IDictionary AdditionalProperties { get; } + /// + public IEnumerator> GetEnumerator() => AdditionalProperties.GetEnumerator(); + /// + IEnumerator IEnumerable.GetEnumerator() => AdditionalProperties.GetEnumerator(); + /// + public bool TryGetValue(string key, out object value) => AdditionalProperties.TryGetValue(key, out value); + /// + public bool ContainsKey(string key) => AdditionalProperties.ContainsKey(key); + /// + public ICollection Keys => AdditionalProperties.Keys; + /// + public ICollection Values => AdditionalProperties.Values; + /// + int ICollection>.Count => AdditionalProperties.Count; + /// + public void Add(string key, object value) => AdditionalProperties.Add(key, value); + /// + public bool Remove(string key) => AdditionalProperties.Remove(key); + /// + bool ICollection>.IsReadOnly => AdditionalProperties.IsReadOnly; + /// + void ICollection>.Add(KeyValuePair value) => AdditionalProperties.Add(value); + /// + bool ICollection>.Remove(KeyValuePair value) => AdditionalProperties.Remove(value); + /// + bool ICollection>.Contains(KeyValuePair value) => AdditionalProperties.Contains(value); + /// + void ICollection>.CopyTo(KeyValuePair[] destination, int offset) => AdditionalProperties.CopyTo(destination, offset); + /// + void ICollection>.Clear() => AdditionalProperties.Clear(); + /// + public object this[string key] + { + get => AdditionalProperties[key]; + set => AdditionalProperties[key] = value; + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/NotebookResource.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/NotebookResource.Serialization.cs new file mode 100644 index 000000000000..ddc57bf03c59 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/NotebookResource.Serialization.cs @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class NotebookResource : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("properties"); + writer.WriteObjectValue(Properties); + if (Id != null) + { + writer.WritePropertyName("id"); + writer.WriteStringValue(Id); + } + if (Name != null) + { + writer.WritePropertyName("name"); + writer.WriteStringValue(Name); + } + if (Type != null) + { + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + } + if (Etag != null) + { + writer.WritePropertyName("etag"); + writer.WriteStringValue(Etag); + } + writer.WriteEndObject(); + } + + internal static NotebookResource DeserializeNotebookResource(JsonElement element) + { + Notebook properties = default; + string id = default; + string name = default; + string type = default; + string etag = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties")) + { + properties = Notebook.DeserializeNotebook(property.Value); + continue; + } + if (property.NameEquals("id")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("name")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("etag")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + etag = property.Value.GetString(); + continue; + } + } + return new NotebookResource(id, name, type, etag, properties); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/NotebookResource.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/NotebookResource.cs new file mode 100644 index 000000000000..73e5ba15fe09 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/NotebookResource.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Notebook resource type. + public partial class NotebookResource : SubResource + { + /// Initializes a new instance of NotebookResource. + /// Properties of Notebook. + public NotebookResource(Notebook properties) + { + if (properties == null) + { + throw new ArgumentNullException(nameof(properties)); + } + + Properties = properties; + } + + /// Initializes a new instance of NotebookResource. + /// The resource identifier. + /// The resource name. + /// The resource type. + /// Etag identifies change in the resource. + /// Properties of Notebook. + internal NotebookResource(string id, string name, string type, string etag, Notebook properties) : base(id, name, type, etag) + { + Properties = properties; + } + + /// Properties of Notebook. + public Notebook Properties { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/NotebookSessionProperties.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/NotebookSessionProperties.Serialization.cs new file mode 100644 index 000000000000..0635ad92027e --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/NotebookSessionProperties.Serialization.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class NotebookSessionProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("driverMemory"); + writer.WriteStringValue(DriverMemory); + writer.WritePropertyName("driverCores"); + writer.WriteNumberValue(DriverCores); + writer.WritePropertyName("executorMemory"); + writer.WriteStringValue(ExecutorMemory); + writer.WritePropertyName("executorCores"); + writer.WriteNumberValue(ExecutorCores); + writer.WritePropertyName("numExecutors"); + writer.WriteNumberValue(NumExecutors); + writer.WriteEndObject(); + } + + internal static NotebookSessionProperties DeserializeNotebookSessionProperties(JsonElement element) + { + string driverMemory = default; + int driverCores = default; + string executorMemory = default; + int executorCores = default; + int numExecutors = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("driverMemory")) + { + driverMemory = property.Value.GetString(); + continue; + } + if (property.NameEquals("driverCores")) + { + driverCores = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("executorMemory")) + { + executorMemory = property.Value.GetString(); + continue; + } + if (property.NameEquals("executorCores")) + { + executorCores = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("numExecutors")) + { + numExecutors = property.Value.GetInt32(); + continue; + } + } + return new NotebookSessionProperties(driverMemory, driverCores, executorMemory, executorCores, numExecutors); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/NotebookSessionProperties.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/NotebookSessionProperties.cs new file mode 100644 index 000000000000..1333edc3206a --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/NotebookSessionProperties.cs @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Session properties. + public partial class NotebookSessionProperties + { + /// Initializes a new instance of NotebookSessionProperties. + /// Amount of memory to use for the driver process. + /// Number of cores to use for the driver. + /// Amount of memory to use per executor process. + /// Number of cores to use for each executor. + /// Number of executors to launch for this session. + public NotebookSessionProperties(string driverMemory, int driverCores, string executorMemory, int executorCores, int numExecutors) + { + if (driverMemory == null) + { + throw new ArgumentNullException(nameof(driverMemory)); + } + if (executorMemory == null) + { + throw new ArgumentNullException(nameof(executorMemory)); + } + + DriverMemory = driverMemory; + DriverCores = driverCores; + ExecutorMemory = executorMemory; + ExecutorCores = executorCores; + NumExecutors = numExecutors; + } + + /// Amount of memory to use for the driver process. + public string DriverMemory { get; set; } + /// Number of cores to use for the driver. + public int DriverCores { get; set; } + /// Amount of memory to use per executor process. + public string ExecutorMemory { get; set; } + /// Number of cores to use for each executor. + public int ExecutorCores { get; set; } + /// Number of executors to launch for this session. + public int NumExecutors { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ODataAadServicePrincipalCredentialType.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ODataAadServicePrincipalCredentialType.cs new file mode 100644 index 000000000000..ac0a735c3e49 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ODataAadServicePrincipalCredentialType.cs @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Specify the credential type (key or cert) is used for service principal. + public readonly partial struct ODataAadServicePrincipalCredentialType : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + public ODataAadServicePrincipalCredentialType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ServicePrincipalKeyValue = "ServicePrincipalKey"; + private const string ServicePrincipalCertValue = "ServicePrincipalCert"; + + /// ServicePrincipalKey. + public static ODataAadServicePrincipalCredentialType ServicePrincipalKey { get; } = new ODataAadServicePrincipalCredentialType(ServicePrincipalKeyValue); + /// ServicePrincipalCert. + public static ODataAadServicePrincipalCredentialType ServicePrincipalCert { get; } = new ODataAadServicePrincipalCredentialType(ServicePrincipalCertValue); + /// Determines if two values are the same. + public static bool operator ==(ODataAadServicePrincipalCredentialType left, ODataAadServicePrincipalCredentialType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ODataAadServicePrincipalCredentialType left, ODataAadServicePrincipalCredentialType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator ODataAadServicePrincipalCredentialType(string value) => new ODataAadServicePrincipalCredentialType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ODataAadServicePrincipalCredentialType other && Equals(other); + /// + public bool Equals(ODataAadServicePrincipalCredentialType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ODataAuthenticationType.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ODataAuthenticationType.cs new file mode 100644 index 000000000000..cf868b792a2c --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ODataAuthenticationType.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Type of authentication used to connect to the OData service. + public readonly partial struct ODataAuthenticationType : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + public ODataAuthenticationType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string BasicValue = "Basic"; + private const string AnonymousValue = "Anonymous"; + private const string WindowsValue = "Windows"; + private const string AadServicePrincipalValue = "AadServicePrincipal"; + private const string ManagedServiceIdentityValue = "ManagedServiceIdentity"; + + /// Basic. + public static ODataAuthenticationType Basic { get; } = new ODataAuthenticationType(BasicValue); + /// Anonymous. + public static ODataAuthenticationType Anonymous { get; } = new ODataAuthenticationType(AnonymousValue); + /// Windows. + public static ODataAuthenticationType Windows { get; } = new ODataAuthenticationType(WindowsValue); + /// AadServicePrincipal. + public static ODataAuthenticationType AadServicePrincipal { get; } = new ODataAuthenticationType(AadServicePrincipalValue); + /// ManagedServiceIdentity. + public static ODataAuthenticationType ManagedServiceIdentity { get; } = new ODataAuthenticationType(ManagedServiceIdentityValue); + /// Determines if two values are the same. + public static bool operator ==(ODataAuthenticationType left, ODataAuthenticationType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ODataAuthenticationType left, ODataAuthenticationType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator ODataAuthenticationType(string value) => new ODataAuthenticationType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ODataAuthenticationType other && Equals(other); + /// + public bool Equals(ODataAuthenticationType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ODataLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ODataLinkedService.Serialization.cs new file mode 100644 index 000000000000..c1e33aca16e2 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ODataLinkedService.Serialization.cs @@ -0,0 +1,333 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class ODataLinkedService : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (ConnectVia != null) + { + writer.WritePropertyName("connectVia"); + writer.WriteObjectValue(ConnectVia); + } + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + writer.WritePropertyName("url"); + writer.WriteObjectValue(Url); + if (AuthenticationType != null) + { + writer.WritePropertyName("authenticationType"); + writer.WriteStringValue(AuthenticationType.Value.ToString()); + } + if (UserName != null) + { + writer.WritePropertyName("userName"); + writer.WriteObjectValue(UserName); + } + if (Password != null) + { + writer.WritePropertyName("password"); + writer.WriteObjectValue(Password); + } + if (Tenant != null) + { + writer.WritePropertyName("tenant"); + writer.WriteObjectValue(Tenant); + } + if (ServicePrincipalId != null) + { + writer.WritePropertyName("servicePrincipalId"); + writer.WriteObjectValue(ServicePrincipalId); + } + if (AadResourceId != null) + { + writer.WritePropertyName("aadResourceId"); + writer.WriteObjectValue(AadResourceId); + } + if (AadServicePrincipalCredentialType != null) + { + writer.WritePropertyName("aadServicePrincipalCredentialType"); + writer.WriteStringValue(AadServicePrincipalCredentialType.Value.ToString()); + } + if (ServicePrincipalKey != null) + { + writer.WritePropertyName("servicePrincipalKey"); + writer.WriteObjectValue(ServicePrincipalKey); + } + if (ServicePrincipalEmbeddedCert != null) + { + writer.WritePropertyName("servicePrincipalEmbeddedCert"); + writer.WriteObjectValue(ServicePrincipalEmbeddedCert); + } + if (ServicePrincipalEmbeddedCertPassword != null) + { + writer.WritePropertyName("servicePrincipalEmbeddedCertPassword"); + writer.WriteObjectValue(ServicePrincipalEmbeddedCertPassword); + } + if (EncryptedCredential != null) + { + writer.WritePropertyName("encryptedCredential"); + writer.WriteObjectValue(EncryptedCredential); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static ODataLinkedService DeserializeODataLinkedService(JsonElement element) + { + string type = default; + IntegrationRuntimeReference connectVia = default; + string description = default; + IDictionary parameters = default; + IList annotations = default; + object url = default; + ODataAuthenticationType? authenticationType = default; + object userName = default; + SecretBase password = default; + object tenant = default; + object servicePrincipalId = default; + object aadResourceId = default; + ODataAadServicePrincipalCredentialType? aadServicePrincipalCredentialType = default; + SecretBase servicePrincipalKey = default; + SecretBase servicePrincipalEmbeddedCert = default; + SecretBase servicePrincipalEmbeddedCertPassword = default; + object encryptedCredential = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("connectVia")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("url")) + { + url = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("authenticationType")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + authenticationType = new ODataAuthenticationType(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("userName")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + userName = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("password")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + password = SecretBase.DeserializeSecretBase(property0.Value); + continue; + } + if (property0.NameEquals("tenant")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + tenant = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("servicePrincipalId")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + servicePrincipalId = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("aadResourceId")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + aadResourceId = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("aadServicePrincipalCredentialType")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + aadServicePrincipalCredentialType = new ODataAadServicePrincipalCredentialType(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("servicePrincipalKey")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + servicePrincipalKey = SecretBase.DeserializeSecretBase(property0.Value); + continue; + } + if (property0.NameEquals("servicePrincipalEmbeddedCert")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + servicePrincipalEmbeddedCert = SecretBase.DeserializeSecretBase(property0.Value); + continue; + } + if (property0.NameEquals("servicePrincipalEmbeddedCertPassword")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + servicePrincipalEmbeddedCertPassword = SecretBase.DeserializeSecretBase(property0.Value); + continue; + } + if (property0.NameEquals("encryptedCredential")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + encryptedCredential = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new ODataLinkedService(type, connectVia, description, parameters, annotations, additionalProperties, url, authenticationType, userName, password, tenant, servicePrincipalId, aadResourceId, aadServicePrincipalCredentialType, servicePrincipalKey, servicePrincipalEmbeddedCert, servicePrincipalEmbeddedCertPassword, encryptedCredential); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ODataLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ODataLinkedService.cs new file mode 100644 index 000000000000..d99f3bdee745 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ODataLinkedService.cs @@ -0,0 +1,90 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Open Data Protocol (OData) linked service. + public partial class ODataLinkedService : LinkedService + { + /// Initializes a new instance of ODataLinkedService. + /// The URL of the OData service endpoint. Type: string (or Expression with resultType string). + public ODataLinkedService(object url) + { + if (url == null) + { + throw new ArgumentNullException(nameof(url)); + } + + Url = url; + Type = "OData"; + } + + /// Initializes a new instance of ODataLinkedService. + /// Type of linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for describing the linked service. + /// . + /// The URL of the OData service endpoint. Type: string (or Expression with resultType string). + /// Type of authentication used to connect to the OData service. + /// User name of the OData service. Type: string (or Expression with resultType string). + /// Password of the OData service. + /// Specify the tenant information (domain name or tenant ID) under which your application resides. Type: string (or Expression with resultType string). + /// Specify the application id of your application registered in Azure Active Directory. Type: string (or Expression with resultType string). + /// Specify the resource you are requesting authorization to use Directory. Type: string (or Expression with resultType string). + /// Specify the credential type (key or cert) is used for service principal. + /// Specify the secret of your application registered in Azure Active Directory. Type: string (or Expression with resultType string). + /// Specify the base64 encoded certificate of your application registered in Azure Active Directory. Type: string (or Expression with resultType string). + /// Specify the password of your certificate if your certificate has a password and you are using AadServicePrincipal authentication. Type: string (or Expression with resultType string). + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + internal ODataLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object url, ODataAuthenticationType? authenticationType, object userName, SecretBase password, object tenant, object servicePrincipalId, object aadResourceId, ODataAadServicePrincipalCredentialType? aadServicePrincipalCredentialType, SecretBase servicePrincipalKey, SecretBase servicePrincipalEmbeddedCert, SecretBase servicePrincipalEmbeddedCertPassword, object encryptedCredential) : base(type, connectVia, description, parameters, annotations, additionalProperties) + { + Url = url; + AuthenticationType = authenticationType; + UserName = userName; + Password = password; + Tenant = tenant; + ServicePrincipalId = servicePrincipalId; + AadResourceId = aadResourceId; + AadServicePrincipalCredentialType = aadServicePrincipalCredentialType; + ServicePrincipalKey = servicePrincipalKey; + ServicePrincipalEmbeddedCert = servicePrincipalEmbeddedCert; + ServicePrincipalEmbeddedCertPassword = servicePrincipalEmbeddedCertPassword; + EncryptedCredential = encryptedCredential; + Type = type ?? "OData"; + } + + /// The URL of the OData service endpoint. Type: string (or Expression with resultType string). + public object Url { get; set; } + /// Type of authentication used to connect to the OData service. + public ODataAuthenticationType? AuthenticationType { get; set; } + /// User name of the OData service. Type: string (or Expression with resultType string). + public object UserName { get; set; } + /// Password of the OData service. + public SecretBase Password { get; set; } + /// Specify the tenant information (domain name or tenant ID) under which your application resides. Type: string (or Expression with resultType string). + public object Tenant { get; set; } + /// Specify the application id of your application registered in Azure Active Directory. Type: string (or Expression with resultType string). + public object ServicePrincipalId { get; set; } + /// Specify the resource you are requesting authorization to use Directory. Type: string (or Expression with resultType string). + public object AadResourceId { get; set; } + /// Specify the credential type (key or cert) is used for service principal. + public ODataAadServicePrincipalCredentialType? AadServicePrincipalCredentialType { get; set; } + /// Specify the secret of your application registered in Azure Active Directory. Type: string (or Expression with resultType string). + public SecretBase ServicePrincipalKey { get; set; } + /// Specify the base64 encoded certificate of your application registered in Azure Active Directory. Type: string (or Expression with resultType string). + public SecretBase ServicePrincipalEmbeddedCert { get; set; } + /// Specify the password of your certificate if your certificate has a password and you are using AadServicePrincipal authentication. Type: string (or Expression with resultType string). + public SecretBase ServicePrincipalEmbeddedCertPassword { get; set; } + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + public object EncryptedCredential { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ODataResourceDataset.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ODataResourceDataset.Serialization.cs new file mode 100644 index 000000000000..99ccef912fb1 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ODataResourceDataset.Serialization.cs @@ -0,0 +1,213 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class ODataResourceDataset : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Structure != null) + { + writer.WritePropertyName("structure"); + writer.WriteObjectValue(Structure); + } + if (Schema != null) + { + writer.WritePropertyName("schema"); + writer.WriteObjectValue(Schema); + } + writer.WritePropertyName("linkedServiceName"); + writer.WriteObjectValue(LinkedServiceName); + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Folder != null) + { + writer.WritePropertyName("folder"); + writer.WriteObjectValue(Folder); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + if (Path != null) + { + writer.WritePropertyName("path"); + writer.WriteObjectValue(Path); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static ODataResourceDataset DeserializeODataResourceDataset(JsonElement element) + { + string type = default; + string description = default; + object structure = default; + object schema = default; + LinkedServiceReference linkedServiceName = default; + IDictionary parameters = default; + IList annotations = default; + DatasetFolder folder = default; + object path = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("structure")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + structure = property.Value.GetObject(); + continue; + } + if (property.NameEquals("schema")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + schema = property.Value.GetObject(); + continue; + } + if (property.NameEquals("linkedServiceName")) + { + linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("folder")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + folder = DatasetFolder.DeserializeDatasetFolder(property.Value); + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("path")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + path = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new ODataResourceDataset(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties, path); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ODataResourceDataset.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ODataResourceDataset.cs new file mode 100644 index 000000000000..16187081e2d1 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ODataResourceDataset.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// The Open Data Protocol (OData) resource dataset. + public partial class ODataResourceDataset : Dataset + { + /// Initializes a new instance of ODataResourceDataset. + /// Linked service reference. + public ODataResourceDataset(LinkedServiceReference linkedServiceName) : base(linkedServiceName) + { + if (linkedServiceName == null) + { + throw new ArgumentNullException(nameof(linkedServiceName)); + } + + Type = "ODataResource"; + } + + /// Initializes a new instance of ODataResourceDataset. + /// Type of dataset. + /// Dataset description. + /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. + /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. + /// Linked service reference. + /// Parameters for dataset. + /// List of tags that can be used for describing the Dataset. + /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. + /// . + /// The OData resource path. Type: string (or Expression with resultType string). + internal ODataResourceDataset(string type, string description, object structure, object schema, LinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary additionalProperties, object path) : base(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) + { + Path = path; + Type = type ?? "ODataResource"; + } + + /// The OData resource path. Type: string (or Expression with resultType string). + public object Path { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/OdbcLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/OdbcLinkedService.Serialization.cs new file mode 100644 index 000000000000..d7f807490e49 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/OdbcLinkedService.Serialization.cs @@ -0,0 +1,243 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class OdbcLinkedService : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (ConnectVia != null) + { + writer.WritePropertyName("connectVia"); + writer.WriteObjectValue(ConnectVia); + } + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + writer.WritePropertyName("connectionString"); + writer.WriteObjectValue(ConnectionString); + if (AuthenticationType != null) + { + writer.WritePropertyName("authenticationType"); + writer.WriteObjectValue(AuthenticationType); + } + if (Credential != null) + { + writer.WritePropertyName("credential"); + writer.WriteObjectValue(Credential); + } + if (UserName != null) + { + writer.WritePropertyName("userName"); + writer.WriteObjectValue(UserName); + } + if (Password != null) + { + writer.WritePropertyName("password"); + writer.WriteObjectValue(Password); + } + if (EncryptedCredential != null) + { + writer.WritePropertyName("encryptedCredential"); + writer.WriteObjectValue(EncryptedCredential); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static OdbcLinkedService DeserializeOdbcLinkedService(JsonElement element) + { + string type = default; + IntegrationRuntimeReference connectVia = default; + string description = default; + IDictionary parameters = default; + IList annotations = default; + object connectionString = default; + object authenticationType = default; + SecretBase credential = default; + object userName = default; + SecretBase password = default; + object encryptedCredential = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("connectVia")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("connectionString")) + { + connectionString = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("authenticationType")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + authenticationType = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("credential")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + credential = SecretBase.DeserializeSecretBase(property0.Value); + continue; + } + if (property0.NameEquals("userName")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + userName = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("password")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + password = SecretBase.DeserializeSecretBase(property0.Value); + continue; + } + if (property0.NameEquals("encryptedCredential")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + encryptedCredential = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new OdbcLinkedService(type, connectVia, description, parameters, annotations, additionalProperties, connectionString, authenticationType, credential, userName, password, encryptedCredential); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/OdbcLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/OdbcLinkedService.cs new file mode 100644 index 000000000000..3285ece0981d --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/OdbcLinkedService.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Open Database Connectivity (ODBC) linked service. + public partial class OdbcLinkedService : LinkedService + { + /// Initializes a new instance of OdbcLinkedService. + /// The non-access credential portion of the connection string as well as an optional encrypted credential. Type: string, SecureString or AzureKeyVaultSecretReference. + public OdbcLinkedService(object connectionString) + { + if (connectionString == null) + { + throw new ArgumentNullException(nameof(connectionString)); + } + + ConnectionString = connectionString; + Type = "Odbc"; + } + + /// Initializes a new instance of OdbcLinkedService. + /// Type of linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for describing the linked service. + /// . + /// The non-access credential portion of the connection string as well as an optional encrypted credential. Type: string, SecureString or AzureKeyVaultSecretReference. + /// Type of authentication used to connect to the ODBC data store. Possible values are: Anonymous and Basic. Type: string (or Expression with resultType string). + /// The access credential portion of the connection string specified in driver-specific property-value format. + /// User name for Basic authentication. Type: string (or Expression with resultType string). + /// Password for Basic authentication. + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + internal OdbcLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object connectionString, object authenticationType, SecretBase credential, object userName, SecretBase password, object encryptedCredential) : base(type, connectVia, description, parameters, annotations, additionalProperties) + { + ConnectionString = connectionString; + AuthenticationType = authenticationType; + Credential = credential; + UserName = userName; + Password = password; + EncryptedCredential = encryptedCredential; + Type = type ?? "Odbc"; + } + + /// The non-access credential portion of the connection string as well as an optional encrypted credential. Type: string, SecureString or AzureKeyVaultSecretReference. + public object ConnectionString { get; set; } + /// Type of authentication used to connect to the ODBC data store. Possible values are: Anonymous and Basic. Type: string (or Expression with resultType string). + public object AuthenticationType { get; set; } + /// The access credential portion of the connection string specified in driver-specific property-value format. + public SecretBase Credential { get; set; } + /// User name for Basic authentication. Type: string (or Expression with resultType string). + public object UserName { get; set; } + /// Password for Basic authentication. + public SecretBase Password { get; set; } + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + public object EncryptedCredential { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/OdbcTableDataset.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/OdbcTableDataset.Serialization.cs new file mode 100644 index 000000000000..d9a3aeb66c78 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/OdbcTableDataset.Serialization.cs @@ -0,0 +1,213 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class OdbcTableDataset : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Structure != null) + { + writer.WritePropertyName("structure"); + writer.WriteObjectValue(Structure); + } + if (Schema != null) + { + writer.WritePropertyName("schema"); + writer.WriteObjectValue(Schema); + } + writer.WritePropertyName("linkedServiceName"); + writer.WriteObjectValue(LinkedServiceName); + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Folder != null) + { + writer.WritePropertyName("folder"); + writer.WriteObjectValue(Folder); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + if (TableName != null) + { + writer.WritePropertyName("tableName"); + writer.WriteObjectValue(TableName); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static OdbcTableDataset DeserializeOdbcTableDataset(JsonElement element) + { + string type = default; + string description = default; + object structure = default; + object schema = default; + LinkedServiceReference linkedServiceName = default; + IDictionary parameters = default; + IList annotations = default; + DatasetFolder folder = default; + object tableName = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("structure")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + structure = property.Value.GetObject(); + continue; + } + if (property.NameEquals("schema")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + schema = property.Value.GetObject(); + continue; + } + if (property.NameEquals("linkedServiceName")) + { + linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("folder")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + folder = DatasetFolder.DeserializeDatasetFolder(property.Value); + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("tableName")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + tableName = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new OdbcTableDataset(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties, tableName); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/OdbcTableDataset.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/OdbcTableDataset.cs new file mode 100644 index 000000000000..3db2b7538a8d --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/OdbcTableDataset.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// The ODBC table dataset. + public partial class OdbcTableDataset : Dataset + { + /// Initializes a new instance of OdbcTableDataset. + /// Linked service reference. + public OdbcTableDataset(LinkedServiceReference linkedServiceName) : base(linkedServiceName) + { + if (linkedServiceName == null) + { + throw new ArgumentNullException(nameof(linkedServiceName)); + } + + Type = "OdbcTable"; + } + + /// Initializes a new instance of OdbcTableDataset. + /// Type of dataset. + /// Dataset description. + /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. + /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. + /// Linked service reference. + /// Parameters for dataset. + /// List of tags that can be used for describing the Dataset. + /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. + /// . + /// The ODBC table name. Type: string (or Expression with resultType string). + internal OdbcTableDataset(string type, string description, object structure, object schema, LinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary additionalProperties, object tableName) : base(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) + { + TableName = tableName; + Type = type ?? "OdbcTable"; + } + + /// The ODBC table name. Type: string (or Expression with resultType string). + public object TableName { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/Office365Dataset.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/Office365Dataset.Serialization.cs new file mode 100644 index 000000000000..26e1b5e09824 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/Office365Dataset.Serialization.cs @@ -0,0 +1,221 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class Office365Dataset : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Structure != null) + { + writer.WritePropertyName("structure"); + writer.WriteObjectValue(Structure); + } + if (Schema != null) + { + writer.WritePropertyName("schema"); + writer.WriteObjectValue(Schema); + } + writer.WritePropertyName("linkedServiceName"); + writer.WriteObjectValue(LinkedServiceName); + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Folder != null) + { + writer.WritePropertyName("folder"); + writer.WriteObjectValue(Folder); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + writer.WritePropertyName("tableName"); + writer.WriteObjectValue(TableName); + if (Predicate != null) + { + writer.WritePropertyName("predicate"); + writer.WriteObjectValue(Predicate); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static Office365Dataset DeserializeOffice365Dataset(JsonElement element) + { + string type = default; + string description = default; + object structure = default; + object schema = default; + LinkedServiceReference linkedServiceName = default; + IDictionary parameters = default; + IList annotations = default; + DatasetFolder folder = default; + object tableName = default; + object predicate = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("structure")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + structure = property.Value.GetObject(); + continue; + } + if (property.NameEquals("schema")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + schema = property.Value.GetObject(); + continue; + } + if (property.NameEquals("linkedServiceName")) + { + linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("folder")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + folder = DatasetFolder.DeserializeDatasetFolder(property.Value); + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("tableName")) + { + tableName = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("predicate")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + predicate = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new Office365Dataset(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties, tableName, predicate); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/Office365Dataset.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/Office365Dataset.cs new file mode 100644 index 000000000000..2a56eb8d2a1a --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/Office365Dataset.cs @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// The Office365 account. + public partial class Office365Dataset : Dataset + { + /// Initializes a new instance of Office365Dataset. + /// Linked service reference. + /// Name of the dataset to extract from Office 365. Type: string (or Expression with resultType string). + public Office365Dataset(LinkedServiceReference linkedServiceName, object tableName) : base(linkedServiceName) + { + if (linkedServiceName == null) + { + throw new ArgumentNullException(nameof(linkedServiceName)); + } + if (tableName == null) + { + throw new ArgumentNullException(nameof(tableName)); + } + + TableName = tableName; + Type = "Office365Table"; + } + + /// Initializes a new instance of Office365Dataset. + /// Type of dataset. + /// Dataset description. + /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. + /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. + /// Linked service reference. + /// Parameters for dataset. + /// List of tags that can be used for describing the Dataset. + /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. + /// . + /// Name of the dataset to extract from Office 365. Type: string (or Expression with resultType string). + /// A predicate expression that can be used to filter the specific rows to extract from Office 365. Type: string (or Expression with resultType string). + internal Office365Dataset(string type, string description, object structure, object schema, LinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary additionalProperties, object tableName, object predicate) : base(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) + { + TableName = tableName; + Predicate = predicate; + Type = type ?? "Office365Table"; + } + + /// Name of the dataset to extract from Office 365. Type: string (or Expression with resultType string). + public object TableName { get; set; } + /// A predicate expression that can be used to filter the specific rows to extract from Office 365. Type: string (or Expression with resultType string). + public object Predicate { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/Office365LinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/Office365LinkedService.Serialization.cs new file mode 100644 index 000000000000..ea37ccf60d58 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/Office365LinkedService.Serialization.cs @@ -0,0 +1,207 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class Office365LinkedService : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (ConnectVia != null) + { + writer.WritePropertyName("connectVia"); + writer.WriteObjectValue(ConnectVia); + } + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + writer.WritePropertyName("office365TenantId"); + writer.WriteObjectValue(Office365TenantId); + writer.WritePropertyName("servicePrincipalTenantId"); + writer.WriteObjectValue(ServicePrincipalTenantId); + writer.WritePropertyName("servicePrincipalId"); + writer.WriteObjectValue(ServicePrincipalId); + writer.WritePropertyName("servicePrincipalKey"); + writer.WriteObjectValue(ServicePrincipalKey); + if (EncryptedCredential != null) + { + writer.WritePropertyName("encryptedCredential"); + writer.WriteObjectValue(EncryptedCredential); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static Office365LinkedService DeserializeOffice365LinkedService(JsonElement element) + { + string type = default; + IntegrationRuntimeReference connectVia = default; + string description = default; + IDictionary parameters = default; + IList annotations = default; + object office365TenantId = default; + object servicePrincipalTenantId = default; + object servicePrincipalId = default; + SecretBase servicePrincipalKey = default; + object encryptedCredential = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("connectVia")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("office365TenantId")) + { + office365TenantId = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("servicePrincipalTenantId")) + { + servicePrincipalTenantId = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("servicePrincipalId")) + { + servicePrincipalId = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("servicePrincipalKey")) + { + servicePrincipalKey = SecretBase.DeserializeSecretBase(property0.Value); + continue; + } + if (property0.NameEquals("encryptedCredential")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + encryptedCredential = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new Office365LinkedService(type, connectVia, description, parameters, annotations, additionalProperties, office365TenantId, servicePrincipalTenantId, servicePrincipalId, servicePrincipalKey, encryptedCredential); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/Office365LinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/Office365LinkedService.cs new file mode 100644 index 000000000000..2cf89602d678 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/Office365LinkedService.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Office365 linked service. + public partial class Office365LinkedService : LinkedService + { + /// Initializes a new instance of Office365LinkedService. + /// Azure tenant ID to which the Office 365 account belongs. Type: string (or Expression with resultType string). + /// Specify the tenant information under which your Azure AD web application resides. Type: string (or Expression with resultType string). + /// Specify the application's client ID. Type: string (or Expression with resultType string). + /// Specify the application's key. + public Office365LinkedService(object office365TenantId, object servicePrincipalTenantId, object servicePrincipalId, SecretBase servicePrincipalKey) + { + if (office365TenantId == null) + { + throw new ArgumentNullException(nameof(office365TenantId)); + } + if (servicePrincipalTenantId == null) + { + throw new ArgumentNullException(nameof(servicePrincipalTenantId)); + } + if (servicePrincipalId == null) + { + throw new ArgumentNullException(nameof(servicePrincipalId)); + } + if (servicePrincipalKey == null) + { + throw new ArgumentNullException(nameof(servicePrincipalKey)); + } + + Office365TenantId = office365TenantId; + ServicePrincipalTenantId = servicePrincipalTenantId; + ServicePrincipalId = servicePrincipalId; + ServicePrincipalKey = servicePrincipalKey; + Type = "Office365"; + } + + /// Initializes a new instance of Office365LinkedService. + /// Type of linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for describing the linked service. + /// . + /// Azure tenant ID to which the Office 365 account belongs. Type: string (or Expression with resultType string). + /// Specify the tenant information under which your Azure AD web application resides. Type: string (or Expression with resultType string). + /// Specify the application's client ID. Type: string (or Expression with resultType string). + /// Specify the application's key. + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + internal Office365LinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object office365TenantId, object servicePrincipalTenantId, object servicePrincipalId, SecretBase servicePrincipalKey, object encryptedCredential) : base(type, connectVia, description, parameters, annotations, additionalProperties) + { + Office365TenantId = office365TenantId; + ServicePrincipalTenantId = servicePrincipalTenantId; + ServicePrincipalId = servicePrincipalId; + ServicePrincipalKey = servicePrincipalKey; + EncryptedCredential = encryptedCredential; + Type = type ?? "Office365"; + } + + /// Azure tenant ID to which the Office 365 account belongs. Type: string (or Expression with resultType string). + public object Office365TenantId { get; set; } + /// Specify the tenant information under which your Azure AD web application resides. Type: string (or Expression with resultType string). + public object ServicePrincipalTenantId { get; set; } + /// Specify the application's client ID. Type: string (or Expression with resultType string). + public object ServicePrincipalId { get; set; } + /// Specify the application's key. + public SecretBase ServicePrincipalKey { get; set; } + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + public object EncryptedCredential { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/OracleLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/OracleLinkedService.Serialization.cs new file mode 100644 index 000000000000..107a8aafcfad --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/OracleLinkedService.Serialization.cs @@ -0,0 +1,198 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class OracleLinkedService : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (ConnectVia != null) + { + writer.WritePropertyName("connectVia"); + writer.WriteObjectValue(ConnectVia); + } + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + writer.WritePropertyName("connectionString"); + writer.WriteObjectValue(ConnectionString); + if (Password != null) + { + writer.WritePropertyName("password"); + writer.WriteObjectValue(Password); + } + if (EncryptedCredential != null) + { + writer.WritePropertyName("encryptedCredential"); + writer.WriteObjectValue(EncryptedCredential); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static OracleLinkedService DeserializeOracleLinkedService(JsonElement element) + { + string type = default; + IntegrationRuntimeReference connectVia = default; + string description = default; + IDictionary parameters = default; + IList annotations = default; + object connectionString = default; + AzureKeyVaultSecretReference password = default; + object encryptedCredential = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("connectVia")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("connectionString")) + { + connectionString = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("password")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + password = AzureKeyVaultSecretReference.DeserializeAzureKeyVaultSecretReference(property0.Value); + continue; + } + if (property0.NameEquals("encryptedCredential")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + encryptedCredential = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new OracleLinkedService(type, connectVia, description, parameters, annotations, additionalProperties, connectionString, password, encryptedCredential); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/OracleLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/OracleLinkedService.cs new file mode 100644 index 000000000000..834019855d27 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/OracleLinkedService.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Oracle database. + public partial class OracleLinkedService : LinkedService + { + /// Initializes a new instance of OracleLinkedService. + /// The connection string. Type: string, SecureString or AzureKeyVaultSecretReference. + public OracleLinkedService(object connectionString) + { + if (connectionString == null) + { + throw new ArgumentNullException(nameof(connectionString)); + } + + ConnectionString = connectionString; + Type = "Oracle"; + } + + /// Initializes a new instance of OracleLinkedService. + /// Type of linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for describing the linked service. + /// . + /// The connection string. Type: string, SecureString or AzureKeyVaultSecretReference. + /// The Azure key vault secret reference of password in connection string. + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + internal OracleLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object connectionString, AzureKeyVaultSecretReference password, object encryptedCredential) : base(type, connectVia, description, parameters, annotations, additionalProperties) + { + ConnectionString = connectionString; + Password = password; + EncryptedCredential = encryptedCredential; + Type = type ?? "Oracle"; + } + + /// The connection string. Type: string, SecureString or AzureKeyVaultSecretReference. + public object ConnectionString { get; set; } + /// The Azure key vault secret reference of password in connection string. + public AzureKeyVaultSecretReference Password { get; set; } + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + public object EncryptedCredential { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/OracleServiceCloudLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/OracleServiceCloudLinkedService.Serialization.cs new file mode 100644 index 000000000000..e6b37283dd2d --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/OracleServiceCloudLinkedService.Serialization.cs @@ -0,0 +1,244 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class OracleServiceCloudLinkedService : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (ConnectVia != null) + { + writer.WritePropertyName("connectVia"); + writer.WriteObjectValue(ConnectVia); + } + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + writer.WritePropertyName("host"); + writer.WriteObjectValue(Host); + writer.WritePropertyName("username"); + writer.WriteObjectValue(Username); + writer.WritePropertyName("password"); + writer.WriteObjectValue(Password); + if (UseEncryptedEndpoints != null) + { + writer.WritePropertyName("useEncryptedEndpoints"); + writer.WriteObjectValue(UseEncryptedEndpoints); + } + if (UseHostVerification != null) + { + writer.WritePropertyName("useHostVerification"); + writer.WriteObjectValue(UseHostVerification); + } + if (UsePeerVerification != null) + { + writer.WritePropertyName("usePeerVerification"); + writer.WriteObjectValue(UsePeerVerification); + } + if (EncryptedCredential != null) + { + writer.WritePropertyName("encryptedCredential"); + writer.WriteObjectValue(EncryptedCredential); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static OracleServiceCloudLinkedService DeserializeOracleServiceCloudLinkedService(JsonElement element) + { + string type = default; + IntegrationRuntimeReference connectVia = default; + string description = default; + IDictionary parameters = default; + IList annotations = default; + object host = default; + object username = default; + SecretBase password = default; + object useEncryptedEndpoints = default; + object useHostVerification = default; + object usePeerVerification = default; + object encryptedCredential = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("connectVia")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("host")) + { + host = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("username")) + { + username = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("password")) + { + password = SecretBase.DeserializeSecretBase(property0.Value); + continue; + } + if (property0.NameEquals("useEncryptedEndpoints")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + useEncryptedEndpoints = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("useHostVerification")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + useHostVerification = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("usePeerVerification")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + usePeerVerification = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("encryptedCredential")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + encryptedCredential = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new OracleServiceCloudLinkedService(type, connectVia, description, parameters, annotations, additionalProperties, host, username, password, useEncryptedEndpoints, useHostVerification, usePeerVerification, encryptedCredential); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/OracleServiceCloudLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/OracleServiceCloudLinkedService.cs new file mode 100644 index 000000000000..8ecbd919fd19 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/OracleServiceCloudLinkedService.cs @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Oracle Service Cloud linked service. + public partial class OracleServiceCloudLinkedService : LinkedService + { + /// Initializes a new instance of OracleServiceCloudLinkedService. + /// The URL of the Oracle Service Cloud instance. + /// The user name that you use to access Oracle Service Cloud server. + /// The password corresponding to the user name that you provided in the username key. + public OracleServiceCloudLinkedService(object host, object username, SecretBase password) + { + if (host == null) + { + throw new ArgumentNullException(nameof(host)); + } + if (username == null) + { + throw new ArgumentNullException(nameof(username)); + } + if (password == null) + { + throw new ArgumentNullException(nameof(password)); + } + + Host = host; + Username = username; + Password = password; + Type = "OracleServiceCloud"; + } + + /// Initializes a new instance of OracleServiceCloudLinkedService. + /// Type of linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for describing the linked service. + /// . + /// The URL of the Oracle Service Cloud instance. + /// The user name that you use to access Oracle Service Cloud server. + /// The password corresponding to the user name that you provided in the username key. + /// Specifies whether the data source endpoints are encrypted using HTTPS. The default value is true. Type: boolean (or Expression with resultType boolean). + /// Specifies whether to require the host name in the server's certificate to match the host name of the server when connecting over SSL. The default value is true. Type: boolean (or Expression with resultType boolean). + /// Specifies whether to verify the identity of the server when connecting over SSL. The default value is true. Type: boolean (or Expression with resultType boolean). + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + internal OracleServiceCloudLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object host, object username, SecretBase password, object useEncryptedEndpoints, object useHostVerification, object usePeerVerification, object encryptedCredential) : base(type, connectVia, description, parameters, annotations, additionalProperties) + { + Host = host; + Username = username; + Password = password; + UseEncryptedEndpoints = useEncryptedEndpoints; + UseHostVerification = useHostVerification; + UsePeerVerification = usePeerVerification; + EncryptedCredential = encryptedCredential; + Type = type ?? "OracleServiceCloud"; + } + + /// The URL of the Oracle Service Cloud instance. + public object Host { get; set; } + /// The user name that you use to access Oracle Service Cloud server. + public object Username { get; set; } + /// The password corresponding to the user name that you provided in the username key. + public SecretBase Password { get; set; } + /// Specifies whether the data source endpoints are encrypted using HTTPS. The default value is true. Type: boolean (or Expression with resultType boolean). + public object UseEncryptedEndpoints { get; set; } + /// Specifies whether to require the host name in the server's certificate to match the host name of the server when connecting over SSL. The default value is true. Type: boolean (or Expression with resultType boolean). + public object UseHostVerification { get; set; } + /// Specifies whether to verify the identity of the server when connecting over SSL. The default value is true. Type: boolean (or Expression with resultType boolean). + public object UsePeerVerification { get; set; } + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + public object EncryptedCredential { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/OracleServiceCloudObjectDataset.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/OracleServiceCloudObjectDataset.Serialization.cs new file mode 100644 index 000000000000..61c63e4fd19c --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/OracleServiceCloudObjectDataset.Serialization.cs @@ -0,0 +1,213 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class OracleServiceCloudObjectDataset : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Structure != null) + { + writer.WritePropertyName("structure"); + writer.WriteObjectValue(Structure); + } + if (Schema != null) + { + writer.WritePropertyName("schema"); + writer.WriteObjectValue(Schema); + } + writer.WritePropertyName("linkedServiceName"); + writer.WriteObjectValue(LinkedServiceName); + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Folder != null) + { + writer.WritePropertyName("folder"); + writer.WriteObjectValue(Folder); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + if (TableName != null) + { + writer.WritePropertyName("tableName"); + writer.WriteObjectValue(TableName); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static OracleServiceCloudObjectDataset DeserializeOracleServiceCloudObjectDataset(JsonElement element) + { + string type = default; + string description = default; + object structure = default; + object schema = default; + LinkedServiceReference linkedServiceName = default; + IDictionary parameters = default; + IList annotations = default; + DatasetFolder folder = default; + object tableName = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("structure")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + structure = property.Value.GetObject(); + continue; + } + if (property.NameEquals("schema")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + schema = property.Value.GetObject(); + continue; + } + if (property.NameEquals("linkedServiceName")) + { + linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("folder")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + folder = DatasetFolder.DeserializeDatasetFolder(property.Value); + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("tableName")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + tableName = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new OracleServiceCloudObjectDataset(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties, tableName); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/OracleServiceCloudObjectDataset.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/OracleServiceCloudObjectDataset.cs new file mode 100644 index 000000000000..38a6e0605e36 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/OracleServiceCloudObjectDataset.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Oracle Service Cloud dataset. + public partial class OracleServiceCloudObjectDataset : Dataset + { + /// Initializes a new instance of OracleServiceCloudObjectDataset. + /// Linked service reference. + public OracleServiceCloudObjectDataset(LinkedServiceReference linkedServiceName) : base(linkedServiceName) + { + if (linkedServiceName == null) + { + throw new ArgumentNullException(nameof(linkedServiceName)); + } + + Type = "OracleServiceCloudObject"; + } + + /// Initializes a new instance of OracleServiceCloudObjectDataset. + /// Type of dataset. + /// Dataset description. + /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. + /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. + /// Linked service reference. + /// Parameters for dataset. + /// List of tags that can be used for describing the Dataset. + /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. + /// . + /// The table name. Type: string (or Expression with resultType string). + internal OracleServiceCloudObjectDataset(string type, string description, object structure, object schema, LinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary additionalProperties, object tableName) : base(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) + { + TableName = tableName; + Type = type ?? "OracleServiceCloudObject"; + } + + /// The table name. Type: string (or Expression with resultType string). + public object TableName { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/OracleTableDataset.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/OracleTableDataset.Serialization.cs new file mode 100644 index 000000000000..0048ce614ee1 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/OracleTableDataset.Serialization.cs @@ -0,0 +1,243 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class OracleTableDataset : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Structure != null) + { + writer.WritePropertyName("structure"); + writer.WriteObjectValue(Structure); + } + if (Schema != null) + { + writer.WritePropertyName("schema"); + writer.WriteObjectValue(Schema); + } + writer.WritePropertyName("linkedServiceName"); + writer.WriteObjectValue(LinkedServiceName); + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Folder != null) + { + writer.WritePropertyName("folder"); + writer.WriteObjectValue(Folder); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + if (TableName != null) + { + writer.WritePropertyName("tableName"); + writer.WriteObjectValue(TableName); + } + if (SchemaTypePropertiesSchema != null) + { + writer.WritePropertyName("schema"); + writer.WriteObjectValue(SchemaTypePropertiesSchema); + } + if (Table != null) + { + writer.WritePropertyName("table"); + writer.WriteObjectValue(Table); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static OracleTableDataset DeserializeOracleTableDataset(JsonElement element) + { + string type = default; + string description = default; + object structure = default; + object schema = default; + LinkedServiceReference linkedServiceName = default; + IDictionary parameters = default; + IList annotations = default; + DatasetFolder folder = default; + object tableName = default; + object schema0 = default; + object table = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("structure")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + structure = property.Value.GetObject(); + continue; + } + if (property.NameEquals("schema")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + schema = property.Value.GetObject(); + continue; + } + if (property.NameEquals("linkedServiceName")) + { + linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("folder")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + folder = DatasetFolder.DeserializeDatasetFolder(property.Value); + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("tableName")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + tableName = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("schema")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + schema0 = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("table")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + table = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new OracleTableDataset(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties, tableName, schema0, table); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/OracleTableDataset.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/OracleTableDataset.cs new file mode 100644 index 000000000000..90a85de1113c --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/OracleTableDataset.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// The on-premises Oracle database dataset. + public partial class OracleTableDataset : Dataset + { + /// Initializes a new instance of OracleTableDataset. + /// Linked service reference. + public OracleTableDataset(LinkedServiceReference linkedServiceName) : base(linkedServiceName) + { + if (linkedServiceName == null) + { + throw new ArgumentNullException(nameof(linkedServiceName)); + } + + Type = "OracleTable"; + } + + /// Initializes a new instance of OracleTableDataset. + /// Type of dataset. + /// Dataset description. + /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. + /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. + /// Linked service reference. + /// Parameters for dataset. + /// List of tags that can be used for describing the Dataset. + /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. + /// . + /// This property will be retired. Please consider using schema + table properties instead. + /// The schema name of the on-premises Oracle database. Type: string (or Expression with resultType string). + /// The table name of the on-premises Oracle database. Type: string (or Expression with resultType string). + internal OracleTableDataset(string type, string description, object structure, object schema, LinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary additionalProperties, object tableName, object schemaTypePropertiesSchema, object table) : base(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) + { + TableName = tableName; + SchemaTypePropertiesSchema = schemaTypePropertiesSchema; + Table = table; + Type = type ?? "OracleTable"; + } + + /// This property will be retired. Please consider using schema + table properties instead. + public object TableName { get; set; } + /// The schema name of the on-premises Oracle database. Type: string (or Expression with resultType string). + public object SchemaTypePropertiesSchema { get; set; } + /// The table name of the on-premises Oracle database. Type: string (or Expression with resultType string). + public object Table { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/OrcCompressionCodec.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/OrcCompressionCodec.cs new file mode 100644 index 000000000000..dc7c965ce838 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/OrcCompressionCodec.cs @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// The OrcCompressionCodec. + public readonly partial struct OrcCompressionCodec : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + public OrcCompressionCodec(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NoneValue = "none"; + private const string ZlibValue = "zlib"; + private const string SnappyValue = "snappy"; + + /// none. + public static OrcCompressionCodec None { get; } = new OrcCompressionCodec(NoneValue); + /// zlib. + public static OrcCompressionCodec Zlib { get; } = new OrcCompressionCodec(ZlibValue); + /// snappy. + public static OrcCompressionCodec Snappy { get; } = new OrcCompressionCodec(SnappyValue); + /// Determines if two values are the same. + public static bool operator ==(OrcCompressionCodec left, OrcCompressionCodec right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(OrcCompressionCodec left, OrcCompressionCodec right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator OrcCompressionCodec(string value) => new OrcCompressionCodec(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is OrcCompressionCodec other && Equals(other); + /// + public bool Equals(OrcCompressionCodec other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/OrcDataset.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/OrcDataset.Serialization.cs new file mode 100644 index 000000000000..98d73335a083 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/OrcDataset.Serialization.cs @@ -0,0 +1,228 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class OrcDataset : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Structure != null) + { + writer.WritePropertyName("structure"); + writer.WriteObjectValue(Structure); + } + if (Schema != null) + { + writer.WritePropertyName("schema"); + writer.WriteObjectValue(Schema); + } + writer.WritePropertyName("linkedServiceName"); + writer.WriteObjectValue(LinkedServiceName); + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Folder != null) + { + writer.WritePropertyName("folder"); + writer.WriteObjectValue(Folder); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + if (Location != null) + { + writer.WritePropertyName("location"); + writer.WriteObjectValue(Location); + } + if (OrcCompressionCodec != null) + { + writer.WritePropertyName("orcCompressionCodec"); + writer.WriteStringValue(OrcCompressionCodec.Value.ToString()); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static OrcDataset DeserializeOrcDataset(JsonElement element) + { + string type = default; + string description = default; + object structure = default; + object schema = default; + LinkedServiceReference linkedServiceName = default; + IDictionary parameters = default; + IList annotations = default; + DatasetFolder folder = default; + DatasetLocation location = default; + OrcCompressionCodec? orcCompressionCodec = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("structure")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + structure = property.Value.GetObject(); + continue; + } + if (property.NameEquals("schema")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + schema = property.Value.GetObject(); + continue; + } + if (property.NameEquals("linkedServiceName")) + { + linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("folder")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + folder = DatasetFolder.DeserializeDatasetFolder(property.Value); + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("location")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + location = DatasetLocation.DeserializeDatasetLocation(property0.Value); + continue; + } + if (property0.NameEquals("orcCompressionCodec")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + orcCompressionCodec = new OrcCompressionCodec(property0.Value.GetString()); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new OrcDataset(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties, location, orcCompressionCodec); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/OrcDataset.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/OrcDataset.cs new file mode 100644 index 000000000000..3316124d3825 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/OrcDataset.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// ORC dataset. + public partial class OrcDataset : Dataset + { + /// Initializes a new instance of OrcDataset. + /// Linked service reference. + public OrcDataset(LinkedServiceReference linkedServiceName) : base(linkedServiceName) + { + if (linkedServiceName == null) + { + throw new ArgumentNullException(nameof(linkedServiceName)); + } + + Type = "Orc"; + } + + /// Initializes a new instance of OrcDataset. + /// Type of dataset. + /// Dataset description. + /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. + /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. + /// Linked service reference. + /// Parameters for dataset. + /// List of tags that can be used for describing the Dataset. + /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. + /// . + /// The location of the ORC data storage. + /// . + internal OrcDataset(string type, string description, object structure, object schema, LinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary additionalProperties, DatasetLocation location, OrcCompressionCodec? orcCompressionCodec) : base(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) + { + Location = location; + OrcCompressionCodec = orcCompressionCodec; + Type = type ?? "Orc"; + } + + /// The location of the ORC data storage. + public DatasetLocation Location { get; set; } + public OrcCompressionCodec? OrcCompressionCodec { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ParameterSpecification.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ParameterSpecification.Serialization.cs new file mode 100644 index 000000000000..37569701d9d8 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ParameterSpecification.Serialization.cs @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class ParameterSpecification : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type.ToString()); + if (DefaultValue != null) + { + writer.WritePropertyName("defaultValue"); + writer.WriteObjectValue(DefaultValue); + } + writer.WriteEndObject(); + } + + internal static ParameterSpecification DeserializeParameterSpecification(JsonElement element) + { + ParameterType type = default; + object defaultValue = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = new ParameterType(property.Value.GetString()); + continue; + } + if (property.NameEquals("defaultValue")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + defaultValue = property.Value.GetObject(); + continue; + } + } + return new ParameterSpecification(type, defaultValue); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ParameterSpecification.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ParameterSpecification.cs new file mode 100644 index 000000000000..2c8558d04291 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ParameterSpecification.cs @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Definition of a single parameter for an entity. + public partial class ParameterSpecification + { + /// Initializes a new instance of ParameterSpecification. + /// Parameter type. + public ParameterSpecification(ParameterType type) + { + Type = type; + } + + /// Initializes a new instance of ParameterSpecification. + /// Parameter type. + /// Default value of parameter. + internal ParameterSpecification(ParameterType type, object defaultValue) + { + Type = type; + DefaultValue = defaultValue; + } + + /// Parameter type. + public ParameterType Type { get; set; } + /// Default value of parameter. + public object DefaultValue { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ParameterType.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ParameterType.cs new file mode 100644 index 000000000000..976c719fc85d --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ParameterType.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Parameter type. + public readonly partial struct ParameterType : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + public ParameterType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ObjectValue = "Object"; + private const string StringValue = "String"; + private const string IntValue = "Int"; + private const string FloatValue = "Float"; + private const string BoolValue = "Bool"; + private const string ArrayValue = "Array"; + private const string SecureStringValue = "SecureString"; + + /// Object. + public static ParameterType Object { get; } = new ParameterType(ObjectValue); + /// String. + public static ParameterType String { get; } = new ParameterType(StringValue); + /// Int. + public static ParameterType Int { get; } = new ParameterType(IntValue); + /// Float. + public static ParameterType Float { get; } = new ParameterType(FloatValue); + /// Bool. + public static ParameterType Bool { get; } = new ParameterType(BoolValue); + /// Array. + public static ParameterType Array { get; } = new ParameterType(ArrayValue); + /// SecureString. + public static ParameterType SecureString { get; } = new ParameterType(SecureStringValue); + /// Determines if two values are the same. + public static bool operator ==(ParameterType left, ParameterType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ParameterType left, ParameterType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator ParameterType(string value) => new ParameterType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ParameterType other && Equals(other); + /// + public bool Equals(ParameterType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ParquetCompressionCodec.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ParquetCompressionCodec.cs new file mode 100644 index 000000000000..a94d70486730 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ParquetCompressionCodec.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// The ParquetCompressionCodec. + public readonly partial struct ParquetCompressionCodec : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + public ParquetCompressionCodec(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NoneValue = "none"; + private const string GzipValue = "gzip"; + private const string SnappyValue = "snappy"; + private const string LzoValue = "lzo"; + + /// none. + public static ParquetCompressionCodec None { get; } = new ParquetCompressionCodec(NoneValue); + /// gzip. + public static ParquetCompressionCodec Gzip { get; } = new ParquetCompressionCodec(GzipValue); + /// snappy. + public static ParquetCompressionCodec Snappy { get; } = new ParquetCompressionCodec(SnappyValue); + /// lzo. + public static ParquetCompressionCodec Lzo { get; } = new ParquetCompressionCodec(LzoValue); + /// Determines if two values are the same. + public static bool operator ==(ParquetCompressionCodec left, ParquetCompressionCodec right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ParquetCompressionCodec left, ParquetCompressionCodec right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator ParquetCompressionCodec(string value) => new ParquetCompressionCodec(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ParquetCompressionCodec other && Equals(other); + /// + public bool Equals(ParquetCompressionCodec other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ParquetDataset.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ParquetDataset.Serialization.cs new file mode 100644 index 000000000000..d607f54bcbed --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ParquetDataset.Serialization.cs @@ -0,0 +1,228 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class ParquetDataset : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Structure != null) + { + writer.WritePropertyName("structure"); + writer.WriteObjectValue(Structure); + } + if (Schema != null) + { + writer.WritePropertyName("schema"); + writer.WriteObjectValue(Schema); + } + writer.WritePropertyName("linkedServiceName"); + writer.WriteObjectValue(LinkedServiceName); + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Folder != null) + { + writer.WritePropertyName("folder"); + writer.WriteObjectValue(Folder); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + if (Location != null) + { + writer.WritePropertyName("location"); + writer.WriteObjectValue(Location); + } + if (CompressionCodec != null) + { + writer.WritePropertyName("compressionCodec"); + writer.WriteStringValue(CompressionCodec.Value.ToString()); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static ParquetDataset DeserializeParquetDataset(JsonElement element) + { + string type = default; + string description = default; + object structure = default; + object schema = default; + LinkedServiceReference linkedServiceName = default; + IDictionary parameters = default; + IList annotations = default; + DatasetFolder folder = default; + DatasetLocation location = default; + ParquetCompressionCodec? compressionCodec = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("structure")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + structure = property.Value.GetObject(); + continue; + } + if (property.NameEquals("schema")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + schema = property.Value.GetObject(); + continue; + } + if (property.NameEquals("linkedServiceName")) + { + linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("folder")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + folder = DatasetFolder.DeserializeDatasetFolder(property.Value); + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("location")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + location = DatasetLocation.DeserializeDatasetLocation(property0.Value); + continue; + } + if (property0.NameEquals("compressionCodec")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + compressionCodec = new ParquetCompressionCodec(property0.Value.GetString()); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new ParquetDataset(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties, location, compressionCodec); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ParquetDataset.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ParquetDataset.cs new file mode 100644 index 000000000000..7f9e02c3f10f --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ParquetDataset.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Parquet dataset. + public partial class ParquetDataset : Dataset + { + /// Initializes a new instance of ParquetDataset. + /// Linked service reference. + public ParquetDataset(LinkedServiceReference linkedServiceName) : base(linkedServiceName) + { + if (linkedServiceName == null) + { + throw new ArgumentNullException(nameof(linkedServiceName)); + } + + Type = "Parquet"; + } + + /// Initializes a new instance of ParquetDataset. + /// Type of dataset. + /// Dataset description. + /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. + /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. + /// Linked service reference. + /// Parameters for dataset. + /// List of tags that can be used for describing the Dataset. + /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. + /// . + /// The location of the parquet storage. + /// . + internal ParquetDataset(string type, string description, object structure, object schema, LinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary additionalProperties, DatasetLocation location, ParquetCompressionCodec? compressionCodec) : base(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) + { + Location = location; + CompressionCodec = compressionCodec; + Type = type ?? "Parquet"; + } + + /// The location of the parquet storage. + public DatasetLocation Location { get; set; } + public ParquetCompressionCodec? CompressionCodec { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PaypalLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PaypalLinkedService.Serialization.cs new file mode 100644 index 000000000000..beb639543458 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PaypalLinkedService.Serialization.cs @@ -0,0 +1,251 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class PaypalLinkedService : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (ConnectVia != null) + { + writer.WritePropertyName("connectVia"); + writer.WriteObjectValue(ConnectVia); + } + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + writer.WritePropertyName("host"); + writer.WriteObjectValue(Host); + writer.WritePropertyName("clientId"); + writer.WriteObjectValue(ClientId); + if (ClientSecret != null) + { + writer.WritePropertyName("clientSecret"); + writer.WriteObjectValue(ClientSecret); + } + if (UseEncryptedEndpoints != null) + { + writer.WritePropertyName("useEncryptedEndpoints"); + writer.WriteObjectValue(UseEncryptedEndpoints); + } + if (UseHostVerification != null) + { + writer.WritePropertyName("useHostVerification"); + writer.WriteObjectValue(UseHostVerification); + } + if (UsePeerVerification != null) + { + writer.WritePropertyName("usePeerVerification"); + writer.WriteObjectValue(UsePeerVerification); + } + if (EncryptedCredential != null) + { + writer.WritePropertyName("encryptedCredential"); + writer.WriteObjectValue(EncryptedCredential); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static PaypalLinkedService DeserializePaypalLinkedService(JsonElement element) + { + string type = default; + IntegrationRuntimeReference connectVia = default; + string description = default; + IDictionary parameters = default; + IList annotations = default; + object host = default; + object clientId = default; + SecretBase clientSecret = default; + object useEncryptedEndpoints = default; + object useHostVerification = default; + object usePeerVerification = default; + object encryptedCredential = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("connectVia")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("host")) + { + host = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("clientId")) + { + clientId = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("clientSecret")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + clientSecret = SecretBase.DeserializeSecretBase(property0.Value); + continue; + } + if (property0.NameEquals("useEncryptedEndpoints")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + useEncryptedEndpoints = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("useHostVerification")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + useHostVerification = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("usePeerVerification")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + usePeerVerification = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("encryptedCredential")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + encryptedCredential = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new PaypalLinkedService(type, connectVia, description, parameters, annotations, additionalProperties, host, clientId, clientSecret, useEncryptedEndpoints, useHostVerification, usePeerVerification, encryptedCredential); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PaypalLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PaypalLinkedService.cs new file mode 100644 index 000000000000..874c9633a762 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PaypalLinkedService.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Paypal Service linked service. + public partial class PaypalLinkedService : LinkedService + { + /// Initializes a new instance of PaypalLinkedService. + /// The URL of the PayPal instance. (i.e. api.sandbox.paypal.com). + /// The client ID associated with your PayPal application. + public PaypalLinkedService(object host, object clientId) + { + if (host == null) + { + throw new ArgumentNullException(nameof(host)); + } + if (clientId == null) + { + throw new ArgumentNullException(nameof(clientId)); + } + + Host = host; + ClientId = clientId; + Type = "Paypal"; + } + + /// Initializes a new instance of PaypalLinkedService. + /// Type of linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for describing the linked service. + /// . + /// The URL of the PayPal instance. (i.e. api.sandbox.paypal.com). + /// The client ID associated with your PayPal application. + /// The client secret associated with your PayPal application. + /// Specifies whether the data source endpoints are encrypted using HTTPS. The default value is true. + /// Specifies whether to require the host name in the server's certificate to match the host name of the server when connecting over SSL. The default value is true. + /// Specifies whether to verify the identity of the server when connecting over SSL. The default value is true. + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + internal PaypalLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object host, object clientId, SecretBase clientSecret, object useEncryptedEndpoints, object useHostVerification, object usePeerVerification, object encryptedCredential) : base(type, connectVia, description, parameters, annotations, additionalProperties) + { + Host = host; + ClientId = clientId; + ClientSecret = clientSecret; + UseEncryptedEndpoints = useEncryptedEndpoints; + UseHostVerification = useHostVerification; + UsePeerVerification = usePeerVerification; + EncryptedCredential = encryptedCredential; + Type = type ?? "Paypal"; + } + + /// The URL of the PayPal instance. (i.e. api.sandbox.paypal.com). + public object Host { get; set; } + /// The client ID associated with your PayPal application. + public object ClientId { get; set; } + /// The client secret associated with your PayPal application. + public SecretBase ClientSecret { get; set; } + /// Specifies whether the data source endpoints are encrypted using HTTPS. The default value is true. + public object UseEncryptedEndpoints { get; set; } + /// Specifies whether to require the host name in the server's certificate to match the host name of the server when connecting over SSL. The default value is true. + public object UseHostVerification { get; set; } + /// Specifies whether to verify the identity of the server when connecting over SSL. The default value is true. + public object UsePeerVerification { get; set; } + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + public object EncryptedCredential { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PaypalObjectDataset.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PaypalObjectDataset.Serialization.cs new file mode 100644 index 000000000000..583b56f44430 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PaypalObjectDataset.Serialization.cs @@ -0,0 +1,213 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class PaypalObjectDataset : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Structure != null) + { + writer.WritePropertyName("structure"); + writer.WriteObjectValue(Structure); + } + if (Schema != null) + { + writer.WritePropertyName("schema"); + writer.WriteObjectValue(Schema); + } + writer.WritePropertyName("linkedServiceName"); + writer.WriteObjectValue(LinkedServiceName); + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Folder != null) + { + writer.WritePropertyName("folder"); + writer.WriteObjectValue(Folder); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + if (TableName != null) + { + writer.WritePropertyName("tableName"); + writer.WriteObjectValue(TableName); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static PaypalObjectDataset DeserializePaypalObjectDataset(JsonElement element) + { + string type = default; + string description = default; + object structure = default; + object schema = default; + LinkedServiceReference linkedServiceName = default; + IDictionary parameters = default; + IList annotations = default; + DatasetFolder folder = default; + object tableName = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("structure")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + structure = property.Value.GetObject(); + continue; + } + if (property.NameEquals("schema")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + schema = property.Value.GetObject(); + continue; + } + if (property.NameEquals("linkedServiceName")) + { + linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("folder")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + folder = DatasetFolder.DeserializeDatasetFolder(property.Value); + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("tableName")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + tableName = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new PaypalObjectDataset(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties, tableName); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PaypalObjectDataset.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PaypalObjectDataset.cs new file mode 100644 index 000000000000..5a3f12b94d06 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PaypalObjectDataset.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Paypal Service dataset. + public partial class PaypalObjectDataset : Dataset + { + /// Initializes a new instance of PaypalObjectDataset. + /// Linked service reference. + public PaypalObjectDataset(LinkedServiceReference linkedServiceName) : base(linkedServiceName) + { + if (linkedServiceName == null) + { + throw new ArgumentNullException(nameof(linkedServiceName)); + } + + Type = "PaypalObject"; + } + + /// Initializes a new instance of PaypalObjectDataset. + /// Type of dataset. + /// Dataset description. + /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. + /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. + /// Linked service reference. + /// Parameters for dataset. + /// List of tags that can be used for describing the Dataset. + /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. + /// . + /// The table name. Type: string (or Expression with resultType string). + internal PaypalObjectDataset(string type, string description, object structure, object schema, LinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary additionalProperties, object tableName) : base(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) + { + TableName = tableName; + Type = type ?? "PaypalObject"; + } + + /// The table name. Type: string (or Expression with resultType string). + public object TableName { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PhoenixAuthenticationType.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PhoenixAuthenticationType.cs new file mode 100644 index 000000000000..13c7b38f97e2 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PhoenixAuthenticationType.cs @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// The authentication mechanism used to connect to the Phoenix server. + public readonly partial struct PhoenixAuthenticationType : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + public PhoenixAuthenticationType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AnonymousValue = "Anonymous"; + private const string UsernameAndPasswordValue = "UsernameAndPassword"; + private const string WindowsAzureHDInsightServiceValue = "WindowsAzureHDInsightService"; + + /// Anonymous. + public static PhoenixAuthenticationType Anonymous { get; } = new PhoenixAuthenticationType(AnonymousValue); + /// UsernameAndPassword. + public static PhoenixAuthenticationType UsernameAndPassword { get; } = new PhoenixAuthenticationType(UsernameAndPasswordValue); + /// WindowsAzureHDInsightService. + public static PhoenixAuthenticationType WindowsAzureHDInsightService { get; } = new PhoenixAuthenticationType(WindowsAzureHDInsightServiceValue); + /// Determines if two values are the same. + public static bool operator ==(PhoenixAuthenticationType left, PhoenixAuthenticationType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(PhoenixAuthenticationType left, PhoenixAuthenticationType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator PhoenixAuthenticationType(string value) => new PhoenixAuthenticationType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is PhoenixAuthenticationType other && Equals(other); + /// + public bool Equals(PhoenixAuthenticationType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PhoenixLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PhoenixLinkedService.Serialization.cs new file mode 100644 index 000000000000..ad7b90023a4f --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PhoenixLinkedService.Serialization.cs @@ -0,0 +1,326 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class PhoenixLinkedService : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (ConnectVia != null) + { + writer.WritePropertyName("connectVia"); + writer.WriteObjectValue(ConnectVia); + } + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + writer.WritePropertyName("host"); + writer.WriteObjectValue(Host); + if (Port != null) + { + writer.WritePropertyName("port"); + writer.WriteObjectValue(Port); + } + if (HttpPath != null) + { + writer.WritePropertyName("httpPath"); + writer.WriteObjectValue(HttpPath); + } + writer.WritePropertyName("authenticationType"); + writer.WriteStringValue(AuthenticationType.ToString()); + if (Username != null) + { + writer.WritePropertyName("username"); + writer.WriteObjectValue(Username); + } + if (Password != null) + { + writer.WritePropertyName("password"); + writer.WriteObjectValue(Password); + } + if (EnableSsl != null) + { + writer.WritePropertyName("enableSsl"); + writer.WriteObjectValue(EnableSsl); + } + if (TrustedCertPath != null) + { + writer.WritePropertyName("trustedCertPath"); + writer.WriteObjectValue(TrustedCertPath); + } + if (UseSystemTrustStore != null) + { + writer.WritePropertyName("useSystemTrustStore"); + writer.WriteObjectValue(UseSystemTrustStore); + } + if (AllowHostNameCNMismatch != null) + { + writer.WritePropertyName("allowHostNameCNMismatch"); + writer.WriteObjectValue(AllowHostNameCNMismatch); + } + if (AllowSelfSignedServerCert != null) + { + writer.WritePropertyName("allowSelfSignedServerCert"); + writer.WriteObjectValue(AllowSelfSignedServerCert); + } + if (EncryptedCredential != null) + { + writer.WritePropertyName("encryptedCredential"); + writer.WriteObjectValue(EncryptedCredential); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static PhoenixLinkedService DeserializePhoenixLinkedService(JsonElement element) + { + string type = default; + IntegrationRuntimeReference connectVia = default; + string description = default; + IDictionary parameters = default; + IList annotations = default; + object host = default; + object port = default; + object httpPath = default; + PhoenixAuthenticationType authenticationType = default; + object username = default; + SecretBase password = default; + object enableSsl = default; + object trustedCertPath = default; + object useSystemTrustStore = default; + object allowHostNameCNMismatch = default; + object allowSelfSignedServerCert = default; + object encryptedCredential = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("connectVia")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("host")) + { + host = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("port")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + port = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("httpPath")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + httpPath = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("authenticationType")) + { + authenticationType = new PhoenixAuthenticationType(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("username")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + username = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("password")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + password = SecretBase.DeserializeSecretBase(property0.Value); + continue; + } + if (property0.NameEquals("enableSsl")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + enableSsl = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("trustedCertPath")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + trustedCertPath = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("useSystemTrustStore")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + useSystemTrustStore = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("allowHostNameCNMismatch")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + allowHostNameCNMismatch = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("allowSelfSignedServerCert")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + allowSelfSignedServerCert = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("encryptedCredential")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + encryptedCredential = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new PhoenixLinkedService(type, connectVia, description, parameters, annotations, additionalProperties, host, port, httpPath, authenticationType, username, password, enableSsl, trustedCertPath, useSystemTrustStore, allowHostNameCNMismatch, allowSelfSignedServerCert, encryptedCredential); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PhoenixLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PhoenixLinkedService.cs new file mode 100644 index 000000000000..1bf02b9a9be7 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PhoenixLinkedService.cs @@ -0,0 +1,92 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Phoenix server linked service. + public partial class PhoenixLinkedService : LinkedService + { + /// Initializes a new instance of PhoenixLinkedService. + /// The IP address or host name of the Phoenix server. (i.e. 192.168.222.160). + /// The authentication mechanism used to connect to the Phoenix server. + public PhoenixLinkedService(object host, PhoenixAuthenticationType authenticationType) + { + if (host == null) + { + throw new ArgumentNullException(nameof(host)); + } + + Host = host; + AuthenticationType = authenticationType; + Type = "Phoenix"; + } + + /// Initializes a new instance of PhoenixLinkedService. + /// Type of linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for describing the linked service. + /// . + /// The IP address or host name of the Phoenix server. (i.e. 192.168.222.160). + /// The TCP port that the Phoenix server uses to listen for client connections. The default value is 8765. + /// The partial URL corresponding to the Phoenix server. (i.e. /gateway/sandbox/phoenix/version). The default value is hbasephoenix if using WindowsAzureHDInsightService. + /// The authentication mechanism used to connect to the Phoenix server. + /// The user name used to connect to the Phoenix server. + /// The password corresponding to the user name. + /// Specifies whether the connections to the server are encrypted using SSL. The default value is false. + /// The full path of the .pem file containing trusted CA certificates for verifying the server when connecting over SSL. This property can only be set when using SSL on self-hosted IR. The default value is the cacerts.pem file installed with the IR. + /// Specifies whether to use a CA certificate from the system trust store or from a specified PEM file. The default value is false. + /// Specifies whether to require a CA-issued SSL certificate name to match the host name of the server when connecting over SSL. The default value is false. + /// Specifies whether to allow self-signed certificates from the server. The default value is false. + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + internal PhoenixLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object host, object port, object httpPath, PhoenixAuthenticationType authenticationType, object username, SecretBase password, object enableSsl, object trustedCertPath, object useSystemTrustStore, object allowHostNameCNMismatch, object allowSelfSignedServerCert, object encryptedCredential) : base(type, connectVia, description, parameters, annotations, additionalProperties) + { + Host = host; + Port = port; + HttpPath = httpPath; + AuthenticationType = authenticationType; + Username = username; + Password = password; + EnableSsl = enableSsl; + TrustedCertPath = trustedCertPath; + UseSystemTrustStore = useSystemTrustStore; + AllowHostNameCNMismatch = allowHostNameCNMismatch; + AllowSelfSignedServerCert = allowSelfSignedServerCert; + EncryptedCredential = encryptedCredential; + Type = type ?? "Phoenix"; + } + + /// The IP address or host name of the Phoenix server. (i.e. 192.168.222.160). + public object Host { get; set; } + /// The TCP port that the Phoenix server uses to listen for client connections. The default value is 8765. + public object Port { get; set; } + /// The partial URL corresponding to the Phoenix server. (i.e. /gateway/sandbox/phoenix/version). The default value is hbasephoenix if using WindowsAzureHDInsightService. + public object HttpPath { get; set; } + /// The authentication mechanism used to connect to the Phoenix server. + public PhoenixAuthenticationType AuthenticationType { get; set; } + /// The user name used to connect to the Phoenix server. + public object Username { get; set; } + /// The password corresponding to the user name. + public SecretBase Password { get; set; } + /// Specifies whether the connections to the server are encrypted using SSL. The default value is false. + public object EnableSsl { get; set; } + /// The full path of the .pem file containing trusted CA certificates for verifying the server when connecting over SSL. This property can only be set when using SSL on self-hosted IR. The default value is the cacerts.pem file installed with the IR. + public object TrustedCertPath { get; set; } + /// Specifies whether to use a CA certificate from the system trust store or from a specified PEM file. The default value is false. + public object UseSystemTrustStore { get; set; } + /// Specifies whether to require a CA-issued SSL certificate name to match the host name of the server when connecting over SSL. The default value is false. + public object AllowHostNameCNMismatch { get; set; } + /// Specifies whether to allow self-signed certificates from the server. The default value is false. + public object AllowSelfSignedServerCert { get; set; } + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + public object EncryptedCredential { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PhoenixObjectDataset.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PhoenixObjectDataset.Serialization.cs new file mode 100644 index 000000000000..1c08f21a0ccd --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PhoenixObjectDataset.Serialization.cs @@ -0,0 +1,243 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class PhoenixObjectDataset : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Structure != null) + { + writer.WritePropertyName("structure"); + writer.WriteObjectValue(Structure); + } + if (Schema != null) + { + writer.WritePropertyName("schema"); + writer.WriteObjectValue(Schema); + } + writer.WritePropertyName("linkedServiceName"); + writer.WriteObjectValue(LinkedServiceName); + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Folder != null) + { + writer.WritePropertyName("folder"); + writer.WriteObjectValue(Folder); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + if (TableName != null) + { + writer.WritePropertyName("tableName"); + writer.WriteObjectValue(TableName); + } + if (Table != null) + { + writer.WritePropertyName("table"); + writer.WriteObjectValue(Table); + } + if (SchemaTypePropertiesSchema != null) + { + writer.WritePropertyName("schema"); + writer.WriteObjectValue(SchemaTypePropertiesSchema); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static PhoenixObjectDataset DeserializePhoenixObjectDataset(JsonElement element) + { + string type = default; + string description = default; + object structure = default; + object schema = default; + LinkedServiceReference linkedServiceName = default; + IDictionary parameters = default; + IList annotations = default; + DatasetFolder folder = default; + object tableName = default; + object table = default; + object schema0 = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("structure")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + structure = property.Value.GetObject(); + continue; + } + if (property.NameEquals("schema")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + schema = property.Value.GetObject(); + continue; + } + if (property.NameEquals("linkedServiceName")) + { + linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("folder")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + folder = DatasetFolder.DeserializeDatasetFolder(property.Value); + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("tableName")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + tableName = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("table")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + table = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("schema")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + schema0 = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new PhoenixObjectDataset(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties, tableName, table, schema0); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PhoenixObjectDataset.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PhoenixObjectDataset.cs new file mode 100644 index 000000000000..61c14f1fc8c0 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PhoenixObjectDataset.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Phoenix server dataset. + public partial class PhoenixObjectDataset : Dataset + { + /// Initializes a new instance of PhoenixObjectDataset. + /// Linked service reference. + public PhoenixObjectDataset(LinkedServiceReference linkedServiceName) : base(linkedServiceName) + { + if (linkedServiceName == null) + { + throw new ArgumentNullException(nameof(linkedServiceName)); + } + + Type = "PhoenixObject"; + } + + /// Initializes a new instance of PhoenixObjectDataset. + /// Type of dataset. + /// Dataset description. + /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. + /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. + /// Linked service reference. + /// Parameters for dataset. + /// List of tags that can be used for describing the Dataset. + /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. + /// . + /// This property will be retired. Please consider using schema + table properties instead. + /// The table name of the Phoenix. Type: string (or Expression with resultType string). + /// The schema name of the Phoenix. Type: string (or Expression with resultType string). + internal PhoenixObjectDataset(string type, string description, object structure, object schema, LinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary additionalProperties, object tableName, object table, object schemaTypePropertiesSchema) : base(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) + { + TableName = tableName; + Table = table; + SchemaTypePropertiesSchema = schemaTypePropertiesSchema; + Type = type ?? "PhoenixObject"; + } + + /// This property will be retired. Please consider using schema + table properties instead. + public object TableName { get; set; } + /// The table name of the Phoenix. Type: string (or Expression with resultType string). + public object Table { get; set; } + /// The schema name of the Phoenix. Type: string (or Expression with resultType string). + public object SchemaTypePropertiesSchema { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PipelineFolder.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PipelineFolder.Serialization.cs new file mode 100644 index 000000000000..853b33269caf --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PipelineFolder.Serialization.cs @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class PipelineFolder : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Name != null) + { + writer.WritePropertyName("name"); + writer.WriteStringValue(Name); + } + writer.WriteEndObject(); + } + + internal static PipelineFolder DeserializePipelineFolder(JsonElement element) + { + string name = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + name = property.Value.GetString(); + continue; + } + } + return new PipelineFolder(name); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PipelineFolder.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PipelineFolder.cs new file mode 100644 index 000000000000..18583c5068d1 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PipelineFolder.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// The folder that this Pipeline is in. If not specified, Pipeline will appear at the root level. + public partial class PipelineFolder + { + /// Initializes a new instance of PipelineFolder. + public PipelineFolder() + { + } + + /// Initializes a new instance of PipelineFolder. + /// The name of the folder that this Pipeline is in. + internal PipelineFolder(string name) + { + Name = name; + } + + /// The name of the folder that this Pipeline is in. + public string Name { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PipelineListResponse.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PipelineListResponse.Serialization.cs new file mode 100644 index 000000000000..a9d114c012d0 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PipelineListResponse.Serialization.cs @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class PipelineListResponse + { + internal static PipelineListResponse DeserializePipelineListResponse(JsonElement element) + { + IReadOnlyList value = default; + string nextLink = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value")) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(PipelineResource.DeserializePipelineResource(item)); + } + } + value = array; + continue; + } + if (property.NameEquals("nextLink")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = property.Value.GetString(); + continue; + } + } + return new PipelineListResponse(value, nextLink); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PipelineListResponse.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PipelineListResponse.cs new file mode 100644 index 000000000000..3873ccfe68b7 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PipelineListResponse.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// A list of pipeline resources. + public partial class PipelineListResponse + { + /// Initializes a new instance of PipelineListResponse. + /// List of pipelines. + internal PipelineListResponse(IEnumerable value) + { + if (value == null) + { + throw new ArgumentNullException(nameof(value)); + } + + Value = value.ToArray(); + } + + /// Initializes a new instance of PipelineListResponse. + /// List of pipelines. + /// The link to the next page of results, if any remaining results exist. + internal PipelineListResponse(IReadOnlyList value, string nextLink) + { + Value = value; + NextLink = nextLink; + } + + /// List of pipelines. + public IReadOnlyList Value { get; } + /// The link to the next page of results, if any remaining results exist. + public string NextLink { get; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PipelineReference.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PipelineReference.Serialization.cs new file mode 100644 index 000000000000..d42257503042 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PipelineReference.Serialization.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class PipelineReference : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + writer.WritePropertyName("referenceName"); + writer.WriteStringValue(ReferenceName); + if (Name != null) + { + writer.WritePropertyName("name"); + writer.WriteStringValue(Name); + } + writer.WriteEndObject(); + } + + internal static PipelineReference DeserializePipelineReference(JsonElement element) + { + string type = default; + string referenceName = default; + string name = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("referenceName")) + { + referenceName = property.Value.GetString(); + continue; + } + if (property.NameEquals("name")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + name = property.Value.GetString(); + continue; + } + } + return new PipelineReference(type, referenceName, name); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PipelineReference.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PipelineReference.cs new file mode 100644 index 000000000000..e4fecd93a8ee --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PipelineReference.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Pipeline reference type. + public partial class PipelineReference + { + /// Initializes a new instance of PipelineReference. + /// Reference pipeline name. + public PipelineReference(string referenceName) + { + if (referenceName == null) + { + throw new ArgumentNullException(nameof(referenceName)); + } + + Type = "PipelineReference"; + ReferenceName = referenceName; + } + + /// Initializes a new instance of PipelineReference. + /// Pipeline reference type. + /// Reference pipeline name. + /// Reference name. + internal PipelineReference(string type, string referenceName, string name) + { + Type = type; + ReferenceName = referenceName; + Name = name; + } + + /// Pipeline reference type. + public string Type { get; set; } + /// Reference pipeline name. + public string ReferenceName { get; set; } + /// Reference name. + public string Name { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PipelineResource.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PipelineResource.Serialization.cs new file mode 100644 index 000000000000..12f1f7561288 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PipelineResource.Serialization.cs @@ -0,0 +1,325 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class PipelineResource : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Id != null) + { + writer.WritePropertyName("id"); + writer.WriteStringValue(Id); + } + if (Name != null) + { + writer.WritePropertyName("name"); + writer.WriteStringValue(Name); + } + if (Type != null) + { + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + } + if (Etag != null) + { + writer.WritePropertyName("etag"); + writer.WriteStringValue(Etag); + } + writer.WritePropertyName("properties"); + writer.WriteStartObject(); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Activities != null) + { + writer.WritePropertyName("activities"); + writer.WriteStartArray(); + foreach (var item in Activities) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Variables != null) + { + writer.WritePropertyName("variables"); + writer.WriteStartObject(); + foreach (var item in Variables) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Concurrency != null) + { + writer.WritePropertyName("concurrency"); + writer.WriteNumberValue(Concurrency.Value); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (RunDimensions != null) + { + writer.WritePropertyName("runDimensions"); + writer.WriteStartObject(); + foreach (var item in RunDimensions) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Folder != null) + { + writer.WritePropertyName("folder"); + writer.WriteObjectValue(Folder); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static PipelineResource DeserializePipelineResource(JsonElement element) + { + string id = default; + string name = default; + string type = default; + string etag = default; + string description = default; + IList activities = default; + IDictionary parameters = default; + IDictionary variables = default; + int? concurrency = default; + IList annotations = default; + IDictionary runDimensions = default; + PipelineFolder folder = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("name")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("etag")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + etag = property.Value.GetString(); + continue; + } + if (property.NameEquals("properties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("description")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("activities")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(Activity.DeserializeActivity(item)); + } + } + activities = array; + continue; + } + if (property0.NameEquals("parameters")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property1 in property0.Value.EnumerateObject()) + { + if (property1.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property1.Name, null); + } + else + { + dictionary.Add(property1.Name, ParameterSpecification.DeserializeParameterSpecification(property1.Value)); + } + } + parameters = dictionary; + continue; + } + if (property0.NameEquals("variables")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property1 in property0.Value.EnumerateObject()) + { + if (property1.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property1.Name, null); + } + else + { + dictionary.Add(property1.Name, VariableSpecification.DeserializeVariableSpecification(property1.Value)); + } + } + variables = dictionary; + continue; + } + if (property0.NameEquals("concurrency")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + concurrency = property0.Value.GetInt32(); + continue; + } + if (property0.NameEquals("annotations")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property0.NameEquals("runDimensions")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property1 in property0.Value.EnumerateObject()) + { + if (property1.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property1.Name, null); + } + else + { + dictionary.Add(property1.Name, property1.Value.GetObject()); + } + } + runDimensions = dictionary; + continue; + } + if (property0.NameEquals("folder")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + folder = PipelineFolder.DeserializePipelineFolder(property0.Value); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new PipelineResource(id, name, type, etag, description, activities, parameters, variables, concurrency, annotations, runDimensions, folder, additionalProperties); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PipelineResource.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PipelineResource.cs new file mode 100644 index 000000000000..886a9115337d --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PipelineResource.cs @@ -0,0 +1,103 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Pipeline resource type. + public partial class PipelineResource : SubResource, IDictionary + { + /// Initializes a new instance of PipelineResource. + public PipelineResource() + { + AdditionalProperties = new Dictionary(); + } + + /// Initializes a new instance of PipelineResource. + /// The resource identifier. + /// The resource name. + /// The resource type. + /// Etag identifies change in the resource. + /// The description of the pipeline. + /// List of activities in pipeline. + /// List of parameters for pipeline. + /// List of variables for pipeline. + /// The max number of concurrent runs for the pipeline. + /// List of tags that can be used for describing the Pipeline. + /// Dimensions emitted by Pipeline. + /// The folder that this Pipeline is in. If not specified, Pipeline will appear at the root level. + /// . + internal PipelineResource(string id, string name, string type, string etag, string description, IList activities, IDictionary parameters, IDictionary variables, int? concurrency, IList annotations, IDictionary runDimensions, PipelineFolder folder, IDictionary additionalProperties) : base(id, name, type, etag) + { + Description = description; + Activities = activities; + Parameters = parameters; + Variables = variables; + Concurrency = concurrency; + Annotations = annotations; + RunDimensions = runDimensions; + Folder = folder; + AdditionalProperties = additionalProperties ?? new Dictionary(); + } + + /// The description of the pipeline. + public string Description { get; set; } + /// List of activities in pipeline. + public IList Activities { get; set; } + /// List of parameters for pipeline. + public IDictionary Parameters { get; set; } + /// List of variables for pipeline. + public IDictionary Variables { get; set; } + /// The max number of concurrent runs for the pipeline. + public int? Concurrency { get; set; } + /// List of tags that can be used for describing the Pipeline. + public IList Annotations { get; set; } + /// Dimensions emitted by Pipeline. + public IDictionary RunDimensions { get; set; } + /// The folder that this Pipeline is in. If not specified, Pipeline will appear at the root level. + public PipelineFolder Folder { get; set; } + internal IDictionary AdditionalProperties { get; } + /// + public IEnumerator> GetEnumerator() => AdditionalProperties.GetEnumerator(); + /// + IEnumerator IEnumerable.GetEnumerator() => AdditionalProperties.GetEnumerator(); + /// + public bool TryGetValue(string key, out object value) => AdditionalProperties.TryGetValue(key, out value); + /// + public bool ContainsKey(string key) => AdditionalProperties.ContainsKey(key); + /// + public ICollection Keys => AdditionalProperties.Keys; + /// + public ICollection Values => AdditionalProperties.Values; + /// + int ICollection>.Count => AdditionalProperties.Count; + /// + public void Add(string key, object value) => AdditionalProperties.Add(key, value); + /// + public bool Remove(string key) => AdditionalProperties.Remove(key); + /// + bool ICollection>.IsReadOnly => AdditionalProperties.IsReadOnly; + /// + void ICollection>.Add(KeyValuePair value) => AdditionalProperties.Add(value); + /// + bool ICollection>.Remove(KeyValuePair value) => AdditionalProperties.Remove(value); + /// + bool ICollection>.Contains(KeyValuePair value) => AdditionalProperties.Contains(value); + /// + void ICollection>.CopyTo(KeyValuePair[] destination, int offset) => AdditionalProperties.CopyTo(destination, offset); + /// + void ICollection>.Clear() => AdditionalProperties.Clear(); + /// + public object this[string key] + { + get => AdditionalProperties[key]; + set => AdditionalProperties[key] = value; + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PipelineRun.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PipelineRun.Serialization.cs new file mode 100644 index 000000000000..16b915516d55 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PipelineRun.Serialization.cs @@ -0,0 +1,169 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class PipelineRun + { + internal static PipelineRun DeserializePipelineRun(JsonElement element) + { + string runId = default; + string runGroupId = default; + bool? isLatest = default; + string pipelineName = default; + IReadOnlyDictionary parameters = default; + PipelineRunInvokedBy invokedBy = default; + DateTimeOffset? lastUpdated = default; + DateTimeOffset? runStart = default; + DateTimeOffset? runEnd = default; + int? durationInMs = default; + string status = default; + string message = default; + IReadOnlyDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("runId")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + runId = property.Value.GetString(); + continue; + } + if (property.NameEquals("runGroupId")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + runGroupId = property.Value.GetString(); + continue; + } + if (property.NameEquals("isLatest")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isLatest = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("pipelineName")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + pipelineName = property.Value.GetString(); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("invokedBy")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + invokedBy = PipelineRunInvokedBy.DeserializePipelineRunInvokedBy(property.Value); + continue; + } + if (property.NameEquals("lastUpdated")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + lastUpdated = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("runStart")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + runStart = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("runEnd")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + runEnd = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("durationInMs")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + durationInMs = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("status")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + status = property.Value.GetString(); + continue; + } + if (property.NameEquals("message")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + message = property.Value.GetString(); + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new PipelineRun(runId, runGroupId, isLatest, pipelineName, parameters, invokedBy, lastUpdated, runStart, runEnd, durationInMs, status, message, additionalProperties); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PipelineRun.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PipelineRun.cs new file mode 100644 index 000000000000..0848174101fa --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PipelineRun.cs @@ -0,0 +1,99 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Information about a pipeline run. + public partial class PipelineRun : IReadOnlyDictionary + { + /// Initializes a new instance of PipelineRun. + internal PipelineRun() + { + AdditionalProperties = new Dictionary(); + } + + /// Initializes a new instance of PipelineRun. + /// Identifier of a run. + /// Identifier that correlates all the recovery runs of a pipeline run. + /// Indicates if the recovered pipeline run is the latest in its group. + /// The pipeline name. + /// The full or partial list of parameter name, value pair used in the pipeline run. + /// Entity that started the pipeline run. + /// The last updated timestamp for the pipeline run event in ISO8601 format. + /// The start time of a pipeline run in ISO8601 format. + /// The end time of a pipeline run in ISO8601 format. + /// The duration of a pipeline run. + /// The status of a pipeline run. + /// The message from a pipeline run. + /// . + internal PipelineRun(string runId, string runGroupId, bool? isLatest, string pipelineName, IReadOnlyDictionary parameters, PipelineRunInvokedBy invokedBy, DateTimeOffset? lastUpdated, DateTimeOffset? runStart, DateTimeOffset? runEnd, int? durationInMs, string status, string message, IReadOnlyDictionary additionalProperties) + { + RunId = runId; + RunGroupId = runGroupId; + IsLatest = isLatest; + PipelineName = pipelineName; + Parameters = parameters; + InvokedBy = invokedBy; + LastUpdated = lastUpdated; + RunStart = runStart; + RunEnd = runEnd; + DurationInMs = durationInMs; + Status = status; + Message = message; + AdditionalProperties = additionalProperties ?? new Dictionary(); + } + + /// Identifier of a run. + public string RunId { get; } + /// Identifier that correlates all the recovery runs of a pipeline run. + public string RunGroupId { get; } + /// Indicates if the recovered pipeline run is the latest in its group. + public bool? IsLatest { get; } + /// The pipeline name. + public string PipelineName { get; } + /// The full or partial list of parameter name, value pair used in the pipeline run. + public IReadOnlyDictionary Parameters { get; } + /// Entity that started the pipeline run. + public PipelineRunInvokedBy InvokedBy { get; } + /// The last updated timestamp for the pipeline run event in ISO8601 format. + public DateTimeOffset? LastUpdated { get; } + /// The start time of a pipeline run in ISO8601 format. + public DateTimeOffset? RunStart { get; } + /// The end time of a pipeline run in ISO8601 format. + public DateTimeOffset? RunEnd { get; } + /// The duration of a pipeline run. + public int? DurationInMs { get; } + /// The status of a pipeline run. + public string Status { get; } + /// The message from a pipeline run. + public string Message { get; } + internal IReadOnlyDictionary AdditionalProperties { get; } + /// + public IEnumerator> GetEnumerator() => AdditionalProperties.GetEnumerator(); + /// + IEnumerator IEnumerable.GetEnumerator() => AdditionalProperties.GetEnumerator(); + /// + public bool TryGetValue(string key, out object value) => AdditionalProperties.TryGetValue(key, out value); + /// + public bool ContainsKey(string key) => AdditionalProperties.ContainsKey(key); + /// + public IEnumerable Keys => AdditionalProperties.Keys; + /// + public IEnumerable Values => AdditionalProperties.Values; + /// + int IReadOnlyCollection>.Count => AdditionalProperties.Count; + /// + public object this[string key] + { + get => AdditionalProperties[key]; + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PipelineRunInvokedBy.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PipelineRunInvokedBy.Serialization.cs new file mode 100644 index 000000000000..7152d4f7e205 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PipelineRunInvokedBy.Serialization.cs @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class PipelineRunInvokedBy + { + internal static PipelineRunInvokedBy DeserializePipelineRunInvokedBy(JsonElement element) + { + string name = default; + string id = default; + string invokedByType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("id")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("invokedByType")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + invokedByType = property.Value.GetString(); + continue; + } + } + return new PipelineRunInvokedBy(name, id, invokedByType); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PipelineRunInvokedBy.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PipelineRunInvokedBy.cs new file mode 100644 index 000000000000..5d7bac839b0b --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PipelineRunInvokedBy.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Provides entity name and id that started the pipeline run. + public partial class PipelineRunInvokedBy + { + /// Initializes a new instance of PipelineRunInvokedBy. + internal PipelineRunInvokedBy() + { + } + + /// Initializes a new instance of PipelineRunInvokedBy. + /// Name of the entity that started the pipeline run. + /// The ID of the entity that started the run. + /// The type of the entity that started the run. + internal PipelineRunInvokedBy(string name, string id, string invokedByType) + { + Name = name; + Id = id; + InvokedByType = invokedByType; + } + + /// Name of the entity that started the pipeline run. + public string Name { get; } + /// The ID of the entity that started the run. + public string Id { get; } + /// The type of the entity that started the run. + public string InvokedByType { get; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PipelineRunsQueryResponse.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PipelineRunsQueryResponse.Serialization.cs new file mode 100644 index 000000000000..0c727bce8db3 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PipelineRunsQueryResponse.Serialization.cs @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class PipelineRunsQueryResponse + { + internal static PipelineRunsQueryResponse DeserializePipelineRunsQueryResponse(JsonElement element) + { + IReadOnlyList value = default; + string continuationToken = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value")) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(PipelineRun.DeserializePipelineRun(item)); + } + } + value = array; + continue; + } + if (property.NameEquals("continuationToken")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + continuationToken = property.Value.GetString(); + continue; + } + } + return new PipelineRunsQueryResponse(value, continuationToken); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PipelineRunsQueryResponse.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PipelineRunsQueryResponse.cs new file mode 100644 index 000000000000..a0a464b9b60f --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PipelineRunsQueryResponse.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// A list pipeline runs. + public partial class PipelineRunsQueryResponse + { + /// Initializes a new instance of PipelineRunsQueryResponse. + /// List of pipeline runs. + internal PipelineRunsQueryResponse(IEnumerable value) + { + if (value == null) + { + throw new ArgumentNullException(nameof(value)); + } + + Value = value.ToArray(); + } + + /// Initializes a new instance of PipelineRunsQueryResponse. + /// List of pipeline runs. + /// The continuation token for getting the next page of results, if any remaining results exist, null otherwise. + internal PipelineRunsQueryResponse(IReadOnlyList value, string continuationToken) + { + Value = value; + ContinuationToken = continuationToken; + } + + /// List of pipeline runs. + public IReadOnlyList Value { get; } + /// The continuation token for getting the next page of results, if any remaining results exist, null otherwise. + public string ContinuationToken { get; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PluginCurrentState.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PluginCurrentState.cs new file mode 100644 index 000000000000..39a68be24108 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PluginCurrentState.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// The PluginCurrentState. + public readonly partial struct PluginCurrentState : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + public PluginCurrentState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string PreparationValue = "Preparation"; + private const string ResourceAcquisitionValue = "ResourceAcquisition"; + private const string QueuedValue = "Queued"; + private const string SubmissionValue = "Submission"; + private const string MonitoringValue = "Monitoring"; + private const string CleanupValue = "Cleanup"; + private const string EndedValue = "Ended"; + + /// Preparation. + public static PluginCurrentState Preparation { get; } = new PluginCurrentState(PreparationValue); + /// ResourceAcquisition. + public static PluginCurrentState ResourceAcquisition { get; } = new PluginCurrentState(ResourceAcquisitionValue); + /// Queued. + public static PluginCurrentState Queued { get; } = new PluginCurrentState(QueuedValue); + /// Submission. + public static PluginCurrentState Submission { get; } = new PluginCurrentState(SubmissionValue); + /// Monitoring. + public static PluginCurrentState Monitoring { get; } = new PluginCurrentState(MonitoringValue); + /// Cleanup. + public static PluginCurrentState Cleanup { get; } = new PluginCurrentState(CleanupValue); + /// Ended. + public static PluginCurrentState Ended { get; } = new PluginCurrentState(EndedValue); + /// Determines if two values are the same. + public static bool operator ==(PluginCurrentState left, PluginCurrentState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(PluginCurrentState left, PluginCurrentState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator PluginCurrentState(string value) => new PluginCurrentState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is PluginCurrentState other && Equals(other); + /// + public bool Equals(PluginCurrentState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PostgreSqlLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PostgreSqlLinkedService.Serialization.cs new file mode 100644 index 000000000000..37c5701cdcd8 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PostgreSqlLinkedService.Serialization.cs @@ -0,0 +1,198 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class PostgreSqlLinkedService : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (ConnectVia != null) + { + writer.WritePropertyName("connectVia"); + writer.WriteObjectValue(ConnectVia); + } + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + writer.WritePropertyName("connectionString"); + writer.WriteObjectValue(ConnectionString); + if (Password != null) + { + writer.WritePropertyName("password"); + writer.WriteObjectValue(Password); + } + if (EncryptedCredential != null) + { + writer.WritePropertyName("encryptedCredential"); + writer.WriteObjectValue(EncryptedCredential); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static PostgreSqlLinkedService DeserializePostgreSqlLinkedService(JsonElement element) + { + string type = default; + IntegrationRuntimeReference connectVia = default; + string description = default; + IDictionary parameters = default; + IList annotations = default; + object connectionString = default; + AzureKeyVaultSecretReference password = default; + object encryptedCredential = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("connectVia")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("connectionString")) + { + connectionString = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("password")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + password = AzureKeyVaultSecretReference.DeserializeAzureKeyVaultSecretReference(property0.Value); + continue; + } + if (property0.NameEquals("encryptedCredential")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + encryptedCredential = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new PostgreSqlLinkedService(type, connectVia, description, parameters, annotations, additionalProperties, connectionString, password, encryptedCredential); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PostgreSqlLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PostgreSqlLinkedService.cs new file mode 100644 index 000000000000..20a4e4ad9ae1 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PostgreSqlLinkedService.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Linked service for PostgreSQL data source. + public partial class PostgreSqlLinkedService : LinkedService + { + /// Initializes a new instance of PostgreSqlLinkedService. + /// The connection string. + public PostgreSqlLinkedService(object connectionString) + { + if (connectionString == null) + { + throw new ArgumentNullException(nameof(connectionString)); + } + + ConnectionString = connectionString; + Type = "PostgreSql"; + } + + /// Initializes a new instance of PostgreSqlLinkedService. + /// Type of linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for describing the linked service. + /// . + /// The connection string. + /// The Azure key vault secret reference of password in connection string. + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + internal PostgreSqlLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object connectionString, AzureKeyVaultSecretReference password, object encryptedCredential) : base(type, connectVia, description, parameters, annotations, additionalProperties) + { + ConnectionString = connectionString; + Password = password; + EncryptedCredential = encryptedCredential; + Type = type ?? "PostgreSql"; + } + + /// The connection string. + public object ConnectionString { get; set; } + /// The Azure key vault secret reference of password in connection string. + public AzureKeyVaultSecretReference Password { get; set; } + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + public object EncryptedCredential { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PostgreSqlTableDataset.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PostgreSqlTableDataset.Serialization.cs new file mode 100644 index 000000000000..d79d420f7d80 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PostgreSqlTableDataset.Serialization.cs @@ -0,0 +1,243 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class PostgreSqlTableDataset : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Structure != null) + { + writer.WritePropertyName("structure"); + writer.WriteObjectValue(Structure); + } + if (Schema != null) + { + writer.WritePropertyName("schema"); + writer.WriteObjectValue(Schema); + } + writer.WritePropertyName("linkedServiceName"); + writer.WriteObjectValue(LinkedServiceName); + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Folder != null) + { + writer.WritePropertyName("folder"); + writer.WriteObjectValue(Folder); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + if (TableName != null) + { + writer.WritePropertyName("tableName"); + writer.WriteObjectValue(TableName); + } + if (Table != null) + { + writer.WritePropertyName("table"); + writer.WriteObjectValue(Table); + } + if (SchemaTypePropertiesSchema != null) + { + writer.WritePropertyName("schema"); + writer.WriteObjectValue(SchemaTypePropertiesSchema); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static PostgreSqlTableDataset DeserializePostgreSqlTableDataset(JsonElement element) + { + string type = default; + string description = default; + object structure = default; + object schema = default; + LinkedServiceReference linkedServiceName = default; + IDictionary parameters = default; + IList annotations = default; + DatasetFolder folder = default; + object tableName = default; + object table = default; + object schema0 = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("structure")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + structure = property.Value.GetObject(); + continue; + } + if (property.NameEquals("schema")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + schema = property.Value.GetObject(); + continue; + } + if (property.NameEquals("linkedServiceName")) + { + linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("folder")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + folder = DatasetFolder.DeserializeDatasetFolder(property.Value); + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("tableName")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + tableName = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("table")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + table = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("schema")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + schema0 = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new PostgreSqlTableDataset(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties, tableName, table, schema0); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PostgreSqlTableDataset.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PostgreSqlTableDataset.cs new file mode 100644 index 000000000000..47eacd95913b --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PostgreSqlTableDataset.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// The PostgreSQL table dataset. + public partial class PostgreSqlTableDataset : Dataset + { + /// Initializes a new instance of PostgreSqlTableDataset. + /// Linked service reference. + public PostgreSqlTableDataset(LinkedServiceReference linkedServiceName) : base(linkedServiceName) + { + if (linkedServiceName == null) + { + throw new ArgumentNullException(nameof(linkedServiceName)); + } + + Type = "PostgreSqlTable"; + } + + /// Initializes a new instance of PostgreSqlTableDataset. + /// Type of dataset. + /// Dataset description. + /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. + /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. + /// Linked service reference. + /// Parameters for dataset. + /// List of tags that can be used for describing the Dataset. + /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. + /// . + /// This property will be retired. Please consider using schema + table properties instead. + /// The PostgreSQL table name. Type: string (or Expression with resultType string). + /// The PostgreSQL schema name. Type: string (or Expression with resultType string). + internal PostgreSqlTableDataset(string type, string description, object structure, object schema, LinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary additionalProperties, object tableName, object table, object schemaTypePropertiesSchema) : base(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) + { + TableName = tableName; + Table = table; + SchemaTypePropertiesSchema = schemaTypePropertiesSchema; + Type = type ?? "PostgreSqlTable"; + } + + /// This property will be retired. Please consider using schema + table properties instead. + public object TableName { get; set; } + /// The PostgreSQL table name. Type: string (or Expression with resultType string). + public object Table { get; set; } + /// The PostgreSQL schema name. Type: string (or Expression with resultType string). + public object SchemaTypePropertiesSchema { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PrestoAuthenticationType.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PrestoAuthenticationType.cs new file mode 100644 index 000000000000..f5a6971fddeb --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PrestoAuthenticationType.cs @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// The authentication mechanism used to connect to the Presto server. + public readonly partial struct PrestoAuthenticationType : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + public PrestoAuthenticationType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AnonymousValue = "Anonymous"; + private const string LdapValue = "LDAP"; + + /// Anonymous. + public static PrestoAuthenticationType Anonymous { get; } = new PrestoAuthenticationType(AnonymousValue); + /// LDAP. + public static PrestoAuthenticationType Ldap { get; } = new PrestoAuthenticationType(LdapValue); + /// Determines if two values are the same. + public static bool operator ==(PrestoAuthenticationType left, PrestoAuthenticationType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(PrestoAuthenticationType left, PrestoAuthenticationType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator PrestoAuthenticationType(string value) => new PrestoAuthenticationType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is PrestoAuthenticationType other && Equals(other); + /// + public bool Equals(PrestoAuthenticationType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PrestoLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PrestoLinkedService.Serialization.cs new file mode 100644 index 000000000000..e8b183d133ca --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PrestoLinkedService.Serialization.cs @@ -0,0 +1,342 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class PrestoLinkedService : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (ConnectVia != null) + { + writer.WritePropertyName("connectVia"); + writer.WriteObjectValue(ConnectVia); + } + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + writer.WritePropertyName("host"); + writer.WriteObjectValue(Host); + writer.WritePropertyName("serverVersion"); + writer.WriteObjectValue(ServerVersion); + writer.WritePropertyName("catalog"); + writer.WriteObjectValue(Catalog); + if (Port != null) + { + writer.WritePropertyName("port"); + writer.WriteObjectValue(Port); + } + writer.WritePropertyName("authenticationType"); + writer.WriteStringValue(AuthenticationType.ToString()); + if (Username != null) + { + writer.WritePropertyName("username"); + writer.WriteObjectValue(Username); + } + if (Password != null) + { + writer.WritePropertyName("password"); + writer.WriteObjectValue(Password); + } + if (EnableSsl != null) + { + writer.WritePropertyName("enableSsl"); + writer.WriteObjectValue(EnableSsl); + } + if (TrustedCertPath != null) + { + writer.WritePropertyName("trustedCertPath"); + writer.WriteObjectValue(TrustedCertPath); + } + if (UseSystemTrustStore != null) + { + writer.WritePropertyName("useSystemTrustStore"); + writer.WriteObjectValue(UseSystemTrustStore); + } + if (AllowHostNameCNMismatch != null) + { + writer.WritePropertyName("allowHostNameCNMismatch"); + writer.WriteObjectValue(AllowHostNameCNMismatch); + } + if (AllowSelfSignedServerCert != null) + { + writer.WritePropertyName("allowSelfSignedServerCert"); + writer.WriteObjectValue(AllowSelfSignedServerCert); + } + if (TimeZoneID != null) + { + writer.WritePropertyName("timeZoneID"); + writer.WriteObjectValue(TimeZoneID); + } + if (EncryptedCredential != null) + { + writer.WritePropertyName("encryptedCredential"); + writer.WriteObjectValue(EncryptedCredential); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static PrestoLinkedService DeserializePrestoLinkedService(JsonElement element) + { + string type = default; + IntegrationRuntimeReference connectVia = default; + string description = default; + IDictionary parameters = default; + IList annotations = default; + object host = default; + object serverVersion = default; + object catalog = default; + object port = default; + PrestoAuthenticationType authenticationType = default; + object username = default; + SecretBase password = default; + object enableSsl = default; + object trustedCertPath = default; + object useSystemTrustStore = default; + object allowHostNameCNMismatch = default; + object allowSelfSignedServerCert = default; + object timeZoneID = default; + object encryptedCredential = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("connectVia")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("host")) + { + host = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("serverVersion")) + { + serverVersion = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("catalog")) + { + catalog = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("port")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + port = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("authenticationType")) + { + authenticationType = new PrestoAuthenticationType(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("username")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + username = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("password")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + password = SecretBase.DeserializeSecretBase(property0.Value); + continue; + } + if (property0.NameEquals("enableSsl")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + enableSsl = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("trustedCertPath")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + trustedCertPath = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("useSystemTrustStore")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + useSystemTrustStore = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("allowHostNameCNMismatch")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + allowHostNameCNMismatch = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("allowSelfSignedServerCert")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + allowSelfSignedServerCert = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("timeZoneID")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + timeZoneID = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("encryptedCredential")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + encryptedCredential = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new PrestoLinkedService(type, connectVia, description, parameters, annotations, additionalProperties, host, serverVersion, catalog, port, authenticationType, username, password, enableSsl, trustedCertPath, useSystemTrustStore, allowHostNameCNMismatch, allowSelfSignedServerCert, timeZoneID, encryptedCredential); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PrestoLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PrestoLinkedService.cs new file mode 100644 index 000000000000..1c067716af62 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PrestoLinkedService.cs @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Presto server linked service. + public partial class PrestoLinkedService : LinkedService + { + /// Initializes a new instance of PrestoLinkedService. + /// The IP address or host name of the Presto server. (i.e. 192.168.222.160). + /// The version of the Presto server. (i.e. 0.148-t). + /// The catalog context for all request against the server. + /// The authentication mechanism used to connect to the Presto server. + public PrestoLinkedService(object host, object serverVersion, object catalog, PrestoAuthenticationType authenticationType) + { + if (host == null) + { + throw new ArgumentNullException(nameof(host)); + } + if (serverVersion == null) + { + throw new ArgumentNullException(nameof(serverVersion)); + } + if (catalog == null) + { + throw new ArgumentNullException(nameof(catalog)); + } + + Host = host; + ServerVersion = serverVersion; + Catalog = catalog; + AuthenticationType = authenticationType; + Type = "Presto"; + } + + /// Initializes a new instance of PrestoLinkedService. + /// Type of linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for describing the linked service. + /// . + /// The IP address or host name of the Presto server. (i.e. 192.168.222.160). + /// The version of the Presto server. (i.e. 0.148-t). + /// The catalog context for all request against the server. + /// The TCP port that the Presto server uses to listen for client connections. The default value is 8080. + /// The authentication mechanism used to connect to the Presto server. + /// The user name used to connect to the Presto server. + /// The password corresponding to the user name. + /// Specifies whether the connections to the server are encrypted using SSL. The default value is false. + /// The full path of the .pem file containing trusted CA certificates for verifying the server when connecting over SSL. This property can only be set when using SSL on self-hosted IR. The default value is the cacerts.pem file installed with the IR. + /// Specifies whether to use a CA certificate from the system trust store or from a specified PEM file. The default value is false. + /// Specifies whether to require a CA-issued SSL certificate name to match the host name of the server when connecting over SSL. The default value is false. + /// Specifies whether to allow self-signed certificates from the server. The default value is false. + /// The local time zone used by the connection. Valid values for this option are specified in the IANA Time Zone Database. The default value is the system time zone. + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + internal PrestoLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object host, object serverVersion, object catalog, object port, PrestoAuthenticationType authenticationType, object username, SecretBase password, object enableSsl, object trustedCertPath, object useSystemTrustStore, object allowHostNameCNMismatch, object allowSelfSignedServerCert, object timeZoneID, object encryptedCredential) : base(type, connectVia, description, parameters, annotations, additionalProperties) + { + Host = host; + ServerVersion = serverVersion; + Catalog = catalog; + Port = port; + AuthenticationType = authenticationType; + Username = username; + Password = password; + EnableSsl = enableSsl; + TrustedCertPath = trustedCertPath; + UseSystemTrustStore = useSystemTrustStore; + AllowHostNameCNMismatch = allowHostNameCNMismatch; + AllowSelfSignedServerCert = allowSelfSignedServerCert; + TimeZoneID = timeZoneID; + EncryptedCredential = encryptedCredential; + Type = type ?? "Presto"; + } + + /// The IP address or host name of the Presto server. (i.e. 192.168.222.160). + public object Host { get; set; } + /// The version of the Presto server. (i.e. 0.148-t). + public object ServerVersion { get; set; } + /// The catalog context for all request against the server. + public object Catalog { get; set; } + /// The TCP port that the Presto server uses to listen for client connections. The default value is 8080. + public object Port { get; set; } + /// The authentication mechanism used to connect to the Presto server. + public PrestoAuthenticationType AuthenticationType { get; set; } + /// The user name used to connect to the Presto server. + public object Username { get; set; } + /// The password corresponding to the user name. + public SecretBase Password { get; set; } + /// Specifies whether the connections to the server are encrypted using SSL. The default value is false. + public object EnableSsl { get; set; } + /// The full path of the .pem file containing trusted CA certificates for verifying the server when connecting over SSL. This property can only be set when using SSL on self-hosted IR. The default value is the cacerts.pem file installed with the IR. + public object TrustedCertPath { get; set; } + /// Specifies whether to use a CA certificate from the system trust store or from a specified PEM file. The default value is false. + public object UseSystemTrustStore { get; set; } + /// Specifies whether to require a CA-issued SSL certificate name to match the host name of the server when connecting over SSL. The default value is false. + public object AllowHostNameCNMismatch { get; set; } + /// Specifies whether to allow self-signed certificates from the server. The default value is false. + public object AllowSelfSignedServerCert { get; set; } + /// The local time zone used by the connection. Valid values for this option are specified in the IANA Time Zone Database. The default value is the system time zone. + public object TimeZoneID { get; set; } + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + public object EncryptedCredential { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PrestoObjectDataset.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PrestoObjectDataset.Serialization.cs new file mode 100644 index 000000000000..14bcc4a75490 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PrestoObjectDataset.Serialization.cs @@ -0,0 +1,243 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class PrestoObjectDataset : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Structure != null) + { + writer.WritePropertyName("structure"); + writer.WriteObjectValue(Structure); + } + if (Schema != null) + { + writer.WritePropertyName("schema"); + writer.WriteObjectValue(Schema); + } + writer.WritePropertyName("linkedServiceName"); + writer.WriteObjectValue(LinkedServiceName); + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Folder != null) + { + writer.WritePropertyName("folder"); + writer.WriteObjectValue(Folder); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + if (TableName != null) + { + writer.WritePropertyName("tableName"); + writer.WriteObjectValue(TableName); + } + if (Table != null) + { + writer.WritePropertyName("table"); + writer.WriteObjectValue(Table); + } + if (SchemaTypePropertiesSchema != null) + { + writer.WritePropertyName("schema"); + writer.WriteObjectValue(SchemaTypePropertiesSchema); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static PrestoObjectDataset DeserializePrestoObjectDataset(JsonElement element) + { + string type = default; + string description = default; + object structure = default; + object schema = default; + LinkedServiceReference linkedServiceName = default; + IDictionary parameters = default; + IList annotations = default; + DatasetFolder folder = default; + object tableName = default; + object table = default; + object schema0 = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("structure")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + structure = property.Value.GetObject(); + continue; + } + if (property.NameEquals("schema")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + schema = property.Value.GetObject(); + continue; + } + if (property.NameEquals("linkedServiceName")) + { + linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("folder")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + folder = DatasetFolder.DeserializeDatasetFolder(property.Value); + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("tableName")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + tableName = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("table")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + table = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("schema")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + schema0 = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new PrestoObjectDataset(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties, tableName, table, schema0); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PrestoObjectDataset.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PrestoObjectDataset.cs new file mode 100644 index 000000000000..54a1952b7a14 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PrestoObjectDataset.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Presto server dataset. + public partial class PrestoObjectDataset : Dataset + { + /// Initializes a new instance of PrestoObjectDataset. + /// Linked service reference. + public PrestoObjectDataset(LinkedServiceReference linkedServiceName) : base(linkedServiceName) + { + if (linkedServiceName == null) + { + throw new ArgumentNullException(nameof(linkedServiceName)); + } + + Type = "PrestoObject"; + } + + /// Initializes a new instance of PrestoObjectDataset. + /// Type of dataset. + /// Dataset description. + /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. + /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. + /// Linked service reference. + /// Parameters for dataset. + /// List of tags that can be used for describing the Dataset. + /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. + /// . + /// This property will be retired. Please consider using schema + table properties instead. + /// The table name of the Presto. Type: string (or Expression with resultType string). + /// The schema name of the Presto. Type: string (or Expression with resultType string). + internal PrestoObjectDataset(string type, string description, object structure, object schema, LinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary additionalProperties, object tableName, object table, object schemaTypePropertiesSchema) : base(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) + { + TableName = tableName; + Table = table; + SchemaTypePropertiesSchema = schemaTypePropertiesSchema; + Type = type ?? "PrestoObject"; + } + + /// This property will be retired. Please consider using schema + table properties instead. + public object TableName { get; set; } + /// The table name of the Presto. Type: string (or Expression with resultType string). + public object Table { get; set; } + /// The schema name of the Presto. Type: string (or Expression with resultType string). + public object SchemaTypePropertiesSchema { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/QueryDataFlowDebugSessionsResponse.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/QueryDataFlowDebugSessionsResponse.Serialization.cs new file mode 100644 index 000000000000..a1c7b7dc0039 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/QueryDataFlowDebugSessionsResponse.Serialization.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class QueryDataFlowDebugSessionsResponse + { + internal static QueryDataFlowDebugSessionsResponse DeserializeQueryDataFlowDebugSessionsResponse(JsonElement element) + { + IReadOnlyList value = default; + string nextLink = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(DataFlowDebugSessionInfo.DeserializeDataFlowDebugSessionInfo(item)); + } + } + value = array; + continue; + } + if (property.NameEquals("nextLink")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = property.Value.GetString(); + continue; + } + } + return new QueryDataFlowDebugSessionsResponse(value, nextLink); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/QueryDataFlowDebugSessionsResponse.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/QueryDataFlowDebugSessionsResponse.cs new file mode 100644 index 000000000000..2df26bb87919 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/QueryDataFlowDebugSessionsResponse.cs @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// A list of active debug sessions. + public partial class QueryDataFlowDebugSessionsResponse + { + /// Initializes a new instance of QueryDataFlowDebugSessionsResponse. + internal QueryDataFlowDebugSessionsResponse() + { + } + + /// Initializes a new instance of QueryDataFlowDebugSessionsResponse. + /// Array with all active debug sessions. + /// The link to the next page of results, if any remaining results exist. + internal QueryDataFlowDebugSessionsResponse(IReadOnlyList value, string nextLink) + { + Value = value; + NextLink = nextLink; + } + + /// Array with all active debug sessions. + public IReadOnlyList Value { get; } + /// The link to the next page of results, if any remaining results exist. + public string NextLink { get; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/QuickBooksLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/QuickBooksLinkedService.Serialization.cs new file mode 100644 index 000000000000..1a97b403e763 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/QuickBooksLinkedService.Serialization.cs @@ -0,0 +1,238 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class QuickBooksLinkedService : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (ConnectVia != null) + { + writer.WritePropertyName("connectVia"); + writer.WriteObjectValue(ConnectVia); + } + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + writer.WritePropertyName("endpoint"); + writer.WriteObjectValue(Endpoint); + writer.WritePropertyName("companyId"); + writer.WriteObjectValue(CompanyId); + writer.WritePropertyName("consumerKey"); + writer.WriteObjectValue(ConsumerKey); + writer.WritePropertyName("consumerSecret"); + writer.WriteObjectValue(ConsumerSecret); + writer.WritePropertyName("accessToken"); + writer.WriteObjectValue(AccessToken); + writer.WritePropertyName("accessTokenSecret"); + writer.WriteObjectValue(AccessTokenSecret); + if (UseEncryptedEndpoints != null) + { + writer.WritePropertyName("useEncryptedEndpoints"); + writer.WriteObjectValue(UseEncryptedEndpoints); + } + if (EncryptedCredential != null) + { + writer.WritePropertyName("encryptedCredential"); + writer.WriteObjectValue(EncryptedCredential); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static QuickBooksLinkedService DeserializeQuickBooksLinkedService(JsonElement element) + { + string type = default; + IntegrationRuntimeReference connectVia = default; + string description = default; + IDictionary parameters = default; + IList annotations = default; + object endpoint = default; + object companyId = default; + object consumerKey = default; + SecretBase consumerSecret = default; + SecretBase accessToken = default; + SecretBase accessTokenSecret = default; + object useEncryptedEndpoints = default; + object encryptedCredential = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("connectVia")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("endpoint")) + { + endpoint = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("companyId")) + { + companyId = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("consumerKey")) + { + consumerKey = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("consumerSecret")) + { + consumerSecret = SecretBase.DeserializeSecretBase(property0.Value); + continue; + } + if (property0.NameEquals("accessToken")) + { + accessToken = SecretBase.DeserializeSecretBase(property0.Value); + continue; + } + if (property0.NameEquals("accessTokenSecret")) + { + accessTokenSecret = SecretBase.DeserializeSecretBase(property0.Value); + continue; + } + if (property0.NameEquals("useEncryptedEndpoints")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + useEncryptedEndpoints = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("encryptedCredential")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + encryptedCredential = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new QuickBooksLinkedService(type, connectVia, description, parameters, annotations, additionalProperties, endpoint, companyId, consumerKey, consumerSecret, accessToken, accessTokenSecret, useEncryptedEndpoints, encryptedCredential); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/QuickBooksLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/QuickBooksLinkedService.cs new file mode 100644 index 000000000000..a7b7951153c7 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/QuickBooksLinkedService.cs @@ -0,0 +1,104 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// QuickBooks server linked service. + public partial class QuickBooksLinkedService : LinkedService + { + /// Initializes a new instance of QuickBooksLinkedService. + /// The endpoint of the QuickBooks server. (i.e. quickbooks.api.intuit.com). + /// The company ID of the QuickBooks company to authorize. + /// The consumer key for OAuth 1.0 authentication. + /// The consumer secret for OAuth 1.0 authentication. + /// The access token for OAuth 1.0 authentication. + /// The access token secret for OAuth 1.0 authentication. + public QuickBooksLinkedService(object endpoint, object companyId, object consumerKey, SecretBase consumerSecret, SecretBase accessToken, SecretBase accessTokenSecret) + { + if (endpoint == null) + { + throw new ArgumentNullException(nameof(endpoint)); + } + if (companyId == null) + { + throw new ArgumentNullException(nameof(companyId)); + } + if (consumerKey == null) + { + throw new ArgumentNullException(nameof(consumerKey)); + } + if (consumerSecret == null) + { + throw new ArgumentNullException(nameof(consumerSecret)); + } + if (accessToken == null) + { + throw new ArgumentNullException(nameof(accessToken)); + } + if (accessTokenSecret == null) + { + throw new ArgumentNullException(nameof(accessTokenSecret)); + } + + Endpoint = endpoint; + CompanyId = companyId; + ConsumerKey = consumerKey; + ConsumerSecret = consumerSecret; + AccessToken = accessToken; + AccessTokenSecret = accessTokenSecret; + Type = "QuickBooks"; + } + + /// Initializes a new instance of QuickBooksLinkedService. + /// Type of linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for describing the linked service. + /// . + /// The endpoint of the QuickBooks server. (i.e. quickbooks.api.intuit.com). + /// The company ID of the QuickBooks company to authorize. + /// The consumer key for OAuth 1.0 authentication. + /// The consumer secret for OAuth 1.0 authentication. + /// The access token for OAuth 1.0 authentication. + /// The access token secret for OAuth 1.0 authentication. + /// Specifies whether the data source endpoints are encrypted using HTTPS. The default value is true. + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + internal QuickBooksLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object endpoint, object companyId, object consumerKey, SecretBase consumerSecret, SecretBase accessToken, SecretBase accessTokenSecret, object useEncryptedEndpoints, object encryptedCredential) : base(type, connectVia, description, parameters, annotations, additionalProperties) + { + Endpoint = endpoint; + CompanyId = companyId; + ConsumerKey = consumerKey; + ConsumerSecret = consumerSecret; + AccessToken = accessToken; + AccessTokenSecret = accessTokenSecret; + UseEncryptedEndpoints = useEncryptedEndpoints; + EncryptedCredential = encryptedCredential; + Type = type ?? "QuickBooks"; + } + + /// The endpoint of the QuickBooks server. (i.e. quickbooks.api.intuit.com). + public object Endpoint { get; set; } + /// The company ID of the QuickBooks company to authorize. + public object CompanyId { get; set; } + /// The consumer key for OAuth 1.0 authentication. + public object ConsumerKey { get; set; } + /// The consumer secret for OAuth 1.0 authentication. + public SecretBase ConsumerSecret { get; set; } + /// The access token for OAuth 1.0 authentication. + public SecretBase AccessToken { get; set; } + /// The access token secret for OAuth 1.0 authentication. + public SecretBase AccessTokenSecret { get; set; } + /// Specifies whether the data source endpoints are encrypted using HTTPS. The default value is true. + public object UseEncryptedEndpoints { get; set; } + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + public object EncryptedCredential { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/QuickBooksObjectDataset.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/QuickBooksObjectDataset.Serialization.cs new file mode 100644 index 000000000000..d3ea120c52b1 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/QuickBooksObjectDataset.Serialization.cs @@ -0,0 +1,213 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class QuickBooksObjectDataset : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Structure != null) + { + writer.WritePropertyName("structure"); + writer.WriteObjectValue(Structure); + } + if (Schema != null) + { + writer.WritePropertyName("schema"); + writer.WriteObjectValue(Schema); + } + writer.WritePropertyName("linkedServiceName"); + writer.WriteObjectValue(LinkedServiceName); + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Folder != null) + { + writer.WritePropertyName("folder"); + writer.WriteObjectValue(Folder); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + if (TableName != null) + { + writer.WritePropertyName("tableName"); + writer.WriteObjectValue(TableName); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static QuickBooksObjectDataset DeserializeQuickBooksObjectDataset(JsonElement element) + { + string type = default; + string description = default; + object structure = default; + object schema = default; + LinkedServiceReference linkedServiceName = default; + IDictionary parameters = default; + IList annotations = default; + DatasetFolder folder = default; + object tableName = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("structure")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + structure = property.Value.GetObject(); + continue; + } + if (property.NameEquals("schema")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + schema = property.Value.GetObject(); + continue; + } + if (property.NameEquals("linkedServiceName")) + { + linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("folder")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + folder = DatasetFolder.DeserializeDatasetFolder(property.Value); + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("tableName")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + tableName = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new QuickBooksObjectDataset(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties, tableName); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/QuickBooksObjectDataset.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/QuickBooksObjectDataset.cs new file mode 100644 index 000000000000..0f59e3869e11 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/QuickBooksObjectDataset.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// QuickBooks server dataset. + public partial class QuickBooksObjectDataset : Dataset + { + /// Initializes a new instance of QuickBooksObjectDataset. + /// Linked service reference. + public QuickBooksObjectDataset(LinkedServiceReference linkedServiceName) : base(linkedServiceName) + { + if (linkedServiceName == null) + { + throw new ArgumentNullException(nameof(linkedServiceName)); + } + + Type = "QuickBooksObject"; + } + + /// Initializes a new instance of QuickBooksObjectDataset. + /// Type of dataset. + /// Dataset description. + /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. + /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. + /// Linked service reference. + /// Parameters for dataset. + /// List of tags that can be used for describing the Dataset. + /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. + /// . + /// The table name. Type: string (or Expression with resultType string). + internal QuickBooksObjectDataset(string type, string description, object structure, object schema, LinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary additionalProperties, object tableName) : base(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) + { + TableName = tableName; + Type = type ?? "QuickBooksObject"; + } + + /// The table name. Type: string (or Expression with resultType string). + public object TableName { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RedirectIncompatibleRowSettings.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RedirectIncompatibleRowSettings.Serialization.cs new file mode 100644 index 000000000000..d435aad7732b --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RedirectIncompatibleRowSettings.Serialization.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class RedirectIncompatibleRowSettings : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("linkedServiceName"); + writer.WriteObjectValue(LinkedServiceName); + if (Path != null) + { + writer.WritePropertyName("path"); + writer.WriteObjectValue(Path); + } + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static RedirectIncompatibleRowSettings DeserializeRedirectIncompatibleRowSettings(JsonElement element) + { + object linkedServiceName = default; + object path = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("linkedServiceName")) + { + linkedServiceName = property.Value.GetObject(); + continue; + } + if (property.NameEquals("path")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + path = property.Value.GetObject(); + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new RedirectIncompatibleRowSettings(linkedServiceName, path, additionalProperties); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RedirectIncompatibleRowSettings.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RedirectIncompatibleRowSettings.cs new file mode 100644 index 000000000000..b90d8bb545f3 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RedirectIncompatibleRowSettings.cs @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Redirect incompatible row settings. + public partial class RedirectIncompatibleRowSettings : IDictionary + { + /// Initializes a new instance of RedirectIncompatibleRowSettings. + /// Name of the Azure Storage, Storage SAS, or Azure Data Lake Store linked service used for redirecting incompatible row. Must be specified if redirectIncompatibleRowSettings is specified. Type: string (or Expression with resultType string). + public RedirectIncompatibleRowSettings(object linkedServiceName) + { + if (linkedServiceName == null) + { + throw new ArgumentNullException(nameof(linkedServiceName)); + } + + LinkedServiceName = linkedServiceName; + AdditionalProperties = new Dictionary(); + } + + /// Initializes a new instance of RedirectIncompatibleRowSettings. + /// Name of the Azure Storage, Storage SAS, or Azure Data Lake Store linked service used for redirecting incompatible row. Must be specified if redirectIncompatibleRowSettings is specified. Type: string (or Expression with resultType string). + /// The path for storing the redirect incompatible row data. Type: string (or Expression with resultType string). + /// . + internal RedirectIncompatibleRowSettings(object linkedServiceName, object path, IDictionary additionalProperties) + { + LinkedServiceName = linkedServiceName; + Path = path; + AdditionalProperties = additionalProperties ?? new Dictionary(); + } + + /// Name of the Azure Storage, Storage SAS, or Azure Data Lake Store linked service used for redirecting incompatible row. Must be specified if redirectIncompatibleRowSettings is specified. Type: string (or Expression with resultType string). + public object LinkedServiceName { get; set; } + /// The path for storing the redirect incompatible row data. Type: string (or Expression with resultType string). + public object Path { get; set; } + internal IDictionary AdditionalProperties { get; } + /// + public IEnumerator> GetEnumerator() => AdditionalProperties.GetEnumerator(); + /// + IEnumerator IEnumerable.GetEnumerator() => AdditionalProperties.GetEnumerator(); + /// + public bool TryGetValue(string key, out object value) => AdditionalProperties.TryGetValue(key, out value); + /// + public bool ContainsKey(string key) => AdditionalProperties.ContainsKey(key); + /// + public ICollection Keys => AdditionalProperties.Keys; + /// + public ICollection Values => AdditionalProperties.Values; + /// + int ICollection>.Count => AdditionalProperties.Count; + /// + public void Add(string key, object value) => AdditionalProperties.Add(key, value); + /// + public bool Remove(string key) => AdditionalProperties.Remove(key); + /// + bool ICollection>.IsReadOnly => AdditionalProperties.IsReadOnly; + /// + void ICollection>.Add(KeyValuePair value) => AdditionalProperties.Add(value); + /// + bool ICollection>.Remove(KeyValuePair value) => AdditionalProperties.Remove(value); + /// + bool ICollection>.Contains(KeyValuePair value) => AdditionalProperties.Contains(value); + /// + void ICollection>.CopyTo(KeyValuePair[] destination, int offset) => AdditionalProperties.CopyTo(destination, offset); + /// + void ICollection>.Clear() => AdditionalProperties.Clear(); + /// + public object this[string key] + { + get => AdditionalProperties[key]; + set => AdditionalProperties[key] = value; + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RelationalTableDataset.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RelationalTableDataset.Serialization.cs new file mode 100644 index 000000000000..98d93ee0c4d2 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RelationalTableDataset.Serialization.cs @@ -0,0 +1,213 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class RelationalTableDataset : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Structure != null) + { + writer.WritePropertyName("structure"); + writer.WriteObjectValue(Structure); + } + if (Schema != null) + { + writer.WritePropertyName("schema"); + writer.WriteObjectValue(Schema); + } + writer.WritePropertyName("linkedServiceName"); + writer.WriteObjectValue(LinkedServiceName); + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Folder != null) + { + writer.WritePropertyName("folder"); + writer.WriteObjectValue(Folder); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + if (TableName != null) + { + writer.WritePropertyName("tableName"); + writer.WriteObjectValue(TableName); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static RelationalTableDataset DeserializeRelationalTableDataset(JsonElement element) + { + string type = default; + string description = default; + object structure = default; + object schema = default; + LinkedServiceReference linkedServiceName = default; + IDictionary parameters = default; + IList annotations = default; + DatasetFolder folder = default; + object tableName = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("structure")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + structure = property.Value.GetObject(); + continue; + } + if (property.NameEquals("schema")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + schema = property.Value.GetObject(); + continue; + } + if (property.NameEquals("linkedServiceName")) + { + linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("folder")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + folder = DatasetFolder.DeserializeDatasetFolder(property.Value); + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("tableName")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + tableName = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new RelationalTableDataset(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties, tableName); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RelationalTableDataset.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RelationalTableDataset.cs new file mode 100644 index 000000000000..0bb40b36e4d8 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RelationalTableDataset.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// The relational table dataset. + public partial class RelationalTableDataset : Dataset + { + /// Initializes a new instance of RelationalTableDataset. + /// Linked service reference. + public RelationalTableDataset(LinkedServiceReference linkedServiceName) : base(linkedServiceName) + { + if (linkedServiceName == null) + { + throw new ArgumentNullException(nameof(linkedServiceName)); + } + + Type = "RelationalTable"; + } + + /// Initializes a new instance of RelationalTableDataset. + /// Type of dataset. + /// Dataset description. + /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. + /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. + /// Linked service reference. + /// Parameters for dataset. + /// List of tags that can be used for describing the Dataset. + /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. + /// . + /// The relational table name. Type: string (or Expression with resultType string). + internal RelationalTableDataset(string type, string description, object structure, object schema, LinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary additionalProperties, object tableName) : base(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) + { + TableName = tableName; + Type = type ?? "RelationalTable"; + } + + /// The relational table name. Type: string (or Expression with resultType string). + public object TableName { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RerunTriggerListResponse.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RerunTriggerListResponse.cs new file mode 100644 index 000000000000..fa6d2138f03f --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RerunTriggerListResponse.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// A list of rerun triggers. + internal partial class RerunTriggerListResponse + { + /// Initializes a new instance of RerunTriggerListResponse. + /// List of rerun triggers. + internal RerunTriggerListResponse(IEnumerable value) + { + if (value == null) + { + throw new ArgumentNullException(nameof(value)); + } + + Value = value.ToArray(); + } + + /// Initializes a new instance of RerunTriggerListResponse. + /// List of rerun triggers. + /// The continuation token for getting the next page of results, if any remaining results exist, null otherwise. + internal RerunTriggerListResponse(IReadOnlyList value, string nextLink) + { + Value = value; + NextLink = nextLink; + } + + /// List of rerun triggers. + public IReadOnlyList Value { get; set; } + /// The continuation token for getting the next page of results, if any remaining results exist, null otherwise. + public string NextLink { get; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RerunTriggerResource.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RerunTriggerResource.Serialization.cs new file mode 100644 index 000000000000..7058e1ac222e --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RerunTriggerResource.Serialization.cs @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class RerunTriggerResource : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("properties"); + writer.WriteObjectValue(Properties); + if (Id != null) + { + writer.WritePropertyName("id"); + writer.WriteStringValue(Id); + } + if (Name != null) + { + writer.WritePropertyName("name"); + writer.WriteStringValue(Name); + } + if (Type != null) + { + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + } + if (Etag != null) + { + writer.WritePropertyName("etag"); + writer.WriteStringValue(Etag); + } + writer.WriteEndObject(); + } + + internal static RerunTriggerResource DeserializeRerunTriggerResource(JsonElement element) + { + RerunTumblingWindowTrigger properties = default; + string id = default; + string name = default; + string type = default; + string etag = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties")) + { + properties = RerunTumblingWindowTrigger.DeserializeRerunTumblingWindowTrigger(property.Value); + continue; + } + if (property.NameEquals("id")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("name")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("etag")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + etag = property.Value.GetString(); + continue; + } + } + return new RerunTriggerResource(id, name, type, etag, properties); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RerunTriggerResource.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RerunTriggerResource.cs new file mode 100644 index 000000000000..12825c6b8025 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RerunTriggerResource.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// RerunTrigger resource type. + public partial class RerunTriggerResource : SubResource + { + /// Initializes a new instance of RerunTriggerResource. + /// Properties of the rerun trigger. + public RerunTriggerResource(RerunTumblingWindowTrigger properties) + { + if (properties == null) + { + throw new ArgumentNullException(nameof(properties)); + } + + Properties = properties; + } + + /// Initializes a new instance of RerunTriggerResource. + /// The resource identifier. + /// The resource name. + /// The resource type. + /// Etag identifies change in the resource. + /// Properties of the rerun trigger. + internal RerunTriggerResource(string id, string name, string type, string etag, RerunTumblingWindowTrigger properties) : base(id, name, type, etag) + { + Properties = properties; + } + + /// Properties of the rerun trigger. + public RerunTumblingWindowTrigger Properties { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RerunTumblingWindowTrigger.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RerunTumblingWindowTrigger.Serialization.cs new file mode 100644 index 000000000000..1ce15feb32a6 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RerunTumblingWindowTrigger.Serialization.cs @@ -0,0 +1,167 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class RerunTumblingWindowTrigger : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (RuntimeState != null) + { + writer.WritePropertyName("runtimeState"); + writer.WriteStringValue(RuntimeState.Value.ToString()); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + if (ParentTrigger != null) + { + writer.WritePropertyName("parentTrigger"); + writer.WriteObjectValue(ParentTrigger); + } + writer.WritePropertyName("requestedStartTime"); + writer.WriteStringValue(RequestedStartTime, "O"); + writer.WritePropertyName("requestedEndTime"); + writer.WriteStringValue(RequestedEndTime, "O"); + writer.WritePropertyName("maxConcurrency"); + writer.WriteNumberValue(MaxConcurrency); + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static RerunTumblingWindowTrigger DeserializeRerunTumblingWindowTrigger(JsonElement element) + { + string type = default; + string description = default; + TriggerRuntimeState? runtimeState = default; + IList annotations = default; + object parentTrigger = default; + DateTimeOffset requestedStartTime = default; + DateTimeOffset requestedEndTime = default; + int maxConcurrency = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("runtimeState")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + runtimeState = new TriggerRuntimeState(property.Value.GetString()); + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("parentTrigger")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + parentTrigger = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("requestedStartTime")) + { + requestedStartTime = property0.Value.GetDateTimeOffset("O"); + continue; + } + if (property0.NameEquals("requestedEndTime")) + { + requestedEndTime = property0.Value.GetDateTimeOffset("O"); + continue; + } + if (property0.NameEquals("maxConcurrency")) + { + maxConcurrency = property0.Value.GetInt32(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new RerunTumblingWindowTrigger(type, description, runtimeState, annotations, additionalProperties, parentTrigger, requestedStartTime, requestedEndTime, maxConcurrency); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RerunTumblingWindowTrigger.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RerunTumblingWindowTrigger.cs new file mode 100644 index 000000000000..9fae025b8a22 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RerunTumblingWindowTrigger.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Trigger that schedules pipeline reruns for all fixed time interval windows from a requested start time to requested end time. + public partial class RerunTumblingWindowTrigger : Trigger + { + /// Initializes a new instance of RerunTumblingWindowTrigger. + /// The start time for the time period for which restatement is initiated. Only UTC time is currently supported. + /// The end time for the time period for which restatement is initiated. Only UTC time is currently supported. + /// The max number of parallel time windows (ready for execution) for which a rerun is triggered. + public RerunTumblingWindowTrigger(DateTimeOffset requestedStartTime, DateTimeOffset requestedEndTime, int maxConcurrency) + { + RequestedStartTime = requestedStartTime; + RequestedEndTime = requestedEndTime; + MaxConcurrency = maxConcurrency; + Type = "RerunTumblingWindowTrigger"; + } + + /// Initializes a new instance of RerunTumblingWindowTrigger. + /// Trigger type. + /// Trigger description. + /// Indicates if trigger is running or not. Updated when Start/Stop APIs are called on the Trigger. + /// List of tags that can be used for describing the trigger. + /// . + /// The parent trigger reference. + /// The start time for the time period for which restatement is initiated. Only UTC time is currently supported. + /// The end time for the time period for which restatement is initiated. Only UTC time is currently supported. + /// The max number of parallel time windows (ready for execution) for which a rerun is triggered. + internal RerunTumblingWindowTrigger(string type, string description, TriggerRuntimeState? runtimeState, IList annotations, IDictionary additionalProperties, object parentTrigger, DateTimeOffset requestedStartTime, DateTimeOffset requestedEndTime, int maxConcurrency) : base(type, description, runtimeState, annotations, additionalProperties) + { + ParentTrigger = parentTrigger; + RequestedStartTime = requestedStartTime; + RequestedEndTime = requestedEndTime; + MaxConcurrency = maxConcurrency; + Type = type ?? "RerunTumblingWindowTrigger"; + } + + /// The parent trigger reference. + public object ParentTrigger { get; set; } + /// The start time for the time period for which restatement is initiated. Only UTC time is currently supported. + public DateTimeOffset RequestedStartTime { get; set; } + /// The end time for the time period for which restatement is initiated. Only UTC time is currently supported. + public DateTimeOffset RequestedEndTime { get; set; } + /// The max number of parallel time windows (ready for execution) for which a rerun is triggered. + public int MaxConcurrency { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RerunTumblingWindowTriggerActionParameters.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RerunTumblingWindowTriggerActionParameters.cs new file mode 100644 index 000000000000..4e94d1b6e453 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RerunTumblingWindowTriggerActionParameters.cs @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Rerun tumbling window trigger Parameters. + internal partial class RerunTumblingWindowTriggerActionParameters + { + /// Initializes a new instance of RerunTumblingWindowTriggerActionParameters. + /// The start time for the time period for which restatement is initiated. Only UTC time is currently supported. + /// The end time for the time period for which restatement is initiated. Only UTC time is currently supported. + /// The max number of parallel time windows (ready for execution) for which a rerun is triggered. + internal RerunTumblingWindowTriggerActionParameters(DateTimeOffset startTime, DateTimeOffset endTime, int maxConcurrency) + { + StartTime = startTime; + EndTime = endTime; + MaxConcurrency = maxConcurrency; + } + + /// The start time for the time period for which restatement is initiated. Only UTC time is currently supported. + public DateTimeOffset StartTime { get; set; } + /// The end time for the time period for which restatement is initiated. Only UTC time is currently supported. + public DateTimeOffset EndTime { get; set; } + /// The max number of parallel time windows (ready for execution) for which a rerun is triggered. + public int MaxConcurrency { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/Resource.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/Resource.cs new file mode 100644 index 000000000000..d0ab38ca8cf0 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/Resource.cs @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Azure Synapse top-level resource. + internal partial class Resource + { + /// Initializes a new instance of Resource. + internal Resource() + { + } + + /// Initializes a new instance of Resource. + /// The resource identifier. + /// The resource name. + /// The resource type. + /// The resource location. + /// The resource tags. + /// Etag identifies change in the resource. + internal Resource(string id, string name, string type, string location, IReadOnlyDictionary tags, string eTag) + { + Id = id; + Name = name; + Type = type; + Location = location; + Tags = tags; + ETag = eTag; + } + + /// The resource identifier. + public string Id { get; } + /// The resource name. + public string Name { get; } + /// The resource type. + public string Type { get; } + /// The resource location. + public string Location { get; set; } + /// The resource tags. + public IReadOnlyDictionary Tags { get; set; } + /// Etag identifies change in the resource. + public string ETag { get; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ResponsysLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ResponsysLinkedService.Serialization.cs new file mode 100644 index 000000000000..8a0d219e68b6 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ResponsysLinkedService.Serialization.cs @@ -0,0 +1,251 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class ResponsysLinkedService : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (ConnectVia != null) + { + writer.WritePropertyName("connectVia"); + writer.WriteObjectValue(ConnectVia); + } + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + writer.WritePropertyName("endpoint"); + writer.WriteObjectValue(Endpoint); + writer.WritePropertyName("clientId"); + writer.WriteObjectValue(ClientId); + if (ClientSecret != null) + { + writer.WritePropertyName("clientSecret"); + writer.WriteObjectValue(ClientSecret); + } + if (UseEncryptedEndpoints != null) + { + writer.WritePropertyName("useEncryptedEndpoints"); + writer.WriteObjectValue(UseEncryptedEndpoints); + } + if (UseHostVerification != null) + { + writer.WritePropertyName("useHostVerification"); + writer.WriteObjectValue(UseHostVerification); + } + if (UsePeerVerification != null) + { + writer.WritePropertyName("usePeerVerification"); + writer.WriteObjectValue(UsePeerVerification); + } + if (EncryptedCredential != null) + { + writer.WritePropertyName("encryptedCredential"); + writer.WriteObjectValue(EncryptedCredential); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static ResponsysLinkedService DeserializeResponsysLinkedService(JsonElement element) + { + string type = default; + IntegrationRuntimeReference connectVia = default; + string description = default; + IDictionary parameters = default; + IList annotations = default; + object endpoint = default; + object clientId = default; + SecretBase clientSecret = default; + object useEncryptedEndpoints = default; + object useHostVerification = default; + object usePeerVerification = default; + object encryptedCredential = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("connectVia")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("endpoint")) + { + endpoint = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("clientId")) + { + clientId = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("clientSecret")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + clientSecret = SecretBase.DeserializeSecretBase(property0.Value); + continue; + } + if (property0.NameEquals("useEncryptedEndpoints")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + useEncryptedEndpoints = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("useHostVerification")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + useHostVerification = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("usePeerVerification")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + usePeerVerification = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("encryptedCredential")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + encryptedCredential = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new ResponsysLinkedService(type, connectVia, description, parameters, annotations, additionalProperties, endpoint, clientId, clientSecret, useEncryptedEndpoints, useHostVerification, usePeerVerification, encryptedCredential); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ResponsysLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ResponsysLinkedService.cs new file mode 100644 index 000000000000..6fb2ce02506a --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ResponsysLinkedService.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Responsys linked service. + public partial class ResponsysLinkedService : LinkedService + { + /// Initializes a new instance of ResponsysLinkedService. + /// The endpoint of the Responsys server. + /// The client ID associated with the Responsys application. Type: string (or Expression with resultType string). + public ResponsysLinkedService(object endpoint, object clientId) + { + if (endpoint == null) + { + throw new ArgumentNullException(nameof(endpoint)); + } + if (clientId == null) + { + throw new ArgumentNullException(nameof(clientId)); + } + + Endpoint = endpoint; + ClientId = clientId; + Type = "Responsys"; + } + + /// Initializes a new instance of ResponsysLinkedService. + /// Type of linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for describing the linked service. + /// . + /// The endpoint of the Responsys server. + /// The client ID associated with the Responsys application. Type: string (or Expression with resultType string). + /// The client secret associated with the Responsys application. Type: string (or Expression with resultType string). + /// Specifies whether the data source endpoints are encrypted using HTTPS. The default value is true. Type: boolean (or Expression with resultType boolean). + /// Specifies whether to require the host name in the server's certificate to match the host name of the server when connecting over SSL. The default value is true. Type: boolean (or Expression with resultType boolean). + /// Specifies whether to verify the identity of the server when connecting over SSL. The default value is true. Type: boolean (or Expression with resultType boolean). + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + internal ResponsysLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object endpoint, object clientId, SecretBase clientSecret, object useEncryptedEndpoints, object useHostVerification, object usePeerVerification, object encryptedCredential) : base(type, connectVia, description, parameters, annotations, additionalProperties) + { + Endpoint = endpoint; + ClientId = clientId; + ClientSecret = clientSecret; + UseEncryptedEndpoints = useEncryptedEndpoints; + UseHostVerification = useHostVerification; + UsePeerVerification = usePeerVerification; + EncryptedCredential = encryptedCredential; + Type = type ?? "Responsys"; + } + + /// The endpoint of the Responsys server. + public object Endpoint { get; set; } + /// The client ID associated with the Responsys application. Type: string (or Expression with resultType string). + public object ClientId { get; set; } + /// The client secret associated with the Responsys application. Type: string (or Expression with resultType string). + public SecretBase ClientSecret { get; set; } + /// Specifies whether the data source endpoints are encrypted using HTTPS. The default value is true. Type: boolean (or Expression with resultType boolean). + public object UseEncryptedEndpoints { get; set; } + /// Specifies whether to require the host name in the server's certificate to match the host name of the server when connecting over SSL. The default value is true. Type: boolean (or Expression with resultType boolean). + public object UseHostVerification { get; set; } + /// Specifies whether to verify the identity of the server when connecting over SSL. The default value is true. Type: boolean (or Expression with resultType boolean). + public object UsePeerVerification { get; set; } + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + public object EncryptedCredential { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ResponsysObjectDataset.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ResponsysObjectDataset.Serialization.cs new file mode 100644 index 000000000000..620d6d6ce72c --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ResponsysObjectDataset.Serialization.cs @@ -0,0 +1,213 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class ResponsysObjectDataset : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Structure != null) + { + writer.WritePropertyName("structure"); + writer.WriteObjectValue(Structure); + } + if (Schema != null) + { + writer.WritePropertyName("schema"); + writer.WriteObjectValue(Schema); + } + writer.WritePropertyName("linkedServiceName"); + writer.WriteObjectValue(LinkedServiceName); + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Folder != null) + { + writer.WritePropertyName("folder"); + writer.WriteObjectValue(Folder); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + if (TableName != null) + { + writer.WritePropertyName("tableName"); + writer.WriteObjectValue(TableName); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static ResponsysObjectDataset DeserializeResponsysObjectDataset(JsonElement element) + { + string type = default; + string description = default; + object structure = default; + object schema = default; + LinkedServiceReference linkedServiceName = default; + IDictionary parameters = default; + IList annotations = default; + DatasetFolder folder = default; + object tableName = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("structure")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + structure = property.Value.GetObject(); + continue; + } + if (property.NameEquals("schema")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + schema = property.Value.GetObject(); + continue; + } + if (property.NameEquals("linkedServiceName")) + { + linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("folder")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + folder = DatasetFolder.DeserializeDatasetFolder(property.Value); + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("tableName")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + tableName = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new ResponsysObjectDataset(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties, tableName); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ResponsysObjectDataset.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ResponsysObjectDataset.cs new file mode 100644 index 000000000000..db1a46307bc7 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ResponsysObjectDataset.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Responsys dataset. + public partial class ResponsysObjectDataset : Dataset + { + /// Initializes a new instance of ResponsysObjectDataset. + /// Linked service reference. + public ResponsysObjectDataset(LinkedServiceReference linkedServiceName) : base(linkedServiceName) + { + if (linkedServiceName == null) + { + throw new ArgumentNullException(nameof(linkedServiceName)); + } + + Type = "ResponsysObject"; + } + + /// Initializes a new instance of ResponsysObjectDataset. + /// Type of dataset. + /// Dataset description. + /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. + /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. + /// Linked service reference. + /// Parameters for dataset. + /// List of tags that can be used for describing the Dataset. + /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. + /// . + /// The table name. Type: string (or Expression with resultType string). + internal ResponsysObjectDataset(string type, string description, object structure, object schema, LinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary additionalProperties, object tableName) : base(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) + { + TableName = tableName; + Type = type ?? "ResponsysObject"; + } + + /// The table name. Type: string (or Expression with resultType string). + public object TableName { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RestResourceDataset.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RestResourceDataset.Serialization.cs new file mode 100644 index 000000000000..35f3b7eda6b0 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RestResourceDataset.Serialization.cs @@ -0,0 +1,273 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class RestResourceDataset : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Structure != null) + { + writer.WritePropertyName("structure"); + writer.WriteObjectValue(Structure); + } + if (Schema != null) + { + writer.WritePropertyName("schema"); + writer.WriteObjectValue(Schema); + } + writer.WritePropertyName("linkedServiceName"); + writer.WriteObjectValue(LinkedServiceName); + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Folder != null) + { + writer.WritePropertyName("folder"); + writer.WriteObjectValue(Folder); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + if (RelativeUrl != null) + { + writer.WritePropertyName("relativeUrl"); + writer.WriteObjectValue(RelativeUrl); + } + if (RequestMethod != null) + { + writer.WritePropertyName("requestMethod"); + writer.WriteObjectValue(RequestMethod); + } + if (RequestBody != null) + { + writer.WritePropertyName("requestBody"); + writer.WriteObjectValue(RequestBody); + } + if (AdditionalHeaders != null) + { + writer.WritePropertyName("additionalHeaders"); + writer.WriteObjectValue(AdditionalHeaders); + } + if (PaginationRules != null) + { + writer.WritePropertyName("paginationRules"); + writer.WriteObjectValue(PaginationRules); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static RestResourceDataset DeserializeRestResourceDataset(JsonElement element) + { + string type = default; + string description = default; + object structure = default; + object schema = default; + LinkedServiceReference linkedServiceName = default; + IDictionary parameters = default; + IList annotations = default; + DatasetFolder folder = default; + object relativeUrl = default; + object requestMethod = default; + object requestBody = default; + object additionalHeaders = default; + object paginationRules = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("structure")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + structure = property.Value.GetObject(); + continue; + } + if (property.NameEquals("schema")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + schema = property.Value.GetObject(); + continue; + } + if (property.NameEquals("linkedServiceName")) + { + linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("folder")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + folder = DatasetFolder.DeserializeDatasetFolder(property.Value); + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("relativeUrl")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + relativeUrl = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("requestMethod")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + requestMethod = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("requestBody")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + requestBody = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("additionalHeaders")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + additionalHeaders = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("paginationRules")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + paginationRules = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new RestResourceDataset(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties, relativeUrl, requestMethod, requestBody, additionalHeaders, paginationRules); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RestResourceDataset.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RestResourceDataset.cs new file mode 100644 index 000000000000..5867dcd5d03f --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RestResourceDataset.cs @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// A Rest service dataset. + public partial class RestResourceDataset : Dataset + { + /// Initializes a new instance of RestResourceDataset. + /// Linked service reference. + public RestResourceDataset(LinkedServiceReference linkedServiceName) : base(linkedServiceName) + { + if (linkedServiceName == null) + { + throw new ArgumentNullException(nameof(linkedServiceName)); + } + + Type = "RestResource"; + } + + /// Initializes a new instance of RestResourceDataset. + /// Type of dataset. + /// Dataset description. + /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. + /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. + /// Linked service reference. + /// Parameters for dataset. + /// List of tags that can be used for describing the Dataset. + /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. + /// . + /// The relative URL to the resource that the RESTful API provides. Type: string (or Expression with resultType string). + /// The HTTP method used to call the RESTful API. The default is GET. Type: string (or Expression with resultType string). + /// The HTTP request body to the RESTful API if requestMethod is POST. Type: string (or Expression with resultType string). + /// The additional HTTP headers in the request to the RESTful API. Type: string (or Expression with resultType string). + /// The pagination rules to compose next page requests. Type: string (or Expression with resultType string). + internal RestResourceDataset(string type, string description, object structure, object schema, LinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary additionalProperties, object relativeUrl, object requestMethod, object requestBody, object additionalHeaders, object paginationRules) : base(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) + { + RelativeUrl = relativeUrl; + RequestMethod = requestMethod; + RequestBody = requestBody; + AdditionalHeaders = additionalHeaders; + PaginationRules = paginationRules; + Type = type ?? "RestResource"; + } + + /// The relative URL to the resource that the RESTful API provides. Type: string (or Expression with resultType string). + public object RelativeUrl { get; set; } + /// The HTTP method used to call the RESTful API. The default is GET. Type: string (or Expression with resultType string). + public object RequestMethod { get; set; } + /// The HTTP request body to the RESTful API if requestMethod is POST. Type: string (or Expression with resultType string). + public object RequestBody { get; set; } + /// The additional HTTP headers in the request to the RESTful API. Type: string (or Expression with resultType string). + public object AdditionalHeaders { get; set; } + /// The pagination rules to compose next page requests. Type: string (or Expression with resultType string). + public object PaginationRules { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RestServiceAuthenticationType.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RestServiceAuthenticationType.cs new file mode 100644 index 000000000000..9c1548474d39 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RestServiceAuthenticationType.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Type of authentication used to connect to the REST service. + public readonly partial struct RestServiceAuthenticationType : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + public RestServiceAuthenticationType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AnonymousValue = "Anonymous"; + private const string BasicValue = "Basic"; + private const string AadServicePrincipalValue = "AadServicePrincipal"; + private const string ManagedServiceIdentityValue = "ManagedServiceIdentity"; + + /// Anonymous. + public static RestServiceAuthenticationType Anonymous { get; } = new RestServiceAuthenticationType(AnonymousValue); + /// Basic. + public static RestServiceAuthenticationType Basic { get; } = new RestServiceAuthenticationType(BasicValue); + /// AadServicePrincipal. + public static RestServiceAuthenticationType AadServicePrincipal { get; } = new RestServiceAuthenticationType(AadServicePrincipalValue); + /// ManagedServiceIdentity. + public static RestServiceAuthenticationType ManagedServiceIdentity { get; } = new RestServiceAuthenticationType(ManagedServiceIdentityValue); + /// Determines if two values are the same. + public static bool operator ==(RestServiceAuthenticationType left, RestServiceAuthenticationType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(RestServiceAuthenticationType left, RestServiceAuthenticationType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator RestServiceAuthenticationType(string value) => new RestServiceAuthenticationType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is RestServiceAuthenticationType other && Equals(other); + /// + public bool Equals(RestServiceAuthenticationType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RestServiceLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RestServiceLinkedService.Serialization.cs new file mode 100644 index 000000000000..9033cb5144ae --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RestServiceLinkedService.Serialization.cs @@ -0,0 +1,296 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class RestServiceLinkedService : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (ConnectVia != null) + { + writer.WritePropertyName("connectVia"); + writer.WriteObjectValue(ConnectVia); + } + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + writer.WritePropertyName("url"); + writer.WriteObjectValue(Url); + if (EnableServerCertificateValidation != null) + { + writer.WritePropertyName("enableServerCertificateValidation"); + writer.WriteObjectValue(EnableServerCertificateValidation); + } + writer.WritePropertyName("authenticationType"); + writer.WriteStringValue(AuthenticationType.ToString()); + if (UserName != null) + { + writer.WritePropertyName("userName"); + writer.WriteObjectValue(UserName); + } + if (Password != null) + { + writer.WritePropertyName("password"); + writer.WriteObjectValue(Password); + } + if (ServicePrincipalId != null) + { + writer.WritePropertyName("servicePrincipalId"); + writer.WriteObjectValue(ServicePrincipalId); + } + if (ServicePrincipalKey != null) + { + writer.WritePropertyName("servicePrincipalKey"); + writer.WriteObjectValue(ServicePrincipalKey); + } + if (Tenant != null) + { + writer.WritePropertyName("tenant"); + writer.WriteObjectValue(Tenant); + } + if (AadResourceId != null) + { + writer.WritePropertyName("aadResourceId"); + writer.WriteObjectValue(AadResourceId); + } + if (EncryptedCredential != null) + { + writer.WritePropertyName("encryptedCredential"); + writer.WriteObjectValue(EncryptedCredential); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static RestServiceLinkedService DeserializeRestServiceLinkedService(JsonElement element) + { + string type = default; + IntegrationRuntimeReference connectVia = default; + string description = default; + IDictionary parameters = default; + IList annotations = default; + object url = default; + object enableServerCertificateValidation = default; + RestServiceAuthenticationType authenticationType = default; + object userName = default; + SecretBase password = default; + object servicePrincipalId = default; + SecretBase servicePrincipalKey = default; + object tenant = default; + object aadResourceId = default; + object encryptedCredential = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("connectVia")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("url")) + { + url = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("enableServerCertificateValidation")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + enableServerCertificateValidation = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("authenticationType")) + { + authenticationType = new RestServiceAuthenticationType(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("userName")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + userName = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("password")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + password = SecretBase.DeserializeSecretBase(property0.Value); + continue; + } + if (property0.NameEquals("servicePrincipalId")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + servicePrincipalId = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("servicePrincipalKey")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + servicePrincipalKey = SecretBase.DeserializeSecretBase(property0.Value); + continue; + } + if (property0.NameEquals("tenant")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + tenant = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("aadResourceId")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + aadResourceId = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("encryptedCredential")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + encryptedCredential = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new RestServiceLinkedService(type, connectVia, description, parameters, annotations, additionalProperties, url, enableServerCertificateValidation, authenticationType, userName, password, servicePrincipalId, servicePrincipalKey, tenant, aadResourceId, encryptedCredential); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RestServiceLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RestServiceLinkedService.cs new file mode 100644 index 000000000000..bd309f5d1b99 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RestServiceLinkedService.cs @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Rest Service linked service. + public partial class RestServiceLinkedService : LinkedService + { + /// Initializes a new instance of RestServiceLinkedService. + /// The base URL of the REST service. + /// Type of authentication used to connect to the REST service. + public RestServiceLinkedService(object url, RestServiceAuthenticationType authenticationType) + { + if (url == null) + { + throw new ArgumentNullException(nameof(url)); + } + + Url = url; + AuthenticationType = authenticationType; + Type = "RestService"; + } + + /// Initializes a new instance of RestServiceLinkedService. + /// Type of linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for describing the linked service. + /// . + /// The base URL of the REST service. + /// Whether to validate server side SSL certificate when connecting to the endpoint.The default value is true. Type: boolean (or Expression with resultType boolean). + /// Type of authentication used to connect to the REST service. + /// The user name used in Basic authentication type. + /// The password used in Basic authentication type. + /// The application's client ID used in AadServicePrincipal authentication type. + /// The application's key used in AadServicePrincipal authentication type. + /// The tenant information (domain name or tenant ID) used in AadServicePrincipal authentication type under which your application resides. + /// The resource you are requesting authorization to use. + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + internal RestServiceLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object url, object enableServerCertificateValidation, RestServiceAuthenticationType authenticationType, object userName, SecretBase password, object servicePrincipalId, SecretBase servicePrincipalKey, object tenant, object aadResourceId, object encryptedCredential) : base(type, connectVia, description, parameters, annotations, additionalProperties) + { + Url = url; + EnableServerCertificateValidation = enableServerCertificateValidation; + AuthenticationType = authenticationType; + UserName = userName; + Password = password; + ServicePrincipalId = servicePrincipalId; + ServicePrincipalKey = servicePrincipalKey; + Tenant = tenant; + AadResourceId = aadResourceId; + EncryptedCredential = encryptedCredential; + Type = type ?? "RestService"; + } + + /// The base URL of the REST service. + public object Url { get; set; } + /// Whether to validate server side SSL certificate when connecting to the endpoint.The default value is true. Type: boolean (or Expression with resultType boolean). + public object EnableServerCertificateValidation { get; set; } + /// Type of authentication used to connect to the REST service. + public RestServiceAuthenticationType AuthenticationType { get; set; } + /// The user name used in Basic authentication type. + public object UserName { get; set; } + /// The password used in Basic authentication type. + public SecretBase Password { get; set; } + /// The application's client ID used in AadServicePrincipal authentication type. + public object ServicePrincipalId { get; set; } + /// The application's key used in AadServicePrincipal authentication type. + public SecretBase ServicePrincipalKey { get; set; } + /// The tenant information (domain name or tenant ID) used in AadServicePrincipal authentication type under which your application resides. + public object Tenant { get; set; } + /// The resource you are requesting authorization to use. + public object AadResourceId { get; set; } + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + public object EncryptedCredential { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RunFilterParameters.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RunFilterParameters.Serialization.cs new file mode 100644 index 000000000000..1d4a5db7c814 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RunFilterParameters.Serialization.cs @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class RunFilterParameters : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (ContinuationToken != null) + { + writer.WritePropertyName("continuationToken"); + writer.WriteStringValue(ContinuationToken); + } + writer.WritePropertyName("lastUpdatedAfter"); + writer.WriteStringValue(LastUpdatedAfter, "O"); + writer.WritePropertyName("lastUpdatedBefore"); + writer.WriteStringValue(LastUpdatedBefore, "O"); + if (Filters != null) + { + writer.WritePropertyName("filters"); + writer.WriteStartArray(); + foreach (var item in Filters) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (OrderBy != null) + { + writer.WritePropertyName("orderBy"); + writer.WriteStartArray(); + foreach (var item in OrderBy) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RunFilterParameters.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RunFilterParameters.cs new file mode 100644 index 000000000000..e21116f30b01 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RunFilterParameters.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Query parameters for listing runs. + public partial class RunFilterParameters + { + /// Initializes a new instance of RunFilterParameters. + /// The time at or after which the run event was updated in 'ISO 8601' format. + /// The time at or before which the run event was updated in 'ISO 8601' format. + public RunFilterParameters(DateTimeOffset lastUpdatedAfter, DateTimeOffset lastUpdatedBefore) + { + LastUpdatedAfter = lastUpdatedAfter; + LastUpdatedBefore = lastUpdatedBefore; + } + + /// Initializes a new instance of RunFilterParameters. + /// The continuation token for getting the next page of results. Null for first page. + /// The time at or after which the run event was updated in 'ISO 8601' format. + /// The time at or before which the run event was updated in 'ISO 8601' format. + /// List of filters. + /// List of OrderBy option. + internal RunFilterParameters(string continuationToken, DateTimeOffset lastUpdatedAfter, DateTimeOffset lastUpdatedBefore, IList filters, IList orderBy) + { + ContinuationToken = continuationToken; + LastUpdatedAfter = lastUpdatedAfter; + LastUpdatedBefore = lastUpdatedBefore; + Filters = filters; + OrderBy = orderBy; + } + + /// The continuation token for getting the next page of results. Null for first page. + public string ContinuationToken { get; set; } + /// The time at or after which the run event was updated in 'ISO 8601' format. + public DateTimeOffset LastUpdatedAfter { get; } + /// The time at or before which the run event was updated in 'ISO 8601' format. + public DateTimeOffset LastUpdatedBefore { get; } + /// List of filters. + public IList Filters { get; set; } + /// List of OrderBy option. + public IList OrderBy { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RunQueryFilter.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RunQueryFilter.Serialization.cs new file mode 100644 index 000000000000..c851143ccf46 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RunQueryFilter.Serialization.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class RunQueryFilter : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("operand"); + writer.WriteStringValue(Operand.ToString()); + writer.WritePropertyName("operator"); + writer.WriteStringValue(Operator.ToString()); + writer.WritePropertyName("values"); + writer.WriteStartArray(); + foreach (var item in Values) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + writer.WriteEndObject(); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RunQueryFilter.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RunQueryFilter.cs new file mode 100644 index 000000000000..df02deeefde1 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RunQueryFilter.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Query filter option for listing runs. + public partial class RunQueryFilter + { + /// Initializes a new instance of RunQueryFilter. + /// Parameter name to be used for filter. The allowed operands to query pipeline runs are PipelineName, RunStart, RunEnd and Status; to query activity runs are ActivityName, ActivityRunStart, ActivityRunEnd, ActivityType and Status, and to query trigger runs are TriggerName, TriggerRunTimestamp and Status. + /// Operator to be used for filter. + /// List of filter values. + public RunQueryFilter(RunQueryFilterOperand operand, RunQueryFilterOperator @operator, IEnumerable values) + { + if (values == null) + { + throw new ArgumentNullException(nameof(values)); + } + + Operand = operand; + Operator = @operator; + Values = values.ToArray(); + } + + /// Initializes a new instance of RunQueryFilter. + /// Parameter name to be used for filter. The allowed operands to query pipeline runs are PipelineName, RunStart, RunEnd and Status; to query activity runs are ActivityName, ActivityRunStart, ActivityRunEnd, ActivityType and Status, and to query trigger runs are TriggerName, TriggerRunTimestamp and Status. + /// Operator to be used for filter. + /// List of filter values. + internal RunQueryFilter(RunQueryFilterOperand operand, RunQueryFilterOperator @operator, IList values) + { + Operand = operand; + Operator = @operator; + Values = values; + } + + /// Parameter name to be used for filter. The allowed operands to query pipeline runs are PipelineName, RunStart, RunEnd and Status; to query activity runs are ActivityName, ActivityRunStart, ActivityRunEnd, ActivityType and Status, and to query trigger runs are TriggerName, TriggerRunTimestamp and Status. + public RunQueryFilterOperand Operand { get; } + /// Operator to be used for filter. + public RunQueryFilterOperator Operator { get; } + /// List of filter values. + public IList Values { get; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RunQueryFilterOperand.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RunQueryFilterOperand.cs new file mode 100644 index 000000000000..bddb5ddb7313 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RunQueryFilterOperand.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Parameter name to be used for filter. The allowed operands to query pipeline runs are PipelineName, RunStart, RunEnd and Status; to query activity runs are ActivityName, ActivityRunStart, ActivityRunEnd, ActivityType and Status, and to query trigger runs are TriggerName, TriggerRunTimestamp and Status. + public readonly partial struct RunQueryFilterOperand : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + public RunQueryFilterOperand(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string PipelineNameValue = "PipelineName"; + private const string StatusValue = "Status"; + private const string RunStartValue = "RunStart"; + private const string RunEndValue = "RunEnd"; + private const string ActivityNameValue = "ActivityName"; + private const string ActivityRunStartValue = "ActivityRunStart"; + private const string ActivityRunEndValue = "ActivityRunEnd"; + private const string ActivityTypeValue = "ActivityType"; + private const string TriggerNameValue = "TriggerName"; + private const string TriggerRunTimestampValue = "TriggerRunTimestamp"; + private const string RunGroupIdValue = "RunGroupId"; + private const string LatestOnlyValue = "LatestOnly"; + + /// PipelineName. + public static RunQueryFilterOperand PipelineName { get; } = new RunQueryFilterOperand(PipelineNameValue); + /// Status. + public static RunQueryFilterOperand Status { get; } = new RunQueryFilterOperand(StatusValue); + /// RunStart. + public static RunQueryFilterOperand RunStart { get; } = new RunQueryFilterOperand(RunStartValue); + /// RunEnd. + public static RunQueryFilterOperand RunEnd { get; } = new RunQueryFilterOperand(RunEndValue); + /// ActivityName. + public static RunQueryFilterOperand ActivityName { get; } = new RunQueryFilterOperand(ActivityNameValue); + /// ActivityRunStart. + public static RunQueryFilterOperand ActivityRunStart { get; } = new RunQueryFilterOperand(ActivityRunStartValue); + /// ActivityRunEnd. + public static RunQueryFilterOperand ActivityRunEnd { get; } = new RunQueryFilterOperand(ActivityRunEndValue); + /// ActivityType. + public static RunQueryFilterOperand ActivityType { get; } = new RunQueryFilterOperand(ActivityTypeValue); + /// TriggerName. + public static RunQueryFilterOperand TriggerName { get; } = new RunQueryFilterOperand(TriggerNameValue); + /// TriggerRunTimestamp. + public static RunQueryFilterOperand TriggerRunTimestamp { get; } = new RunQueryFilterOperand(TriggerRunTimestampValue); + /// RunGroupId. + public static RunQueryFilterOperand RunGroupId { get; } = new RunQueryFilterOperand(RunGroupIdValue); + /// LatestOnly. + public static RunQueryFilterOperand LatestOnly { get; } = new RunQueryFilterOperand(LatestOnlyValue); + /// Determines if two values are the same. + public static bool operator ==(RunQueryFilterOperand left, RunQueryFilterOperand right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(RunQueryFilterOperand left, RunQueryFilterOperand right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator RunQueryFilterOperand(string value) => new RunQueryFilterOperand(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is RunQueryFilterOperand other && Equals(other); + /// + public bool Equals(RunQueryFilterOperand other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RunQueryFilterOperator.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RunQueryFilterOperator.cs new file mode 100644 index 000000000000..c1c9213023fa --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RunQueryFilterOperator.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Operator to be used for filter. + public readonly partial struct RunQueryFilterOperator : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + public RunQueryFilterOperator(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string EqualsValueValue = "Equals"; + private const string NotEqualsValue = "NotEquals"; + private const string InValue = "In"; + private const string NotInValue = "NotIn"; + + /// Equals. + public static RunQueryFilterOperator EqualsValue { get; } = new RunQueryFilterOperator(EqualsValueValue); + /// NotEquals. + public static RunQueryFilterOperator NotEquals { get; } = new RunQueryFilterOperator(NotEqualsValue); + /// In. + public static RunQueryFilterOperator In { get; } = new RunQueryFilterOperator(InValue); + /// NotIn. + public static RunQueryFilterOperator NotIn { get; } = new RunQueryFilterOperator(NotInValue); + /// Determines if two values are the same. + public static bool operator ==(RunQueryFilterOperator left, RunQueryFilterOperator right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(RunQueryFilterOperator left, RunQueryFilterOperator right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator RunQueryFilterOperator(string value) => new RunQueryFilterOperator(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is RunQueryFilterOperator other && Equals(other); + /// + public bool Equals(RunQueryFilterOperator other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RunQueryOrder.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RunQueryOrder.cs new file mode 100644 index 000000000000..337ad0063f29 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RunQueryOrder.cs @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Sorting order of the parameter. + public readonly partial struct RunQueryOrder : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + public RunQueryOrder(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ASCValue = "ASC"; + private const string DescValue = "DESC"; + + /// ASC. + public static RunQueryOrder ASC { get; } = new RunQueryOrder(ASCValue); + /// DESC. + public static RunQueryOrder Desc { get; } = new RunQueryOrder(DescValue); + /// Determines if two values are the same. + public static bool operator ==(RunQueryOrder left, RunQueryOrder right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(RunQueryOrder left, RunQueryOrder right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator RunQueryOrder(string value) => new RunQueryOrder(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is RunQueryOrder other && Equals(other); + /// + public bool Equals(RunQueryOrder other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RunQueryOrderBy.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RunQueryOrderBy.Serialization.cs new file mode 100644 index 000000000000..09d2b42bf8c8 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RunQueryOrderBy.Serialization.cs @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class RunQueryOrderBy : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("orderBy"); + writer.WriteStringValue(OrderBy.ToString()); + writer.WritePropertyName("order"); + writer.WriteStringValue(Order.ToString()); + writer.WriteEndObject(); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RunQueryOrderBy.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RunQueryOrderBy.cs new file mode 100644 index 000000000000..3c6004199e50 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RunQueryOrderBy.cs @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// An object to provide order by options for listing runs. + public partial class RunQueryOrderBy + { + /// Initializes a new instance of RunQueryOrderBy. + /// Parameter name to be used for order by. The allowed parameters to order by for pipeline runs are PipelineName, RunStart, RunEnd and Status; for activity runs are ActivityName, ActivityRunStart, ActivityRunEnd and Status; for trigger runs are TriggerName, TriggerRunTimestamp and Status. + /// Sorting order of the parameter. + public RunQueryOrderBy(RunQueryOrderByField orderBy, RunQueryOrder order) + { + OrderBy = orderBy; + Order = order; + } + + /// Parameter name to be used for order by. The allowed parameters to order by for pipeline runs are PipelineName, RunStart, RunEnd and Status; for activity runs are ActivityName, ActivityRunStart, ActivityRunEnd and Status; for trigger runs are TriggerName, TriggerRunTimestamp and Status. + public RunQueryOrderByField OrderBy { get; } + /// Sorting order of the parameter. + public RunQueryOrder Order { get; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RunQueryOrderByField.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RunQueryOrderByField.cs new file mode 100644 index 000000000000..0633632a557d --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RunQueryOrderByField.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Parameter name to be used for order by. The allowed parameters to order by for pipeline runs are PipelineName, RunStart, RunEnd and Status; for activity runs are ActivityName, ActivityRunStart, ActivityRunEnd and Status; for trigger runs are TriggerName, TriggerRunTimestamp and Status. + public readonly partial struct RunQueryOrderByField : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + public RunQueryOrderByField(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string RunStartValue = "RunStart"; + private const string RunEndValue = "RunEnd"; + private const string PipelineNameValue = "PipelineName"; + private const string StatusValue = "Status"; + private const string ActivityNameValue = "ActivityName"; + private const string ActivityRunStartValue = "ActivityRunStart"; + private const string ActivityRunEndValue = "ActivityRunEnd"; + private const string TriggerNameValue = "TriggerName"; + private const string TriggerRunTimestampValue = "TriggerRunTimestamp"; + + /// RunStart. + public static RunQueryOrderByField RunStart { get; } = new RunQueryOrderByField(RunStartValue); + /// RunEnd. + public static RunQueryOrderByField RunEnd { get; } = new RunQueryOrderByField(RunEndValue); + /// PipelineName. + public static RunQueryOrderByField PipelineName { get; } = new RunQueryOrderByField(PipelineNameValue); + /// Status. + public static RunQueryOrderByField Status { get; } = new RunQueryOrderByField(StatusValue); + /// ActivityName. + public static RunQueryOrderByField ActivityName { get; } = new RunQueryOrderByField(ActivityNameValue); + /// ActivityRunStart. + public static RunQueryOrderByField ActivityRunStart { get; } = new RunQueryOrderByField(ActivityRunStartValue); + /// ActivityRunEnd. + public static RunQueryOrderByField ActivityRunEnd { get; } = new RunQueryOrderByField(ActivityRunEndValue); + /// TriggerName. + public static RunQueryOrderByField TriggerName { get; } = new RunQueryOrderByField(TriggerNameValue); + /// TriggerRunTimestamp. + public static RunQueryOrderByField TriggerRunTimestamp { get; } = new RunQueryOrderByField(TriggerRunTimestampValue); + /// Determines if two values are the same. + public static bool operator ==(RunQueryOrderByField left, RunQueryOrderByField right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(RunQueryOrderByField left, RunQueryOrderByField right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator RunQueryOrderByField(string value) => new RunQueryOrderByField(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is RunQueryOrderByField other && Equals(other); + /// + public bool Equals(RunQueryOrderByField other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SalesforceLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SalesforceLinkedService.Serialization.cs new file mode 100644 index 000000000000..7069ca4b737e --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SalesforceLinkedService.Serialization.cs @@ -0,0 +1,235 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class SalesforceLinkedService : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (ConnectVia != null) + { + writer.WritePropertyName("connectVia"); + writer.WriteObjectValue(ConnectVia); + } + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + if (EnvironmentUrl != null) + { + writer.WritePropertyName("environmentUrl"); + writer.WriteObjectValue(EnvironmentUrl); + } + if (Username != null) + { + writer.WritePropertyName("username"); + writer.WriteObjectValue(Username); + } + if (Password != null) + { + writer.WritePropertyName("password"); + writer.WriteObjectValue(Password); + } + if (SecurityToken != null) + { + writer.WritePropertyName("securityToken"); + writer.WriteObjectValue(SecurityToken); + } + if (EncryptedCredential != null) + { + writer.WritePropertyName("encryptedCredential"); + writer.WriteObjectValue(EncryptedCredential); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static SalesforceLinkedService DeserializeSalesforceLinkedService(JsonElement element) + { + string type = default; + IntegrationRuntimeReference connectVia = default; + string description = default; + IDictionary parameters = default; + IList annotations = default; + object environmentUrl = default; + object username = default; + SecretBase password = default; + SecretBase securityToken = default; + object encryptedCredential = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("connectVia")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("environmentUrl")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + environmentUrl = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("username")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + username = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("password")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + password = SecretBase.DeserializeSecretBase(property0.Value); + continue; + } + if (property0.NameEquals("securityToken")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + securityToken = SecretBase.DeserializeSecretBase(property0.Value); + continue; + } + if (property0.NameEquals("encryptedCredential")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + encryptedCredential = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new SalesforceLinkedService(type, connectVia, description, parameters, annotations, additionalProperties, environmentUrl, username, password, securityToken, encryptedCredential); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SalesforceLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SalesforceLinkedService.cs new file mode 100644 index 000000000000..91b1f66ea314 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SalesforceLinkedService.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Linked service for Salesforce. + public partial class SalesforceLinkedService : LinkedService + { + /// Initializes a new instance of SalesforceLinkedService. + public SalesforceLinkedService() + { + Type = "Salesforce"; + } + + /// Initializes a new instance of SalesforceLinkedService. + /// Type of linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for describing the linked service. + /// . + /// The URL of Salesforce instance. Default is 'https://login.salesforce.com'. To copy data from sandbox, specify 'https://test.salesforce.com'. To copy data from custom domain, specify, for example, 'https://[domain].my.salesforce.com'. Type: string (or Expression with resultType string). + /// The username for Basic authentication of the Salesforce instance. Type: string (or Expression with resultType string). + /// The password for Basic authentication of the Salesforce instance. + /// The security token is required to remotely access Salesforce instance. + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + internal SalesforceLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object environmentUrl, object username, SecretBase password, SecretBase securityToken, object encryptedCredential) : base(type, connectVia, description, parameters, annotations, additionalProperties) + { + EnvironmentUrl = environmentUrl; + Username = username; + Password = password; + SecurityToken = securityToken; + EncryptedCredential = encryptedCredential; + Type = type ?? "Salesforce"; + } + + /// The URL of Salesforce instance. Default is 'https://login.salesforce.com'. To copy data from sandbox, specify 'https://test.salesforce.com'. To copy data from custom domain, specify, for example, 'https://[domain].my.salesforce.com'. Type: string (or Expression with resultType string). + public object EnvironmentUrl { get; set; } + /// The username for Basic authentication of the Salesforce instance. Type: string (or Expression with resultType string). + public object Username { get; set; } + /// The password for Basic authentication of the Salesforce instance. + public SecretBase Password { get; set; } + /// The security token is required to remotely access Salesforce instance. + public SecretBase SecurityToken { get; set; } + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + public object EncryptedCredential { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SalesforceMarketingCloudLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SalesforceMarketingCloudLinkedService.Serialization.cs new file mode 100644 index 000000000000..9094bd75e2f9 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SalesforceMarketingCloudLinkedService.Serialization.cs @@ -0,0 +1,243 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class SalesforceMarketingCloudLinkedService : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (ConnectVia != null) + { + writer.WritePropertyName("connectVia"); + writer.WriteObjectValue(ConnectVia); + } + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + writer.WritePropertyName("clientId"); + writer.WriteObjectValue(ClientId); + if (ClientSecret != null) + { + writer.WritePropertyName("clientSecret"); + writer.WriteObjectValue(ClientSecret); + } + if (UseEncryptedEndpoints != null) + { + writer.WritePropertyName("useEncryptedEndpoints"); + writer.WriteObjectValue(UseEncryptedEndpoints); + } + if (UseHostVerification != null) + { + writer.WritePropertyName("useHostVerification"); + writer.WriteObjectValue(UseHostVerification); + } + if (UsePeerVerification != null) + { + writer.WritePropertyName("usePeerVerification"); + writer.WriteObjectValue(UsePeerVerification); + } + if (EncryptedCredential != null) + { + writer.WritePropertyName("encryptedCredential"); + writer.WriteObjectValue(EncryptedCredential); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static SalesforceMarketingCloudLinkedService DeserializeSalesforceMarketingCloudLinkedService(JsonElement element) + { + string type = default; + IntegrationRuntimeReference connectVia = default; + string description = default; + IDictionary parameters = default; + IList annotations = default; + object clientId = default; + SecretBase clientSecret = default; + object useEncryptedEndpoints = default; + object useHostVerification = default; + object usePeerVerification = default; + object encryptedCredential = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("connectVia")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("clientId")) + { + clientId = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("clientSecret")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + clientSecret = SecretBase.DeserializeSecretBase(property0.Value); + continue; + } + if (property0.NameEquals("useEncryptedEndpoints")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + useEncryptedEndpoints = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("useHostVerification")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + useHostVerification = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("usePeerVerification")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + usePeerVerification = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("encryptedCredential")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + encryptedCredential = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new SalesforceMarketingCloudLinkedService(type, connectVia, description, parameters, annotations, additionalProperties, clientId, clientSecret, useEncryptedEndpoints, useHostVerification, usePeerVerification, encryptedCredential); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SalesforceMarketingCloudLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SalesforceMarketingCloudLinkedService.cs new file mode 100644 index 000000000000..83979eeabe50 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SalesforceMarketingCloudLinkedService.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Salesforce Marketing Cloud linked service. + public partial class SalesforceMarketingCloudLinkedService : LinkedService + { + /// Initializes a new instance of SalesforceMarketingCloudLinkedService. + /// The client ID associated with the Salesforce Marketing Cloud application. Type: string (or Expression with resultType string). + public SalesforceMarketingCloudLinkedService(object clientId) + { + if (clientId == null) + { + throw new ArgumentNullException(nameof(clientId)); + } + + ClientId = clientId; + Type = "SalesforceMarketingCloud"; + } + + /// Initializes a new instance of SalesforceMarketingCloudLinkedService. + /// Type of linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for describing the linked service. + /// . + /// The client ID associated with the Salesforce Marketing Cloud application. Type: string (or Expression with resultType string). + /// The client secret associated with the Salesforce Marketing Cloud application. Type: string (or Expression with resultType string). + /// Specifies whether the data source endpoints are encrypted using HTTPS. The default value is true. Type: boolean (or Expression with resultType boolean). + /// Specifies whether to require the host name in the server's certificate to match the host name of the server when connecting over SSL. The default value is true. Type: boolean (or Expression with resultType boolean). + /// Specifies whether to verify the identity of the server when connecting over SSL. The default value is true. Type: boolean (or Expression with resultType boolean). + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + internal SalesforceMarketingCloudLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object clientId, SecretBase clientSecret, object useEncryptedEndpoints, object useHostVerification, object usePeerVerification, object encryptedCredential) : base(type, connectVia, description, parameters, annotations, additionalProperties) + { + ClientId = clientId; + ClientSecret = clientSecret; + UseEncryptedEndpoints = useEncryptedEndpoints; + UseHostVerification = useHostVerification; + UsePeerVerification = usePeerVerification; + EncryptedCredential = encryptedCredential; + Type = type ?? "SalesforceMarketingCloud"; + } + + /// The client ID associated with the Salesforce Marketing Cloud application. Type: string (or Expression with resultType string). + public object ClientId { get; set; } + /// The client secret associated with the Salesforce Marketing Cloud application. Type: string (or Expression with resultType string). + public SecretBase ClientSecret { get; set; } + /// Specifies whether the data source endpoints are encrypted using HTTPS. The default value is true. Type: boolean (or Expression with resultType boolean). + public object UseEncryptedEndpoints { get; set; } + /// Specifies whether to require the host name in the server's certificate to match the host name of the server when connecting over SSL. The default value is true. Type: boolean (or Expression with resultType boolean). + public object UseHostVerification { get; set; } + /// Specifies whether to verify the identity of the server when connecting over SSL. The default value is true. Type: boolean (or Expression with resultType boolean). + public object UsePeerVerification { get; set; } + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + public object EncryptedCredential { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SalesforceMarketingCloudObjectDataset.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SalesforceMarketingCloudObjectDataset.Serialization.cs new file mode 100644 index 000000000000..408cd01c5aef --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SalesforceMarketingCloudObjectDataset.Serialization.cs @@ -0,0 +1,213 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class SalesforceMarketingCloudObjectDataset : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Structure != null) + { + writer.WritePropertyName("structure"); + writer.WriteObjectValue(Structure); + } + if (Schema != null) + { + writer.WritePropertyName("schema"); + writer.WriteObjectValue(Schema); + } + writer.WritePropertyName("linkedServiceName"); + writer.WriteObjectValue(LinkedServiceName); + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Folder != null) + { + writer.WritePropertyName("folder"); + writer.WriteObjectValue(Folder); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + if (TableName != null) + { + writer.WritePropertyName("tableName"); + writer.WriteObjectValue(TableName); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static SalesforceMarketingCloudObjectDataset DeserializeSalesforceMarketingCloudObjectDataset(JsonElement element) + { + string type = default; + string description = default; + object structure = default; + object schema = default; + LinkedServiceReference linkedServiceName = default; + IDictionary parameters = default; + IList annotations = default; + DatasetFolder folder = default; + object tableName = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("structure")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + structure = property.Value.GetObject(); + continue; + } + if (property.NameEquals("schema")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + schema = property.Value.GetObject(); + continue; + } + if (property.NameEquals("linkedServiceName")) + { + linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("folder")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + folder = DatasetFolder.DeserializeDatasetFolder(property.Value); + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("tableName")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + tableName = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new SalesforceMarketingCloudObjectDataset(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties, tableName); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SalesforceMarketingCloudObjectDataset.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SalesforceMarketingCloudObjectDataset.cs new file mode 100644 index 000000000000..1dd26bd2652b --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SalesforceMarketingCloudObjectDataset.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Salesforce Marketing Cloud dataset. + public partial class SalesforceMarketingCloudObjectDataset : Dataset + { + /// Initializes a new instance of SalesforceMarketingCloudObjectDataset. + /// Linked service reference. + public SalesforceMarketingCloudObjectDataset(LinkedServiceReference linkedServiceName) : base(linkedServiceName) + { + if (linkedServiceName == null) + { + throw new ArgumentNullException(nameof(linkedServiceName)); + } + + Type = "SalesforceMarketingCloudObject"; + } + + /// Initializes a new instance of SalesforceMarketingCloudObjectDataset. + /// Type of dataset. + /// Dataset description. + /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. + /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. + /// Linked service reference. + /// Parameters for dataset. + /// List of tags that can be used for describing the Dataset. + /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. + /// . + /// The table name. Type: string (or Expression with resultType string). + internal SalesforceMarketingCloudObjectDataset(string type, string description, object structure, object schema, LinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary additionalProperties, object tableName) : base(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) + { + TableName = tableName; + Type = type ?? "SalesforceMarketingCloudObject"; + } + + /// The table name. Type: string (or Expression with resultType string). + public object TableName { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SalesforceObjectDataset.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SalesforceObjectDataset.Serialization.cs new file mode 100644 index 000000000000..36e00d3da673 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SalesforceObjectDataset.Serialization.cs @@ -0,0 +1,213 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class SalesforceObjectDataset : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Structure != null) + { + writer.WritePropertyName("structure"); + writer.WriteObjectValue(Structure); + } + if (Schema != null) + { + writer.WritePropertyName("schema"); + writer.WriteObjectValue(Schema); + } + writer.WritePropertyName("linkedServiceName"); + writer.WriteObjectValue(LinkedServiceName); + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Folder != null) + { + writer.WritePropertyName("folder"); + writer.WriteObjectValue(Folder); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + if (ObjectApiName != null) + { + writer.WritePropertyName("objectApiName"); + writer.WriteObjectValue(ObjectApiName); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static SalesforceObjectDataset DeserializeSalesforceObjectDataset(JsonElement element) + { + string type = default; + string description = default; + object structure = default; + object schema = default; + LinkedServiceReference linkedServiceName = default; + IDictionary parameters = default; + IList annotations = default; + DatasetFolder folder = default; + object objectApiName = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("structure")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + structure = property.Value.GetObject(); + continue; + } + if (property.NameEquals("schema")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + schema = property.Value.GetObject(); + continue; + } + if (property.NameEquals("linkedServiceName")) + { + linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("folder")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + folder = DatasetFolder.DeserializeDatasetFolder(property.Value); + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("objectApiName")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + objectApiName = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new SalesforceObjectDataset(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties, objectApiName); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SalesforceObjectDataset.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SalesforceObjectDataset.cs new file mode 100644 index 000000000000..19c9bc2deac1 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SalesforceObjectDataset.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// The Salesforce object dataset. + public partial class SalesforceObjectDataset : Dataset + { + /// Initializes a new instance of SalesforceObjectDataset. + /// Linked service reference. + public SalesforceObjectDataset(LinkedServiceReference linkedServiceName) : base(linkedServiceName) + { + if (linkedServiceName == null) + { + throw new ArgumentNullException(nameof(linkedServiceName)); + } + + Type = "SalesforceObject"; + } + + /// Initializes a new instance of SalesforceObjectDataset. + /// Type of dataset. + /// Dataset description. + /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. + /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. + /// Linked service reference. + /// Parameters for dataset. + /// List of tags that can be used for describing the Dataset. + /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. + /// . + /// The Salesforce object API name. Type: string (or Expression with resultType string). + internal SalesforceObjectDataset(string type, string description, object structure, object schema, LinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary additionalProperties, object objectApiName) : base(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) + { + ObjectApiName = objectApiName; + Type = type ?? "SalesforceObject"; + } + + /// The Salesforce object API name. Type: string (or Expression with resultType string). + public object ObjectApiName { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SalesforceServiceCloudLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SalesforceServiceCloudLinkedService.Serialization.cs new file mode 100644 index 000000000000..5c4699a048a3 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SalesforceServiceCloudLinkedService.Serialization.cs @@ -0,0 +1,250 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class SalesforceServiceCloudLinkedService : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (ConnectVia != null) + { + writer.WritePropertyName("connectVia"); + writer.WriteObjectValue(ConnectVia); + } + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + if (EnvironmentUrl != null) + { + writer.WritePropertyName("environmentUrl"); + writer.WriteObjectValue(EnvironmentUrl); + } + if (Username != null) + { + writer.WritePropertyName("username"); + writer.WriteObjectValue(Username); + } + if (Password != null) + { + writer.WritePropertyName("password"); + writer.WriteObjectValue(Password); + } + if (SecurityToken != null) + { + writer.WritePropertyName("securityToken"); + writer.WriteObjectValue(SecurityToken); + } + if (ExtendedProperties != null) + { + writer.WritePropertyName("extendedProperties"); + writer.WriteObjectValue(ExtendedProperties); + } + if (EncryptedCredential != null) + { + writer.WritePropertyName("encryptedCredential"); + writer.WriteObjectValue(EncryptedCredential); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static SalesforceServiceCloudLinkedService DeserializeSalesforceServiceCloudLinkedService(JsonElement element) + { + string type = default; + IntegrationRuntimeReference connectVia = default; + string description = default; + IDictionary parameters = default; + IList annotations = default; + object environmentUrl = default; + object username = default; + SecretBase password = default; + SecretBase securityToken = default; + object extendedProperties = default; + object encryptedCredential = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("connectVia")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("environmentUrl")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + environmentUrl = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("username")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + username = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("password")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + password = SecretBase.DeserializeSecretBase(property0.Value); + continue; + } + if (property0.NameEquals("securityToken")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + securityToken = SecretBase.DeserializeSecretBase(property0.Value); + continue; + } + if (property0.NameEquals("extendedProperties")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + extendedProperties = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("encryptedCredential")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + encryptedCredential = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new SalesforceServiceCloudLinkedService(type, connectVia, description, parameters, annotations, additionalProperties, environmentUrl, username, password, securityToken, extendedProperties, encryptedCredential); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SalesforceServiceCloudLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SalesforceServiceCloudLinkedService.cs new file mode 100644 index 000000000000..bdbe54e03672 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SalesforceServiceCloudLinkedService.cs @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Linked service for Salesforce Service Cloud. + public partial class SalesforceServiceCloudLinkedService : LinkedService + { + /// Initializes a new instance of SalesforceServiceCloudLinkedService. + public SalesforceServiceCloudLinkedService() + { + Type = "SalesforceServiceCloud"; + } + + /// Initializes a new instance of SalesforceServiceCloudLinkedService. + /// Type of linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for describing the linked service. + /// . + /// The URL of Salesforce Service Cloud instance. Default is 'https://login.salesforce.com'. To copy data from sandbox, specify 'https://test.salesforce.com'. To copy data from custom domain, specify, for example, 'https://[domain].my.salesforce.com'. Type: string (or Expression with resultType string). + /// The username for Basic authentication of the Salesforce instance. Type: string (or Expression with resultType string). + /// The password for Basic authentication of the Salesforce instance. + /// The security token is required to remotely access Salesforce instance. + /// Extended properties appended to the connection string. Type: string (or Expression with resultType string). + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + internal SalesforceServiceCloudLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object environmentUrl, object username, SecretBase password, SecretBase securityToken, object extendedProperties, object encryptedCredential) : base(type, connectVia, description, parameters, annotations, additionalProperties) + { + EnvironmentUrl = environmentUrl; + Username = username; + Password = password; + SecurityToken = securityToken; + ExtendedProperties = extendedProperties; + EncryptedCredential = encryptedCredential; + Type = type ?? "SalesforceServiceCloud"; + } + + /// The URL of Salesforce Service Cloud instance. Default is 'https://login.salesforce.com'. To copy data from sandbox, specify 'https://test.salesforce.com'. To copy data from custom domain, specify, for example, 'https://[domain].my.salesforce.com'. Type: string (or Expression with resultType string). + public object EnvironmentUrl { get; set; } + /// The username for Basic authentication of the Salesforce instance. Type: string (or Expression with resultType string). + public object Username { get; set; } + /// The password for Basic authentication of the Salesforce instance. + public SecretBase Password { get; set; } + /// The security token is required to remotely access Salesforce instance. + public SecretBase SecurityToken { get; set; } + /// Extended properties appended to the connection string. Type: string (or Expression with resultType string). + public object ExtendedProperties { get; set; } + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + public object EncryptedCredential { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SalesforceServiceCloudObjectDataset.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SalesforceServiceCloudObjectDataset.Serialization.cs new file mode 100644 index 000000000000..7a2dc98172d0 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SalesforceServiceCloudObjectDataset.Serialization.cs @@ -0,0 +1,213 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class SalesforceServiceCloudObjectDataset : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Structure != null) + { + writer.WritePropertyName("structure"); + writer.WriteObjectValue(Structure); + } + if (Schema != null) + { + writer.WritePropertyName("schema"); + writer.WriteObjectValue(Schema); + } + writer.WritePropertyName("linkedServiceName"); + writer.WriteObjectValue(LinkedServiceName); + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Folder != null) + { + writer.WritePropertyName("folder"); + writer.WriteObjectValue(Folder); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + if (ObjectApiName != null) + { + writer.WritePropertyName("objectApiName"); + writer.WriteObjectValue(ObjectApiName); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static SalesforceServiceCloudObjectDataset DeserializeSalesforceServiceCloudObjectDataset(JsonElement element) + { + string type = default; + string description = default; + object structure = default; + object schema = default; + LinkedServiceReference linkedServiceName = default; + IDictionary parameters = default; + IList annotations = default; + DatasetFolder folder = default; + object objectApiName = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("structure")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + structure = property.Value.GetObject(); + continue; + } + if (property.NameEquals("schema")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + schema = property.Value.GetObject(); + continue; + } + if (property.NameEquals("linkedServiceName")) + { + linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("folder")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + folder = DatasetFolder.DeserializeDatasetFolder(property.Value); + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("objectApiName")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + objectApiName = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new SalesforceServiceCloudObjectDataset(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties, objectApiName); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SalesforceServiceCloudObjectDataset.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SalesforceServiceCloudObjectDataset.cs new file mode 100644 index 000000000000..3d389e2d4dab --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SalesforceServiceCloudObjectDataset.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// The Salesforce Service Cloud object dataset. + public partial class SalesforceServiceCloudObjectDataset : Dataset + { + /// Initializes a new instance of SalesforceServiceCloudObjectDataset. + /// Linked service reference. + public SalesforceServiceCloudObjectDataset(LinkedServiceReference linkedServiceName) : base(linkedServiceName) + { + if (linkedServiceName == null) + { + throw new ArgumentNullException(nameof(linkedServiceName)); + } + + Type = "SalesforceServiceCloudObject"; + } + + /// Initializes a new instance of SalesforceServiceCloudObjectDataset. + /// Type of dataset. + /// Dataset description. + /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. + /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. + /// Linked service reference. + /// Parameters for dataset. + /// List of tags that can be used for describing the Dataset. + /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. + /// . + /// The Salesforce Service Cloud object API name. Type: string (or Expression with resultType string). + internal SalesforceServiceCloudObjectDataset(string type, string description, object structure, object schema, LinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary additionalProperties, object objectApiName) : base(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) + { + ObjectApiName = objectApiName; + Type = type ?? "SalesforceServiceCloudObject"; + } + + /// The Salesforce Service Cloud object API name. Type: string (or Expression with resultType string). + public object ObjectApiName { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SapBWLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SapBWLinkedService.Serialization.cs new file mode 100644 index 000000000000..babd21dc582b --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SapBWLinkedService.Serialization.cs @@ -0,0 +1,229 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class SapBWLinkedService : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (ConnectVia != null) + { + writer.WritePropertyName("connectVia"); + writer.WriteObjectValue(ConnectVia); + } + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + writer.WritePropertyName("server"); + writer.WriteObjectValue(Server); + writer.WritePropertyName("systemNumber"); + writer.WriteObjectValue(SystemNumber); + writer.WritePropertyName("clientId"); + writer.WriteObjectValue(ClientId); + if (UserName != null) + { + writer.WritePropertyName("userName"); + writer.WriteObjectValue(UserName); + } + if (Password != null) + { + writer.WritePropertyName("password"); + writer.WriteObjectValue(Password); + } + if (EncryptedCredential != null) + { + writer.WritePropertyName("encryptedCredential"); + writer.WriteObjectValue(EncryptedCredential); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static SapBWLinkedService DeserializeSapBWLinkedService(JsonElement element) + { + string type = default; + IntegrationRuntimeReference connectVia = default; + string description = default; + IDictionary parameters = default; + IList annotations = default; + object server = default; + object systemNumber = default; + object clientId = default; + object userName = default; + SecretBase password = default; + object encryptedCredential = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("connectVia")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("server")) + { + server = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("systemNumber")) + { + systemNumber = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("clientId")) + { + clientId = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("userName")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + userName = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("password")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + password = SecretBase.DeserializeSecretBase(property0.Value); + continue; + } + if (property0.NameEquals("encryptedCredential")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + encryptedCredential = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new SapBWLinkedService(type, connectVia, description, parameters, annotations, additionalProperties, server, systemNumber, clientId, userName, password, encryptedCredential); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SapBWLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SapBWLinkedService.cs new file mode 100644 index 000000000000..5e492db4b08e --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SapBWLinkedService.cs @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// SAP Business Warehouse Linked Service. + public partial class SapBWLinkedService : LinkedService + { + /// Initializes a new instance of SapBWLinkedService. + /// Host name of the SAP BW instance. Type: string (or Expression with resultType string). + /// System number of the BW system. (Usually a two-digit decimal number represented as a string.) Type: string (or Expression with resultType string). + /// Client ID of the client on the BW system. (Usually a three-digit decimal number represented as a string) Type: string (or Expression with resultType string). + public SapBWLinkedService(object server, object systemNumber, object clientId) + { + if (server == null) + { + throw new ArgumentNullException(nameof(server)); + } + if (systemNumber == null) + { + throw new ArgumentNullException(nameof(systemNumber)); + } + if (clientId == null) + { + throw new ArgumentNullException(nameof(clientId)); + } + + Server = server; + SystemNumber = systemNumber; + ClientId = clientId; + Type = "SapBW"; + } + + /// Initializes a new instance of SapBWLinkedService. + /// Type of linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for describing the linked service. + /// . + /// Host name of the SAP BW instance. Type: string (or Expression with resultType string). + /// System number of the BW system. (Usually a two-digit decimal number represented as a string.) Type: string (or Expression with resultType string). + /// Client ID of the client on the BW system. (Usually a three-digit decimal number represented as a string) Type: string (or Expression with resultType string). + /// Username to access the SAP BW server. Type: string (or Expression with resultType string). + /// Password to access the SAP BW server. + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + internal SapBWLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object server, object systemNumber, object clientId, object userName, SecretBase password, object encryptedCredential) : base(type, connectVia, description, parameters, annotations, additionalProperties) + { + Server = server; + SystemNumber = systemNumber; + ClientId = clientId; + UserName = userName; + Password = password; + EncryptedCredential = encryptedCredential; + Type = type ?? "SapBW"; + } + + /// Host name of the SAP BW instance. Type: string (or Expression with resultType string). + public object Server { get; set; } + /// System number of the BW system. (Usually a two-digit decimal number represented as a string.) Type: string (or Expression with resultType string). + public object SystemNumber { get; set; } + /// Client ID of the client on the BW system. (Usually a three-digit decimal number represented as a string) Type: string (or Expression with resultType string). + public object ClientId { get; set; } + /// Username to access the SAP BW server. Type: string (or Expression with resultType string). + public object UserName { get; set; } + /// Password to access the SAP BW server. + public SecretBase Password { get; set; } + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + public object EncryptedCredential { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SapBwCubeDataset.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SapBwCubeDataset.Serialization.cs new file mode 100644 index 000000000000..113b56bc5ca7 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SapBwCubeDataset.Serialization.cs @@ -0,0 +1,188 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class SapBwCubeDataset : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Structure != null) + { + writer.WritePropertyName("structure"); + writer.WriteObjectValue(Structure); + } + if (Schema != null) + { + writer.WritePropertyName("schema"); + writer.WriteObjectValue(Schema); + } + writer.WritePropertyName("linkedServiceName"); + writer.WriteObjectValue(LinkedServiceName); + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Folder != null) + { + writer.WritePropertyName("folder"); + writer.WriteObjectValue(Folder); + } + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static SapBwCubeDataset DeserializeSapBwCubeDataset(JsonElement element) + { + string type = default; + string description = default; + object structure = default; + object schema = default; + LinkedServiceReference linkedServiceName = default; + IDictionary parameters = default; + IList annotations = default; + DatasetFolder folder = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("structure")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + structure = property.Value.GetObject(); + continue; + } + if (property.NameEquals("schema")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + schema = property.Value.GetObject(); + continue; + } + if (property.NameEquals("linkedServiceName")) + { + linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("folder")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + folder = DatasetFolder.DeserializeDatasetFolder(property.Value); + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new SapBwCubeDataset(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SapBwCubeDataset.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SapBwCubeDataset.cs new file mode 100644 index 000000000000..d2308eca7ebc --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SapBwCubeDataset.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// The SAP BW cube dataset. + public partial class SapBwCubeDataset : Dataset + { + /// Initializes a new instance of SapBwCubeDataset. + /// Linked service reference. + public SapBwCubeDataset(LinkedServiceReference linkedServiceName) : base(linkedServiceName) + { + if (linkedServiceName == null) + { + throw new ArgumentNullException(nameof(linkedServiceName)); + } + + Type = "SapBwCube"; + } + + /// Initializes a new instance of SapBwCubeDataset. + /// Type of dataset. + /// Dataset description. + /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. + /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. + /// Linked service reference. + /// Parameters for dataset. + /// List of tags that can be used for describing the Dataset. + /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. + /// . + internal SapBwCubeDataset(string type, string description, object structure, object schema, LinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary additionalProperties) : base(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) + { + Type = type ?? "SapBwCube"; + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SapCloudForCustomerLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SapCloudForCustomerLinkedService.Serialization.cs new file mode 100644 index 000000000000..fff67329b7ac --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SapCloudForCustomerLinkedService.Serialization.cs @@ -0,0 +1,213 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class SapCloudForCustomerLinkedService : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (ConnectVia != null) + { + writer.WritePropertyName("connectVia"); + writer.WriteObjectValue(ConnectVia); + } + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + writer.WritePropertyName("url"); + writer.WriteObjectValue(Url); + if (Username != null) + { + writer.WritePropertyName("username"); + writer.WriteObjectValue(Username); + } + if (Password != null) + { + writer.WritePropertyName("password"); + writer.WriteObjectValue(Password); + } + if (EncryptedCredential != null) + { + writer.WritePropertyName("encryptedCredential"); + writer.WriteObjectValue(EncryptedCredential); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static SapCloudForCustomerLinkedService DeserializeSapCloudForCustomerLinkedService(JsonElement element) + { + string type = default; + IntegrationRuntimeReference connectVia = default; + string description = default; + IDictionary parameters = default; + IList annotations = default; + object url = default; + object username = default; + SecretBase password = default; + object encryptedCredential = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("connectVia")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("url")) + { + url = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("username")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + username = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("password")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + password = SecretBase.DeserializeSecretBase(property0.Value); + continue; + } + if (property0.NameEquals("encryptedCredential")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + encryptedCredential = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new SapCloudForCustomerLinkedService(type, connectVia, description, parameters, annotations, additionalProperties, url, username, password, encryptedCredential); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SapCloudForCustomerLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SapCloudForCustomerLinkedService.cs new file mode 100644 index 000000000000..d5b6fc4fce2b --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SapCloudForCustomerLinkedService.cs @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Linked service for SAP Cloud for Customer. + public partial class SapCloudForCustomerLinkedService : LinkedService + { + /// Initializes a new instance of SapCloudForCustomerLinkedService. + /// The URL of SAP Cloud for Customer OData API. For example, '[https://[tenantname].crm.ondemand.com/sap/c4c/odata/v1]'. Type: string (or Expression with resultType string). + public SapCloudForCustomerLinkedService(object url) + { + if (url == null) + { + throw new ArgumentNullException(nameof(url)); + } + + Url = url; + Type = "SapCloudForCustomer"; + } + + /// Initializes a new instance of SapCloudForCustomerLinkedService. + /// Type of linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for describing the linked service. + /// . + /// The URL of SAP Cloud for Customer OData API. For example, '[https://[tenantname].crm.ondemand.com/sap/c4c/odata/v1]'. Type: string (or Expression with resultType string). + /// The username for Basic authentication. Type: string (or Expression with resultType string). + /// The password for Basic authentication. + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Either encryptedCredential or username/password must be provided. Type: string (or Expression with resultType string). + internal SapCloudForCustomerLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object url, object username, SecretBase password, object encryptedCredential) : base(type, connectVia, description, parameters, annotations, additionalProperties) + { + Url = url; + Username = username; + Password = password; + EncryptedCredential = encryptedCredential; + Type = type ?? "SapCloudForCustomer"; + } + + /// The URL of SAP Cloud for Customer OData API. For example, '[https://[tenantname].crm.ondemand.com/sap/c4c/odata/v1]'. Type: string (or Expression with resultType string). + public object Url { get; set; } + /// The username for Basic authentication. Type: string (or Expression with resultType string). + public object Username { get; set; } + /// The password for Basic authentication. + public SecretBase Password { get; set; } + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Either encryptedCredential or username/password must be provided. Type: string (or Expression with resultType string). + public object EncryptedCredential { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SapCloudForCustomerResourceDataset.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SapCloudForCustomerResourceDataset.Serialization.cs new file mode 100644 index 000000000000..d7527684e05c --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SapCloudForCustomerResourceDataset.Serialization.cs @@ -0,0 +1,206 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class SapCloudForCustomerResourceDataset : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Structure != null) + { + writer.WritePropertyName("structure"); + writer.WriteObjectValue(Structure); + } + if (Schema != null) + { + writer.WritePropertyName("schema"); + writer.WriteObjectValue(Schema); + } + writer.WritePropertyName("linkedServiceName"); + writer.WriteObjectValue(LinkedServiceName); + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Folder != null) + { + writer.WritePropertyName("folder"); + writer.WriteObjectValue(Folder); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + writer.WritePropertyName("path"); + writer.WriteObjectValue(Path); + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static SapCloudForCustomerResourceDataset DeserializeSapCloudForCustomerResourceDataset(JsonElement element) + { + string type = default; + string description = default; + object structure = default; + object schema = default; + LinkedServiceReference linkedServiceName = default; + IDictionary parameters = default; + IList annotations = default; + DatasetFolder folder = default; + object path = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("structure")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + structure = property.Value.GetObject(); + continue; + } + if (property.NameEquals("schema")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + schema = property.Value.GetObject(); + continue; + } + if (property.NameEquals("linkedServiceName")) + { + linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("folder")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + folder = DatasetFolder.DeserializeDatasetFolder(property.Value); + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("path")) + { + path = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new SapCloudForCustomerResourceDataset(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties, path); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SapCloudForCustomerResourceDataset.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SapCloudForCustomerResourceDataset.cs new file mode 100644 index 000000000000..dfcc3849dc32 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SapCloudForCustomerResourceDataset.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// The path of the SAP Cloud for Customer OData entity. + public partial class SapCloudForCustomerResourceDataset : Dataset + { + /// Initializes a new instance of SapCloudForCustomerResourceDataset. + /// Linked service reference. + /// The path of the SAP Cloud for Customer OData entity. Type: string (or Expression with resultType string). + public SapCloudForCustomerResourceDataset(LinkedServiceReference linkedServiceName, object path) : base(linkedServiceName) + { + if (linkedServiceName == null) + { + throw new ArgumentNullException(nameof(linkedServiceName)); + } + if (path == null) + { + throw new ArgumentNullException(nameof(path)); + } + + Path = path; + Type = "SapCloudForCustomerResource"; + } + + /// Initializes a new instance of SapCloudForCustomerResourceDataset. + /// Type of dataset. + /// Dataset description. + /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. + /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. + /// Linked service reference. + /// Parameters for dataset. + /// List of tags that can be used for describing the Dataset. + /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. + /// . + /// The path of the SAP Cloud for Customer OData entity. Type: string (or Expression with resultType string). + internal SapCloudForCustomerResourceDataset(string type, string description, object structure, object schema, LinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary additionalProperties, object path) : base(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) + { + Path = path; + Type = type ?? "SapCloudForCustomerResource"; + } + + /// The path of the SAP Cloud for Customer OData entity. Type: string (or Expression with resultType string). + public object Path { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SapEccLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SapEccLinkedService.Serialization.cs new file mode 100644 index 000000000000..0cc60a7e0f7e --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SapEccLinkedService.Serialization.cs @@ -0,0 +1,213 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class SapEccLinkedService : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (ConnectVia != null) + { + writer.WritePropertyName("connectVia"); + writer.WriteObjectValue(ConnectVia); + } + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + writer.WritePropertyName("url"); + writer.WriteStringValue(Url); + if (Username != null) + { + writer.WritePropertyName("username"); + writer.WriteStringValue(Username); + } + if (Password != null) + { + writer.WritePropertyName("password"); + writer.WriteObjectValue(Password); + } + if (EncryptedCredential != null) + { + writer.WritePropertyName("encryptedCredential"); + writer.WriteStringValue(EncryptedCredential); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static SapEccLinkedService DeserializeSapEccLinkedService(JsonElement element) + { + string type = default; + IntegrationRuntimeReference connectVia = default; + string description = default; + IDictionary parameters = default; + IList annotations = default; + string url = default; + string username = default; + SecretBase password = default; + string encryptedCredential = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("connectVia")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("url")) + { + url = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("username")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + username = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("password")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + password = SecretBase.DeserializeSecretBase(property0.Value); + continue; + } + if (property0.NameEquals("encryptedCredential")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + encryptedCredential = property0.Value.GetString(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new SapEccLinkedService(type, connectVia, description, parameters, annotations, additionalProperties, url, username, password, encryptedCredential); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SapEccLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SapEccLinkedService.cs new file mode 100644 index 000000000000..7f6a3a6e9c10 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SapEccLinkedService.cs @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Linked service for SAP ERP Central Component(SAP ECC). + public partial class SapEccLinkedService : LinkedService + { + /// Initializes a new instance of SapEccLinkedService. + /// The URL of SAP ECC OData API. For example, '[https://hostname:port/sap/opu/odata/sap/servicename/]'. Type: string (or Expression with resultType string). + public SapEccLinkedService(string url) + { + if (url == null) + { + throw new ArgumentNullException(nameof(url)); + } + + Url = url; + Type = "SapEcc"; + } + + /// Initializes a new instance of SapEccLinkedService. + /// Type of linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for describing the linked service. + /// . + /// The URL of SAP ECC OData API. For example, '[https://hostname:port/sap/opu/odata/sap/servicename/]'. Type: string (or Expression with resultType string). + /// The username for Basic authentication. Type: string (or Expression with resultType string). + /// The password for Basic authentication. + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Either encryptedCredential or username/password must be provided. Type: string (or Expression with resultType string). + internal SapEccLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, string url, string username, SecretBase password, string encryptedCredential) : base(type, connectVia, description, parameters, annotations, additionalProperties) + { + Url = url; + Username = username; + Password = password; + EncryptedCredential = encryptedCredential; + Type = type ?? "SapEcc"; + } + + /// The URL of SAP ECC OData API. For example, '[https://hostname:port/sap/opu/odata/sap/servicename/]'. Type: string (or Expression with resultType string). + public string Url { get; set; } + /// The username for Basic authentication. Type: string (or Expression with resultType string). + public string Username { get; set; } + /// The password for Basic authentication. + public SecretBase Password { get; set; } + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Either encryptedCredential or username/password must be provided. Type: string (or Expression with resultType string). + public string EncryptedCredential { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SapEccResourceDataset.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SapEccResourceDataset.Serialization.cs new file mode 100644 index 000000000000..87b5a55822a7 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SapEccResourceDataset.Serialization.cs @@ -0,0 +1,206 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class SapEccResourceDataset : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Structure != null) + { + writer.WritePropertyName("structure"); + writer.WriteObjectValue(Structure); + } + if (Schema != null) + { + writer.WritePropertyName("schema"); + writer.WriteObjectValue(Schema); + } + writer.WritePropertyName("linkedServiceName"); + writer.WriteObjectValue(LinkedServiceName); + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Folder != null) + { + writer.WritePropertyName("folder"); + writer.WriteObjectValue(Folder); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + writer.WritePropertyName("path"); + writer.WriteObjectValue(Path); + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static SapEccResourceDataset DeserializeSapEccResourceDataset(JsonElement element) + { + string type = default; + string description = default; + object structure = default; + object schema = default; + LinkedServiceReference linkedServiceName = default; + IDictionary parameters = default; + IList annotations = default; + DatasetFolder folder = default; + object path = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("structure")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + structure = property.Value.GetObject(); + continue; + } + if (property.NameEquals("schema")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + schema = property.Value.GetObject(); + continue; + } + if (property.NameEquals("linkedServiceName")) + { + linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("folder")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + folder = DatasetFolder.DeserializeDatasetFolder(property.Value); + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("path")) + { + path = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new SapEccResourceDataset(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties, path); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SapEccResourceDataset.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SapEccResourceDataset.cs new file mode 100644 index 000000000000..f247722f6bb6 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SapEccResourceDataset.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// The path of the SAP ECC OData entity. + public partial class SapEccResourceDataset : Dataset + { + /// Initializes a new instance of SapEccResourceDataset. + /// Linked service reference. + /// The path of the SAP ECC OData entity. Type: string (or Expression with resultType string). + public SapEccResourceDataset(LinkedServiceReference linkedServiceName, object path) : base(linkedServiceName) + { + if (linkedServiceName == null) + { + throw new ArgumentNullException(nameof(linkedServiceName)); + } + if (path == null) + { + throw new ArgumentNullException(nameof(path)); + } + + Path = path; + Type = "SapEccResource"; + } + + /// Initializes a new instance of SapEccResourceDataset. + /// Type of dataset. + /// Dataset description. + /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. + /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. + /// Linked service reference. + /// Parameters for dataset. + /// List of tags that can be used for describing the Dataset. + /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. + /// . + /// The path of the SAP ECC OData entity. Type: string (or Expression with resultType string). + internal SapEccResourceDataset(string type, string description, object structure, object schema, LinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary additionalProperties, object path) : base(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) + { + Path = path; + Type = type ?? "SapEccResource"; + } + + /// The path of the SAP ECC OData entity. Type: string (or Expression with resultType string). + public object Path { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SapHanaAuthenticationType.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SapHanaAuthenticationType.cs new file mode 100644 index 000000000000..faadec9640a4 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SapHanaAuthenticationType.cs @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// The authentication type to be used to connect to the SAP HANA server. + public readonly partial struct SapHanaAuthenticationType : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + public SapHanaAuthenticationType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string BasicValue = "Basic"; + private const string WindowsValue = "Windows"; + + /// Basic. + public static SapHanaAuthenticationType Basic { get; } = new SapHanaAuthenticationType(BasicValue); + /// Windows. + public static SapHanaAuthenticationType Windows { get; } = new SapHanaAuthenticationType(WindowsValue); + /// Determines if two values are the same. + public static bool operator ==(SapHanaAuthenticationType left, SapHanaAuthenticationType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SapHanaAuthenticationType left, SapHanaAuthenticationType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator SapHanaAuthenticationType(string value) => new SapHanaAuthenticationType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SapHanaAuthenticationType other && Equals(other); + /// + public bool Equals(SapHanaAuthenticationType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SapHanaLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SapHanaLinkedService.Serialization.cs new file mode 100644 index 000000000000..391eca405af4 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SapHanaLinkedService.Serialization.cs @@ -0,0 +1,243 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class SapHanaLinkedService : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (ConnectVia != null) + { + writer.WritePropertyName("connectVia"); + writer.WriteObjectValue(ConnectVia); + } + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + if (ConnectionString != null) + { + writer.WritePropertyName("connectionString"); + writer.WriteObjectValue(ConnectionString); + } + writer.WritePropertyName("server"); + writer.WriteObjectValue(Server); + if (AuthenticationType != null) + { + writer.WritePropertyName("authenticationType"); + writer.WriteStringValue(AuthenticationType.Value.ToString()); + } + if (UserName != null) + { + writer.WritePropertyName("userName"); + writer.WriteObjectValue(UserName); + } + if (Password != null) + { + writer.WritePropertyName("password"); + writer.WriteObjectValue(Password); + } + if (EncryptedCredential != null) + { + writer.WritePropertyName("encryptedCredential"); + writer.WriteObjectValue(EncryptedCredential); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static SapHanaLinkedService DeserializeSapHanaLinkedService(JsonElement element) + { + string type = default; + IntegrationRuntimeReference connectVia = default; + string description = default; + IDictionary parameters = default; + IList annotations = default; + object connectionString = default; + object server = default; + SapHanaAuthenticationType? authenticationType = default; + object userName = default; + SecretBase password = default; + object encryptedCredential = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("connectVia")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("connectionString")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectionString = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("server")) + { + server = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("authenticationType")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + authenticationType = new SapHanaAuthenticationType(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("userName")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + userName = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("password")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + password = SecretBase.DeserializeSecretBase(property0.Value); + continue; + } + if (property0.NameEquals("encryptedCredential")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + encryptedCredential = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new SapHanaLinkedService(type, connectVia, description, parameters, annotations, additionalProperties, connectionString, server, authenticationType, userName, password, encryptedCredential); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SapHanaLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SapHanaLinkedService.cs new file mode 100644 index 000000000000..f2f48cd7aa5d --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SapHanaLinkedService.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// SAP HANA Linked Service. + public partial class SapHanaLinkedService : LinkedService + { + /// Initializes a new instance of SapHanaLinkedService. + /// Host name of the SAP HANA server. Type: string (or Expression with resultType string). + public SapHanaLinkedService(object server) + { + if (server == null) + { + throw new ArgumentNullException(nameof(server)); + } + + Server = server; + Type = "SapHana"; + } + + /// Initializes a new instance of SapHanaLinkedService. + /// Type of linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for describing the linked service. + /// . + /// SAP HANA ODBC connection string. Type: string, SecureString or AzureKeyVaultSecretReference. + /// Host name of the SAP HANA server. Type: string (or Expression with resultType string). + /// The authentication type to be used to connect to the SAP HANA server. + /// Username to access the SAP HANA server. Type: string (or Expression with resultType string). + /// Password to access the SAP HANA server. + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + internal SapHanaLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object connectionString, object server, SapHanaAuthenticationType? authenticationType, object userName, SecretBase password, object encryptedCredential) : base(type, connectVia, description, parameters, annotations, additionalProperties) + { + ConnectionString = connectionString; + Server = server; + AuthenticationType = authenticationType; + UserName = userName; + Password = password; + EncryptedCredential = encryptedCredential; + Type = type ?? "SapHana"; + } + + /// SAP HANA ODBC connection string. Type: string, SecureString or AzureKeyVaultSecretReference. + public object ConnectionString { get; set; } + /// Host name of the SAP HANA server. Type: string (or Expression with resultType string). + public object Server { get; set; } + /// The authentication type to be used to connect to the SAP HANA server. + public SapHanaAuthenticationType? AuthenticationType { get; set; } + /// Username to access the SAP HANA server. Type: string (or Expression with resultType string). + public object UserName { get; set; } + /// Password to access the SAP HANA server. + public SecretBase Password { get; set; } + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + public object EncryptedCredential { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SapHanaTableDataset.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SapHanaTableDataset.Serialization.cs new file mode 100644 index 000000000000..36f70b33249a --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SapHanaTableDataset.Serialization.cs @@ -0,0 +1,228 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class SapHanaTableDataset : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Structure != null) + { + writer.WritePropertyName("structure"); + writer.WriteObjectValue(Structure); + } + if (Schema != null) + { + writer.WritePropertyName("schema"); + writer.WriteObjectValue(Schema); + } + writer.WritePropertyName("linkedServiceName"); + writer.WriteObjectValue(LinkedServiceName); + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Folder != null) + { + writer.WritePropertyName("folder"); + writer.WriteObjectValue(Folder); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + if (SchemaTypePropertiesSchema != null) + { + writer.WritePropertyName("schema"); + writer.WriteObjectValue(SchemaTypePropertiesSchema); + } + if (Table != null) + { + writer.WritePropertyName("table"); + writer.WriteObjectValue(Table); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static SapHanaTableDataset DeserializeSapHanaTableDataset(JsonElement element) + { + string type = default; + string description = default; + object structure = default; + object schema = default; + LinkedServiceReference linkedServiceName = default; + IDictionary parameters = default; + IList annotations = default; + DatasetFolder folder = default; + object schema0 = default; + object table = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("structure")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + structure = property.Value.GetObject(); + continue; + } + if (property.NameEquals("schema")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + schema = property.Value.GetObject(); + continue; + } + if (property.NameEquals("linkedServiceName")) + { + linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("folder")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + folder = DatasetFolder.DeserializeDatasetFolder(property.Value); + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("schema")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + schema0 = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("table")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + table = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new SapHanaTableDataset(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties, schema0, table); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SapHanaTableDataset.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SapHanaTableDataset.cs new file mode 100644 index 000000000000..31006e2f7689 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SapHanaTableDataset.cs @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// SAP HANA Table properties. + public partial class SapHanaTableDataset : Dataset + { + /// Initializes a new instance of SapHanaTableDataset. + /// Linked service reference. + public SapHanaTableDataset(LinkedServiceReference linkedServiceName) : base(linkedServiceName) + { + if (linkedServiceName == null) + { + throw new ArgumentNullException(nameof(linkedServiceName)); + } + + Type = "SapHanaTable"; + } + + /// Initializes a new instance of SapHanaTableDataset. + /// Type of dataset. + /// Dataset description. + /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. + /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. + /// Linked service reference. + /// Parameters for dataset. + /// List of tags that can be used for describing the Dataset. + /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. + /// . + /// The schema name of SAP HANA. Type: string (or Expression with resultType string). + /// The table name of SAP HANA. Type: string (or Expression with resultType string). + internal SapHanaTableDataset(string type, string description, object structure, object schema, LinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary additionalProperties, object schemaTypePropertiesSchema, object table) : base(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) + { + SchemaTypePropertiesSchema = schemaTypePropertiesSchema; + Table = table; + Type = type ?? "SapHanaTable"; + } + + /// The schema name of SAP HANA. Type: string (or Expression with resultType string). + public object SchemaTypePropertiesSchema { get; set; } + /// The table name of SAP HANA. Type: string (or Expression with resultType string). + public object Table { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SapOpenHubLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SapOpenHubLinkedService.Serialization.cs new file mode 100644 index 000000000000..9381b49e4fd4 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SapOpenHubLinkedService.Serialization.cs @@ -0,0 +1,244 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class SapOpenHubLinkedService : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (ConnectVia != null) + { + writer.WritePropertyName("connectVia"); + writer.WriteObjectValue(ConnectVia); + } + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + writer.WritePropertyName("server"); + writer.WriteObjectValue(Server); + writer.WritePropertyName("systemNumber"); + writer.WriteObjectValue(SystemNumber); + writer.WritePropertyName("clientId"); + writer.WriteObjectValue(ClientId); + if (Language != null) + { + writer.WritePropertyName("language"); + writer.WriteObjectValue(Language); + } + if (UserName != null) + { + writer.WritePropertyName("userName"); + writer.WriteObjectValue(UserName); + } + if (Password != null) + { + writer.WritePropertyName("password"); + writer.WriteObjectValue(Password); + } + if (EncryptedCredential != null) + { + writer.WritePropertyName("encryptedCredential"); + writer.WriteObjectValue(EncryptedCredential); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static SapOpenHubLinkedService DeserializeSapOpenHubLinkedService(JsonElement element) + { + string type = default; + IntegrationRuntimeReference connectVia = default; + string description = default; + IDictionary parameters = default; + IList annotations = default; + object server = default; + object systemNumber = default; + object clientId = default; + object language = default; + object userName = default; + SecretBase password = default; + object encryptedCredential = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("connectVia")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("server")) + { + server = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("systemNumber")) + { + systemNumber = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("clientId")) + { + clientId = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("language")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + language = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("userName")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + userName = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("password")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + password = SecretBase.DeserializeSecretBase(property0.Value); + continue; + } + if (property0.NameEquals("encryptedCredential")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + encryptedCredential = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new SapOpenHubLinkedService(type, connectVia, description, parameters, annotations, additionalProperties, server, systemNumber, clientId, language, userName, password, encryptedCredential); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SapOpenHubLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SapOpenHubLinkedService.cs new file mode 100644 index 000000000000..3bc446d24752 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SapOpenHubLinkedService.cs @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// SAP Business Warehouse Open Hub Destination Linked Service. + public partial class SapOpenHubLinkedService : LinkedService + { + /// Initializes a new instance of SapOpenHubLinkedService. + /// Host name of the SAP BW instance where the open hub destination is located. Type: string (or Expression with resultType string). + /// System number of the BW system where the open hub destination is located. (Usually a two-digit decimal number represented as a string.) Type: string (or Expression with resultType string). + /// Client ID of the client on the BW system where the open hub destination is located. (Usually a three-digit decimal number represented as a string) Type: string (or Expression with resultType string). + public SapOpenHubLinkedService(object server, object systemNumber, object clientId) + { + if (server == null) + { + throw new ArgumentNullException(nameof(server)); + } + if (systemNumber == null) + { + throw new ArgumentNullException(nameof(systemNumber)); + } + if (clientId == null) + { + throw new ArgumentNullException(nameof(clientId)); + } + + Server = server; + SystemNumber = systemNumber; + ClientId = clientId; + Type = "SapOpenHub"; + } + + /// Initializes a new instance of SapOpenHubLinkedService. + /// Type of linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for describing the linked service. + /// . + /// Host name of the SAP BW instance where the open hub destination is located. Type: string (or Expression with resultType string). + /// System number of the BW system where the open hub destination is located. (Usually a two-digit decimal number represented as a string.) Type: string (or Expression with resultType string). + /// Client ID of the client on the BW system where the open hub destination is located. (Usually a three-digit decimal number represented as a string) Type: string (or Expression with resultType string). + /// Language of the BW system where the open hub destination is located. The default value is EN. Type: string (or Expression with resultType string). + /// Username to access the SAP BW server where the open hub destination is located. Type: string (or Expression with resultType string). + /// Password to access the SAP BW server where the open hub destination is located. + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + internal SapOpenHubLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object server, object systemNumber, object clientId, object language, object userName, SecretBase password, object encryptedCredential) : base(type, connectVia, description, parameters, annotations, additionalProperties) + { + Server = server; + SystemNumber = systemNumber; + ClientId = clientId; + Language = language; + UserName = userName; + Password = password; + EncryptedCredential = encryptedCredential; + Type = type ?? "SapOpenHub"; + } + + /// Host name of the SAP BW instance where the open hub destination is located. Type: string (or Expression with resultType string). + public object Server { get; set; } + /// System number of the BW system where the open hub destination is located. (Usually a two-digit decimal number represented as a string.) Type: string (or Expression with resultType string). + public object SystemNumber { get; set; } + /// Client ID of the client on the BW system where the open hub destination is located. (Usually a three-digit decimal number represented as a string) Type: string (or Expression with resultType string). + public object ClientId { get; set; } + /// Language of the BW system where the open hub destination is located. The default value is EN. Type: string (or Expression with resultType string). + public object Language { get; set; } + /// Username to access the SAP BW server where the open hub destination is located. Type: string (or Expression with resultType string). + public object UserName { get; set; } + /// Password to access the SAP BW server where the open hub destination is located. + public SecretBase Password { get; set; } + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + public object EncryptedCredential { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SapOpenHubTableDataset.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SapOpenHubTableDataset.Serialization.cs new file mode 100644 index 000000000000..9d05ac79cc73 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SapOpenHubTableDataset.Serialization.cs @@ -0,0 +1,236 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class SapOpenHubTableDataset : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Structure != null) + { + writer.WritePropertyName("structure"); + writer.WriteObjectValue(Structure); + } + if (Schema != null) + { + writer.WritePropertyName("schema"); + writer.WriteObjectValue(Schema); + } + writer.WritePropertyName("linkedServiceName"); + writer.WriteObjectValue(LinkedServiceName); + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Folder != null) + { + writer.WritePropertyName("folder"); + writer.WriteObjectValue(Folder); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + writer.WritePropertyName("openHubDestinationName"); + writer.WriteObjectValue(OpenHubDestinationName); + if (ExcludeLastRequest != null) + { + writer.WritePropertyName("excludeLastRequest"); + writer.WriteObjectValue(ExcludeLastRequest); + } + if (BaseRequestId != null) + { + writer.WritePropertyName("baseRequestId"); + writer.WriteObjectValue(BaseRequestId); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static SapOpenHubTableDataset DeserializeSapOpenHubTableDataset(JsonElement element) + { + string type = default; + string description = default; + object structure = default; + object schema = default; + LinkedServiceReference linkedServiceName = default; + IDictionary parameters = default; + IList annotations = default; + DatasetFolder folder = default; + object openHubDestinationName = default; + object excludeLastRequest = default; + object baseRequestId = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("structure")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + structure = property.Value.GetObject(); + continue; + } + if (property.NameEquals("schema")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + schema = property.Value.GetObject(); + continue; + } + if (property.NameEquals("linkedServiceName")) + { + linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("folder")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + folder = DatasetFolder.DeserializeDatasetFolder(property.Value); + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("openHubDestinationName")) + { + openHubDestinationName = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("excludeLastRequest")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + excludeLastRequest = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("baseRequestId")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + baseRequestId = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new SapOpenHubTableDataset(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties, openHubDestinationName, excludeLastRequest, baseRequestId); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SapOpenHubTableDataset.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SapOpenHubTableDataset.cs new file mode 100644 index 000000000000..6842cb83277a --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SapOpenHubTableDataset.cs @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Sap Business Warehouse Open Hub Destination Table properties. + public partial class SapOpenHubTableDataset : Dataset + { + /// Initializes a new instance of SapOpenHubTableDataset. + /// Linked service reference. + /// The name of the Open Hub Destination with destination type as Database Table. Type: string (or Expression with resultType string). + public SapOpenHubTableDataset(LinkedServiceReference linkedServiceName, object openHubDestinationName) : base(linkedServiceName) + { + if (linkedServiceName == null) + { + throw new ArgumentNullException(nameof(linkedServiceName)); + } + if (openHubDestinationName == null) + { + throw new ArgumentNullException(nameof(openHubDestinationName)); + } + + OpenHubDestinationName = openHubDestinationName; + Type = "SapOpenHubTable"; + } + + /// Initializes a new instance of SapOpenHubTableDataset. + /// Type of dataset. + /// Dataset description. + /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. + /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. + /// Linked service reference. + /// Parameters for dataset. + /// List of tags that can be used for describing the Dataset. + /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. + /// . + /// The name of the Open Hub Destination with destination type as Database Table. Type: string (or Expression with resultType string). + /// Whether to exclude the records of the last request. The default value is true. Type: boolean (or Expression with resultType boolean). + /// The ID of request for delta loading. Once it is set, only data with requestId larger than the value of this property will be retrieved. The default value is 0. Type: integer (or Expression with resultType integer ). + internal SapOpenHubTableDataset(string type, string description, object structure, object schema, LinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary additionalProperties, object openHubDestinationName, object excludeLastRequest, object baseRequestId) : base(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) + { + OpenHubDestinationName = openHubDestinationName; + ExcludeLastRequest = excludeLastRequest; + BaseRequestId = baseRequestId; + Type = type ?? "SapOpenHubTable"; + } + + /// The name of the Open Hub Destination with destination type as Database Table. Type: string (or Expression with resultType string). + public object OpenHubDestinationName { get; set; } + /// Whether to exclude the records of the last request. The default value is true. Type: boolean (or Expression with resultType boolean). + public object ExcludeLastRequest { get; set; } + /// The ID of request for delta loading. Once it is set, only data with requestId larger than the value of this property will be retrieved. The default value is 0. Type: integer (or Expression with resultType integer ). + public object BaseRequestId { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SapTableLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SapTableLinkedService.Serialization.cs new file mode 100644 index 000000000000..38e586f7c1a7 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SapTableLinkedService.Serialization.cs @@ -0,0 +1,400 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class SapTableLinkedService : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (ConnectVia != null) + { + writer.WritePropertyName("connectVia"); + writer.WriteObjectValue(ConnectVia); + } + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + if (Server != null) + { + writer.WritePropertyName("server"); + writer.WriteObjectValue(Server); + } + if (SystemNumber != null) + { + writer.WritePropertyName("systemNumber"); + writer.WriteObjectValue(SystemNumber); + } + if (ClientId != null) + { + writer.WritePropertyName("clientId"); + writer.WriteObjectValue(ClientId); + } + if (Language != null) + { + writer.WritePropertyName("language"); + writer.WriteObjectValue(Language); + } + if (SystemId != null) + { + writer.WritePropertyName("systemId"); + writer.WriteObjectValue(SystemId); + } + if (UserName != null) + { + writer.WritePropertyName("userName"); + writer.WriteObjectValue(UserName); + } + if (Password != null) + { + writer.WritePropertyName("password"); + writer.WriteObjectValue(Password); + } + if (MessageServer != null) + { + writer.WritePropertyName("messageServer"); + writer.WriteObjectValue(MessageServer); + } + if (MessageServerService != null) + { + writer.WritePropertyName("messageServerService"); + writer.WriteObjectValue(MessageServerService); + } + if (SncMode != null) + { + writer.WritePropertyName("sncMode"); + writer.WriteObjectValue(SncMode); + } + if (SncMyName != null) + { + writer.WritePropertyName("sncMyName"); + writer.WriteObjectValue(SncMyName); + } + if (SncPartnerName != null) + { + writer.WritePropertyName("sncPartnerName"); + writer.WriteObjectValue(SncPartnerName); + } + if (SncLibraryPath != null) + { + writer.WritePropertyName("sncLibraryPath"); + writer.WriteObjectValue(SncLibraryPath); + } + if (SncQop != null) + { + writer.WritePropertyName("sncQop"); + writer.WriteObjectValue(SncQop); + } + if (LogonGroup != null) + { + writer.WritePropertyName("logonGroup"); + writer.WriteObjectValue(LogonGroup); + } + if (EncryptedCredential != null) + { + writer.WritePropertyName("encryptedCredential"); + writer.WriteObjectValue(EncryptedCredential); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static SapTableLinkedService DeserializeSapTableLinkedService(JsonElement element) + { + string type = default; + IntegrationRuntimeReference connectVia = default; + string description = default; + IDictionary parameters = default; + IList annotations = default; + object server = default; + object systemNumber = default; + object clientId = default; + object language = default; + object systemId = default; + object userName = default; + SecretBase password = default; + object messageServer = default; + object messageServerService = default; + object sncMode = default; + object sncMyName = default; + object sncPartnerName = default; + object sncLibraryPath = default; + object sncQop = default; + object logonGroup = default; + object encryptedCredential = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("connectVia")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("server")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + server = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("systemNumber")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemNumber = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("clientId")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + clientId = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("language")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + language = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("systemId")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemId = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("userName")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + userName = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("password")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + password = SecretBase.DeserializeSecretBase(property0.Value); + continue; + } + if (property0.NameEquals("messageServer")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + messageServer = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("messageServerService")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + messageServerService = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("sncMode")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sncMode = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("sncMyName")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sncMyName = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("sncPartnerName")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sncPartnerName = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("sncLibraryPath")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sncLibraryPath = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("sncQop")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sncQop = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("logonGroup")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + logonGroup = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("encryptedCredential")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + encryptedCredential = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new SapTableLinkedService(type, connectVia, description, parameters, annotations, additionalProperties, server, systemNumber, clientId, language, systemId, userName, password, messageServer, messageServerService, sncMode, sncMyName, sncPartnerName, sncLibraryPath, sncQop, logonGroup, encryptedCredential); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SapTableLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SapTableLinkedService.cs new file mode 100644 index 000000000000..0f6b0cfba9b3 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SapTableLinkedService.cs @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// SAP Table Linked Service. + public partial class SapTableLinkedService : LinkedService + { + /// Initializes a new instance of SapTableLinkedService. + public SapTableLinkedService() + { + Type = "SapTable"; + } + + /// Initializes a new instance of SapTableLinkedService. + /// Type of linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for describing the linked service. + /// . + /// Host name of the SAP instance where the table is located. Type: string (or Expression with resultType string). + /// System number of the SAP system where the table is located. (Usually a two-digit decimal number represented as a string.) Type: string (or Expression with resultType string). + /// Client ID of the client on the SAP system where the table is located. (Usually a three-digit decimal number represented as a string) Type: string (or Expression with resultType string). + /// Language of the SAP system where the table is located. The default value is EN. Type: string (or Expression with resultType string). + /// SystemID of the SAP system where the table is located. Type: string (or Expression with resultType string). + /// Username to access the SAP server where the table is located. Type: string (or Expression with resultType string). + /// Password to access the SAP server where the table is located. + /// The hostname of the SAP Message Server. Type: string (or Expression with resultType string). + /// The service name or port number of the Message Server. Type: string (or Expression with resultType string). + /// SNC activation indicator to access the SAP server where the table is located. Must be either 0 (off) or 1 (on). Type: string (or Expression with resultType string). + /// Initiator's SNC name to access the SAP server where the table is located. Type: string (or Expression with resultType string). + /// Communication partner's SNC name to access the SAP server where the table is located. Type: string (or Expression with resultType string). + /// External security product's library to access the SAP server where the table is located. Type: string (or Expression with resultType string). + /// SNC Quality of Protection. Allowed value include: 1, 2, 3, 8, 9. Type: string (or Expression with resultType string). + /// The Logon Group for the SAP System. Type: string (or Expression with resultType string). + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + internal SapTableLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object server, object systemNumber, object clientId, object language, object systemId, object userName, SecretBase password, object messageServer, object messageServerService, object sncMode, object sncMyName, object sncPartnerName, object sncLibraryPath, object sncQop, object logonGroup, object encryptedCredential) : base(type, connectVia, description, parameters, annotations, additionalProperties) + { + Server = server; + SystemNumber = systemNumber; + ClientId = clientId; + Language = language; + SystemId = systemId; + UserName = userName; + Password = password; + MessageServer = messageServer; + MessageServerService = messageServerService; + SncMode = sncMode; + SncMyName = sncMyName; + SncPartnerName = sncPartnerName; + SncLibraryPath = sncLibraryPath; + SncQop = sncQop; + LogonGroup = logonGroup; + EncryptedCredential = encryptedCredential; + Type = type ?? "SapTable"; + } + + /// Host name of the SAP instance where the table is located. Type: string (or Expression with resultType string). + public object Server { get; set; } + /// System number of the SAP system where the table is located. (Usually a two-digit decimal number represented as a string.) Type: string (or Expression with resultType string). + public object SystemNumber { get; set; } + /// Client ID of the client on the SAP system where the table is located. (Usually a three-digit decimal number represented as a string) Type: string (or Expression with resultType string). + public object ClientId { get; set; } + /// Language of the SAP system where the table is located. The default value is EN. Type: string (or Expression with resultType string). + public object Language { get; set; } + /// SystemID of the SAP system where the table is located. Type: string (or Expression with resultType string). + public object SystemId { get; set; } + /// Username to access the SAP server where the table is located. Type: string (or Expression with resultType string). + public object UserName { get; set; } + /// Password to access the SAP server where the table is located. + public SecretBase Password { get; set; } + /// The hostname of the SAP Message Server. Type: string (or Expression with resultType string). + public object MessageServer { get; set; } + /// The service name or port number of the Message Server. Type: string (or Expression with resultType string). + public object MessageServerService { get; set; } + /// SNC activation indicator to access the SAP server where the table is located. Must be either 0 (off) or 1 (on). Type: string (or Expression with resultType string). + public object SncMode { get; set; } + /// Initiator's SNC name to access the SAP server where the table is located. Type: string (or Expression with resultType string). + public object SncMyName { get; set; } + /// Communication partner's SNC name to access the SAP server where the table is located. Type: string (or Expression with resultType string). + public object SncPartnerName { get; set; } + /// External security product's library to access the SAP server where the table is located. Type: string (or Expression with resultType string). + public object SncLibraryPath { get; set; } + /// SNC Quality of Protection. Allowed value include: 1, 2, 3, 8, 9. Type: string (or Expression with resultType string). + public object SncQop { get; set; } + /// The Logon Group for the SAP System. Type: string (or Expression with resultType string). + public object LogonGroup { get; set; } + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + public object EncryptedCredential { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SapTableResourceDataset.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SapTableResourceDataset.Serialization.cs new file mode 100644 index 000000000000..e9ab5f50afa8 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SapTableResourceDataset.Serialization.cs @@ -0,0 +1,206 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class SapTableResourceDataset : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Structure != null) + { + writer.WritePropertyName("structure"); + writer.WriteObjectValue(Structure); + } + if (Schema != null) + { + writer.WritePropertyName("schema"); + writer.WriteObjectValue(Schema); + } + writer.WritePropertyName("linkedServiceName"); + writer.WriteObjectValue(LinkedServiceName); + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Folder != null) + { + writer.WritePropertyName("folder"); + writer.WriteObjectValue(Folder); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + writer.WritePropertyName("tableName"); + writer.WriteObjectValue(TableName); + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static SapTableResourceDataset DeserializeSapTableResourceDataset(JsonElement element) + { + string type = default; + string description = default; + object structure = default; + object schema = default; + LinkedServiceReference linkedServiceName = default; + IDictionary parameters = default; + IList annotations = default; + DatasetFolder folder = default; + object tableName = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("structure")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + structure = property.Value.GetObject(); + continue; + } + if (property.NameEquals("schema")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + schema = property.Value.GetObject(); + continue; + } + if (property.NameEquals("linkedServiceName")) + { + linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("folder")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + folder = DatasetFolder.DeserializeDatasetFolder(property.Value); + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("tableName")) + { + tableName = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new SapTableResourceDataset(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties, tableName); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SapTableResourceDataset.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SapTableResourceDataset.cs new file mode 100644 index 000000000000..e789f7bb9ae8 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SapTableResourceDataset.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// SAP Table Resource properties. + public partial class SapTableResourceDataset : Dataset + { + /// Initializes a new instance of SapTableResourceDataset. + /// Linked service reference. + /// The name of the SAP Table. Type: string (or Expression with resultType string). + public SapTableResourceDataset(LinkedServiceReference linkedServiceName, object tableName) : base(linkedServiceName) + { + if (linkedServiceName == null) + { + throw new ArgumentNullException(nameof(linkedServiceName)); + } + if (tableName == null) + { + throw new ArgumentNullException(nameof(tableName)); + } + + TableName = tableName; + Type = "SapTableResource"; + } + + /// Initializes a new instance of SapTableResourceDataset. + /// Type of dataset. + /// Dataset description. + /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. + /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. + /// Linked service reference. + /// Parameters for dataset. + /// List of tags that can be used for describing the Dataset. + /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. + /// . + /// The name of the SAP Table. Type: string (or Expression with resultType string). + internal SapTableResourceDataset(string type, string description, object structure, object schema, LinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary additionalProperties, object tableName) : base(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) + { + TableName = tableName; + Type = type ?? "SapTableResource"; + } + + /// The name of the SAP Table. Type: string (or Expression with resultType string). + public object TableName { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SchedulerCurrentState.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SchedulerCurrentState.cs new file mode 100644 index 000000000000..3013aa2ceb10 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SchedulerCurrentState.cs @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// The SchedulerCurrentState. + public readonly partial struct SchedulerCurrentState : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + public SchedulerCurrentState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string QueuedValue = "Queued"; + private const string ScheduledValue = "Scheduled"; + private const string EndedValue = "Ended"; + + /// Queued. + public static SchedulerCurrentState Queued { get; } = new SchedulerCurrentState(QueuedValue); + /// Scheduled. + public static SchedulerCurrentState Scheduled { get; } = new SchedulerCurrentState(ScheduledValue); + /// Ended. + public static SchedulerCurrentState Ended { get; } = new SchedulerCurrentState(EndedValue); + /// Determines if two values are the same. + public static bool operator ==(SchedulerCurrentState left, SchedulerCurrentState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SchedulerCurrentState left, SchedulerCurrentState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator SchedulerCurrentState(string value) => new SchedulerCurrentState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SchedulerCurrentState other && Equals(other); + /// + public bool Equals(SchedulerCurrentState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ScriptAction.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ScriptAction.Serialization.cs new file mode 100644 index 000000000000..1757cd492a61 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ScriptAction.Serialization.cs @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class ScriptAction : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("name"); + writer.WriteStringValue(Name); + writer.WritePropertyName("uri"); + writer.WriteStringValue(Uri); + writer.WritePropertyName("roles"); + writer.WriteStringValue(Roles.ToString()); + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStringValue(Parameters); + } + writer.WriteEndObject(); + } + + internal static ScriptAction DeserializeScriptAction(JsonElement element) + { + string name = default; + string uri = default; + HdiNodeTypes roles = default; + string parameters = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("uri")) + { + uri = property.Value.GetString(); + continue; + } + if (property.NameEquals("roles")) + { + roles = new HdiNodeTypes(property.Value.GetString()); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + parameters = property.Value.GetString(); + continue; + } + } + return new ScriptAction(name, uri, roles, parameters); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ScriptAction.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ScriptAction.cs new file mode 100644 index 000000000000..e3de3b272dd0 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ScriptAction.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Custom script action to run on HDI ondemand cluster once it's up. + public partial class ScriptAction + { + /// Initializes a new instance of ScriptAction. + /// The user provided name of the script action. + /// The URI for the script action. + /// The node types on which the script action should be executed. + public ScriptAction(string name, string uri, HdiNodeTypes roles) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (uri == null) + { + throw new ArgumentNullException(nameof(uri)); + } + + Name = name; + Uri = uri; + Roles = roles; + } + + /// Initializes a new instance of ScriptAction. + /// The user provided name of the script action. + /// The URI for the script action. + /// The node types on which the script action should be executed. + /// The parameters for the script action. + internal ScriptAction(string name, string uri, HdiNodeTypes roles, string parameters) + { + Name = name; + Uri = uri; + Roles = roles; + Parameters = parameters; + } + + /// The user provided name of the script action. + public string Name { get; set; } + /// The URI for the script action. + public string Uri { get; set; } + /// The node types on which the script action should be executed. + public HdiNodeTypes Roles { get; set; } + /// The parameters for the script action. + public string Parameters { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SecretBase.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SecretBase.Serialization.cs new file mode 100644 index 000000000000..7aa9352592e1 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SecretBase.Serialization.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class SecretBase : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + writer.WriteEndObject(); + } + + internal static SecretBase DeserializeSecretBase(JsonElement element) + { + if (element.TryGetProperty("type", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "AzureKeyVaultSecret": return AzureKeyVaultSecretReference.DeserializeAzureKeyVaultSecretReference(element); + case "SecureString": return SecureString.DeserializeSecureString(element); + } + } + string type = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + } + return new SecretBase(type); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SecretBase.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SecretBase.cs new file mode 100644 index 000000000000..732b20cfe47d --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SecretBase.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// The base definition of a secret type. + public partial class SecretBase + { + /// Initializes a new instance of SecretBase. + public SecretBase() + { + Type = null; + } + + /// Initializes a new instance of SecretBase. + /// Type of the secret. + internal SecretBase(string type) + { + Type = type; + } + + /// Type of the secret. + internal string Type { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SecureString.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SecureString.Serialization.cs new file mode 100644 index 000000000000..094a2f9d177a --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SecureString.Serialization.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class SecureString : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("value"); + writer.WriteStringValue(Value); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + writer.WriteEndObject(); + } + + internal static SecureString DeserializeSecureString(JsonElement element) + { + string value = default; + string type = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value")) + { + value = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + } + return new SecureString(type, value); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SecureString.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SecureString.cs new file mode 100644 index 000000000000..9fb776c01ecb --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SecureString.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// 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 SecureString. + /// Value of secure string. + public SecureString(string value) + { + if (value == null) + { + throw new ArgumentNullException(nameof(value)); + } + + Value = value; + Type = "SecureString"; + } + + /// Initializes a new instance of SecureString. + /// Type of the secret. + /// Value of secure string. + internal SecureString(string type, string value) : base(type) + { + Value = value; + Type = type ?? "SecureString"; + } + + /// Value of secure string. + public string Value { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ServiceNowAuthenticationType.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ServiceNowAuthenticationType.cs new file mode 100644 index 000000000000..4b8dfb06058a --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ServiceNowAuthenticationType.cs @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// The authentication type to use. + public readonly partial struct ServiceNowAuthenticationType : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + public ServiceNowAuthenticationType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string BasicValue = "Basic"; + private const string OAuth2Value = "OAuth2"; + + /// Basic. + public static ServiceNowAuthenticationType Basic { get; } = new ServiceNowAuthenticationType(BasicValue); + /// OAuth2. + public static ServiceNowAuthenticationType OAuth2 { get; } = new ServiceNowAuthenticationType(OAuth2Value); + /// Determines if two values are the same. + public static bool operator ==(ServiceNowAuthenticationType left, ServiceNowAuthenticationType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ServiceNowAuthenticationType left, ServiceNowAuthenticationType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator ServiceNowAuthenticationType(string value) => new ServiceNowAuthenticationType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ServiceNowAuthenticationType other && Equals(other); + /// + public bool Equals(ServiceNowAuthenticationType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ServiceNowLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ServiceNowLinkedService.Serialization.cs new file mode 100644 index 000000000000..163b53da727c --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ServiceNowLinkedService.Serialization.cs @@ -0,0 +1,296 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class ServiceNowLinkedService : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (ConnectVia != null) + { + writer.WritePropertyName("connectVia"); + writer.WriteObjectValue(ConnectVia); + } + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + writer.WritePropertyName("endpoint"); + writer.WriteObjectValue(Endpoint); + writer.WritePropertyName("authenticationType"); + writer.WriteStringValue(AuthenticationType.ToString()); + if (Username != null) + { + writer.WritePropertyName("username"); + writer.WriteObjectValue(Username); + } + if (Password != null) + { + writer.WritePropertyName("password"); + writer.WriteObjectValue(Password); + } + if (ClientId != null) + { + writer.WritePropertyName("clientId"); + writer.WriteObjectValue(ClientId); + } + if (ClientSecret != null) + { + writer.WritePropertyName("clientSecret"); + writer.WriteObjectValue(ClientSecret); + } + if (UseEncryptedEndpoints != null) + { + writer.WritePropertyName("useEncryptedEndpoints"); + writer.WriteObjectValue(UseEncryptedEndpoints); + } + if (UseHostVerification != null) + { + writer.WritePropertyName("useHostVerification"); + writer.WriteObjectValue(UseHostVerification); + } + if (UsePeerVerification != null) + { + writer.WritePropertyName("usePeerVerification"); + writer.WriteObjectValue(UsePeerVerification); + } + if (EncryptedCredential != null) + { + writer.WritePropertyName("encryptedCredential"); + writer.WriteObjectValue(EncryptedCredential); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static ServiceNowLinkedService DeserializeServiceNowLinkedService(JsonElement element) + { + string type = default; + IntegrationRuntimeReference connectVia = default; + string description = default; + IDictionary parameters = default; + IList annotations = default; + object endpoint = default; + ServiceNowAuthenticationType authenticationType = default; + object username = default; + SecretBase password = default; + object clientId = default; + SecretBase clientSecret = default; + object useEncryptedEndpoints = default; + object useHostVerification = default; + object usePeerVerification = default; + object encryptedCredential = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("connectVia")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("endpoint")) + { + endpoint = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("authenticationType")) + { + authenticationType = new ServiceNowAuthenticationType(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("username")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + username = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("password")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + password = SecretBase.DeserializeSecretBase(property0.Value); + continue; + } + if (property0.NameEquals("clientId")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + clientId = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("clientSecret")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + clientSecret = SecretBase.DeserializeSecretBase(property0.Value); + continue; + } + if (property0.NameEquals("useEncryptedEndpoints")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + useEncryptedEndpoints = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("useHostVerification")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + useHostVerification = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("usePeerVerification")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + usePeerVerification = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("encryptedCredential")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + encryptedCredential = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new ServiceNowLinkedService(type, connectVia, description, parameters, annotations, additionalProperties, endpoint, authenticationType, username, password, clientId, clientSecret, useEncryptedEndpoints, useHostVerification, usePeerVerification, encryptedCredential); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ServiceNowLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ServiceNowLinkedService.cs new file mode 100644 index 000000000000..780207ecc2a9 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ServiceNowLinkedService.cs @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// ServiceNow server linked service. + public partial class ServiceNowLinkedService : LinkedService + { + /// Initializes a new instance of ServiceNowLinkedService. + /// The endpoint of the ServiceNow server. (i.e. <instance>.service-now.com). + /// The authentication type to use. + public ServiceNowLinkedService(object endpoint, ServiceNowAuthenticationType authenticationType) + { + if (endpoint == null) + { + throw new ArgumentNullException(nameof(endpoint)); + } + + Endpoint = endpoint; + AuthenticationType = authenticationType; + Type = "ServiceNow"; + } + + /// Initializes a new instance of ServiceNowLinkedService. + /// Type of linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for describing the linked service. + /// . + /// The endpoint of the ServiceNow server. (i.e. <instance>.service-now.com). + /// The authentication type to use. + /// The user name used to connect to the ServiceNow server for Basic and OAuth2 authentication. + /// The password corresponding to the user name for Basic and OAuth2 authentication. + /// The client id for OAuth2 authentication. + /// The client secret for OAuth2 authentication. + /// Specifies whether the data source endpoints are encrypted using HTTPS. The default value is true. + /// Specifies whether to require the host name in the server's certificate to match the host name of the server when connecting over SSL. The default value is true. + /// Specifies whether to verify the identity of the server when connecting over SSL. The default value is true. + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + internal ServiceNowLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object endpoint, ServiceNowAuthenticationType authenticationType, object username, SecretBase password, object clientId, SecretBase clientSecret, object useEncryptedEndpoints, object useHostVerification, object usePeerVerification, object encryptedCredential) : base(type, connectVia, description, parameters, annotations, additionalProperties) + { + Endpoint = endpoint; + AuthenticationType = authenticationType; + Username = username; + Password = password; + ClientId = clientId; + ClientSecret = clientSecret; + UseEncryptedEndpoints = useEncryptedEndpoints; + UseHostVerification = useHostVerification; + UsePeerVerification = usePeerVerification; + EncryptedCredential = encryptedCredential; + Type = type ?? "ServiceNow"; + } + + /// The endpoint of the ServiceNow server. (i.e. <instance>.service-now.com). + public object Endpoint { get; set; } + /// The authentication type to use. + public ServiceNowAuthenticationType AuthenticationType { get; set; } + /// The user name used to connect to the ServiceNow server for Basic and OAuth2 authentication. + public object Username { get; set; } + /// The password corresponding to the user name for Basic and OAuth2 authentication. + public SecretBase Password { get; set; } + /// The client id for OAuth2 authentication. + public object ClientId { get; set; } + /// The client secret for OAuth2 authentication. + public SecretBase ClientSecret { get; set; } + /// Specifies whether the data source endpoints are encrypted using HTTPS. The default value is true. + public object UseEncryptedEndpoints { get; set; } + /// Specifies whether to require the host name in the server's certificate to match the host name of the server when connecting over SSL. The default value is true. + public object UseHostVerification { get; set; } + /// Specifies whether to verify the identity of the server when connecting over SSL. The default value is true. + public object UsePeerVerification { get; set; } + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + public object EncryptedCredential { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ServiceNowObjectDataset.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ServiceNowObjectDataset.Serialization.cs new file mode 100644 index 000000000000..ba7131165aa5 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ServiceNowObjectDataset.Serialization.cs @@ -0,0 +1,213 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class ServiceNowObjectDataset : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Structure != null) + { + writer.WritePropertyName("structure"); + writer.WriteObjectValue(Structure); + } + if (Schema != null) + { + writer.WritePropertyName("schema"); + writer.WriteObjectValue(Schema); + } + writer.WritePropertyName("linkedServiceName"); + writer.WriteObjectValue(LinkedServiceName); + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Folder != null) + { + writer.WritePropertyName("folder"); + writer.WriteObjectValue(Folder); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + if (TableName != null) + { + writer.WritePropertyName("tableName"); + writer.WriteObjectValue(TableName); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static ServiceNowObjectDataset DeserializeServiceNowObjectDataset(JsonElement element) + { + string type = default; + string description = default; + object structure = default; + object schema = default; + LinkedServiceReference linkedServiceName = default; + IDictionary parameters = default; + IList annotations = default; + DatasetFolder folder = default; + object tableName = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("structure")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + structure = property.Value.GetObject(); + continue; + } + if (property.NameEquals("schema")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + schema = property.Value.GetObject(); + continue; + } + if (property.NameEquals("linkedServiceName")) + { + linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("folder")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + folder = DatasetFolder.DeserializeDatasetFolder(property.Value); + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("tableName")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + tableName = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new ServiceNowObjectDataset(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties, tableName); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ServiceNowObjectDataset.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ServiceNowObjectDataset.cs new file mode 100644 index 000000000000..cffe07b2a85e --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ServiceNowObjectDataset.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// ServiceNow server dataset. + public partial class ServiceNowObjectDataset : Dataset + { + /// Initializes a new instance of ServiceNowObjectDataset. + /// Linked service reference. + public ServiceNowObjectDataset(LinkedServiceReference linkedServiceName) : base(linkedServiceName) + { + if (linkedServiceName == null) + { + throw new ArgumentNullException(nameof(linkedServiceName)); + } + + Type = "ServiceNowObject"; + } + + /// Initializes a new instance of ServiceNowObjectDataset. + /// Type of dataset. + /// Dataset description. + /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. + /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. + /// Linked service reference. + /// Parameters for dataset. + /// List of tags that can be used for describing the Dataset. + /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. + /// . + /// The table name. Type: string (or Expression with resultType string). + internal ServiceNowObjectDataset(string type, string description, object structure, object schema, LinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary additionalProperties, object tableName) : base(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) + { + TableName = tableName; + Type = type ?? "ServiceNowObject"; + } + + /// The table name. Type: string (or Expression with resultType string). + public object TableName { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SetVariableActivity.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SetVariableActivity.Serialization.cs new file mode 100644 index 000000000000..8eb3abd2cd54 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SetVariableActivity.Serialization.cs @@ -0,0 +1,182 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class SetVariableActivity : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("name"); + writer.WriteStringValue(Name); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (DependsOn != null) + { + writer.WritePropertyName("dependsOn"); + writer.WriteStartArray(); + foreach (var item in DependsOn) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (UserProperties != null) + { + writer.WritePropertyName("userProperties"); + writer.WriteStartArray(); + foreach (var item in UserProperties) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + if (VariableName != null) + { + writer.WritePropertyName("variableName"); + writer.WriteStringValue(VariableName); + } + if (Value != null) + { + writer.WritePropertyName("value"); + writer.WriteObjectValue(Value); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static SetVariableActivity DeserializeSetVariableActivity(JsonElement element) + { + string name = default; + string type = default; + string description = default; + IList dependsOn = default; + IList userProperties = default; + string variableName = default; + object value = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("dependsOn")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(ActivityDependency.DeserializeActivityDependency(item)); + } + } + dependsOn = array; + continue; + } + if (property.NameEquals("userProperties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(UserProperty.DeserializeUserProperty(item)); + } + } + userProperties = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("variableName")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + variableName = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("value")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + value = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new SetVariableActivity(name, type, description, dependsOn, userProperties, additionalProperties, variableName, value); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SetVariableActivity.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SetVariableActivity.cs new file mode 100644 index 000000000000..1049f1355b38 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SetVariableActivity.cs @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Set value for a Variable. + public partial class SetVariableActivity : Activity + { + /// Initializes a new instance of SetVariableActivity. + /// Activity name. + public SetVariableActivity(string name) : base(name) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + + Type = "SetVariable"; + } + + /// Initializes a new instance of SetVariableActivity. + /// Activity name. + /// Type of activity. + /// Activity description. + /// Activity depends on condition. + /// Activity user properties. + /// . + /// Name of the variable whose value needs to be set. + /// Value to be set. Could be a static value or Expression. + internal SetVariableActivity(string name, string type, string description, IList dependsOn, IList userProperties, IDictionary additionalProperties, string variableName, object value) : base(name, type, description, dependsOn, userProperties, additionalProperties) + { + VariableName = variableName; + Value = value; + Type = type ?? "SetVariable"; + } + + /// Name of the variable whose value needs to be set. + public string VariableName { get; set; } + /// Value to be set. Could be a static value or Expression. + public object Value { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SftpAuthenticationType.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SftpAuthenticationType.cs new file mode 100644 index 000000000000..88fe2a18da16 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SftpAuthenticationType.cs @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// The authentication type to be used to connect to the FTP server. + public readonly partial struct SftpAuthenticationType : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + public SftpAuthenticationType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string BasicValue = "Basic"; + private const string SshPublicKeyValue = "SshPublicKey"; + + /// Basic. + public static SftpAuthenticationType Basic { get; } = new SftpAuthenticationType(BasicValue); + /// SshPublicKey. + public static SftpAuthenticationType SshPublicKey { get; } = new SftpAuthenticationType(SshPublicKeyValue); + /// Determines if two values are the same. + public static bool operator ==(SftpAuthenticationType left, SftpAuthenticationType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SftpAuthenticationType left, SftpAuthenticationType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator SftpAuthenticationType(string value) => new SftpAuthenticationType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SftpAuthenticationType other && Equals(other); + /// + public bool Equals(SftpAuthenticationType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SftpServerLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SftpServerLinkedService.Serialization.cs new file mode 100644 index 000000000000..40f3076550ac --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SftpServerLinkedService.Serialization.cs @@ -0,0 +1,318 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class SftpServerLinkedService : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (ConnectVia != null) + { + writer.WritePropertyName("connectVia"); + writer.WriteObjectValue(ConnectVia); + } + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + writer.WritePropertyName("host"); + writer.WriteObjectValue(Host); + if (Port != null) + { + writer.WritePropertyName("port"); + writer.WriteObjectValue(Port); + } + if (AuthenticationType != null) + { + writer.WritePropertyName("authenticationType"); + writer.WriteStringValue(AuthenticationType.Value.ToString()); + } + if (UserName != null) + { + writer.WritePropertyName("userName"); + writer.WriteObjectValue(UserName); + } + if (Password != null) + { + writer.WritePropertyName("password"); + writer.WriteObjectValue(Password); + } + if (EncryptedCredential != null) + { + writer.WritePropertyName("encryptedCredential"); + writer.WriteObjectValue(EncryptedCredential); + } + if (PrivateKeyPath != null) + { + writer.WritePropertyName("privateKeyPath"); + writer.WriteObjectValue(PrivateKeyPath); + } + if (PrivateKeyContent != null) + { + writer.WritePropertyName("privateKeyContent"); + writer.WriteObjectValue(PrivateKeyContent); + } + if (PassPhrase != null) + { + writer.WritePropertyName("passPhrase"); + writer.WriteObjectValue(PassPhrase); + } + if (SkipHostKeyValidation != null) + { + writer.WritePropertyName("skipHostKeyValidation"); + writer.WriteObjectValue(SkipHostKeyValidation); + } + if (HostKeyFingerprint != null) + { + writer.WritePropertyName("hostKeyFingerprint"); + writer.WriteObjectValue(HostKeyFingerprint); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static SftpServerLinkedService DeserializeSftpServerLinkedService(JsonElement element) + { + string type = default; + IntegrationRuntimeReference connectVia = default; + string description = default; + IDictionary parameters = default; + IList annotations = default; + object host = default; + object port = default; + SftpAuthenticationType? authenticationType = default; + object userName = default; + SecretBase password = default; + object encryptedCredential = default; + object privateKeyPath = default; + SecretBase privateKeyContent = default; + SecretBase passPhrase = default; + object skipHostKeyValidation = default; + object hostKeyFingerprint = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("connectVia")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("host")) + { + host = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("port")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + port = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("authenticationType")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + authenticationType = new SftpAuthenticationType(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("userName")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + userName = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("password")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + password = SecretBase.DeserializeSecretBase(property0.Value); + continue; + } + if (property0.NameEquals("encryptedCredential")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + encryptedCredential = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("privateKeyPath")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + privateKeyPath = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("privateKeyContent")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + privateKeyContent = SecretBase.DeserializeSecretBase(property0.Value); + continue; + } + if (property0.NameEquals("passPhrase")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + passPhrase = SecretBase.DeserializeSecretBase(property0.Value); + continue; + } + if (property0.NameEquals("skipHostKeyValidation")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + skipHostKeyValidation = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("hostKeyFingerprint")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + hostKeyFingerprint = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new SftpServerLinkedService(type, connectVia, description, parameters, annotations, additionalProperties, host, port, authenticationType, userName, password, encryptedCredential, privateKeyPath, privateKeyContent, passPhrase, skipHostKeyValidation, hostKeyFingerprint); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SftpServerLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SftpServerLinkedService.cs new file mode 100644 index 000000000000..a56a3ea7793e --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SftpServerLinkedService.cs @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// A linked service for an SSH File Transfer Protocol (SFTP) server. + public partial class SftpServerLinkedService : LinkedService + { + /// Initializes a new instance of SftpServerLinkedService. + /// The SFTP server host name. Type: string (or Expression with resultType string). + public SftpServerLinkedService(object host) + { + if (host == null) + { + throw new ArgumentNullException(nameof(host)); + } + + Host = host; + Type = "Sftp"; + } + + /// Initializes a new instance of SftpServerLinkedService. + /// Type of linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for describing the linked service. + /// . + /// The SFTP server host name. Type: string (or Expression with resultType string). + /// The TCP port number that the SFTP server uses to listen for client connections. Default value is 22. Type: integer (or Expression with resultType integer), minimum: 0. + /// The authentication type to be used to connect to the FTP server. + /// The username used to log on to the SFTP server. Type: string (or Expression with resultType string). + /// Password to logon the SFTP server for Basic authentication. + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + /// The SSH private key file path for SshPublicKey authentication. Only valid for on-premises copy. For on-premises copy with SshPublicKey authentication, either PrivateKeyPath or PrivateKeyContent should be specified. SSH private key should be OpenSSH format. Type: string (or Expression with resultType string). + /// Base64 encoded SSH private key content for SshPublicKey authentication. For on-premises copy with SshPublicKey authentication, either PrivateKeyPath or PrivateKeyContent should be specified. SSH private key should be OpenSSH format. + /// The password to decrypt the SSH private key if the SSH private key is encrypted. + /// If true, skip the SSH host key validation. Default value is false. Type: boolean (or Expression with resultType boolean). + /// The host key finger-print of the SFTP server. When SkipHostKeyValidation is false, HostKeyFingerprint should be specified. Type: string (or Expression with resultType string). + internal SftpServerLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object host, object port, SftpAuthenticationType? authenticationType, object userName, SecretBase password, object encryptedCredential, object privateKeyPath, SecretBase privateKeyContent, SecretBase passPhrase, object skipHostKeyValidation, object hostKeyFingerprint) : base(type, connectVia, description, parameters, annotations, additionalProperties) + { + Host = host; + Port = port; + AuthenticationType = authenticationType; + UserName = userName; + Password = password; + EncryptedCredential = encryptedCredential; + PrivateKeyPath = privateKeyPath; + PrivateKeyContent = privateKeyContent; + PassPhrase = passPhrase; + SkipHostKeyValidation = skipHostKeyValidation; + HostKeyFingerprint = hostKeyFingerprint; + Type = type ?? "Sftp"; + } + + /// The SFTP server host name. Type: string (or Expression with resultType string). + public object Host { get; set; } + /// The TCP port number that the SFTP server uses to listen for client connections. Default value is 22. Type: integer (or Expression with resultType integer), minimum: 0. + public object Port { get; set; } + /// The authentication type to be used to connect to the FTP server. + public SftpAuthenticationType? AuthenticationType { get; set; } + /// The username used to log on to the SFTP server. Type: string (or Expression with resultType string). + public object UserName { get; set; } + /// Password to logon the SFTP server for Basic authentication. + public SecretBase Password { get; set; } + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + public object EncryptedCredential { get; set; } + /// The SSH private key file path for SshPublicKey authentication. Only valid for on-premises copy. For on-premises copy with SshPublicKey authentication, either PrivateKeyPath or PrivateKeyContent should be specified. SSH private key should be OpenSSH format. Type: string (or Expression with resultType string). + public object PrivateKeyPath { get; set; } + /// Base64 encoded SSH private key content for SshPublicKey authentication. For on-premises copy with SshPublicKey authentication, either PrivateKeyPath or PrivateKeyContent should be specified. SSH private key should be OpenSSH format. + public SecretBase PrivateKeyContent { get; set; } + /// The password to decrypt the SSH private key if the SSH private key is encrypted. + public SecretBase PassPhrase { get; set; } + /// If true, skip the SSH host key validation. Default value is false. Type: boolean (or Expression with resultType boolean). + public object SkipHostKeyValidation { get; set; } + /// The host key finger-print of the SFTP server. When SkipHostKeyValidation is false, HostKeyFingerprint should be specified. Type: string (or Expression with resultType string). + public object HostKeyFingerprint { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ShopifyLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ShopifyLinkedService.Serialization.cs new file mode 100644 index 000000000000..5be4d21bb145 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ShopifyLinkedService.Serialization.cs @@ -0,0 +1,243 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class ShopifyLinkedService : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (ConnectVia != null) + { + writer.WritePropertyName("connectVia"); + writer.WriteObjectValue(ConnectVia); + } + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + writer.WritePropertyName("host"); + writer.WriteObjectValue(Host); + if (AccessToken != null) + { + writer.WritePropertyName("accessToken"); + writer.WriteObjectValue(AccessToken); + } + if (UseEncryptedEndpoints != null) + { + writer.WritePropertyName("useEncryptedEndpoints"); + writer.WriteObjectValue(UseEncryptedEndpoints); + } + if (UseHostVerification != null) + { + writer.WritePropertyName("useHostVerification"); + writer.WriteObjectValue(UseHostVerification); + } + if (UsePeerVerification != null) + { + writer.WritePropertyName("usePeerVerification"); + writer.WriteObjectValue(UsePeerVerification); + } + if (EncryptedCredential != null) + { + writer.WritePropertyName("encryptedCredential"); + writer.WriteObjectValue(EncryptedCredential); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static ShopifyLinkedService DeserializeShopifyLinkedService(JsonElement element) + { + string type = default; + IntegrationRuntimeReference connectVia = default; + string description = default; + IDictionary parameters = default; + IList annotations = default; + object host = default; + SecretBase accessToken = default; + object useEncryptedEndpoints = default; + object useHostVerification = default; + object usePeerVerification = default; + object encryptedCredential = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("connectVia")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("host")) + { + host = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("accessToken")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + accessToken = SecretBase.DeserializeSecretBase(property0.Value); + continue; + } + if (property0.NameEquals("useEncryptedEndpoints")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + useEncryptedEndpoints = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("useHostVerification")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + useHostVerification = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("usePeerVerification")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + usePeerVerification = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("encryptedCredential")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + encryptedCredential = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new ShopifyLinkedService(type, connectVia, description, parameters, annotations, additionalProperties, host, accessToken, useEncryptedEndpoints, useHostVerification, usePeerVerification, encryptedCredential); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ShopifyLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ShopifyLinkedService.cs new file mode 100644 index 000000000000..d4cef5d51b06 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ShopifyLinkedService.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Shopify Service linked service. + public partial class ShopifyLinkedService : LinkedService + { + /// Initializes a new instance of ShopifyLinkedService. + /// The endpoint of the Shopify server. (i.e. mystore.myshopify.com). + public ShopifyLinkedService(object host) + { + if (host == null) + { + throw new ArgumentNullException(nameof(host)); + } + + Host = host; + Type = "Shopify"; + } + + /// Initializes a new instance of ShopifyLinkedService. + /// Type of linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for describing the linked service. + /// . + /// The endpoint of the Shopify server. (i.e. mystore.myshopify.com). + /// The API access token that can be used to access Shopify’s data. The token won't expire if it is offline mode. + /// Specifies whether the data source endpoints are encrypted using HTTPS. The default value is true. + /// Specifies whether to require the host name in the server's certificate to match the host name of the server when connecting over SSL. The default value is true. + /// Specifies whether to verify the identity of the server when connecting over SSL. The default value is true. + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + internal ShopifyLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object host, SecretBase accessToken, object useEncryptedEndpoints, object useHostVerification, object usePeerVerification, object encryptedCredential) : base(type, connectVia, description, parameters, annotations, additionalProperties) + { + Host = host; + AccessToken = accessToken; + UseEncryptedEndpoints = useEncryptedEndpoints; + UseHostVerification = useHostVerification; + UsePeerVerification = usePeerVerification; + EncryptedCredential = encryptedCredential; + Type = type ?? "Shopify"; + } + + /// The endpoint of the Shopify server. (i.e. mystore.myshopify.com). + public object Host { get; set; } + /// The API access token that can be used to access Shopify’s data. The token won't expire if it is offline mode. + public SecretBase AccessToken { get; set; } + /// Specifies whether the data source endpoints are encrypted using HTTPS. The default value is true. + public object UseEncryptedEndpoints { get; set; } + /// Specifies whether to require the host name in the server's certificate to match the host name of the server when connecting over SSL. The default value is true. + public object UseHostVerification { get; set; } + /// Specifies whether to verify the identity of the server when connecting over SSL. The default value is true. + public object UsePeerVerification { get; set; } + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + public object EncryptedCredential { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ShopifyObjectDataset.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ShopifyObjectDataset.Serialization.cs new file mode 100644 index 000000000000..f8de846bb5b2 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ShopifyObjectDataset.Serialization.cs @@ -0,0 +1,213 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class ShopifyObjectDataset : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Structure != null) + { + writer.WritePropertyName("structure"); + writer.WriteObjectValue(Structure); + } + if (Schema != null) + { + writer.WritePropertyName("schema"); + writer.WriteObjectValue(Schema); + } + writer.WritePropertyName("linkedServiceName"); + writer.WriteObjectValue(LinkedServiceName); + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Folder != null) + { + writer.WritePropertyName("folder"); + writer.WriteObjectValue(Folder); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + if (TableName != null) + { + writer.WritePropertyName("tableName"); + writer.WriteObjectValue(TableName); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static ShopifyObjectDataset DeserializeShopifyObjectDataset(JsonElement element) + { + string type = default; + string description = default; + object structure = default; + object schema = default; + LinkedServiceReference linkedServiceName = default; + IDictionary parameters = default; + IList annotations = default; + DatasetFolder folder = default; + object tableName = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("structure")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + structure = property.Value.GetObject(); + continue; + } + if (property.NameEquals("schema")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + schema = property.Value.GetObject(); + continue; + } + if (property.NameEquals("linkedServiceName")) + { + linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("folder")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + folder = DatasetFolder.DeserializeDatasetFolder(property.Value); + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("tableName")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + tableName = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new ShopifyObjectDataset(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties, tableName); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ShopifyObjectDataset.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ShopifyObjectDataset.cs new file mode 100644 index 000000000000..052792af66bc --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ShopifyObjectDataset.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Shopify Service dataset. + public partial class ShopifyObjectDataset : Dataset + { + /// Initializes a new instance of ShopifyObjectDataset. + /// Linked service reference. + public ShopifyObjectDataset(LinkedServiceReference linkedServiceName) : base(linkedServiceName) + { + if (linkedServiceName == null) + { + throw new ArgumentNullException(nameof(linkedServiceName)); + } + + Type = "ShopifyObject"; + } + + /// Initializes a new instance of ShopifyObjectDataset. + /// Type of dataset. + /// Dataset description. + /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. + /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. + /// Linked service reference. + /// Parameters for dataset. + /// List of tags that can be used for describing the Dataset. + /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. + /// . + /// The table name. Type: string (or Expression with resultType string). + internal ShopifyObjectDataset(string type, string description, object structure, object schema, LinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary additionalProperties, object tableName) : base(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) + { + TableName = tableName; + Type = type ?? "ShopifyObject"; + } + + /// The table name. Type: string (or Expression with resultType string). + public object TableName { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SparkAuthenticationType.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SparkAuthenticationType.cs new file mode 100644 index 000000000000..16b479d47bb8 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SparkAuthenticationType.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// The authentication method used to access the Spark server. + public readonly partial struct SparkAuthenticationType : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + public SparkAuthenticationType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AnonymousValue = "Anonymous"; + private const string UsernameValue = "Username"; + private const string UsernameAndPasswordValue = "UsernameAndPassword"; + private const string WindowsAzureHDInsightServiceValue = "WindowsAzureHDInsightService"; + + /// Anonymous. + public static SparkAuthenticationType Anonymous { get; } = new SparkAuthenticationType(AnonymousValue); + /// Username. + public static SparkAuthenticationType Username { get; } = new SparkAuthenticationType(UsernameValue); + /// UsernameAndPassword. + public static SparkAuthenticationType UsernameAndPassword { get; } = new SparkAuthenticationType(UsernameAndPasswordValue); + /// WindowsAzureHDInsightService. + public static SparkAuthenticationType WindowsAzureHDInsightService { get; } = new SparkAuthenticationType(WindowsAzureHDInsightServiceValue); + /// Determines if two values are the same. + public static bool operator ==(SparkAuthenticationType left, SparkAuthenticationType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SparkAuthenticationType left, SparkAuthenticationType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator SparkAuthenticationType(string value) => new SparkAuthenticationType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SparkAuthenticationType other && Equals(other); + /// + public bool Equals(SparkAuthenticationType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SparkBatchJob.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SparkBatchJob.Serialization.cs new file mode 100644 index 000000000000..5686357571fc --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SparkBatchJob.Serialization.cs @@ -0,0 +1,248 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class SparkBatchJob + { + internal static SparkBatchJob DeserializeSparkBatchJob(JsonElement element) + { + SparkBatchJobState livyInfo = default; + string name = default; + string workspaceName = default; + string sparkPoolName = default; + string submitterName = default; + string submitterId = default; + string artifactId = default; + SparkJobType? jobType = default; + SparkBatchJobResultType? result = default; + SparkScheduler schedulerInfo = default; + SparkServicePlugin pluginInfo = default; + IReadOnlyList errorInfo = default; + IReadOnlyDictionary tags = default; + int id = default; + string appId = default; + IReadOnlyDictionary appInfo = default; + string state = default; + IReadOnlyList log = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("livyInfo")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + livyInfo = SparkBatchJobState.DeserializeSparkBatchJobState(property.Value); + continue; + } + if (property.NameEquals("name")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("workspaceName")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + workspaceName = property.Value.GetString(); + continue; + } + if (property.NameEquals("sparkPoolName")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sparkPoolName = property.Value.GetString(); + continue; + } + if (property.NameEquals("submitterName")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + submitterName = property.Value.GetString(); + continue; + } + if (property.NameEquals("submitterId")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + submitterId = property.Value.GetString(); + continue; + } + if (property.NameEquals("artifactId")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + artifactId = property.Value.GetString(); + continue; + } + if (property.NameEquals("jobType")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + jobType = new SparkJobType(property.Value.GetString()); + continue; + } + if (property.NameEquals("result")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + result = new SparkBatchJobResultType(property.Value.GetString()); + continue; + } + if (property.NameEquals("schedulerInfo")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + schedulerInfo = SparkScheduler.DeserializeSparkScheduler(property.Value); + continue; + } + if (property.NameEquals("pluginInfo")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + pluginInfo = SparkServicePlugin.DeserializeSparkServicePlugin(property.Value); + continue; + } + if (property.NameEquals("errorInfo")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(SparkServiceError.DeserializeSparkServiceError(item)); + } + } + errorInfo = array; + continue; + } + if (property.NameEquals("tags")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + } + tags = dictionary; + continue; + } + if (property.NameEquals("id")) + { + id = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("appId")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + appId = property.Value.GetString(); + continue; + } + if (property.NameEquals("appInfo")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + } + appInfo = dictionary; + continue; + } + if (property.NameEquals("state")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + state = property.Value.GetString(); + continue; + } + if (property.NameEquals("log")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetString()); + } + } + log = array; + continue; + } + } + return new SparkBatchJob(livyInfo, name, workspaceName, sparkPoolName, submitterName, submitterId, artifactId, jobType, result, schedulerInfo, pluginInfo, errorInfo, tags, id, appId, appInfo, state, log); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SparkBatchJob.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SparkBatchJob.cs new file mode 100644 index 000000000000..5e1c2eb557cc --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SparkBatchJob.cs @@ -0,0 +1,99 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// The SparkBatchJob. + public partial class SparkBatchJob + { + /// Initializes a new instance of SparkBatchJob. + /// The session Id. + internal SparkBatchJob(int id) + { + Id = id; + } + + /// Initializes a new instance of SparkBatchJob. + /// . + /// The batch name. + /// The workspace name. + /// The Spark pool name. + /// The submitter name. + /// The submitter identifier. + /// The artifact identifier. + /// The job type. + /// The Spark batch job result. + /// The scheduler information. + /// The plugin information. + /// The error information. + /// The tags. + /// The session Id. + /// The application id of this session. + /// The detailed application info. + /// The batch state. + /// The log lines. + internal SparkBatchJob(SparkBatchJobState livyInfo, string name, string workspaceName, string sparkPoolName, string submitterName, string submitterId, string artifactId, SparkJobType? jobType, SparkBatchJobResultType? result, SparkScheduler scheduler, SparkServicePlugin plugin, IReadOnlyList errors, IReadOnlyDictionary tags, int id, string appId, IReadOnlyDictionary appInfo, string state, IReadOnlyList logLines) + { + LivyInfo = livyInfo; + Name = name; + WorkspaceName = workspaceName; + SparkPoolName = sparkPoolName; + SubmitterName = submitterName; + SubmitterId = submitterId; + ArtifactId = artifactId; + JobType = jobType; + Result = result; + Scheduler = scheduler; + Plugin = plugin; + Errors = errors; + Tags = tags; + Id = id; + AppId = appId; + AppInfo = appInfo; + State = state; + LogLines = logLines; + } + + public SparkBatchJobState LivyInfo { get; } + /// The batch name. + public string Name { get; } + /// The workspace name. + public string WorkspaceName { get; } + /// The Spark pool name. + public string SparkPoolName { get; } + /// The submitter name. + public string SubmitterName { get; } + /// The submitter identifier. + public string SubmitterId { get; } + /// The artifact identifier. + public string ArtifactId { get; } + /// The job type. + public SparkJobType? JobType { get; } + /// The Spark batch job result. + public SparkBatchJobResultType? Result { get; } + /// The scheduler information. + public SparkScheduler Scheduler { get; } + /// The plugin information. + public SparkServicePlugin Plugin { get; } + /// The error information. + public IReadOnlyList Errors { get; } + /// The tags. + public IReadOnlyDictionary Tags { get; } + /// The session Id. + public int Id { get; } + /// The application id of this session. + public string AppId { get; } + /// The detailed application info. + public IReadOnlyDictionary AppInfo { get; } + /// The batch state. + public string State { get; } + /// The log lines. + public IReadOnlyList LogLines { get; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SparkBatchJobResultType.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SparkBatchJobResultType.cs new file mode 100644 index 000000000000..04c5a33a7145 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SparkBatchJobResultType.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// The Spark batch job result. + public readonly partial struct SparkBatchJobResultType : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + public SparkBatchJobResultType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string UncertainValue = "Uncertain"; + private const string SucceededValue = "Succeeded"; + private const string FailedValue = "Failed"; + private const string CancelledValue = "Cancelled"; + + /// Uncertain. + public static SparkBatchJobResultType Uncertain { get; } = new SparkBatchJobResultType(UncertainValue); + /// Succeeded. + public static SparkBatchJobResultType Succeeded { get; } = new SparkBatchJobResultType(SucceededValue); + /// Failed. + public static SparkBatchJobResultType Failed { get; } = new SparkBatchJobResultType(FailedValue); + /// Cancelled. + public static SparkBatchJobResultType Cancelled { get; } = new SparkBatchJobResultType(CancelledValue); + /// Determines if two values are the same. + public static bool operator ==(SparkBatchJobResultType left, SparkBatchJobResultType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SparkBatchJobResultType left, SparkBatchJobResultType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator SparkBatchJobResultType(string value) => new SparkBatchJobResultType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SparkBatchJobResultType other && Equals(other); + /// + public bool Equals(SparkBatchJobResultType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SparkBatchJobState.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SparkBatchJobState.Serialization.cs new file mode 100644 index 000000000000..8158c4a1c6b8 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SparkBatchJobState.Serialization.cs @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class SparkBatchJobState + { + internal static SparkBatchJobState DeserializeSparkBatchJobState(JsonElement element) + { + DateTimeOffset? notStartedAt = default; + DateTimeOffset? startingAt = default; + DateTimeOffset? runningAt = default; + DateTimeOffset? deadAt = default; + DateTimeOffset? successAt = default; + DateTimeOffset? killedAt = default; + DateTimeOffset? recoveringAt = default; + string currentState = default; + SparkRequest jobCreationRequest = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("notStartedAt")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + notStartedAt = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("startingAt")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + startingAt = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("runningAt")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + runningAt = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("deadAt")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + deadAt = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("successAt")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + successAt = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("killedAt")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + killedAt = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("recoveringAt")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + recoveringAt = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("currentState")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + currentState = property.Value.GetString(); + continue; + } + if (property.NameEquals("jobCreationRequest")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + jobCreationRequest = SparkRequest.DeserializeSparkRequest(property.Value); + continue; + } + } + return new SparkBatchJobState(notStartedAt, startingAt, runningAt, deadAt, successAt, killedAt, recoveringAt, currentState, jobCreationRequest); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SparkBatchJobState.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SparkBatchJobState.cs new file mode 100644 index 000000000000..6dbcdb6ebbc8 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SparkBatchJobState.cs @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// The SparkBatchJobState. + public partial class SparkBatchJobState + { + /// Initializes a new instance of SparkBatchJobState. + internal SparkBatchJobState() + { + } + + /// Initializes a new instance of SparkBatchJobState. + /// the time that at which "not_started" livy state was first seen. + /// the time that at which "starting" livy state was first seen. + /// the time that at which "running" livy state was first seen. + /// time that at which "dead" livy state was first seen. + /// the time that at which "success" livy state was first seen. + /// the time that at which "killed" livy state was first seen. + /// the time that at which "recovering" livy state was first seen. + /// the Spark job state. + /// . + internal SparkBatchJobState(DateTimeOffset? notStartedAt, DateTimeOffset? startingAt, DateTimeOffset? runningAt, DateTimeOffset? deadAt, DateTimeOffset? successAt, DateTimeOffset? terminatedAt, DateTimeOffset? recoveringAt, string currentState, SparkRequest jobCreationRequest) + { + NotStartedAt = notStartedAt; + StartingAt = startingAt; + RunningAt = runningAt; + DeadAt = deadAt; + SuccessAt = successAt; + TerminatedAt = terminatedAt; + RecoveringAt = recoveringAt; + CurrentState = currentState; + JobCreationRequest = jobCreationRequest; + } + + /// the time that at which "not_started" livy state was first seen. + public DateTimeOffset? NotStartedAt { get; } + /// the time that at which "starting" livy state was first seen. + public DateTimeOffset? StartingAt { get; } + /// the time that at which "running" livy state was first seen. + public DateTimeOffset? RunningAt { get; } + /// time that at which "dead" livy state was first seen. + public DateTimeOffset? DeadAt { get; } + /// the time that at which "success" livy state was first seen. + public DateTimeOffset? SuccessAt { get; } + /// the time that at which "killed" livy state was first seen. + public DateTimeOffset? TerminatedAt { get; } + /// the time that at which "recovering" livy state was first seen. + public DateTimeOffset? RecoveringAt { get; } + /// the Spark job state. + public string CurrentState { get; } + public SparkRequest JobCreationRequest { get; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SparkErrorSource.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SparkErrorSource.cs new file mode 100644 index 000000000000..76c92031f399 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SparkErrorSource.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// The SparkErrorSource. + public readonly partial struct SparkErrorSource : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + public SparkErrorSource(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SystemValue = "System"; + private const string UserValue = "User"; + private const string UnknownValue = "Unknown"; + private const string DependencyValue = "Dependency"; + + /// System. + public static SparkErrorSource System { get; } = new SparkErrorSource(SystemValue); + /// User. + public static SparkErrorSource User { get; } = new SparkErrorSource(UserValue); + /// Unknown. + public static SparkErrorSource Unknown { get; } = new SparkErrorSource(UnknownValue); + /// Dependency. + public static SparkErrorSource Dependency { get; } = new SparkErrorSource(DependencyValue); + /// Determines if two values are the same. + public static bool operator ==(SparkErrorSource left, SparkErrorSource right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SparkErrorSource left, SparkErrorSource right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator SparkErrorSource(string value) => new SparkErrorSource(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SparkErrorSource other && Equals(other); + /// + public bool Equals(SparkErrorSource other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SparkJobDefinition.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SparkJobDefinition.Serialization.cs new file mode 100644 index 000000000000..ceae1ae62e86 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SparkJobDefinition.Serialization.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class SparkJobDefinition : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + writer.WritePropertyName("targetBigDataPool"); + writer.WriteObjectValue(TargetBigDataPool); + if (RequiredSparkVersion != null) + { + writer.WritePropertyName("requiredSparkVersion"); + writer.WriteStringValue(RequiredSparkVersion); + } + if (Language != null) + { + writer.WritePropertyName("language"); + writer.WriteStringValue(Language); + } + writer.WritePropertyName("jobProperties"); + writer.WriteObjectValue(JobProperties); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static SparkJobDefinition DeserializeSparkJobDefinition(JsonElement element) + { + string description = default; + BigDataPoolReference targetBigDataPool = default; + string requiredSparkVersion = default; + string language = default; + SparkJobProperties jobProperties = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("targetBigDataPool")) + { + targetBigDataPool = BigDataPoolReference.DeserializeBigDataPoolReference(property.Value); + continue; + } + if (property.NameEquals("requiredSparkVersion")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + requiredSparkVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("language")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + language = property.Value.GetString(); + continue; + } + if (property.NameEquals("jobProperties")) + { + jobProperties = SparkJobProperties.DeserializeSparkJobProperties(property.Value); + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new SparkJobDefinition(description, targetBigDataPool, requiredSparkVersion, language, jobProperties, additionalProperties); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SparkJobDefinition.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SparkJobDefinition.cs new file mode 100644 index 000000000000..290adcbabb86 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SparkJobDefinition.cs @@ -0,0 +1,101 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Spark job definition. + public partial class SparkJobDefinition : IDictionary + { + /// Initializes a new instance of SparkJobDefinition. + /// Big data pool reference. + /// The properties of the Spark job. + public SparkJobDefinition(BigDataPoolReference targetBigDataPool, SparkJobProperties jobProperties) + { + if (targetBigDataPool == null) + { + throw new ArgumentNullException(nameof(targetBigDataPool)); + } + if (jobProperties == null) + { + throw new ArgumentNullException(nameof(jobProperties)); + } + + TargetBigDataPool = targetBigDataPool; + JobProperties = jobProperties; + AdditionalProperties = new Dictionary(); + } + + /// Initializes a new instance of SparkJobDefinition. + /// The description of the Spark job definition. + /// Big data pool reference. + /// The required Spark version of the application. + /// The language of the Spark application. + /// The properties of the Spark job. + /// . + internal SparkJobDefinition(string description, BigDataPoolReference targetBigDataPool, string requiredSparkVersion, string language, SparkJobProperties jobProperties, IDictionary additionalProperties) + { + Description = description; + TargetBigDataPool = targetBigDataPool; + RequiredSparkVersion = requiredSparkVersion; + Language = language; + JobProperties = jobProperties; + AdditionalProperties = additionalProperties ?? new Dictionary(); + } + + /// The description of the Spark job definition. + public string Description { get; set; } + /// Big data pool reference. + public BigDataPoolReference TargetBigDataPool { get; set; } + /// The required Spark version of the application. + public string RequiredSparkVersion { get; set; } + /// The language of the Spark application. + public string Language { get; set; } + /// The properties of the Spark job. + public SparkJobProperties JobProperties { get; set; } + internal IDictionary AdditionalProperties { get; } + /// + public IEnumerator> GetEnumerator() => AdditionalProperties.GetEnumerator(); + /// + IEnumerator IEnumerable.GetEnumerator() => AdditionalProperties.GetEnumerator(); + /// + public bool TryGetValue(string key, out object value) => AdditionalProperties.TryGetValue(key, out value); + /// + public bool ContainsKey(string key) => AdditionalProperties.ContainsKey(key); + /// + public ICollection Keys => AdditionalProperties.Keys; + /// + public ICollection Values => AdditionalProperties.Values; + /// + int ICollection>.Count => AdditionalProperties.Count; + /// + public void Add(string key, object value) => AdditionalProperties.Add(key, value); + /// + public bool Remove(string key) => AdditionalProperties.Remove(key); + /// + bool ICollection>.IsReadOnly => AdditionalProperties.IsReadOnly; + /// + void ICollection>.Add(KeyValuePair value) => AdditionalProperties.Add(value); + /// + bool ICollection>.Remove(KeyValuePair value) => AdditionalProperties.Remove(value); + /// + bool ICollection>.Contains(KeyValuePair value) => AdditionalProperties.Contains(value); + /// + void ICollection>.CopyTo(KeyValuePair[] destination, int offset) => AdditionalProperties.CopyTo(destination, offset); + /// + void ICollection>.Clear() => AdditionalProperties.Clear(); + /// + public object this[string key] + { + get => AdditionalProperties[key]; + set => AdditionalProperties[key] = value; + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SparkJobDefinitionResource.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SparkJobDefinitionResource.Serialization.cs new file mode 100644 index 000000000000..3252daaf9c52 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SparkJobDefinitionResource.Serialization.cs @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class SparkJobDefinitionResource : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("properties"); + writer.WriteObjectValue(Properties); + if (Id != null) + { + writer.WritePropertyName("id"); + writer.WriteStringValue(Id); + } + if (Name != null) + { + writer.WritePropertyName("name"); + writer.WriteStringValue(Name); + } + if (Type != null) + { + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + } + if (Etag != null) + { + writer.WritePropertyName("etag"); + writer.WriteStringValue(Etag); + } + writer.WriteEndObject(); + } + + internal static SparkJobDefinitionResource DeserializeSparkJobDefinitionResource(JsonElement element) + { + SparkJobDefinition properties = default; + string id = default; + string name = default; + string type = default; + string etag = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties")) + { + properties = SparkJobDefinition.DeserializeSparkJobDefinition(property.Value); + continue; + } + if (property.NameEquals("id")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("name")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("etag")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + etag = property.Value.GetString(); + continue; + } + } + return new SparkJobDefinitionResource(id, name, type, etag, properties); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SparkJobDefinitionResource.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SparkJobDefinitionResource.cs new file mode 100644 index 000000000000..547a6e28c3b9 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SparkJobDefinitionResource.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Spark job definition resource type. + public partial class SparkJobDefinitionResource : SubResource + { + /// Initializes a new instance of SparkJobDefinitionResource. + /// Properties of spark job definition. + public SparkJobDefinitionResource(SparkJobDefinition properties) + { + if (properties == null) + { + throw new ArgumentNullException(nameof(properties)); + } + + Properties = properties; + } + + /// Initializes a new instance of SparkJobDefinitionResource. + /// The resource identifier. + /// The resource name. + /// The resource type. + /// Etag identifies change in the resource. + /// Properties of spark job definition. + internal SparkJobDefinitionResource(string id, string name, string type, string etag, SparkJobDefinition properties) : base(id, name, type, etag) + { + Properties = properties; + } + + /// Properties of spark job definition. + public SparkJobDefinition Properties { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SparkJobDefinitionsListResponse.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SparkJobDefinitionsListResponse.Serialization.cs new file mode 100644 index 000000000000..790814e307f8 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SparkJobDefinitionsListResponse.Serialization.cs @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class SparkJobDefinitionsListResponse + { + internal static SparkJobDefinitionsListResponse DeserializeSparkJobDefinitionsListResponse(JsonElement element) + { + IReadOnlyList value = default; + string nextLink = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value")) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(SparkJobDefinitionResource.DeserializeSparkJobDefinitionResource(item)); + } + } + value = array; + continue; + } + if (property.NameEquals("nextLink")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = property.Value.GetString(); + continue; + } + } + return new SparkJobDefinitionsListResponse(value, nextLink); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SparkJobDefinitionsListResponse.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SparkJobDefinitionsListResponse.cs new file mode 100644 index 000000000000..66d46fc16889 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SparkJobDefinitionsListResponse.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// A list of spark job definitions resources. + public partial class SparkJobDefinitionsListResponse + { + /// Initializes a new instance of SparkJobDefinitionsListResponse. + /// List of spark job definitions. + internal SparkJobDefinitionsListResponse(IEnumerable value) + { + if (value == null) + { + throw new ArgumentNullException(nameof(value)); + } + + Value = value.ToArray(); + } + + /// Initializes a new instance of SparkJobDefinitionsListResponse. + /// List of spark job definitions. + /// The link to the next page of results, if any remaining results exist. + internal SparkJobDefinitionsListResponse(IReadOnlyList value, string nextLink) + { + Value = value; + NextLink = nextLink; + } + + /// List of spark job definitions. + public IReadOnlyList Value { get; } + /// The link to the next page of results, if any remaining results exist. + public string NextLink { get; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SparkJobProperties.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SparkJobProperties.Serialization.cs new file mode 100644 index 000000000000..5831bfdf437d --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SparkJobProperties.Serialization.cs @@ -0,0 +1,268 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class SparkJobProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Name != null) + { + writer.WritePropertyName("name"); + writer.WriteStringValue(Name); + } + writer.WritePropertyName("file"); + writer.WriteStringValue(File); + if (ClassName != null) + { + writer.WritePropertyName("className"); + writer.WriteStringValue(ClassName); + } + if (Conf != null) + { + writer.WritePropertyName("conf"); + writer.WriteObjectValue(Conf); + } + if (Args != null) + { + writer.WritePropertyName("args"); + writer.WriteStartArray(); + foreach (var item in Args) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Jars != null) + { + writer.WritePropertyName("jars"); + writer.WriteStartArray(); + foreach (var item in Jars) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Files != null) + { + writer.WritePropertyName("files"); + writer.WriteStartArray(); + foreach (var item in Files) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Archives != null) + { + writer.WritePropertyName("archives"); + writer.WriteStartArray(); + foreach (var item in Archives) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("driverMemory"); + writer.WriteStringValue(DriverMemory); + writer.WritePropertyName("driverCores"); + writer.WriteNumberValue(DriverCores); + writer.WritePropertyName("executorMemory"); + writer.WriteStringValue(ExecutorMemory); + writer.WritePropertyName("executorCores"); + writer.WriteNumberValue(ExecutorCores); + writer.WritePropertyName("numExecutors"); + writer.WriteNumberValue(NumExecutors); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static SparkJobProperties DeserializeSparkJobProperties(JsonElement element) + { + string name = default; + string file = default; + string className = default; + object conf = default; + IList args = default; + IList jars = default; + IList files = default; + IList archives = default; + string driverMemory = default; + int driverCores = default; + string executorMemory = default; + int executorCores = default; + int numExecutors = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("file")) + { + file = property.Value.GetString(); + continue; + } + if (property.NameEquals("className")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + className = property.Value.GetString(); + continue; + } + if (property.NameEquals("conf")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + conf = property.Value.GetObject(); + continue; + } + if (property.NameEquals("args")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetString()); + } + } + args = array; + continue; + } + if (property.NameEquals("jars")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetString()); + } + } + jars = array; + continue; + } + if (property.NameEquals("files")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetString()); + } + } + files = array; + continue; + } + if (property.NameEquals("archives")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetString()); + } + } + archives = array; + continue; + } + if (property.NameEquals("driverMemory")) + { + driverMemory = property.Value.GetString(); + continue; + } + if (property.NameEquals("driverCores")) + { + driverCores = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("executorMemory")) + { + executorMemory = property.Value.GetString(); + continue; + } + if (property.NameEquals("executorCores")) + { + executorCores = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("numExecutors")) + { + numExecutors = property.Value.GetInt32(); + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new SparkJobProperties(name, file, className, conf, args, jars, files, archives, driverMemory, driverCores, executorMemory, executorCores, numExecutors, additionalProperties); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SparkJobProperties.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SparkJobProperties.cs new file mode 100644 index 000000000000..ab1e89a6a411 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SparkJobProperties.cs @@ -0,0 +1,145 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// The properties of the Spark job. + public partial class SparkJobProperties : IDictionary + { + /// Initializes a new instance of SparkJobProperties. + /// File containing the application to execute. + /// Amount of memory to use for the driver process. + /// Number of cores to use for the driver. + /// Amount of memory to use per executor process. + /// Number of cores to use for each executor. + /// Number of executors to launch for this job. + public SparkJobProperties(string file, string driverMemory, int driverCores, string executorMemory, int executorCores, int numExecutors) + { + if (file == null) + { + throw new ArgumentNullException(nameof(file)); + } + if (driverMemory == null) + { + throw new ArgumentNullException(nameof(driverMemory)); + } + if (executorMemory == null) + { + throw new ArgumentNullException(nameof(executorMemory)); + } + + File = file; + DriverMemory = driverMemory; + DriverCores = driverCores; + ExecutorMemory = executorMemory; + ExecutorCores = executorCores; + NumExecutors = numExecutors; + AdditionalProperties = new Dictionary(); + } + + /// Initializes a new instance of SparkJobProperties. + /// The name of the job. + /// File containing the application to execute. + /// Main class for Java/Scala application. + /// Spark configuration properties. + /// Command line arguments for the application. + /// Jars to be used in this job. + /// files to be used in this job. + /// Archives to be used in this job. + /// Amount of memory to use for the driver process. + /// Number of cores to use for the driver. + /// Amount of memory to use per executor process. + /// Number of cores to use for each executor. + /// Number of executors to launch for this job. + /// . + internal SparkJobProperties(string name, string file, string className, object conf, IList args, IList jars, IList files, IList archives, string driverMemory, int driverCores, string executorMemory, int executorCores, int numExecutors, IDictionary additionalProperties) + { + Name = name; + File = file; + ClassName = className; + Conf = conf; + Args = args; + Jars = jars; + Files = files; + Archives = archives; + DriverMemory = driverMemory; + DriverCores = driverCores; + ExecutorMemory = executorMemory; + ExecutorCores = executorCores; + NumExecutors = numExecutors; + AdditionalProperties = additionalProperties ?? new Dictionary(); + } + + /// The name of the job. + public string Name { get; set; } + /// File containing the application to execute. + public string File { get; set; } + /// Main class for Java/Scala application. + public string ClassName { get; set; } + /// Spark configuration properties. + public object Conf { get; set; } + /// Command line arguments for the application. + public IList Args { get; set; } + /// Jars to be used in this job. + public IList Jars { get; set; } + /// files to be used in this job. + public IList Files { get; set; } + /// Archives to be used in this job. + public IList Archives { get; set; } + /// Amount of memory to use for the driver process. + public string DriverMemory { get; set; } + /// Number of cores to use for the driver. + public int DriverCores { get; set; } + /// Amount of memory to use per executor process. + public string ExecutorMemory { get; set; } + /// Number of cores to use for each executor. + public int ExecutorCores { get; set; } + /// Number of executors to launch for this job. + public int NumExecutors { get; set; } + internal IDictionary AdditionalProperties { get; } + /// + public IEnumerator> GetEnumerator() => AdditionalProperties.GetEnumerator(); + /// + IEnumerator IEnumerable.GetEnumerator() => AdditionalProperties.GetEnumerator(); + /// + public bool TryGetValue(string key, out object value) => AdditionalProperties.TryGetValue(key, out value); + /// + public bool ContainsKey(string key) => AdditionalProperties.ContainsKey(key); + /// + public ICollection Keys => AdditionalProperties.Keys; + /// + public ICollection Values => AdditionalProperties.Values; + /// + int ICollection>.Count => AdditionalProperties.Count; + /// + public void Add(string key, object value) => AdditionalProperties.Add(key, value); + /// + public bool Remove(string key) => AdditionalProperties.Remove(key); + /// + bool ICollection>.IsReadOnly => AdditionalProperties.IsReadOnly; + /// + void ICollection>.Add(KeyValuePair value) => AdditionalProperties.Add(value); + /// + bool ICollection>.Remove(KeyValuePair value) => AdditionalProperties.Remove(value); + /// + bool ICollection>.Contains(KeyValuePair value) => AdditionalProperties.Contains(value); + /// + void ICollection>.CopyTo(KeyValuePair[] destination, int offset) => AdditionalProperties.CopyTo(destination, offset); + /// + void ICollection>.Clear() => AdditionalProperties.Clear(); + /// + public object this[string key] + { + get => AdditionalProperties[key]; + set => AdditionalProperties[key] = value; + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SparkJobType.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SparkJobType.cs new file mode 100644 index 000000000000..d25b5bfafafe --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SparkJobType.cs @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// The job type. + public readonly partial struct SparkJobType : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + public SparkJobType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SparkBatchValue = "SparkBatch"; + private const string SparkSessionValue = "SparkSession"; + + /// SparkBatch. + public static SparkJobType SparkBatch { get; } = new SparkJobType(SparkBatchValue); + /// SparkSession. + public static SparkJobType SparkSession { get; } = new SparkJobType(SparkSessionValue); + /// Determines if two values are the same. + public static bool operator ==(SparkJobType left, SparkJobType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SparkJobType left, SparkJobType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator SparkJobType(string value) => new SparkJobType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SparkJobType other && Equals(other); + /// + public bool Equals(SparkJobType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SparkLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SparkLinkedService.Serialization.cs new file mode 100644 index 000000000000..e0482074a615 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SparkLinkedService.Serialization.cs @@ -0,0 +1,349 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class SparkLinkedService : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (ConnectVia != null) + { + writer.WritePropertyName("connectVia"); + writer.WriteObjectValue(ConnectVia); + } + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + writer.WritePropertyName("host"); + writer.WriteObjectValue(Host); + writer.WritePropertyName("port"); + writer.WriteObjectValue(Port); + if (ServerType != null) + { + writer.WritePropertyName("serverType"); + writer.WriteStringValue(ServerType.Value.ToString()); + } + if (ThriftTransportProtocol != null) + { + writer.WritePropertyName("thriftTransportProtocol"); + writer.WriteStringValue(ThriftTransportProtocol.Value.ToString()); + } + writer.WritePropertyName("authenticationType"); + writer.WriteStringValue(AuthenticationType.ToString()); + if (Username != null) + { + writer.WritePropertyName("username"); + writer.WriteObjectValue(Username); + } + if (Password != null) + { + writer.WritePropertyName("password"); + writer.WriteObjectValue(Password); + } + if (HttpPath != null) + { + writer.WritePropertyName("httpPath"); + writer.WriteObjectValue(HttpPath); + } + if (EnableSsl != null) + { + writer.WritePropertyName("enableSsl"); + writer.WriteObjectValue(EnableSsl); + } + if (TrustedCertPath != null) + { + writer.WritePropertyName("trustedCertPath"); + writer.WriteObjectValue(TrustedCertPath); + } + if (UseSystemTrustStore != null) + { + writer.WritePropertyName("useSystemTrustStore"); + writer.WriteObjectValue(UseSystemTrustStore); + } + if (AllowHostNameCNMismatch != null) + { + writer.WritePropertyName("allowHostNameCNMismatch"); + writer.WriteObjectValue(AllowHostNameCNMismatch); + } + if (AllowSelfSignedServerCert != null) + { + writer.WritePropertyName("allowSelfSignedServerCert"); + writer.WriteObjectValue(AllowSelfSignedServerCert); + } + if (EncryptedCredential != null) + { + writer.WritePropertyName("encryptedCredential"); + writer.WriteObjectValue(EncryptedCredential); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static SparkLinkedService DeserializeSparkLinkedService(JsonElement element) + { + string type = default; + IntegrationRuntimeReference connectVia = default; + string description = default; + IDictionary parameters = default; + IList annotations = default; + object host = default; + object port = default; + SparkServerType? serverType = default; + SparkThriftTransportProtocol? thriftTransportProtocol = default; + SparkAuthenticationType authenticationType = default; + object username = default; + SecretBase password = default; + object httpPath = default; + object enableSsl = default; + object trustedCertPath = default; + object useSystemTrustStore = default; + object allowHostNameCNMismatch = default; + object allowSelfSignedServerCert = default; + object encryptedCredential = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("connectVia")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("host")) + { + host = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("port")) + { + port = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("serverType")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + serverType = new SparkServerType(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("thriftTransportProtocol")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + thriftTransportProtocol = new SparkThriftTransportProtocol(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("authenticationType")) + { + authenticationType = new SparkAuthenticationType(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("username")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + username = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("password")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + password = SecretBase.DeserializeSecretBase(property0.Value); + continue; + } + if (property0.NameEquals("httpPath")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + httpPath = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("enableSsl")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + enableSsl = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("trustedCertPath")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + trustedCertPath = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("useSystemTrustStore")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + useSystemTrustStore = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("allowHostNameCNMismatch")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + allowHostNameCNMismatch = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("allowSelfSignedServerCert")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + allowSelfSignedServerCert = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("encryptedCredential")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + encryptedCredential = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new SparkLinkedService(type, connectVia, description, parameters, annotations, additionalProperties, host, port, serverType, thriftTransportProtocol, authenticationType, username, password, httpPath, enableSsl, trustedCertPath, useSystemTrustStore, allowHostNameCNMismatch, allowSelfSignedServerCert, encryptedCredential); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SparkLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SparkLinkedService.cs new file mode 100644 index 000000000000..fcb2aac421ab --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SparkLinkedService.cs @@ -0,0 +1,106 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Spark Server linked service. + public partial class SparkLinkedService : LinkedService + { + /// Initializes a new instance of SparkLinkedService. + /// IP address or host name of the Spark server. + /// The TCP port that the Spark server uses to listen for client connections. + /// The authentication method used to access the Spark server. + public SparkLinkedService(object host, object port, SparkAuthenticationType authenticationType) + { + if (host == null) + { + throw new ArgumentNullException(nameof(host)); + } + if (port == null) + { + throw new ArgumentNullException(nameof(port)); + } + + Host = host; + Port = port; + AuthenticationType = authenticationType; + Type = "Spark"; + } + + /// Initializes a new instance of SparkLinkedService. + /// Type of linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for describing the linked service. + /// . + /// IP address or host name of the Spark server. + /// The TCP port that the Spark server uses to listen for client connections. + /// The type of Spark server. + /// The transport protocol to use in the Thrift layer. + /// The authentication method used to access the Spark server. + /// The user name that you use to access Spark Server. + /// The password corresponding to the user name that you provided in the Username field. + /// The partial URL corresponding to the Spark server. + /// Specifies whether the connections to the server are encrypted using SSL. The default value is false. + /// The full path of the .pem file containing trusted CA certificates for verifying the server when connecting over SSL. This property can only be set when using SSL on self-hosted IR. The default value is the cacerts.pem file installed with the IR. + /// Specifies whether to use a CA certificate from the system trust store or from a specified PEM file. The default value is false. + /// Specifies whether to require a CA-issued SSL certificate name to match the host name of the server when connecting over SSL. The default value is false. + /// Specifies whether to allow self-signed certificates from the server. The default value is false. + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + internal SparkLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object host, object port, SparkServerType? serverType, SparkThriftTransportProtocol? thriftTransportProtocol, SparkAuthenticationType authenticationType, object username, SecretBase password, object httpPath, object enableSsl, object trustedCertPath, object useSystemTrustStore, object allowHostNameCNMismatch, object allowSelfSignedServerCert, object encryptedCredential) : base(type, connectVia, description, parameters, annotations, additionalProperties) + { + Host = host; + Port = port; + ServerType = serverType; + ThriftTransportProtocol = thriftTransportProtocol; + AuthenticationType = authenticationType; + Username = username; + Password = password; + HttpPath = httpPath; + EnableSsl = enableSsl; + TrustedCertPath = trustedCertPath; + UseSystemTrustStore = useSystemTrustStore; + AllowHostNameCNMismatch = allowHostNameCNMismatch; + AllowSelfSignedServerCert = allowSelfSignedServerCert; + EncryptedCredential = encryptedCredential; + Type = type ?? "Spark"; + } + + /// IP address or host name of the Spark server. + public object Host { get; set; } + /// The TCP port that the Spark server uses to listen for client connections. + public object Port { get; set; } + /// The type of Spark server. + public SparkServerType? ServerType { get; set; } + /// The transport protocol to use in the Thrift layer. + public SparkThriftTransportProtocol? ThriftTransportProtocol { get; set; } + /// The authentication method used to access the Spark server. + public SparkAuthenticationType AuthenticationType { get; set; } + /// The user name that you use to access Spark Server. + public object Username { get; set; } + /// The password corresponding to the user name that you provided in the Username field. + public SecretBase Password { get; set; } + /// The partial URL corresponding to the Spark server. + public object HttpPath { get; set; } + /// Specifies whether the connections to the server are encrypted using SSL. The default value is false. + public object EnableSsl { get; set; } + /// The full path of the .pem file containing trusted CA certificates for verifying the server when connecting over SSL. This property can only be set when using SSL on self-hosted IR. The default value is the cacerts.pem file installed with the IR. + public object TrustedCertPath { get; set; } + /// Specifies whether to use a CA certificate from the system trust store or from a specified PEM file. The default value is false. + public object UseSystemTrustStore { get; set; } + /// Specifies whether to require a CA-issued SSL certificate name to match the host name of the server when connecting over SSL. The default value is false. + public object AllowHostNameCNMismatch { get; set; } + /// Specifies whether to allow self-signed certificates from the server. The default value is false. + public object AllowSelfSignedServerCert { get; set; } + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + public object EncryptedCredential { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SparkObjectDataset.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SparkObjectDataset.Serialization.cs new file mode 100644 index 000000000000..4a427ab71fb3 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SparkObjectDataset.Serialization.cs @@ -0,0 +1,243 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class SparkObjectDataset : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Structure != null) + { + writer.WritePropertyName("structure"); + writer.WriteObjectValue(Structure); + } + if (Schema != null) + { + writer.WritePropertyName("schema"); + writer.WriteObjectValue(Schema); + } + writer.WritePropertyName("linkedServiceName"); + writer.WriteObjectValue(LinkedServiceName); + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Folder != null) + { + writer.WritePropertyName("folder"); + writer.WriteObjectValue(Folder); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + if (TableName != null) + { + writer.WritePropertyName("tableName"); + writer.WriteObjectValue(TableName); + } + if (Table != null) + { + writer.WritePropertyName("table"); + writer.WriteObjectValue(Table); + } + if (SchemaTypePropertiesSchema != null) + { + writer.WritePropertyName("schema"); + writer.WriteObjectValue(SchemaTypePropertiesSchema); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static SparkObjectDataset DeserializeSparkObjectDataset(JsonElement element) + { + string type = default; + string description = default; + object structure = default; + object schema = default; + LinkedServiceReference linkedServiceName = default; + IDictionary parameters = default; + IList annotations = default; + DatasetFolder folder = default; + object tableName = default; + object table = default; + object schema0 = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("structure")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + structure = property.Value.GetObject(); + continue; + } + if (property.NameEquals("schema")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + schema = property.Value.GetObject(); + continue; + } + if (property.NameEquals("linkedServiceName")) + { + linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("folder")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + folder = DatasetFolder.DeserializeDatasetFolder(property.Value); + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("tableName")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + tableName = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("table")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + table = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("schema")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + schema0 = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new SparkObjectDataset(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties, tableName, table, schema0); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SparkObjectDataset.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SparkObjectDataset.cs new file mode 100644 index 000000000000..c92478b373d5 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SparkObjectDataset.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Spark Server dataset. + public partial class SparkObjectDataset : Dataset + { + /// Initializes a new instance of SparkObjectDataset. + /// Linked service reference. + public SparkObjectDataset(LinkedServiceReference linkedServiceName) : base(linkedServiceName) + { + if (linkedServiceName == null) + { + throw new ArgumentNullException(nameof(linkedServiceName)); + } + + Type = "SparkObject"; + } + + /// Initializes a new instance of SparkObjectDataset. + /// Type of dataset. + /// Dataset description. + /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. + /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. + /// Linked service reference. + /// Parameters for dataset. + /// List of tags that can be used for describing the Dataset. + /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. + /// . + /// This property will be retired. Please consider using schema + table properties instead. + /// The table name of the Spark. Type: string (or Expression with resultType string). + /// The schema name of the Spark. Type: string (or Expression with resultType string). + internal SparkObjectDataset(string type, string description, object structure, object schema, LinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary additionalProperties, object tableName, object table, object schemaTypePropertiesSchema) : base(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) + { + TableName = tableName; + Table = table; + SchemaTypePropertiesSchema = schemaTypePropertiesSchema; + Type = type ?? "SparkObject"; + } + + /// This property will be retired. Please consider using schema + table properties instead. + public object TableName { get; set; } + /// The table name of the Spark. Type: string (or Expression with resultType string). + public object Table { get; set; } + /// The schema name of the Spark. Type: string (or Expression with resultType string). + public object SchemaTypePropertiesSchema { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SparkRequest.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SparkRequest.Serialization.cs new file mode 100644 index 000000000000..a5e2f54d104e --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SparkRequest.Serialization.cs @@ -0,0 +1,236 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class SparkRequest + { + internal static SparkRequest DeserializeSparkRequest(JsonElement element) + { + string name = default; + string file = default; + string className = default; + IReadOnlyList args = default; + IReadOnlyList jars = default; + IReadOnlyList pyFiles = default; + IReadOnlyList files = default; + IReadOnlyList archives = default; + IReadOnlyDictionary conf = default; + string driverMemory = default; + int? driverCores = default; + string executorMemory = default; + int? executorCores = default; + int? numExecutors = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("file")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + file = property.Value.GetString(); + continue; + } + if (property.NameEquals("className")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + className = property.Value.GetString(); + continue; + } + if (property.NameEquals("args")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetString()); + } + } + args = array; + continue; + } + if (property.NameEquals("jars")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetString()); + } + } + jars = array; + continue; + } + if (property.NameEquals("pyFiles")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetString()); + } + } + pyFiles = array; + continue; + } + if (property.NameEquals("files")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetString()); + } + } + files = array; + continue; + } + if (property.NameEquals("archives")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetString()); + } + } + archives = array; + continue; + } + if (property.NameEquals("conf")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + } + conf = dictionary; + continue; + } + if (property.NameEquals("driverMemory")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + driverMemory = property.Value.GetString(); + continue; + } + if (property.NameEquals("driverCores")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + driverCores = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("executorMemory")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + executorMemory = property.Value.GetString(); + continue; + } + if (property.NameEquals("executorCores")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + executorCores = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("numExecutors")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + numExecutors = property.Value.GetInt32(); + continue; + } + } + return new SparkRequest(name, file, className, args, jars, pyFiles, files, archives, conf, driverMemory, driverCores, executorMemory, executorCores, numExecutors); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SparkRequest.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SparkRequest.cs new file mode 100644 index 000000000000..94fd949ee10e --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SparkRequest.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// The SparkRequest. + public partial class SparkRequest + { + /// Initializes a new instance of SparkRequest. + internal SparkRequest() + { + } + + /// Initializes a new instance of SparkRequest. + /// . + /// . + /// . + /// . + /// . + /// . + /// . + /// . + /// Dictionary of <string>. + /// . + /// . + /// . + /// . + /// . + internal SparkRequest(string name, string file, string className, IReadOnlyList arguments, IReadOnlyList jars, IReadOnlyList pythonFiles, IReadOnlyList files, IReadOnlyList archives, IReadOnlyDictionary configuration, string driverMemory, int? driverCores, string executorMemory, int? executorCores, int? executorCount) + { + Name = name; + File = file; + ClassName = className; + Arguments = arguments; + Jars = jars; + PythonFiles = pythonFiles; + Files = files; + Archives = archives; + Configuration = configuration; + DriverMemory = driverMemory; + DriverCores = driverCores; + ExecutorMemory = executorMemory; + ExecutorCores = executorCores; + ExecutorCount = executorCount; + } + + public string Name { get; } + public string File { get; } + public string ClassName { get; } + public IReadOnlyList Arguments { get; } + public IReadOnlyList Jars { get; } + public IReadOnlyList PythonFiles { get; } + public IReadOnlyList Files { get; } + public IReadOnlyList Archives { get; } + /// Dictionary of <string>. + public IReadOnlyDictionary Configuration { get; } + public string DriverMemory { get; } + public int? DriverCores { get; } + public string ExecutorMemory { get; } + public int? ExecutorCores { get; } + public int? ExecutorCount { get; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SparkScheduler.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SparkScheduler.Serialization.cs new file mode 100644 index 000000000000..69bfb28fa317 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SparkScheduler.Serialization.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class SparkScheduler + { + internal static SparkScheduler DeserializeSparkScheduler(JsonElement element) + { + DateTimeOffset? submittedAt = default; + DateTimeOffset? scheduledAt = default; + DateTimeOffset? endedAt = default; + DateTimeOffset? cancellationRequestedAt = default; + SchedulerCurrentState? currentState = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("submittedAt")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + submittedAt = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("scheduledAt")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + scheduledAt = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("endedAt")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + endedAt = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("cancellationRequestedAt")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + cancellationRequestedAt = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("currentState")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + currentState = new SchedulerCurrentState(property.Value.GetString()); + continue; + } + } + return new SparkScheduler(submittedAt, scheduledAt, endedAt, cancellationRequestedAt, currentState); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SparkScheduler.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SparkScheduler.cs new file mode 100644 index 000000000000..2d34cf5ab756 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SparkScheduler.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// The SparkScheduler. + public partial class SparkScheduler + { + /// Initializes a new instance of SparkScheduler. + internal SparkScheduler() + { + } + + /// Initializes a new instance of SparkScheduler. + /// . + /// . + /// . + /// . + /// . + internal SparkScheduler(DateTimeOffset? submittedAt, DateTimeOffset? scheduledAt, DateTimeOffset? endedAt, DateTimeOffset? cancellationRequestedAt, SchedulerCurrentState? currentState) + { + SubmittedAt = submittedAt; + ScheduledAt = scheduledAt; + EndedAt = endedAt; + CancellationRequestedAt = cancellationRequestedAt; + CurrentState = currentState; + } + + public DateTimeOffset? SubmittedAt { get; } + public DateTimeOffset? ScheduledAt { get; } + public DateTimeOffset? EndedAt { get; } + public DateTimeOffset? CancellationRequestedAt { get; } + public SchedulerCurrentState? CurrentState { get; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SparkServerType.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SparkServerType.cs new file mode 100644 index 000000000000..ece030838915 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SparkServerType.cs @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// The type of Spark server. + public readonly partial struct SparkServerType : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + public SparkServerType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SharkServerValue = "SharkServer"; + private const string SharkServer2Value = "SharkServer2"; + private const string SparkThriftServerValue = "SparkThriftServer"; + + /// SharkServer. + public static SparkServerType SharkServer { get; } = new SparkServerType(SharkServerValue); + /// SharkServer2. + public static SparkServerType SharkServer2 { get; } = new SparkServerType(SharkServer2Value); + /// SparkThriftServer. + public static SparkServerType SparkThriftServer { get; } = new SparkServerType(SparkThriftServerValue); + /// Determines if two values are the same. + public static bool operator ==(SparkServerType left, SparkServerType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SparkServerType left, SparkServerType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator SparkServerType(string value) => new SparkServerType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SparkServerType other && Equals(other); + /// + public bool Equals(SparkServerType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SparkServiceError.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SparkServiceError.Serialization.cs new file mode 100644 index 000000000000..ad2dada6fcd6 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SparkServiceError.Serialization.cs @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class SparkServiceError + { + internal static SparkServiceError DeserializeSparkServiceError(JsonElement element) + { + string message = default; + string errorCode = default; + SparkErrorSource? source = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("message")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + message = property.Value.GetString(); + continue; + } + if (property.NameEquals("errorCode")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + errorCode = property.Value.GetString(); + continue; + } + if (property.NameEquals("source")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + source = new SparkErrorSource(property.Value.GetString()); + continue; + } + } + return new SparkServiceError(message, errorCode, source); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SparkServiceError.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SparkServiceError.cs new file mode 100644 index 000000000000..5edda6cf60fd --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SparkServiceError.cs @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// The SparkServiceError. + public partial class SparkServiceError + { + /// Initializes a new instance of SparkServiceError. + internal SparkServiceError() + { + } + + /// Initializes a new instance of SparkServiceError. + /// . + /// . + /// . + internal SparkServiceError(string message, string errorCode, SparkErrorSource? source) + { + Message = message; + ErrorCode = errorCode; + Source = source; + } + + public string Message { get; } + public string ErrorCode { get; } + public SparkErrorSource? Source { get; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SparkServicePlugin.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SparkServicePlugin.Serialization.cs new file mode 100644 index 000000000000..200b162a5386 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SparkServicePlugin.Serialization.cs @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class SparkServicePlugin + { + internal static SparkServicePlugin DeserializeSparkServicePlugin(JsonElement element) + { + DateTimeOffset? preparationStartedAt = default; + DateTimeOffset? resourceAcquisitionStartedAt = default; + DateTimeOffset? submissionStartedAt = default; + DateTimeOffset? monitoringStartedAt = default; + DateTimeOffset? cleanupStartedAt = default; + PluginCurrentState? currentState = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("preparationStartedAt")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + preparationStartedAt = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("resourceAcquisitionStartedAt")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + resourceAcquisitionStartedAt = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("submissionStartedAt")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + submissionStartedAt = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("monitoringStartedAt")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + monitoringStartedAt = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("cleanupStartedAt")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + cleanupStartedAt = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("currentState")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + currentState = new PluginCurrentState(property.Value.GetString()); + continue; + } + } + return new SparkServicePlugin(preparationStartedAt, resourceAcquisitionStartedAt, submissionStartedAt, monitoringStartedAt, cleanupStartedAt, currentState); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SparkServicePlugin.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SparkServicePlugin.cs new file mode 100644 index 000000000000..915ed8322239 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SparkServicePlugin.cs @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// The SparkServicePlugin. + public partial class SparkServicePlugin + { + /// Initializes a new instance of SparkServicePlugin. + internal SparkServicePlugin() + { + } + + /// Initializes a new instance of SparkServicePlugin. + /// . + /// . + /// . + /// . + /// . + /// . + internal SparkServicePlugin(DateTimeOffset? preparationStartedAt, DateTimeOffset? resourceAcquisitionStartedAt, DateTimeOffset? submissionStartedAt, DateTimeOffset? monitoringStartedAt, DateTimeOffset? cleanupStartedAt, PluginCurrentState? currentState) + { + PreparationStartedAt = preparationStartedAt; + ResourceAcquisitionStartedAt = resourceAcquisitionStartedAt; + SubmissionStartedAt = submissionStartedAt; + MonitoringStartedAt = monitoringStartedAt; + CleanupStartedAt = cleanupStartedAt; + CurrentState = currentState; + } + + public DateTimeOffset? PreparationStartedAt { get; } + public DateTimeOffset? ResourceAcquisitionStartedAt { get; } + public DateTimeOffset? SubmissionStartedAt { get; } + public DateTimeOffset? MonitoringStartedAt { get; } + public DateTimeOffset? CleanupStartedAt { get; } + public PluginCurrentState? CurrentState { get; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SparkThriftTransportProtocol.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SparkThriftTransportProtocol.cs new file mode 100644 index 000000000000..8fb53897f16a --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SparkThriftTransportProtocol.cs @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// The transport protocol to use in the Thrift layer. + public readonly partial struct SparkThriftTransportProtocol : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + public SparkThriftTransportProtocol(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string BinaryValue = "Binary"; + private const string SaslValue = "SASL"; + private const string HttpValue = "HTTP "; + + /// Binary. + public static SparkThriftTransportProtocol Binary { get; } = new SparkThriftTransportProtocol(BinaryValue); + /// SASL. + public static SparkThriftTransportProtocol Sasl { get; } = new SparkThriftTransportProtocol(SaslValue); + /// HTTP. + public static SparkThriftTransportProtocol Http { get; } = new SparkThriftTransportProtocol(HttpValue); + /// Determines if two values are the same. + public static bool operator ==(SparkThriftTransportProtocol left, SparkThriftTransportProtocol right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SparkThriftTransportProtocol left, SparkThriftTransportProtocol right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator SparkThriftTransportProtocol(string value) => new SparkThriftTransportProtocol(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SparkThriftTransportProtocol other && Equals(other); + /// + public bool Equals(SparkThriftTransportProtocol other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SqlConnection.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SqlConnection.Serialization.cs new file mode 100644 index 000000000000..391c922da8a1 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SqlConnection.Serialization.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class SqlConnection : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type.ToString()); + writer.WritePropertyName("name"); + writer.WriteStringValue(Name); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static SqlConnection DeserializeSqlConnection(JsonElement element) + { + SqlConnectionType type = default; + string name = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = new SqlConnectionType(property.Value.GetString()); + continue; + } + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new SqlConnection(type, name, additionalProperties); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SqlConnection.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SqlConnection.cs new file mode 100644 index 000000000000..497aaabf1734 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SqlConnection.cs @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// The connection used to execute the SQL script. + public partial class SqlConnection : IDictionary + { + /// Initializes a new instance of SqlConnection. + /// The type of the connection. + /// The identifier of the connection. + public SqlConnection(SqlConnectionType type, string name) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + + Type = type; + Name = name; + AdditionalProperties = new Dictionary(); + } + + /// Initializes a new instance of SqlConnection. + /// The type of the connection. + /// The identifier of the connection. + /// . + internal SqlConnection(SqlConnectionType type, string name, IDictionary additionalProperties) + { + Type = type; + Name = name; + AdditionalProperties = additionalProperties ?? new Dictionary(); + } + + /// The type of the connection. + public SqlConnectionType Type { get; set; } + /// The identifier of the connection. + public string Name { get; set; } + internal IDictionary AdditionalProperties { get; } + /// + public IEnumerator> GetEnumerator() => AdditionalProperties.GetEnumerator(); + /// + IEnumerator IEnumerable.GetEnumerator() => AdditionalProperties.GetEnumerator(); + /// + public bool TryGetValue(string key, out object value) => AdditionalProperties.TryGetValue(key, out value); + /// + public bool ContainsKey(string key) => AdditionalProperties.ContainsKey(key); + /// + public ICollection Keys => AdditionalProperties.Keys; + /// + public ICollection Values => AdditionalProperties.Values; + /// + int ICollection>.Count => AdditionalProperties.Count; + /// + public void Add(string key, object value) => AdditionalProperties.Add(key, value); + /// + public bool Remove(string key) => AdditionalProperties.Remove(key); + /// + bool ICollection>.IsReadOnly => AdditionalProperties.IsReadOnly; + /// + void ICollection>.Add(KeyValuePair value) => AdditionalProperties.Add(value); + /// + bool ICollection>.Remove(KeyValuePair value) => AdditionalProperties.Remove(value); + /// + bool ICollection>.Contains(KeyValuePair value) => AdditionalProperties.Contains(value); + /// + void ICollection>.CopyTo(KeyValuePair[] destination, int offset) => AdditionalProperties.CopyTo(destination, offset); + /// + void ICollection>.Clear() => AdditionalProperties.Clear(); + /// + public object this[string key] + { + get => AdditionalProperties[key]; + set => AdditionalProperties[key] = value; + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SqlConnectionType.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SqlConnectionType.cs new file mode 100644 index 000000000000..b758fa09ec7b --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SqlConnectionType.cs @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// The type of the connection. + public readonly partial struct SqlConnectionType : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + public SqlConnectionType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SqlOnDemandValue = "SqlOnDemand"; + private const string SqlPoolValue = "SqlPool"; + + /// SqlOnDemand. + public static SqlConnectionType SqlOnDemand { get; } = new SqlConnectionType(SqlOnDemandValue); + /// SqlPool. + public static SqlConnectionType SqlPool { get; } = new SqlConnectionType(SqlPoolValue); + /// Determines if two values are the same. + public static bool operator ==(SqlConnectionType left, SqlConnectionType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SqlConnectionType left, SqlConnectionType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator SqlConnectionType(string value) => new SqlConnectionType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SqlConnectionType other && Equals(other); + /// + public bool Equals(SqlConnectionType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SqlScript.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SqlScript.Serialization.cs new file mode 100644 index 000000000000..8161903083aa --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SqlScript.Serialization.cs @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class SqlScript : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Type != null) + { + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + } + writer.WritePropertyName("content"); + writer.WriteObjectValue(Content); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static SqlScript DeserializeSqlScript(JsonElement element) + { + string description = default; + string type = default; + SqlScriptContent content = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("content")) + { + content = SqlScriptContent.DeserializeSqlScriptContent(property.Value); + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new SqlScript(description, type, content, additionalProperties); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SqlScript.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SqlScript.cs new file mode 100644 index 000000000000..040c2bc74d38 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SqlScript.cs @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// SQL script. + public partial class SqlScript : IDictionary + { + /// Initializes a new instance of SqlScript. + /// The content of the SQL script. + public SqlScript(SqlScriptContent content) + { + if (content == null) + { + throw new ArgumentNullException(nameof(content)); + } + + Type = "SqlQuery"; + Content = content; + AdditionalProperties = new Dictionary(); + } + + /// Initializes a new instance of SqlScript. + /// The description of the SQL script. + /// The type of the SQL script. + /// The content of the SQL script. + /// . + internal SqlScript(string description, string type, SqlScriptContent content, IDictionary additionalProperties) + { + Description = description; + Type = type; + Content = content; + AdditionalProperties = additionalProperties ?? new Dictionary(); + } + + /// The description of the SQL script. + public string Description { get; set; } + /// The type of the SQL script. + public string Type { get; set; } + /// The content of the SQL script. + public SqlScriptContent Content { get; set; } + internal IDictionary AdditionalProperties { get; } + /// + public IEnumerator> GetEnumerator() => AdditionalProperties.GetEnumerator(); + /// + IEnumerator IEnumerable.GetEnumerator() => AdditionalProperties.GetEnumerator(); + /// + public bool TryGetValue(string key, out object value) => AdditionalProperties.TryGetValue(key, out value); + /// + public bool ContainsKey(string key) => AdditionalProperties.ContainsKey(key); + /// + public ICollection Keys => AdditionalProperties.Keys; + /// + public ICollection Values => AdditionalProperties.Values; + /// + int ICollection>.Count => AdditionalProperties.Count; + /// + public void Add(string key, object value) => AdditionalProperties.Add(key, value); + /// + public bool Remove(string key) => AdditionalProperties.Remove(key); + /// + bool ICollection>.IsReadOnly => AdditionalProperties.IsReadOnly; + /// + void ICollection>.Add(KeyValuePair value) => AdditionalProperties.Add(value); + /// + bool ICollection>.Remove(KeyValuePair value) => AdditionalProperties.Remove(value); + /// + bool ICollection>.Contains(KeyValuePair value) => AdditionalProperties.Contains(value); + /// + void ICollection>.CopyTo(KeyValuePair[] destination, int offset) => AdditionalProperties.CopyTo(destination, offset); + /// + void ICollection>.Clear() => AdditionalProperties.Clear(); + /// + public object this[string key] + { + get => AdditionalProperties[key]; + set => AdditionalProperties[key] = value; + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SqlScriptContent.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SqlScriptContent.Serialization.cs new file mode 100644 index 000000000000..5ca009b24317 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SqlScriptContent.Serialization.cs @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class SqlScriptContent : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("query"); + writer.WriteStringValue(Query); + writer.WritePropertyName("currentConnection"); + writer.WriteObjectValue(CurrentConnection); + if (Metadata != null) + { + writer.WritePropertyName("metadata"); + writer.WriteObjectValue(Metadata); + } + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static SqlScriptContent DeserializeSqlScriptContent(JsonElement element) + { + string query = default; + SqlConnection currentConnection = default; + SqlScriptMetadata metadata = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("query")) + { + query = property.Value.GetString(); + continue; + } + if (property.NameEquals("currentConnection")) + { + currentConnection = SqlConnection.DeserializeSqlConnection(property.Value); + continue; + } + if (property.NameEquals("metadata")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + metadata = SqlScriptMetadata.DeserializeSqlScriptMetadata(property.Value); + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new SqlScriptContent(query, currentConnection, metadata, additionalProperties); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SqlScriptContent.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SqlScriptContent.cs new file mode 100644 index 000000000000..e9ff1227443c --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SqlScriptContent.cs @@ -0,0 +1,93 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// The content of the SQL script. + public partial class SqlScriptContent : IDictionary + { + /// Initializes a new instance of SqlScriptContent. + /// SQL query to execute. + /// The connection used to execute the SQL script. + public SqlScriptContent(string query, SqlConnection currentConnection) + { + if (query == null) + { + throw new ArgumentNullException(nameof(query)); + } + if (currentConnection == null) + { + throw new ArgumentNullException(nameof(currentConnection)); + } + + Query = query; + CurrentConnection = currentConnection; + AdditionalProperties = new Dictionary(); + } + + /// Initializes a new instance of SqlScriptContent. + /// SQL query to execute. + /// The connection used to execute the SQL script. + /// The metadata of the SQL script. + /// . + internal SqlScriptContent(string query, SqlConnection currentConnection, SqlScriptMetadata metadata, IDictionary additionalProperties) + { + Query = query; + CurrentConnection = currentConnection; + Metadata = metadata; + AdditionalProperties = additionalProperties ?? new Dictionary(); + } + + /// SQL query to execute. + public string Query { get; set; } + /// The connection used to execute the SQL script. + public SqlConnection CurrentConnection { get; set; } + /// The metadata of the SQL script. + public SqlScriptMetadata Metadata { get; set; } + internal IDictionary AdditionalProperties { get; } + /// + public IEnumerator> GetEnumerator() => AdditionalProperties.GetEnumerator(); + /// + IEnumerator IEnumerable.GetEnumerator() => AdditionalProperties.GetEnumerator(); + /// + public bool TryGetValue(string key, out object value) => AdditionalProperties.TryGetValue(key, out value); + /// + public bool ContainsKey(string key) => AdditionalProperties.ContainsKey(key); + /// + public ICollection Keys => AdditionalProperties.Keys; + /// + public ICollection Values => AdditionalProperties.Values; + /// + int ICollection>.Count => AdditionalProperties.Count; + /// + public void Add(string key, object value) => AdditionalProperties.Add(key, value); + /// + public bool Remove(string key) => AdditionalProperties.Remove(key); + /// + bool ICollection>.IsReadOnly => AdditionalProperties.IsReadOnly; + /// + void ICollection>.Add(KeyValuePair value) => AdditionalProperties.Add(value); + /// + bool ICollection>.Remove(KeyValuePair value) => AdditionalProperties.Remove(value); + /// + bool ICollection>.Contains(KeyValuePair value) => AdditionalProperties.Contains(value); + /// + void ICollection>.CopyTo(KeyValuePair[] destination, int offset) => AdditionalProperties.CopyTo(destination, offset); + /// + void ICollection>.Clear() => AdditionalProperties.Clear(); + /// + public object this[string key] + { + get => AdditionalProperties[key]; + set => AdditionalProperties[key] = value; + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SqlScriptMetadata.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SqlScriptMetadata.Serialization.cs new file mode 100644 index 000000000000..dd33efcaf3e7 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SqlScriptMetadata.Serialization.cs @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class SqlScriptMetadata : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Language != null) + { + writer.WritePropertyName("language"); + writer.WriteStringValue(Language); + } + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static SqlScriptMetadata DeserializeSqlScriptMetadata(JsonElement element) + { + string language = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("language")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + language = property.Value.GetString(); + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new SqlScriptMetadata(language, additionalProperties); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SqlScriptMetadata.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SqlScriptMetadata.cs new file mode 100644 index 000000000000..ad84bdfca6b5 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SqlScriptMetadata.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// The metadata of the SQL script. + public partial class SqlScriptMetadata : IDictionary + { + /// Initializes a new instance of SqlScriptMetadata. + public SqlScriptMetadata() + { + AdditionalProperties = new Dictionary(); + } + + /// Initializes a new instance of SqlScriptMetadata. + /// The language of the SQL script. + /// . + internal SqlScriptMetadata(string language, IDictionary additionalProperties) + { + Language = language; + AdditionalProperties = additionalProperties ?? new Dictionary(); + } + + /// The language of the SQL script. + public string Language { get; set; } + internal IDictionary AdditionalProperties { get; } + /// + public IEnumerator> GetEnumerator() => AdditionalProperties.GetEnumerator(); + /// + IEnumerator IEnumerable.GetEnumerator() => AdditionalProperties.GetEnumerator(); + /// + public bool TryGetValue(string key, out object value) => AdditionalProperties.TryGetValue(key, out value); + /// + public bool ContainsKey(string key) => AdditionalProperties.ContainsKey(key); + /// + public ICollection Keys => AdditionalProperties.Keys; + /// + public ICollection Values => AdditionalProperties.Values; + /// + int ICollection>.Count => AdditionalProperties.Count; + /// + public void Add(string key, object value) => AdditionalProperties.Add(key, value); + /// + public bool Remove(string key) => AdditionalProperties.Remove(key); + /// + bool ICollection>.IsReadOnly => AdditionalProperties.IsReadOnly; + /// + void ICollection>.Add(KeyValuePair value) => AdditionalProperties.Add(value); + /// + bool ICollection>.Remove(KeyValuePair value) => AdditionalProperties.Remove(value); + /// + bool ICollection>.Contains(KeyValuePair value) => AdditionalProperties.Contains(value); + /// + void ICollection>.CopyTo(KeyValuePair[] destination, int offset) => AdditionalProperties.CopyTo(destination, offset); + /// + void ICollection>.Clear() => AdditionalProperties.Clear(); + /// + public object this[string key] + { + get => AdditionalProperties[key]; + set => AdditionalProperties[key] = value; + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SqlScriptResource.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SqlScriptResource.Serialization.cs new file mode 100644 index 000000000000..9577c1e88d85 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SqlScriptResource.Serialization.cs @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class SqlScriptResource : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("properties"); + writer.WriteObjectValue(Properties); + if (Id != null) + { + writer.WritePropertyName("id"); + writer.WriteStringValue(Id); + } + if (Name != null) + { + writer.WritePropertyName("name"); + writer.WriteStringValue(Name); + } + if (Type != null) + { + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + } + if (Etag != null) + { + writer.WritePropertyName("etag"); + writer.WriteStringValue(Etag); + } + writer.WriteEndObject(); + } + + internal static SqlScriptResource DeserializeSqlScriptResource(JsonElement element) + { + SqlScript properties = default; + string id = default; + string name = default; + string type = default; + string etag = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties")) + { + properties = SqlScript.DeserializeSqlScript(property.Value); + continue; + } + if (property.NameEquals("id")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("name")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("etag")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + etag = property.Value.GetString(); + continue; + } + } + return new SqlScriptResource(id, name, type, etag, properties); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SqlScriptResource.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SqlScriptResource.cs new file mode 100644 index 000000000000..4ede5ebcb72e --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SqlScriptResource.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Sql Script resource type. + public partial class SqlScriptResource : SubResource + { + /// Initializes a new instance of SqlScriptResource. + /// Properties of sql script. + public SqlScriptResource(SqlScript properties) + { + if (properties == null) + { + throw new ArgumentNullException(nameof(properties)); + } + + Properties = properties; + } + + /// Initializes a new instance of SqlScriptResource. + /// The resource identifier. + /// The resource name. + /// The resource type. + /// Etag identifies change in the resource. + /// Properties of sql script. + internal SqlScriptResource(string id, string name, string type, string etag, SqlScript properties) : base(id, name, type, etag) + { + Properties = properties; + } + + /// Properties of sql script. + public SqlScript Properties { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SqlScriptsListResponse.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SqlScriptsListResponse.Serialization.cs new file mode 100644 index 000000000000..9986a665a840 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SqlScriptsListResponse.Serialization.cs @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class SqlScriptsListResponse + { + internal static SqlScriptsListResponse DeserializeSqlScriptsListResponse(JsonElement element) + { + IReadOnlyList value = default; + string nextLink = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value")) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(SqlScriptResource.DeserializeSqlScriptResource(item)); + } + } + value = array; + continue; + } + if (property.NameEquals("nextLink")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = property.Value.GetString(); + continue; + } + } + return new SqlScriptsListResponse(value, nextLink); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SqlScriptsListResponse.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SqlScriptsListResponse.cs new file mode 100644 index 000000000000..3465202367ef --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SqlScriptsListResponse.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// A list of sql scripts resources. + public partial class SqlScriptsListResponse + { + /// Initializes a new instance of SqlScriptsListResponse. + /// List of sql scripts. + internal SqlScriptsListResponse(IEnumerable value) + { + if (value == null) + { + throw new ArgumentNullException(nameof(value)); + } + + Value = value.ToArray(); + } + + /// Initializes a new instance of SqlScriptsListResponse. + /// List of sql scripts. + /// The link to the next page of results, if any remaining results exist. + internal SqlScriptsListResponse(IReadOnlyList value, string nextLink) + { + Value = value; + NextLink = nextLink; + } + + /// List of sql scripts. + public IReadOnlyList Value { get; } + /// The link to the next page of results, if any remaining results exist. + public string NextLink { get; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SqlServerLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SqlServerLinkedService.Serialization.cs new file mode 100644 index 000000000000..ba54452af591 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SqlServerLinkedService.Serialization.cs @@ -0,0 +1,213 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class SqlServerLinkedService : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (ConnectVia != null) + { + writer.WritePropertyName("connectVia"); + writer.WriteObjectValue(ConnectVia); + } + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + writer.WritePropertyName("connectionString"); + writer.WriteObjectValue(ConnectionString); + if (UserName != null) + { + writer.WritePropertyName("userName"); + writer.WriteObjectValue(UserName); + } + if (Password != null) + { + writer.WritePropertyName("password"); + writer.WriteObjectValue(Password); + } + if (EncryptedCredential != null) + { + writer.WritePropertyName("encryptedCredential"); + writer.WriteObjectValue(EncryptedCredential); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static SqlServerLinkedService DeserializeSqlServerLinkedService(JsonElement element) + { + string type = default; + IntegrationRuntimeReference connectVia = default; + string description = default; + IDictionary parameters = default; + IList annotations = default; + object connectionString = default; + object userName = default; + SecretBase password = default; + object encryptedCredential = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("connectVia")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("connectionString")) + { + connectionString = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("userName")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + userName = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("password")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + password = SecretBase.DeserializeSecretBase(property0.Value); + continue; + } + if (property0.NameEquals("encryptedCredential")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + encryptedCredential = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new SqlServerLinkedService(type, connectVia, description, parameters, annotations, additionalProperties, connectionString, userName, password, encryptedCredential); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SqlServerLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SqlServerLinkedService.cs new file mode 100644 index 000000000000..1e3b1376c036 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SqlServerLinkedService.cs @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// SQL Server linked service. + public partial class SqlServerLinkedService : LinkedService + { + /// Initializes a new instance of SqlServerLinkedService. + /// The connection string. Type: string, SecureString or AzureKeyVaultSecretReference. + public SqlServerLinkedService(object connectionString) + { + if (connectionString == null) + { + throw new ArgumentNullException(nameof(connectionString)); + } + + ConnectionString = connectionString; + Type = "SqlServer"; + } + + /// Initializes a new instance of SqlServerLinkedService. + /// Type of linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for describing the linked service. + /// . + /// The connection string. Type: string, SecureString or AzureKeyVaultSecretReference. + /// The on-premises Windows authentication user name. Type: string (or Expression with resultType string). + /// The on-premises Windows authentication password. + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + internal SqlServerLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object connectionString, object userName, SecretBase password, object encryptedCredential) : base(type, connectVia, description, parameters, annotations, additionalProperties) + { + ConnectionString = connectionString; + UserName = userName; + Password = password; + EncryptedCredential = encryptedCredential; + Type = type ?? "SqlServer"; + } + + /// The connection string. Type: string, SecureString or AzureKeyVaultSecretReference. + public object ConnectionString { get; set; } + /// The on-premises Windows authentication user name. Type: string (or Expression with resultType string). + public object UserName { get; set; } + /// The on-premises Windows authentication password. + public SecretBase Password { get; set; } + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + public object EncryptedCredential { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SqlServerStoredProcedureActivity.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SqlServerStoredProcedureActivity.Serialization.cs new file mode 100644 index 000000000000..625799fb57c7 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SqlServerStoredProcedureActivity.Serialization.cs @@ -0,0 +1,223 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class SqlServerStoredProcedureActivity : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (LinkedServiceName != null) + { + writer.WritePropertyName("linkedServiceName"); + writer.WriteObjectValue(LinkedServiceName); + } + if (Policy != null) + { + writer.WritePropertyName("policy"); + writer.WriteObjectValue(Policy); + } + writer.WritePropertyName("name"); + writer.WriteStringValue(Name); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (DependsOn != null) + { + writer.WritePropertyName("dependsOn"); + writer.WriteStartArray(); + foreach (var item in DependsOn) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (UserProperties != null) + { + writer.WritePropertyName("userProperties"); + writer.WriteStartArray(); + foreach (var item in UserProperties) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + writer.WritePropertyName("storedProcedureName"); + writer.WriteObjectValue(StoredProcedureName); + if (StoredProcedureParameters != null) + { + writer.WritePropertyName("storedProcedureParameters"); + writer.WriteStartObject(); + foreach (var item in StoredProcedureParameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static SqlServerStoredProcedureActivity DeserializeSqlServerStoredProcedureActivity(JsonElement element) + { + LinkedServiceReference linkedServiceName = default; + ActivityPolicy policy = default; + string name = default; + string type = default; + string description = default; + IList dependsOn = default; + IList userProperties = default; + object storedProcedureName = default; + IDictionary storedProcedureParameters = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("linkedServiceName")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value); + continue; + } + if (property.NameEquals("policy")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + policy = ActivityPolicy.DeserializeActivityPolicy(property.Value); + continue; + } + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("dependsOn")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(ActivityDependency.DeserializeActivityDependency(item)); + } + } + dependsOn = array; + continue; + } + if (property.NameEquals("userProperties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(UserProperty.DeserializeUserProperty(item)); + } + } + userProperties = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("storedProcedureName")) + { + storedProcedureName = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("storedProcedureParameters")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property1 in property0.Value.EnumerateObject()) + { + if (property1.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property1.Name, null); + } + else + { + dictionary.Add(property1.Name, StoredProcedureParameter.DeserializeStoredProcedureParameter(property1.Value)); + } + } + storedProcedureParameters = dictionary; + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new SqlServerStoredProcedureActivity(name, type, description, dependsOn, userProperties, additionalProperties, linkedServiceName, policy, storedProcedureName, storedProcedureParameters); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SqlServerStoredProcedureActivity.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SqlServerStoredProcedureActivity.cs new file mode 100644 index 000000000000..d459c4a32a83 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SqlServerStoredProcedureActivity.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// SQL stored procedure activity type. + public partial class SqlServerStoredProcedureActivity : ExecutionActivity + { + /// Initializes a new instance of SqlServerStoredProcedureActivity. + /// Activity name. + /// Stored procedure name. Type: string (or Expression with resultType string). + public SqlServerStoredProcedureActivity(string name, object storedProcedureName) : base(name) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (storedProcedureName == null) + { + throw new ArgumentNullException(nameof(storedProcedureName)); + } + + StoredProcedureName = storedProcedureName; + Type = "SqlServerStoredProcedure"; + } + + /// Initializes a new instance of SqlServerStoredProcedureActivity. + /// Activity name. + /// Type of activity. + /// Activity description. + /// Activity depends on condition. + /// Activity user properties. + /// . + /// Linked service reference. + /// Activity policy. + /// Stored procedure name. Type: string (or Expression with resultType string). + /// Value and type setting for stored procedure parameters. Example: "{Parameter1: {value: "1", type: "int"}}". + internal SqlServerStoredProcedureActivity(string name, string type, string description, IList dependsOn, IList userProperties, IDictionary additionalProperties, LinkedServiceReference linkedServiceName, ActivityPolicy policy, object storedProcedureName, IDictionary storedProcedureParameters) : base(name, type, description, dependsOn, userProperties, additionalProperties, linkedServiceName, policy) + { + StoredProcedureName = storedProcedureName; + StoredProcedureParameters = storedProcedureParameters; + Type = type ?? "SqlServerStoredProcedure"; + } + + /// Stored procedure name. Type: string (or Expression with resultType string). + public object StoredProcedureName { get; set; } + /// Value and type setting for stored procedure parameters. Example: "{Parameter1: {value: "1", type: "int"}}". + public IDictionary StoredProcedureParameters { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SqlServerTableDataset.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SqlServerTableDataset.Serialization.cs new file mode 100644 index 000000000000..2064e69e4eed --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SqlServerTableDataset.Serialization.cs @@ -0,0 +1,243 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class SqlServerTableDataset : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Structure != null) + { + writer.WritePropertyName("structure"); + writer.WriteObjectValue(Structure); + } + if (Schema != null) + { + writer.WritePropertyName("schema"); + writer.WriteObjectValue(Schema); + } + writer.WritePropertyName("linkedServiceName"); + writer.WriteObjectValue(LinkedServiceName); + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Folder != null) + { + writer.WritePropertyName("folder"); + writer.WriteObjectValue(Folder); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + if (TableName != null) + { + writer.WritePropertyName("tableName"); + writer.WriteObjectValue(TableName); + } + if (SchemaTypePropertiesSchema != null) + { + writer.WritePropertyName("schema"); + writer.WriteObjectValue(SchemaTypePropertiesSchema); + } + if (Table != null) + { + writer.WritePropertyName("table"); + writer.WriteObjectValue(Table); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static SqlServerTableDataset DeserializeSqlServerTableDataset(JsonElement element) + { + string type = default; + string description = default; + object structure = default; + object schema = default; + LinkedServiceReference linkedServiceName = default; + IDictionary parameters = default; + IList annotations = default; + DatasetFolder folder = default; + object tableName = default; + object schema0 = default; + object table = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("structure")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + structure = property.Value.GetObject(); + continue; + } + if (property.NameEquals("schema")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + schema = property.Value.GetObject(); + continue; + } + if (property.NameEquals("linkedServiceName")) + { + linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("folder")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + folder = DatasetFolder.DeserializeDatasetFolder(property.Value); + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("tableName")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + tableName = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("schema")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + schema0 = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("table")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + table = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new SqlServerTableDataset(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties, tableName, schema0, table); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SqlServerTableDataset.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SqlServerTableDataset.cs new file mode 100644 index 000000000000..d32b993220fa --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SqlServerTableDataset.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// The on-premises SQL Server dataset. + public partial class SqlServerTableDataset : Dataset + { + /// Initializes a new instance of SqlServerTableDataset. + /// Linked service reference. + public SqlServerTableDataset(LinkedServiceReference linkedServiceName) : base(linkedServiceName) + { + if (linkedServiceName == null) + { + throw new ArgumentNullException(nameof(linkedServiceName)); + } + + Type = "SqlServerTable"; + } + + /// Initializes a new instance of SqlServerTableDataset. + /// Type of dataset. + /// Dataset description. + /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. + /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. + /// Linked service reference. + /// Parameters for dataset. + /// List of tags that can be used for describing the Dataset. + /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. + /// . + /// This property will be retired. Please consider using schema + table properties instead. + /// The schema name of the SQL Server dataset. Type: string (or Expression with resultType string). + /// The table name of the SQL Server dataset. Type: string (or Expression with resultType string). + internal SqlServerTableDataset(string type, string description, object structure, object schema, LinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary additionalProperties, object tableName, object schemaTypePropertiesSchema, object table) : base(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) + { + TableName = tableName; + SchemaTypePropertiesSchema = schemaTypePropertiesSchema; + Table = table; + Type = type ?? "SqlServerTable"; + } + + /// This property will be retired. Please consider using schema + table properties instead. + public object TableName { get; set; } + /// The schema name of the SQL Server dataset. Type: string (or Expression with resultType string). + public object SchemaTypePropertiesSchema { get; set; } + /// The table name of the SQL Server dataset. Type: string (or Expression with resultType string). + public object Table { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SquareLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SquareLinkedService.Serialization.cs new file mode 100644 index 000000000000..c66b8cf3f3be --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SquareLinkedService.Serialization.cs @@ -0,0 +1,259 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class SquareLinkedService : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (ConnectVia != null) + { + writer.WritePropertyName("connectVia"); + writer.WriteObjectValue(ConnectVia); + } + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + writer.WritePropertyName("host"); + writer.WriteObjectValue(Host); + writer.WritePropertyName("clientId"); + writer.WriteObjectValue(ClientId); + if (ClientSecret != null) + { + writer.WritePropertyName("clientSecret"); + writer.WriteObjectValue(ClientSecret); + } + writer.WritePropertyName("redirectUri"); + writer.WriteObjectValue(RedirectUri); + if (UseEncryptedEndpoints != null) + { + writer.WritePropertyName("useEncryptedEndpoints"); + writer.WriteObjectValue(UseEncryptedEndpoints); + } + if (UseHostVerification != null) + { + writer.WritePropertyName("useHostVerification"); + writer.WriteObjectValue(UseHostVerification); + } + if (UsePeerVerification != null) + { + writer.WritePropertyName("usePeerVerification"); + writer.WriteObjectValue(UsePeerVerification); + } + if (EncryptedCredential != null) + { + writer.WritePropertyName("encryptedCredential"); + writer.WriteObjectValue(EncryptedCredential); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static SquareLinkedService DeserializeSquareLinkedService(JsonElement element) + { + string type = default; + IntegrationRuntimeReference connectVia = default; + string description = default; + IDictionary parameters = default; + IList annotations = default; + object host = default; + object clientId = default; + SecretBase clientSecret = default; + object redirectUri = default; + object useEncryptedEndpoints = default; + object useHostVerification = default; + object usePeerVerification = default; + object encryptedCredential = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("connectVia")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("host")) + { + host = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("clientId")) + { + clientId = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("clientSecret")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + clientSecret = SecretBase.DeserializeSecretBase(property0.Value); + continue; + } + if (property0.NameEquals("redirectUri")) + { + redirectUri = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("useEncryptedEndpoints")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + useEncryptedEndpoints = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("useHostVerification")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + useHostVerification = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("usePeerVerification")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + usePeerVerification = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("encryptedCredential")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + encryptedCredential = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new SquareLinkedService(type, connectVia, description, parameters, annotations, additionalProperties, host, clientId, clientSecret, redirectUri, useEncryptedEndpoints, useHostVerification, usePeerVerification, encryptedCredential); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SquareLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SquareLinkedService.cs new file mode 100644 index 000000000000..d0c9bfed962a --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SquareLinkedService.cs @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Square Service linked service. + public partial class SquareLinkedService : LinkedService + { + /// Initializes a new instance of SquareLinkedService. + /// The URL of the Square instance. (i.e. mystore.mysquare.com). + /// The client ID associated with your Square application. + /// The redirect URL assigned in the Square application dashboard. (i.e. http://localhost:2500). + public SquareLinkedService(object host, object clientId, object redirectUri) + { + if (host == null) + { + throw new ArgumentNullException(nameof(host)); + } + if (clientId == null) + { + throw new ArgumentNullException(nameof(clientId)); + } + if (redirectUri == null) + { + throw new ArgumentNullException(nameof(redirectUri)); + } + + Host = host; + ClientId = clientId; + RedirectUri = redirectUri; + Type = "Square"; + } + + /// Initializes a new instance of SquareLinkedService. + /// Type of linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for describing the linked service. + /// . + /// The URL of the Square instance. (i.e. mystore.mysquare.com). + /// The client ID associated with your Square application. + /// The client secret associated with your Square application. + /// The redirect URL assigned in the Square application dashboard. (i.e. http://localhost:2500). + /// Specifies whether the data source endpoints are encrypted using HTTPS. The default value is true. + /// Specifies whether to require the host name in the server's certificate to match the host name of the server when connecting over SSL. The default value is true. + /// Specifies whether to verify the identity of the server when connecting over SSL. The default value is true. + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + internal SquareLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object host, object clientId, SecretBase clientSecret, object redirectUri, object useEncryptedEndpoints, object useHostVerification, object usePeerVerification, object encryptedCredential) : base(type, connectVia, description, parameters, annotations, additionalProperties) + { + Host = host; + ClientId = clientId; + ClientSecret = clientSecret; + RedirectUri = redirectUri; + UseEncryptedEndpoints = useEncryptedEndpoints; + UseHostVerification = useHostVerification; + UsePeerVerification = usePeerVerification; + EncryptedCredential = encryptedCredential; + Type = type ?? "Square"; + } + + /// The URL of the Square instance. (i.e. mystore.mysquare.com). + public object Host { get; set; } + /// The client ID associated with your Square application. + public object ClientId { get; set; } + /// The client secret associated with your Square application. + public SecretBase ClientSecret { get; set; } + /// The redirect URL assigned in the Square application dashboard. (i.e. http://localhost:2500). + public object RedirectUri { get; set; } + /// Specifies whether the data source endpoints are encrypted using HTTPS. The default value is true. + public object UseEncryptedEndpoints { get; set; } + /// Specifies whether to require the host name in the server's certificate to match the host name of the server when connecting over SSL. The default value is true. + public object UseHostVerification { get; set; } + /// Specifies whether to verify the identity of the server when connecting over SSL. The default value is true. + public object UsePeerVerification { get; set; } + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + public object EncryptedCredential { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SquareObjectDataset.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SquareObjectDataset.Serialization.cs new file mode 100644 index 000000000000..a85222cb44f8 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SquareObjectDataset.Serialization.cs @@ -0,0 +1,213 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class SquareObjectDataset : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Structure != null) + { + writer.WritePropertyName("structure"); + writer.WriteObjectValue(Structure); + } + if (Schema != null) + { + writer.WritePropertyName("schema"); + writer.WriteObjectValue(Schema); + } + writer.WritePropertyName("linkedServiceName"); + writer.WriteObjectValue(LinkedServiceName); + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Folder != null) + { + writer.WritePropertyName("folder"); + writer.WriteObjectValue(Folder); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + if (TableName != null) + { + writer.WritePropertyName("tableName"); + writer.WriteObjectValue(TableName); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static SquareObjectDataset DeserializeSquareObjectDataset(JsonElement element) + { + string type = default; + string description = default; + object structure = default; + object schema = default; + LinkedServiceReference linkedServiceName = default; + IDictionary parameters = default; + IList annotations = default; + DatasetFolder folder = default; + object tableName = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("structure")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + structure = property.Value.GetObject(); + continue; + } + if (property.NameEquals("schema")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + schema = property.Value.GetObject(); + continue; + } + if (property.NameEquals("linkedServiceName")) + { + linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("folder")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + folder = DatasetFolder.DeserializeDatasetFolder(property.Value); + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("tableName")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + tableName = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new SquareObjectDataset(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties, tableName); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SquareObjectDataset.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SquareObjectDataset.cs new file mode 100644 index 000000000000..ab64e8cf52be --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SquareObjectDataset.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Square Service dataset. + public partial class SquareObjectDataset : Dataset + { + /// Initializes a new instance of SquareObjectDataset. + /// Linked service reference. + public SquareObjectDataset(LinkedServiceReference linkedServiceName) : base(linkedServiceName) + { + if (linkedServiceName == null) + { + throw new ArgumentNullException(nameof(linkedServiceName)); + } + + Type = "SquareObject"; + } + + /// Initializes a new instance of SquareObjectDataset. + /// Type of dataset. + /// Dataset description. + /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. + /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. + /// Linked service reference. + /// Parameters for dataset. + /// List of tags that can be used for describing the Dataset. + /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. + /// . + /// The table name. Type: string (or Expression with resultType string). + internal SquareObjectDataset(string type, string description, object structure, object schema, LinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary additionalProperties, object tableName) : base(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) + { + TableName = tableName; + Type = type ?? "SquareObject"; + } + + /// The table name. Type: string (or Expression with resultType string). + public object TableName { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SsisAccessCredential.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SsisAccessCredential.Serialization.cs new file mode 100644 index 000000000000..a22a3bc1c0b7 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SsisAccessCredential.Serialization.cs @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class SsisAccessCredential : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("domain"); + writer.WriteObjectValue(Domain); + writer.WritePropertyName("userName"); + writer.WriteObjectValue(UserName); + writer.WritePropertyName("password"); + writer.WriteObjectValue(Password); + writer.WriteEndObject(); + } + + internal static SsisAccessCredential DeserializeSsisAccessCredential(JsonElement element) + { + object domain = default; + object userName = default; + SecretBase password = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("domain")) + { + domain = property.Value.GetObject(); + continue; + } + if (property.NameEquals("userName")) + { + userName = property.Value.GetObject(); + continue; + } + if (property.NameEquals("password")) + { + password = SecretBase.DeserializeSecretBase(property.Value); + continue; + } + } + return new SsisAccessCredential(domain, userName, password); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SsisAccessCredential.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SsisAccessCredential.cs new file mode 100644 index 000000000000..3c13a90c4f13 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SsisAccessCredential.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// SSIS access credential. + public partial class SsisAccessCredential + { + /// Initializes a new instance of SsisAccessCredential. + /// Domain for windows authentication. + /// UseName for windows authentication. + /// Password for windows authentication. + public SsisAccessCredential(object domain, object userName, SecretBase password) + { + if (domain == null) + { + throw new ArgumentNullException(nameof(domain)); + } + if (userName == null) + { + throw new ArgumentNullException(nameof(userName)); + } + if (password == null) + { + throw new ArgumentNullException(nameof(password)); + } + + Domain = domain; + UserName = userName; + Password = password; + } + + /// Domain for windows authentication. + public object Domain { get; set; } + /// UseName for windows authentication. + public object UserName { get; set; } + /// Password for windows authentication. + public SecretBase Password { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SsisChildPackage.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SsisChildPackage.Serialization.cs new file mode 100644 index 000000000000..e2ea96988652 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SsisChildPackage.Serialization.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class SsisChildPackage : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("packagePath"); + writer.WriteObjectValue(PackagePath); + if (PackageName != null) + { + writer.WritePropertyName("packageName"); + writer.WriteStringValue(PackageName); + } + writer.WritePropertyName("packageContent"); + writer.WriteObjectValue(PackageContent); + if (PackageLastModifiedDate != null) + { + writer.WritePropertyName("packageLastModifiedDate"); + writer.WriteStringValue(PackageLastModifiedDate); + } + writer.WriteEndObject(); + } + + internal static SsisChildPackage DeserializeSsisChildPackage(JsonElement element) + { + object packagePath = default; + string packageName = default; + object packageContent = default; + string packageLastModifiedDate = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("packagePath")) + { + packagePath = property.Value.GetObject(); + continue; + } + if (property.NameEquals("packageName")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + packageName = property.Value.GetString(); + continue; + } + if (property.NameEquals("packageContent")) + { + packageContent = property.Value.GetObject(); + continue; + } + if (property.NameEquals("packageLastModifiedDate")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + packageLastModifiedDate = property.Value.GetString(); + continue; + } + } + return new SsisChildPackage(packagePath, packageName, packageContent, packageLastModifiedDate); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SsisChildPackage.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SsisChildPackage.cs new file mode 100644 index 000000000000..c2ca01f0d00f --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SsisChildPackage.cs @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// SSIS embedded child package. + public partial class SsisChildPackage + { + /// Initializes a new instance of SsisChildPackage. + /// Path for embedded child package. Type: string (or Expression with resultType string). + /// Content for embedded child package. Type: string (or Expression with resultType string). + public SsisChildPackage(object packagePath, object packageContent) + { + if (packagePath == null) + { + throw new ArgumentNullException(nameof(packagePath)); + } + if (packageContent == null) + { + throw new ArgumentNullException(nameof(packageContent)); + } + + PackagePath = packagePath; + PackageContent = packageContent; + } + + /// Initializes a new instance of SsisChildPackage. + /// Path for embedded child package. Type: string (or Expression with resultType string). + /// Name for embedded child package. + /// Content for embedded child package. Type: string (or Expression with resultType string). + /// Last modified date for embedded child package. + internal SsisChildPackage(object packagePath, string packageName, object packageContent, string packageLastModifiedDate) + { + PackagePath = packagePath; + PackageName = packageName; + PackageContent = packageContent; + PackageLastModifiedDate = packageLastModifiedDate; + } + + /// Path for embedded child package. Type: string (or Expression with resultType string). + public object PackagePath { get; set; } + /// Name for embedded child package. + public string PackageName { get; set; } + /// Content for embedded child package. Type: string (or Expression with resultType string). + public object PackageContent { get; set; } + /// Last modified date for embedded child package. + public string PackageLastModifiedDate { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SsisExecutionCredential.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SsisExecutionCredential.Serialization.cs new file mode 100644 index 000000000000..10223ec0e72d --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SsisExecutionCredential.Serialization.cs @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class SsisExecutionCredential : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("domain"); + writer.WriteObjectValue(Domain); + writer.WritePropertyName("userName"); + writer.WriteObjectValue(UserName); + writer.WritePropertyName("password"); + writer.WriteObjectValue(Password); + writer.WriteEndObject(); + } + + internal static SsisExecutionCredential DeserializeSsisExecutionCredential(JsonElement element) + { + object domain = default; + object userName = default; + SecureString password = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("domain")) + { + domain = property.Value.GetObject(); + continue; + } + if (property.NameEquals("userName")) + { + userName = property.Value.GetObject(); + continue; + } + if (property.NameEquals("password")) + { + password = SecureString.DeserializeSecureString(property.Value); + continue; + } + } + return new SsisExecutionCredential(domain, userName, password); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SsisExecutionCredential.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SsisExecutionCredential.cs new file mode 100644 index 000000000000..0ec6494687b0 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SsisExecutionCredential.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// SSIS package execution credential. + public partial class SsisExecutionCredential + { + /// Initializes a new instance of SsisExecutionCredential. + /// Domain for windows authentication. + /// UseName for windows authentication. + /// Password for windows authentication. + public SsisExecutionCredential(object domain, object userName, SecureString password) + { + if (domain == null) + { + throw new ArgumentNullException(nameof(domain)); + } + if (userName == null) + { + throw new ArgumentNullException(nameof(userName)); + } + if (password == null) + { + throw new ArgumentNullException(nameof(password)); + } + + Domain = domain; + UserName = userName; + Password = password; + } + + /// Domain for windows authentication. + public object Domain { get; set; } + /// UseName for windows authentication. + public object UserName { get; set; } + /// Password for windows authentication. + public SecureString Password { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SsisExecutionParameter.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SsisExecutionParameter.Serialization.cs new file mode 100644 index 000000000000..5c91a33729c3 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SsisExecutionParameter.Serialization.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class SsisExecutionParameter : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("value"); + writer.WriteObjectValue(Value); + writer.WriteEndObject(); + } + + internal static SsisExecutionParameter DeserializeSsisExecutionParameter(JsonElement element) + { + object value = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value")) + { + value = property.Value.GetObject(); + continue; + } + } + return new SsisExecutionParameter(value); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SsisExecutionParameter.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SsisExecutionParameter.cs new file mode 100644 index 000000000000..64523aaa4d25 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SsisExecutionParameter.cs @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// SSIS execution parameter. + public partial class SsisExecutionParameter + { + /// Initializes a new instance of SsisExecutionParameter. + /// SSIS package execution parameter value. Type: string (or Expression with resultType string). + public SsisExecutionParameter(object value) + { + if (value == null) + { + throw new ArgumentNullException(nameof(value)); + } + + Value = value; + } + + /// SSIS package execution parameter value. Type: string (or Expression with resultType string). + public object Value { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SsisLogLocation.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SsisLogLocation.Serialization.cs new file mode 100644 index 000000000000..482b96dc6d79 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SsisLogLocation.Serialization.cs @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class SsisLogLocation : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("logPath"); + writer.WriteObjectValue(LogPath); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + if (AccessCredential != null) + { + writer.WritePropertyName("accessCredential"); + writer.WriteObjectValue(AccessCredential); + } + if (LogRefreshInterval != null) + { + writer.WritePropertyName("logRefreshInterval"); + writer.WriteObjectValue(LogRefreshInterval); + } + writer.WriteEndObject(); + writer.WriteEndObject(); + } + + internal static SsisLogLocation DeserializeSsisLogLocation(JsonElement element) + { + object logPath = default; + string type = default; + SsisAccessCredential accessCredential = default; + object logRefreshInterval = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("logPath")) + { + logPath = property.Value.GetObject(); + continue; + } + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("accessCredential")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + accessCredential = SsisAccessCredential.DeserializeSsisAccessCredential(property0.Value); + continue; + } + if (property0.NameEquals("logRefreshInterval")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + logRefreshInterval = property0.Value.GetObject(); + continue; + } + } + continue; + } + } + return new SsisLogLocation(logPath, type, accessCredential, logRefreshInterval); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SsisLogLocation.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SsisLogLocation.cs new file mode 100644 index 000000000000..ad4fae222393 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SsisLogLocation.cs @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// SSIS package execution log location. + public partial class SsisLogLocation + { + /// Initializes a new instance of SsisLogLocation. + /// The SSIS package execution log path. Type: string (or Expression with resultType string). + public SsisLogLocation(object logPath) + { + if (logPath == null) + { + throw new ArgumentNullException(nameof(logPath)); + } + + LogPath = logPath; + Type = "File"; + } + + /// Initializes a new instance of SsisLogLocation. + /// The SSIS package execution log path. Type: string (or Expression with resultType string). + /// The type of SSIS log location. + /// The package execution log access credential. + /// Specifies the interval to refresh log. The default interval is 5 minutes. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + internal SsisLogLocation(object logPath, string type, SsisAccessCredential accessCredential, object logRefreshInterval) + { + LogPath = logPath; + Type = type; + AccessCredential = accessCredential; + LogRefreshInterval = logRefreshInterval; + } + + /// The SSIS package execution log path. Type: string (or Expression with resultType string). + public object LogPath { get; set; } + /// The type of SSIS log location. + public string Type { get; set; } + /// The package execution log access credential. + public SsisAccessCredential AccessCredential { get; set; } + /// Specifies the interval to refresh log. The default interval is 5 minutes. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + public object LogRefreshInterval { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SsisObjectMetadataStatusResponse.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SsisObjectMetadataStatusResponse.cs new file mode 100644 index 000000000000..b48d135d4b36 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SsisObjectMetadataStatusResponse.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// The status of the operation. + internal partial class SsisObjectMetadataStatusResponse + { + /// Initializes a new instance of SsisObjectMetadataStatusResponse. + internal SsisObjectMetadataStatusResponse() + { + } + + /// Initializes a new instance of SsisObjectMetadataStatusResponse. + /// The status of the operation. + /// The operation name. + /// The operation properties. + /// The operation error message. + internal SsisObjectMetadataStatusResponse(string status, string name, string properties, string error) + { + Status = status; + Name = name; + Properties = properties; + Error = error; + } + + /// The status of the operation. + public string Status { get; set; } + /// The operation name. + public string Name { get; set; } + /// The operation properties. + public string Properties { get; set; } + /// The operation error message. + public string Error { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SsisPackageLocation.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SsisPackageLocation.Serialization.cs new file mode 100644 index 000000000000..fa326169ed62 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SsisPackageLocation.Serialization.cs @@ -0,0 +1,192 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class SsisPackageLocation : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (PackagePath != null) + { + writer.WritePropertyName("packagePath"); + writer.WriteObjectValue(PackagePath); + } + if (Type != null) + { + writer.WritePropertyName("type"); + writer.WriteStringValue(Type.Value.ToString()); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + if (PackagePassword != null) + { + writer.WritePropertyName("packagePassword"); + writer.WriteObjectValue(PackagePassword); + } + if (AccessCredential != null) + { + writer.WritePropertyName("accessCredential"); + writer.WriteObjectValue(AccessCredential); + } + if (ConfigurationPath != null) + { + writer.WritePropertyName("configurationPath"); + writer.WriteObjectValue(ConfigurationPath); + } + if (PackageName != null) + { + writer.WritePropertyName("packageName"); + writer.WriteStringValue(PackageName); + } + if (PackageContent != null) + { + writer.WritePropertyName("packageContent"); + writer.WriteObjectValue(PackageContent); + } + if (PackageLastModifiedDate != null) + { + writer.WritePropertyName("packageLastModifiedDate"); + writer.WriteStringValue(PackageLastModifiedDate); + } + if (ChildPackages != null) + { + writer.WritePropertyName("childPackages"); + writer.WriteStartArray(); + foreach (var item in ChildPackages) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + writer.WriteEndObject(); + } + + internal static SsisPackageLocation DeserializeSsisPackageLocation(JsonElement element) + { + object packagePath = default; + SsisPackageLocationType? type = default; + SecretBase packagePassword = default; + SsisAccessCredential accessCredential = default; + object configurationPath = default; + string packageName = default; + object packageContent = default; + string packageLastModifiedDate = default; + IList childPackages = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("packagePath")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + packagePath = property.Value.GetObject(); + continue; + } + if (property.NameEquals("type")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + type = new SsisPackageLocationType(property.Value.GetString()); + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("packagePassword")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + packagePassword = SecretBase.DeserializeSecretBase(property0.Value); + continue; + } + if (property0.NameEquals("accessCredential")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + accessCredential = SsisAccessCredential.DeserializeSsisAccessCredential(property0.Value); + continue; + } + if (property0.NameEquals("configurationPath")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + configurationPath = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("packageName")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + packageName = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("packageContent")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + packageContent = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("packageLastModifiedDate")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + packageLastModifiedDate = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("childPackages")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(SsisChildPackage.DeserializeSsisChildPackage(item)); + } + } + childPackages = array; + continue; + } + } + continue; + } + } + return new SsisPackageLocation(packagePath, type, packagePassword, accessCredential, configurationPath, packageName, packageContent, packageLastModifiedDate, childPackages); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SsisPackageLocation.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SsisPackageLocation.cs new file mode 100644 index 000000000000..bd0499b3c2fb --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SsisPackageLocation.cs @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// SSIS package location. + public partial class SsisPackageLocation + { + /// Initializes a new instance of SsisPackageLocation. + public SsisPackageLocation() + { + } + + /// Initializes a new instance of SsisPackageLocation. + /// The SSIS package path. Type: string (or Expression with resultType string). + /// The type of SSIS package location. + /// Password of the package. + /// The package access credential. + /// The configuration file of the package execution. Type: string (or Expression with resultType string). + /// The package name. + /// The embedded package content. Type: string (or Expression with resultType string). + /// The embedded package last modified date. + /// The embedded child package list. + internal SsisPackageLocation(object packagePath, SsisPackageLocationType? type, SecretBase packagePassword, SsisAccessCredential accessCredential, object configurationPath, string packageName, object packageContent, string packageLastModifiedDate, IList childPackages) + { + PackagePath = packagePath; + Type = type; + PackagePassword = packagePassword; + AccessCredential = accessCredential; + ConfigurationPath = configurationPath; + PackageName = packageName; + PackageContent = packageContent; + PackageLastModifiedDate = packageLastModifiedDate; + ChildPackages = childPackages; + } + + /// The SSIS package path. Type: string (or Expression with resultType string). + public object PackagePath { get; set; } + /// The type of SSIS package location. + public SsisPackageLocationType? Type { get; set; } + /// Password of the package. + public SecretBase PackagePassword { get; set; } + /// The package access credential. + public SsisAccessCredential AccessCredential { get; set; } + /// The configuration file of the package execution. Type: string (or Expression with resultType string). + public object ConfigurationPath { get; set; } + /// The package name. + public string PackageName { get; set; } + /// The embedded package content. Type: string (or Expression with resultType string). + public object PackageContent { get; set; } + /// The embedded package last modified date. + public string PackageLastModifiedDate { get; set; } + /// The embedded child package list. + public IList ChildPackages { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SsisPackageLocationType.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SsisPackageLocationType.cs new file mode 100644 index 000000000000..1a1b7100284b --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SsisPackageLocationType.cs @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// The type of SSIS package location. + public readonly partial struct SsisPackageLocationType : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + public SsisPackageLocationType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SsisdbValue = "SSISDB"; + private const string FileValue = "File"; + private const string InlinePackageValue = "InlinePackage"; + + /// SSISDB. + public static SsisPackageLocationType Ssisdb { get; } = new SsisPackageLocationType(SsisdbValue); + /// File. + public static SsisPackageLocationType File { get; } = new SsisPackageLocationType(FileValue); + /// InlinePackage. + public static SsisPackageLocationType InlinePackage { get; } = new SsisPackageLocationType(InlinePackageValue); + /// Determines if two values are the same. + public static bool operator ==(SsisPackageLocationType left, SsisPackageLocationType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SsisPackageLocationType left, SsisPackageLocationType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator SsisPackageLocationType(string value) => new SsisPackageLocationType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SsisPackageLocationType other && Equals(other); + /// + public bool Equals(SsisPackageLocationType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SsisPropertyOverride.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SsisPropertyOverride.Serialization.cs new file mode 100644 index 000000000000..d6c3d42e5c46 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SsisPropertyOverride.Serialization.cs @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class SsisPropertyOverride : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("value"); + writer.WriteObjectValue(Value); + if (IsSensitive != null) + { + writer.WritePropertyName("isSensitive"); + writer.WriteBooleanValue(IsSensitive.Value); + } + writer.WriteEndObject(); + } + + internal static SsisPropertyOverride DeserializeSsisPropertyOverride(JsonElement element) + { + object value = default; + bool? isSensitive = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value")) + { + value = property.Value.GetObject(); + continue; + } + if (property.NameEquals("isSensitive")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isSensitive = property.Value.GetBoolean(); + continue; + } + } + return new SsisPropertyOverride(value, isSensitive); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SsisPropertyOverride.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SsisPropertyOverride.cs new file mode 100644 index 000000000000..471df0591fa8 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SsisPropertyOverride.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// SSIS property override. + public partial class SsisPropertyOverride + { + /// Initializes a new instance of SsisPropertyOverride. + /// SSIS package property override value. Type: string (or Expression with resultType string). + public SsisPropertyOverride(object value) + { + if (value == null) + { + throw new ArgumentNullException(nameof(value)); + } + + Value = value; + } + + /// Initializes a new instance of SsisPropertyOverride. + /// SSIS package property override value. Type: string (or Expression with resultType string). + /// Whether SSIS package property override value is sensitive data. Value will be encrypted in SSISDB if it is true. + internal SsisPropertyOverride(object value, bool? isSensitive) + { + Value = value; + IsSensitive = isSensitive; + } + + /// SSIS package property override value. Type: string (or Expression with resultType string). + public object Value { get; set; } + /// Whether SSIS package property override value is sensitive data. Value will be encrypted in SSISDB if it is true. + public bool? IsSensitive { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/StagingSettings.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/StagingSettings.Serialization.cs new file mode 100644 index 000000000000..1d97da7651d4 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/StagingSettings.Serialization.cs @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class StagingSettings : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("linkedServiceName"); + writer.WriteObjectValue(LinkedServiceName); + if (Path != null) + { + writer.WritePropertyName("path"); + writer.WriteObjectValue(Path); + } + if (EnableCompression != null) + { + writer.WritePropertyName("enableCompression"); + writer.WriteObjectValue(EnableCompression); + } + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static StagingSettings DeserializeStagingSettings(JsonElement element) + { + LinkedServiceReference linkedServiceName = default; + object path = default; + object enableCompression = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("linkedServiceName")) + { + linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value); + continue; + } + if (property.NameEquals("path")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + path = property.Value.GetObject(); + continue; + } + if (property.NameEquals("enableCompression")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + enableCompression = property.Value.GetObject(); + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new StagingSettings(linkedServiceName, path, enableCompression, additionalProperties); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/StagingSettings.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/StagingSettings.cs new file mode 100644 index 000000000000..d9e19b82990b --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/StagingSettings.cs @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Staging settings. + public partial class StagingSettings : IDictionary + { + /// Initializes a new instance of StagingSettings. + /// Staging linked service reference. + public StagingSettings(LinkedServiceReference linkedServiceName) + { + if (linkedServiceName == null) + { + throw new ArgumentNullException(nameof(linkedServiceName)); + } + + LinkedServiceName = linkedServiceName; + AdditionalProperties = new Dictionary(); + } + + /// Initializes a new instance of StagingSettings. + /// Staging linked service reference. + /// The path to storage for storing the interim data. Type: string (or Expression with resultType string). + /// Specifies whether to use compression when copying data via an interim staging. Default value is false. Type: boolean (or Expression with resultType boolean). + /// . + internal StagingSettings(LinkedServiceReference linkedServiceName, object path, object enableCompression, IDictionary additionalProperties) + { + LinkedServiceName = linkedServiceName; + Path = path; + EnableCompression = enableCompression; + AdditionalProperties = additionalProperties ?? new Dictionary(); + } + + /// Staging linked service reference. + public LinkedServiceReference LinkedServiceName { get; set; } + /// The path to storage for storing the interim data. Type: string (or Expression with resultType string). + public object Path { get; set; } + /// Specifies whether to use compression when copying data via an interim staging. Default value is false. Type: boolean (or Expression with resultType boolean). + public object EnableCompression { get; set; } + internal IDictionary AdditionalProperties { get; } + /// + public IEnumerator> GetEnumerator() => AdditionalProperties.GetEnumerator(); + /// + IEnumerator IEnumerable.GetEnumerator() => AdditionalProperties.GetEnumerator(); + /// + public bool TryGetValue(string key, out object value) => AdditionalProperties.TryGetValue(key, out value); + /// + public bool ContainsKey(string key) => AdditionalProperties.ContainsKey(key); + /// + public ICollection Keys => AdditionalProperties.Keys; + /// + public ICollection Values => AdditionalProperties.Values; + /// + int ICollection>.Count => AdditionalProperties.Count; + /// + public void Add(string key, object value) => AdditionalProperties.Add(key, value); + /// + public bool Remove(string key) => AdditionalProperties.Remove(key); + /// + bool ICollection>.IsReadOnly => AdditionalProperties.IsReadOnly; + /// + void ICollection>.Add(KeyValuePair value) => AdditionalProperties.Add(value); + /// + bool ICollection>.Remove(KeyValuePair value) => AdditionalProperties.Remove(value); + /// + bool ICollection>.Contains(KeyValuePair value) => AdditionalProperties.Contains(value); + /// + void ICollection>.CopyTo(KeyValuePair[] destination, int offset) => AdditionalProperties.CopyTo(destination, offset); + /// + void ICollection>.Clear() => AdditionalProperties.Clear(); + /// + public object this[string key] + { + get => AdditionalProperties[key]; + set => AdditionalProperties[key] = value; + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/StartDataFlowDebugSessionRequest.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/StartDataFlowDebugSessionRequest.cs new file mode 100644 index 000000000000..7c415b3789ed --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/StartDataFlowDebugSessionRequest.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Request body structure for starting data flow debug session. + internal partial class StartDataFlowDebugSessionRequest + { + /// Initializes a new instance of StartDataFlowDebugSessionRequest. + internal StartDataFlowDebugSessionRequest() + { + } + + /// Initializes a new instance of StartDataFlowDebugSessionRequest. + /// The ID of data flow debug session. + /// Data flow instance. + /// List of datasets. + /// List of linked services. + /// Staging info for debug session. + /// Data flow debug settings. + /// The type of new Databricks cluster. + internal StartDataFlowDebugSessionRequest(string sessionId, DataFlowResource dataFlow, IReadOnlyList datasets, IReadOnlyList linkedServices, object staging, object debugSettings, bool? incrementalDebug) + { + SessionId = sessionId; + DataFlow = dataFlow; + Datasets = datasets; + LinkedServices = linkedServices; + Staging = staging; + DebugSettings = debugSettings; + IncrementalDebug = incrementalDebug; + } + + /// The ID of data flow debug session. + public string SessionId { get; set; } + /// Data flow instance. + public DataFlowResource DataFlow { get; set; } + /// List of datasets. + public IReadOnlyList Datasets { get; set; } + /// List of linked services. + public IReadOnlyList LinkedServices { get; set; } + /// Staging info for debug session. + public object Staging { get; set; } + /// Data flow debug settings. + public object DebugSettings { get; set; } + /// The type of new Databricks cluster. + public bool? IncrementalDebug { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/StartDataFlowDebugSessionResponse.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/StartDataFlowDebugSessionResponse.cs new file mode 100644 index 000000000000..c3bf6df6bdb3 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/StartDataFlowDebugSessionResponse.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Response body structure for starting data flow debug session. + internal partial class StartDataFlowDebugSessionResponse + { + /// Initializes a new instance of StartDataFlowDebugSessionResponse. + internal StartDataFlowDebugSessionResponse() + { + } + + /// Initializes a new instance of StartDataFlowDebugSessionResponse. + /// The ID of data flow debug job version. + internal StartDataFlowDebugSessionResponse(string jobVersion) + { + JobVersion = jobVersion; + } + + /// The ID of data flow debug job version. + public string JobVersion { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/StoredProcedureParameter.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/StoredProcedureParameter.Serialization.cs new file mode 100644 index 000000000000..2ece06b5a0f6 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/StoredProcedureParameter.Serialization.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class StoredProcedureParameter : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Value != null) + { + writer.WritePropertyName("value"); + writer.WriteObjectValue(Value); + } + if (Type != null) + { + writer.WritePropertyName("type"); + writer.WriteStringValue(Type.Value.ToString()); + } + writer.WriteEndObject(); + } + + internal static StoredProcedureParameter DeserializeStoredProcedureParameter(JsonElement element) + { + object value = default; + StoredProcedureParameterType? type = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + value = property.Value.GetObject(); + continue; + } + if (property.NameEquals("type")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + type = new StoredProcedureParameterType(property.Value.GetString()); + continue; + } + } + return new StoredProcedureParameter(value, type); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/StoredProcedureParameter.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/StoredProcedureParameter.cs new file mode 100644 index 000000000000..43df072d992d --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/StoredProcedureParameter.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// SQL stored procedure parameter. + public partial class StoredProcedureParameter + { + /// Initializes a new instance of StoredProcedureParameter. + public StoredProcedureParameter() + { + } + + /// Initializes a new instance of StoredProcedureParameter. + /// Stored procedure parameter value. Type: string (or Expression with resultType string). + /// Stored procedure parameter type. + internal StoredProcedureParameter(object value, StoredProcedureParameterType? type) + { + Value = value; + Type = type; + } + + /// Stored procedure parameter value. Type: string (or Expression with resultType string). + public object Value { get; set; } + /// Stored procedure parameter type. + public StoredProcedureParameterType? Type { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/StoredProcedureParameterType.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/StoredProcedureParameterType.cs new file mode 100644 index 000000000000..43b0701b7952 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/StoredProcedureParameterType.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Stored procedure parameter type. + public readonly partial struct StoredProcedureParameterType : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + public StoredProcedureParameterType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string StringValue = "String"; + private const string IntValue = "Int"; + private const string Int64Value = "Int64"; + private const string DecimalValue = "Decimal"; + private const string GuidValue = "Guid"; + private const string BooleanValue = "Boolean"; + private const string DateValue = "Date"; + + /// String. + public static StoredProcedureParameterType String { get; } = new StoredProcedureParameterType(StringValue); + /// Int. + public static StoredProcedureParameterType Int { get; } = new StoredProcedureParameterType(IntValue); + /// Int64. + public static StoredProcedureParameterType Int64 { get; } = new StoredProcedureParameterType(Int64Value); + /// Decimal. + public static StoredProcedureParameterType Decimal { get; } = new StoredProcedureParameterType(DecimalValue); + /// Guid. + public static StoredProcedureParameterType Guid { get; } = new StoredProcedureParameterType(GuidValue); + /// Boolean. + public static StoredProcedureParameterType Boolean { get; } = new StoredProcedureParameterType(BooleanValue); + /// Date. + public static StoredProcedureParameterType Date { get; } = new StoredProcedureParameterType(DateValue); + /// Determines if two values are the same. + public static bool operator ==(StoredProcedureParameterType left, StoredProcedureParameterType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(StoredProcedureParameterType left, StoredProcedureParameterType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator StoredProcedureParameterType(string value) => new StoredProcedureParameterType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is StoredProcedureParameterType other && Equals(other); + /// + public bool Equals(StoredProcedureParameterType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SubResource.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SubResource.Serialization.cs new file mode 100644 index 000000000000..1012d1f1e86d --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SubResource.Serialization.cs @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class SubResource : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Id != null) + { + writer.WritePropertyName("id"); + writer.WriteStringValue(Id); + } + if (Name != null) + { + writer.WritePropertyName("name"); + writer.WriteStringValue(Name); + } + if (Type != null) + { + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + } + if (Etag != null) + { + writer.WritePropertyName("etag"); + writer.WriteStringValue(Etag); + } + writer.WriteEndObject(); + } + + internal static SubResource DeserializeSubResource(JsonElement element) + { + string id = default; + string name = default; + string type = default; + string etag = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("name")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("etag")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + etag = property.Value.GetString(); + continue; + } + } + return new SubResource(id, name, type, etag); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SubResource.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SubResource.cs new file mode 100644 index 000000000000..7a1a7f69b14b --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SubResource.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Azure Synapse nested resource, which belongs to a workspace. + public partial class SubResource + { + /// Initializes a new instance of SubResource. + public SubResource() + { + } + + /// Initializes a new instance of SubResource. + /// The resource identifier. + /// The resource name. + /// The resource type. + /// Etag identifies change in the resource. + internal SubResource(string id, string name, string type, string etag) + { + Id = id; + Name = name; + Type = type; + Etag = etag; + } + + /// The resource identifier. + public string Id { get; } + /// The resource name. + public string Name { get; } + /// The resource type. + public string Type { get; } + /// Etag identifies change in the resource. + public string Etag { get; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SubResourceDebugResource.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SubResourceDebugResource.Serialization.cs new file mode 100644 index 000000000000..ea9465fe7e3a --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SubResourceDebugResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class SubResourceDebugResource : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Name != null) + { + writer.WritePropertyName("name"); + writer.WriteStringValue(Name); + } + writer.WriteEndObject(); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SubResourceDebugResource.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SubResourceDebugResource.cs new file mode 100644 index 000000000000..3600e1be38bd --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SubResourceDebugResource.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Azure Synapse nested debug resource. + public partial class SubResourceDebugResource + { + /// Initializes a new instance of SubResourceDebugResource. + public SubResourceDebugResource() + { + } + + /// Initializes a new instance of SubResourceDebugResource. + /// The resource name. + internal SubResourceDebugResource(string name) + { + Name = name; + } + + /// The resource name. + public string Name { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SwitchActivity.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SwitchActivity.Serialization.cs new file mode 100644 index 000000000000..5185075e6acf --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SwitchActivity.Serialization.cs @@ -0,0 +1,224 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class SwitchActivity : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("name"); + writer.WriteStringValue(Name); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (DependsOn != null) + { + writer.WritePropertyName("dependsOn"); + writer.WriteStartArray(); + foreach (var item in DependsOn) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (UserProperties != null) + { + writer.WritePropertyName("userProperties"); + writer.WriteStartArray(); + foreach (var item in UserProperties) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + writer.WritePropertyName("on"); + writer.WriteObjectValue(On); + if (Cases != null) + { + writer.WritePropertyName("cases"); + writer.WriteStartArray(); + foreach (var item in Cases) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (DefaultActivities != null) + { + writer.WritePropertyName("defaultActivities"); + writer.WriteStartArray(); + foreach (var item in DefaultActivities) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static SwitchActivity DeserializeSwitchActivity(JsonElement element) + { + string name = default; + string type = default; + string description = default; + IList dependsOn = default; + IList userProperties = default; + Expression @on = default; + IList cases = default; + IList defaultActivities = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("dependsOn")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(ActivityDependency.DeserializeActivityDependency(item)); + } + } + dependsOn = array; + continue; + } + if (property.NameEquals("userProperties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(UserProperty.DeserializeUserProperty(item)); + } + } + userProperties = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("on")) + { + @on = Expression.DeserializeExpression(property0.Value); + continue; + } + if (property0.NameEquals("cases")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(SwitchCase.DeserializeSwitchCase(item)); + } + } + cases = array; + continue; + } + if (property0.NameEquals("defaultActivities")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(DeserializeActivity(item)); + } + } + defaultActivities = array; + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new SwitchActivity(name, type, description, dependsOn, userProperties, additionalProperties, @on, cases, defaultActivities); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SwitchActivity.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SwitchActivity.cs new file mode 100644 index 000000000000..3c4595fc4c0a --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SwitchActivity.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// This activity evaluates an expression and executes activities under the cases property that correspond to the expression evaluation expected in the equals property. + public partial class SwitchActivity : Activity + { + /// Initializes a new instance of SwitchActivity. + /// Activity name. + /// An expression that would evaluate to a string or integer. This is used to determine the block of activities in cases that will be executed. + public SwitchActivity(string name, Expression @on) : base(name) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (@on == null) + { + throw new ArgumentNullException(nameof(@on)); + } + + On = @on; + Type = "Switch"; + } + + /// Initializes a new instance of SwitchActivity. + /// Activity name. + /// Type of activity. + /// Activity description. + /// Activity depends on condition. + /// Activity user properties. + /// . + /// An expression that would evaluate to a string or integer. This is used to determine the block of activities in cases that will be executed. + /// List of cases that correspond to expected values of the 'on' property. This is an optional property and if not provided, the activity will execute activities provided in defaultActivities. + /// List of activities to execute if no case condition is satisfied. This is an optional property and if not provided, the activity will exit without any action. + internal SwitchActivity(string name, string type, string description, IList dependsOn, IList userProperties, IDictionary additionalProperties, Expression @on, IList cases, IList defaultActivities) : base(name, type, description, dependsOn, userProperties, additionalProperties) + { + On = @on; + Cases = cases; + DefaultActivities = defaultActivities; + Type = type ?? "Switch"; + } + + /// An expression that would evaluate to a string or integer. This is used to determine the block of activities in cases that will be executed. + public Expression On { get; set; } + /// List of cases that correspond to expected values of the 'on' property. This is an optional property and if not provided, the activity will execute activities provided in defaultActivities. + public IList Cases { get; set; } + /// List of activities to execute if no case condition is satisfied. This is an optional property and if not provided, the activity will exit without any action. + public IList DefaultActivities { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SwitchCase.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SwitchCase.Serialization.cs new file mode 100644 index 000000000000..db4b3d1ec8f4 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SwitchCase.Serialization.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class SwitchCase : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Value != null) + { + writer.WritePropertyName("value"); + writer.WriteStringValue(Value); + } + if (Activities != null) + { + writer.WritePropertyName("activities"); + writer.WriteStartArray(); + foreach (var item in Activities) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + } + + internal static SwitchCase DeserializeSwitchCase(JsonElement element) + { + string value = default; + IList activities = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + value = property.Value.GetString(); + continue; + } + if (property.NameEquals("activities")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(Activity.DeserializeActivity(item)); + } + } + activities = array; + continue; + } + } + return new SwitchCase(value, activities); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SwitchCase.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SwitchCase.cs new file mode 100644 index 000000000000..d6914608cc32 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SwitchCase.cs @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Switch cases with have a value and corresponding activities. + public partial class SwitchCase + { + /// Initializes a new instance of SwitchCase. + public SwitchCase() + { + } + + /// Initializes a new instance of SwitchCase. + /// Expected value that satisfies the expression result of the 'on' property. + /// List of activities to execute for satisfied case condition. + internal SwitchCase(string value, IList activities) + { + Value = value; + Activities = activities; + } + + /// Expected value that satisfies the expression result of the 'on' property. + public string Value { get; set; } + /// List of activities to execute for satisfied case condition. + public IList Activities { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SybaseAuthenticationType.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SybaseAuthenticationType.cs new file mode 100644 index 000000000000..d28e900e9407 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SybaseAuthenticationType.cs @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// AuthenticationType to be used for connection. + public readonly partial struct SybaseAuthenticationType : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + public SybaseAuthenticationType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string BasicValue = "Basic"; + private const string WindowsValue = "Windows"; + + /// Basic. + public static SybaseAuthenticationType Basic { get; } = new SybaseAuthenticationType(BasicValue); + /// Windows. + public static SybaseAuthenticationType Windows { get; } = new SybaseAuthenticationType(WindowsValue); + /// Determines if two values are the same. + public static bool operator ==(SybaseAuthenticationType left, SybaseAuthenticationType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SybaseAuthenticationType left, SybaseAuthenticationType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator SybaseAuthenticationType(string value) => new SybaseAuthenticationType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SybaseAuthenticationType other && Equals(other); + /// + public bool Equals(SybaseAuthenticationType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SybaseLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SybaseLinkedService.Serialization.cs new file mode 100644 index 000000000000..c80f7afdbe7c --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SybaseLinkedService.Serialization.cs @@ -0,0 +1,251 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class SybaseLinkedService : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (ConnectVia != null) + { + writer.WritePropertyName("connectVia"); + writer.WriteObjectValue(ConnectVia); + } + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + writer.WritePropertyName("server"); + writer.WriteObjectValue(Server); + writer.WritePropertyName("database"); + writer.WriteObjectValue(Database); + if (Schema != null) + { + writer.WritePropertyName("schema"); + writer.WriteObjectValue(Schema); + } + if (AuthenticationType != null) + { + writer.WritePropertyName("authenticationType"); + writer.WriteStringValue(AuthenticationType.Value.ToString()); + } + if (Username != null) + { + writer.WritePropertyName("username"); + writer.WriteObjectValue(Username); + } + if (Password != null) + { + writer.WritePropertyName("password"); + writer.WriteObjectValue(Password); + } + if (EncryptedCredential != null) + { + writer.WritePropertyName("encryptedCredential"); + writer.WriteObjectValue(EncryptedCredential); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static SybaseLinkedService DeserializeSybaseLinkedService(JsonElement element) + { + string type = default; + IntegrationRuntimeReference connectVia = default; + string description = default; + IDictionary parameters = default; + IList annotations = default; + object server = default; + object database = default; + object schema = default; + SybaseAuthenticationType? authenticationType = default; + object username = default; + SecretBase password = default; + object encryptedCredential = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("connectVia")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("server")) + { + server = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("database")) + { + database = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("schema")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + schema = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("authenticationType")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + authenticationType = new SybaseAuthenticationType(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("username")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + username = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("password")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + password = SecretBase.DeserializeSecretBase(property0.Value); + continue; + } + if (property0.NameEquals("encryptedCredential")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + encryptedCredential = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new SybaseLinkedService(type, connectVia, description, parameters, annotations, additionalProperties, server, database, schema, authenticationType, username, password, encryptedCredential); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SybaseLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SybaseLinkedService.cs new file mode 100644 index 000000000000..0fa5e0680301 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SybaseLinkedService.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Linked service for Sybase data source. + public partial class SybaseLinkedService : LinkedService + { + /// Initializes a new instance of SybaseLinkedService. + /// Server name for connection. Type: string (or Expression with resultType string). + /// Database name for connection. Type: string (or Expression with resultType string). + public SybaseLinkedService(object server, object database) + { + if (server == null) + { + throw new ArgumentNullException(nameof(server)); + } + if (database == null) + { + throw new ArgumentNullException(nameof(database)); + } + + Server = server; + Database = database; + Type = "Sybase"; + } + + /// Initializes a new instance of SybaseLinkedService. + /// Type of linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for describing the linked service. + /// . + /// Server name for connection. Type: string (or Expression with resultType string). + /// Database name for connection. Type: string (or Expression with resultType string). + /// Schema name for connection. Type: string (or Expression with resultType string). + /// AuthenticationType to be used for connection. + /// Username for authentication. Type: string (or Expression with resultType string). + /// Password for authentication. + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + internal SybaseLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object server, object database, object schema, SybaseAuthenticationType? authenticationType, object username, SecretBase password, object encryptedCredential) : base(type, connectVia, description, parameters, annotations, additionalProperties) + { + Server = server; + Database = database; + Schema = schema; + AuthenticationType = authenticationType; + Username = username; + Password = password; + EncryptedCredential = encryptedCredential; + Type = type ?? "Sybase"; + } + + /// Server name for connection. Type: string (or Expression with resultType string). + public object Server { get; set; } + /// Database name for connection. Type: string (or Expression with resultType string). + public object Database { get; set; } + /// Schema name for connection. Type: string (or Expression with resultType string). + public object Schema { get; set; } + /// AuthenticationType to be used for connection. + public SybaseAuthenticationType? AuthenticationType { get; set; } + /// Username for authentication. Type: string (or Expression with resultType string). + public object Username { get; set; } + /// Password for authentication. + public SecretBase Password { get; set; } + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + public object EncryptedCredential { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SybaseTableDataset.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SybaseTableDataset.Serialization.cs new file mode 100644 index 000000000000..afcc9b23ee50 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SybaseTableDataset.Serialization.cs @@ -0,0 +1,213 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class SybaseTableDataset : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Structure != null) + { + writer.WritePropertyName("structure"); + writer.WriteObjectValue(Structure); + } + if (Schema != null) + { + writer.WritePropertyName("schema"); + writer.WriteObjectValue(Schema); + } + writer.WritePropertyName("linkedServiceName"); + writer.WriteObjectValue(LinkedServiceName); + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Folder != null) + { + writer.WritePropertyName("folder"); + writer.WriteObjectValue(Folder); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + if (TableName != null) + { + writer.WritePropertyName("tableName"); + writer.WriteObjectValue(TableName); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static SybaseTableDataset DeserializeSybaseTableDataset(JsonElement element) + { + string type = default; + string description = default; + object structure = default; + object schema = default; + LinkedServiceReference linkedServiceName = default; + IDictionary parameters = default; + IList annotations = default; + DatasetFolder folder = default; + object tableName = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("structure")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + structure = property.Value.GetObject(); + continue; + } + if (property.NameEquals("schema")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + schema = property.Value.GetObject(); + continue; + } + if (property.NameEquals("linkedServiceName")) + { + linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("folder")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + folder = DatasetFolder.DeserializeDatasetFolder(property.Value); + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("tableName")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + tableName = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new SybaseTableDataset(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties, tableName); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SybaseTableDataset.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SybaseTableDataset.cs new file mode 100644 index 000000000000..9b88c97f820b --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SybaseTableDataset.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// The Sybase table dataset. + public partial class SybaseTableDataset : Dataset + { + /// Initializes a new instance of SybaseTableDataset. + /// Linked service reference. + public SybaseTableDataset(LinkedServiceReference linkedServiceName) : base(linkedServiceName) + { + if (linkedServiceName == null) + { + throw new ArgumentNullException(nameof(linkedServiceName)); + } + + Type = "SybaseTable"; + } + + /// Initializes a new instance of SybaseTableDataset. + /// Type of dataset. + /// Dataset description. + /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. + /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. + /// Linked service reference. + /// Parameters for dataset. + /// List of tags that can be used for describing the Dataset. + /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. + /// . + /// The Sybase table name. Type: string (or Expression with resultType string). + internal SybaseTableDataset(string type, string description, object structure, object schema, LinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary additionalProperties, object tableName) : base(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) + { + TableName = tableName; + Type = type ?? "SybaseTable"; + } + + /// The Sybase table name. Type: string (or Expression with resultType string). + public object TableName { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TeradataAuthenticationType.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TeradataAuthenticationType.cs new file mode 100644 index 000000000000..f3282061292a --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TeradataAuthenticationType.cs @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// AuthenticationType to be used for connection. + public readonly partial struct TeradataAuthenticationType : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + public TeradataAuthenticationType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string BasicValue = "Basic"; + private const string WindowsValue = "Windows"; + + /// Basic. + public static TeradataAuthenticationType Basic { get; } = new TeradataAuthenticationType(BasicValue); + /// Windows. + public static TeradataAuthenticationType Windows { get; } = new TeradataAuthenticationType(WindowsValue); + /// Determines if two values are the same. + public static bool operator ==(TeradataAuthenticationType left, TeradataAuthenticationType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(TeradataAuthenticationType left, TeradataAuthenticationType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator TeradataAuthenticationType(string value) => new TeradataAuthenticationType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is TeradataAuthenticationType other && Equals(other); + /// + public bool Equals(TeradataAuthenticationType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TeradataLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TeradataLinkedService.Serialization.cs new file mode 100644 index 000000000000..03209b561490 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TeradataLinkedService.Serialization.cs @@ -0,0 +1,250 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class TeradataLinkedService : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (ConnectVia != null) + { + writer.WritePropertyName("connectVia"); + writer.WriteObjectValue(ConnectVia); + } + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + if (ConnectionString != null) + { + writer.WritePropertyName("connectionString"); + writer.WriteObjectValue(ConnectionString); + } + if (Server != null) + { + writer.WritePropertyName("server"); + writer.WriteObjectValue(Server); + } + if (AuthenticationType != null) + { + writer.WritePropertyName("authenticationType"); + writer.WriteStringValue(AuthenticationType.Value.ToString()); + } + if (Username != null) + { + writer.WritePropertyName("username"); + writer.WriteObjectValue(Username); + } + if (Password != null) + { + writer.WritePropertyName("password"); + writer.WriteObjectValue(Password); + } + if (EncryptedCredential != null) + { + writer.WritePropertyName("encryptedCredential"); + writer.WriteObjectValue(EncryptedCredential); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static TeradataLinkedService DeserializeTeradataLinkedService(JsonElement element) + { + string type = default; + IntegrationRuntimeReference connectVia = default; + string description = default; + IDictionary parameters = default; + IList annotations = default; + object connectionString = default; + object server = default; + TeradataAuthenticationType? authenticationType = default; + object username = default; + SecretBase password = default; + object encryptedCredential = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("connectVia")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("connectionString")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectionString = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("server")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + server = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("authenticationType")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + authenticationType = new TeradataAuthenticationType(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("username")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + username = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("password")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + password = SecretBase.DeserializeSecretBase(property0.Value); + continue; + } + if (property0.NameEquals("encryptedCredential")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + encryptedCredential = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new TeradataLinkedService(type, connectVia, description, parameters, annotations, additionalProperties, connectionString, server, authenticationType, username, password, encryptedCredential); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TeradataLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TeradataLinkedService.cs new file mode 100644 index 000000000000..904a52296565 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TeradataLinkedService.cs @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Linked service for Teradata data source. + public partial class TeradataLinkedService : LinkedService + { + /// Initializes a new instance of TeradataLinkedService. + public TeradataLinkedService() + { + Type = "Teradata"; + } + + /// Initializes a new instance of TeradataLinkedService. + /// Type of linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for describing the linked service. + /// . + /// Teradata ODBC connection string. Type: string, SecureString or AzureKeyVaultSecretReference. + /// Server name for connection. Type: string (or Expression with resultType string). + /// AuthenticationType to be used for connection. + /// Username for authentication. Type: string (or Expression with resultType string). + /// Password for authentication. + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + internal TeradataLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object connectionString, object server, TeradataAuthenticationType? authenticationType, object username, SecretBase password, object encryptedCredential) : base(type, connectVia, description, parameters, annotations, additionalProperties) + { + ConnectionString = connectionString; + Server = server; + AuthenticationType = authenticationType; + Username = username; + Password = password; + EncryptedCredential = encryptedCredential; + Type = type ?? "Teradata"; + } + + /// Teradata ODBC connection string. Type: string, SecureString or AzureKeyVaultSecretReference. + public object ConnectionString { get; set; } + /// Server name for connection. Type: string (or Expression with resultType string). + public object Server { get; set; } + /// AuthenticationType to be used for connection. + public TeradataAuthenticationType? AuthenticationType { get; set; } + /// Username for authentication. Type: string (or Expression with resultType string). + public object Username { get; set; } + /// Password for authentication. + public SecretBase Password { get; set; } + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + public object EncryptedCredential { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TeradataTableDataset.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TeradataTableDataset.Serialization.cs new file mode 100644 index 000000000000..ea62fd9d7133 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TeradataTableDataset.Serialization.cs @@ -0,0 +1,228 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class TeradataTableDataset : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Structure != null) + { + writer.WritePropertyName("structure"); + writer.WriteObjectValue(Structure); + } + if (Schema != null) + { + writer.WritePropertyName("schema"); + writer.WriteObjectValue(Schema); + } + writer.WritePropertyName("linkedServiceName"); + writer.WriteObjectValue(LinkedServiceName); + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Folder != null) + { + writer.WritePropertyName("folder"); + writer.WriteObjectValue(Folder); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + if (Database != null) + { + writer.WritePropertyName("database"); + writer.WriteObjectValue(Database); + } + if (Table != null) + { + writer.WritePropertyName("table"); + writer.WriteObjectValue(Table); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static TeradataTableDataset DeserializeTeradataTableDataset(JsonElement element) + { + string type = default; + string description = default; + object structure = default; + object schema = default; + LinkedServiceReference linkedServiceName = default; + IDictionary parameters = default; + IList annotations = default; + DatasetFolder folder = default; + object database = default; + object table = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("structure")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + structure = property.Value.GetObject(); + continue; + } + if (property.NameEquals("schema")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + schema = property.Value.GetObject(); + continue; + } + if (property.NameEquals("linkedServiceName")) + { + linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("folder")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + folder = DatasetFolder.DeserializeDatasetFolder(property.Value); + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("database")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + database = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("table")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + table = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new TeradataTableDataset(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties, database, table); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TeradataTableDataset.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TeradataTableDataset.cs new file mode 100644 index 000000000000..65531abb1ddd --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TeradataTableDataset.cs @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// The Teradata database dataset. + public partial class TeradataTableDataset : Dataset + { + /// Initializes a new instance of TeradataTableDataset. + /// Linked service reference. + public TeradataTableDataset(LinkedServiceReference linkedServiceName) : base(linkedServiceName) + { + if (linkedServiceName == null) + { + throw new ArgumentNullException(nameof(linkedServiceName)); + } + + Type = "TeradataTable"; + } + + /// Initializes a new instance of TeradataTableDataset. + /// Type of dataset. + /// Dataset description. + /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. + /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. + /// Linked service reference. + /// Parameters for dataset. + /// List of tags that can be used for describing the Dataset. + /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. + /// . + /// The database name of Teradata. Type: string (or Expression with resultType string). + /// The table name of Teradata. Type: string (or Expression with resultType string). + internal TeradataTableDataset(string type, string description, object structure, object schema, LinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary additionalProperties, object database, object table) : base(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) + { + Database = database; + Table = table; + Type = type ?? "TeradataTable"; + } + + /// The database name of Teradata. Type: string (or Expression with resultType string). + public object Database { get; set; } + /// The table name of Teradata. Type: string (or Expression with resultType string). + public object Table { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/Transformation.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/Transformation.Serialization.cs new file mode 100644 index 000000000000..c42a6aa127de --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/Transformation.Serialization.cs @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class Transformation : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("name"); + writer.WriteStringValue(Name); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + writer.WriteEndObject(); + } + + internal static Transformation DeserializeTransformation(JsonElement element) + { + string name = default; + string description = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + } + return new Transformation(name, description); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/Transformation.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/Transformation.cs new file mode 100644 index 000000000000..05f253881817 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/Transformation.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// A data flow transformation. + public partial class Transformation + { + /// Initializes a new instance of Transformation. + /// Transformation name. + public Transformation(string name) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + + Name = name; + } + + /// Initializes a new instance of Transformation. + /// Transformation name. + /// Transformation description. + internal Transformation(string name, string description) + { + Name = name; + Description = description; + } + + /// Transformation name. + public string Name { get; set; } + /// Transformation description. + public string Description { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/Trigger.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/Trigger.Serialization.cs new file mode 100644 index 000000000000..635ac909d9bd --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/Trigger.Serialization.cs @@ -0,0 +1,125 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class Trigger : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (RuntimeState != null) + { + writer.WritePropertyName("runtimeState"); + writer.WriteStringValue(RuntimeState.Value.ToString()); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static Trigger DeserializeTrigger(JsonElement element) + { + if (element.TryGetProperty("type", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "MultiplePipelineTrigger": return MultiplePipelineTrigger.DeserializeMultiplePipelineTrigger(element); + case "RerunTumblingWindowTrigger": return RerunTumblingWindowTrigger.DeserializeRerunTumblingWindowTrigger(element); + } + } + string type = default; + string description = default; + TriggerRuntimeState? runtimeState = default; + IList annotations = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("runtimeState")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + runtimeState = new TriggerRuntimeState(property.Value.GetString()); + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new Trigger(type, description, runtimeState, annotations, additionalProperties); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/Trigger.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/Trigger.cs new file mode 100644 index 000000000000..e8c90dd3154f --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/Trigger.cs @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Azure Synapse nested object which contains information about creating pipeline run. + public partial class Trigger : IDictionary + { + /// Initializes a new instance of Trigger. + public Trigger() + { + AdditionalProperties = new Dictionary(); + Type = "Trigger"; + } + + /// Initializes a new instance of Trigger. + /// Trigger type. + /// Trigger description. + /// Indicates if trigger is running or not. Updated when Start/Stop APIs are called on the Trigger. + /// List of tags that can be used for describing the trigger. + /// . + internal Trigger(string type, string description, TriggerRuntimeState? runtimeState, IList annotations, IDictionary additionalProperties) + { + Type = type ?? "Trigger"; + Description = description; + RuntimeState = runtimeState; + Annotations = annotations; + AdditionalProperties = additionalProperties ?? new Dictionary(); + } + + /// Trigger type. + internal string Type { get; set; } + /// Trigger description. + public string Description { get; set; } + /// Indicates if trigger is running or not. Updated when Start/Stop APIs are called on the Trigger. + public TriggerRuntimeState? RuntimeState { get; } + /// List of tags that can be used for describing the trigger. + public IList Annotations { get; set; } + internal IDictionary AdditionalProperties { get; } + /// + public IEnumerator> GetEnumerator() => AdditionalProperties.GetEnumerator(); + /// + IEnumerator IEnumerable.GetEnumerator() => AdditionalProperties.GetEnumerator(); + /// + public bool TryGetValue(string key, out object value) => AdditionalProperties.TryGetValue(key, out value); + /// + public bool ContainsKey(string key) => AdditionalProperties.ContainsKey(key); + /// + public ICollection Keys => AdditionalProperties.Keys; + /// + public ICollection Values => AdditionalProperties.Values; + /// + int ICollection>.Count => AdditionalProperties.Count; + /// + public void Add(string key, object value) => AdditionalProperties.Add(key, value); + /// + public bool Remove(string key) => AdditionalProperties.Remove(key); + /// + bool ICollection>.IsReadOnly => AdditionalProperties.IsReadOnly; + /// + void ICollection>.Add(KeyValuePair value) => AdditionalProperties.Add(value); + /// + bool ICollection>.Remove(KeyValuePair value) => AdditionalProperties.Remove(value); + /// + bool ICollection>.Contains(KeyValuePair value) => AdditionalProperties.Contains(value); + /// + void ICollection>.CopyTo(KeyValuePair[] destination, int offset) => AdditionalProperties.CopyTo(destination, offset); + /// + void ICollection>.Clear() => AdditionalProperties.Clear(); + /// + public object this[string key] + { + get => AdditionalProperties[key]; + set => AdditionalProperties[key] = value; + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TriggerDependencyProvisioningStatus.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TriggerDependencyProvisioningStatus.cs new file mode 100644 index 000000000000..9fbf35f04d04 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TriggerDependencyProvisioningStatus.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Defines the response of a provision trigger dependency operation. + internal partial class TriggerDependencyProvisioningStatus + { + /// Initializes a new instance of TriggerDependencyProvisioningStatus. + /// Trigger name. + /// Provisioning status. + internal TriggerDependencyProvisioningStatus(string triggerName, string provisioningStatus) + { + if (triggerName == null) + { + throw new ArgumentNullException(nameof(triggerName)); + } + if (provisioningStatus == null) + { + throw new ArgumentNullException(nameof(provisioningStatus)); + } + + TriggerName = triggerName; + ProvisioningStatus = provisioningStatus; + } + + /// Trigger name. + public string TriggerName { get; set; } + /// Provisioning status. + public string ProvisioningStatus { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TriggerListResponse.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TriggerListResponse.Serialization.cs new file mode 100644 index 000000000000..4c319ac37353 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TriggerListResponse.Serialization.cs @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class TriggerListResponse + { + internal static TriggerListResponse DeserializeTriggerListResponse(JsonElement element) + { + IReadOnlyList value = default; + string nextLink = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value")) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(TriggerResource.DeserializeTriggerResource(item)); + } + } + value = array; + continue; + } + if (property.NameEquals("nextLink")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = property.Value.GetString(); + continue; + } + } + return new TriggerListResponse(value, nextLink); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TriggerListResponse.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TriggerListResponse.cs new file mode 100644 index 000000000000..eb6de41c1d0a --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TriggerListResponse.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// A list of trigger resources. + public partial class TriggerListResponse + { + /// Initializes a new instance of TriggerListResponse. + /// List of triggers. + internal TriggerListResponse(IEnumerable value) + { + if (value == null) + { + throw new ArgumentNullException(nameof(value)); + } + + Value = value.ToArray(); + } + + /// Initializes a new instance of TriggerListResponse. + /// List of triggers. + /// The link to the next page of results, if any remaining results exist. + internal TriggerListResponse(IReadOnlyList value, string nextLink) + { + Value = value; + NextLink = nextLink; + } + + /// List of triggers. + public IReadOnlyList Value { get; } + /// The link to the next page of results, if any remaining results exist. + public string NextLink { get; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TriggerPipelineReference.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TriggerPipelineReference.Serialization.cs new file mode 100644 index 000000000000..71e98c03ec61 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TriggerPipelineReference.Serialization.cs @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class TriggerPipelineReference : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (PipelineReference != null) + { + writer.WritePropertyName("pipelineReference"); + writer.WriteObjectValue(PipelineReference); + } + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WriteEndObject(); + } + + internal static TriggerPipelineReference DeserializeTriggerPipelineReference(JsonElement element) + { + PipelineReference pipelineReference = default; + IDictionary parameters = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("pipelineReference")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + pipelineReference = PipelineReference.DeserializePipelineReference(property.Value); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, property0.Value.GetObject()); + } + } + parameters = dictionary; + continue; + } + } + return new TriggerPipelineReference(pipelineReference, parameters); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TriggerPipelineReference.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TriggerPipelineReference.cs new file mode 100644 index 000000000000..b66c99ac3304 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TriggerPipelineReference.cs @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Pipeline that needs to be triggered with the given parameters. + public partial class TriggerPipelineReference + { + /// Initializes a new instance of TriggerPipelineReference. + public TriggerPipelineReference() + { + } + + /// Initializes a new instance of TriggerPipelineReference. + /// Pipeline reference. + /// Pipeline parameters. + internal TriggerPipelineReference(PipelineReference pipelineReference, IDictionary parameters) + { + PipelineReference = pipelineReference; + Parameters = parameters; + } + + /// Pipeline reference. + public PipelineReference PipelineReference { get; set; } + /// Pipeline parameters. + public IDictionary Parameters { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TriggerResource.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TriggerResource.Serialization.cs new file mode 100644 index 000000000000..506aeacb32c9 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TriggerResource.Serialization.cs @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class TriggerResource : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("properties"); + writer.WriteObjectValue(Properties); + if (Id != null) + { + writer.WritePropertyName("id"); + writer.WriteStringValue(Id); + } + if (Name != null) + { + writer.WritePropertyName("name"); + writer.WriteStringValue(Name); + } + if (Type != null) + { + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + } + if (Etag != null) + { + writer.WritePropertyName("etag"); + writer.WriteStringValue(Etag); + } + writer.WriteEndObject(); + } + + internal static TriggerResource DeserializeTriggerResource(JsonElement element) + { + Trigger properties = default; + string id = default; + string name = default; + string type = default; + string etag = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties")) + { + properties = Trigger.DeserializeTrigger(property.Value); + continue; + } + if (property.NameEquals("id")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("name")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("etag")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + etag = property.Value.GetString(); + continue; + } + } + return new TriggerResource(id, name, type, etag, properties); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TriggerResource.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TriggerResource.cs new file mode 100644 index 000000000000..be55511e9dad --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TriggerResource.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Trigger resource type. + public partial class TriggerResource : SubResource + { + /// Initializes a new instance of TriggerResource. + /// Properties of the trigger. + public TriggerResource(Trigger properties) + { + if (properties == null) + { + throw new ArgumentNullException(nameof(properties)); + } + + Properties = properties; + } + + /// Initializes a new instance of TriggerResource. + /// The resource identifier. + /// The resource name. + /// The resource type. + /// Etag identifies change in the resource. + /// Properties of the trigger. + internal TriggerResource(string id, string name, string type, string etag, Trigger properties) : base(id, name, type, etag) + { + Properties = properties; + } + + /// Properties of the trigger. + public Trigger Properties { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TriggerRun.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TriggerRun.Serialization.cs new file mode 100644 index 000000000000..b83370dafb51 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TriggerRun.Serialization.cs @@ -0,0 +1,141 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class TriggerRun + { + internal static TriggerRun DeserializeTriggerRun(JsonElement element) + { + string triggerRunId = default; + string triggerName = default; + string triggerType = default; + DateTimeOffset? triggerRunTimestamp = default; + TriggerRunStatus? status = default; + string message = default; + IReadOnlyDictionary properties = default; + IReadOnlyDictionary triggeredPipelines = default; + IReadOnlyDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("triggerRunId")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + triggerRunId = property.Value.GetString(); + continue; + } + if (property.NameEquals("triggerName")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + triggerName = property.Value.GetString(); + continue; + } + if (property.NameEquals("triggerType")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + triggerType = property.Value.GetString(); + continue; + } + if (property.NameEquals("triggerRunTimestamp")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + triggerRunTimestamp = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("status")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + status = new TriggerRunStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("message")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + message = property.Value.GetString(); + continue; + } + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + } + properties = dictionary; + continue; + } + if (property.NameEquals("triggeredPipelines")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + } + triggeredPipelines = dictionary; + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new TriggerRun(triggerRunId, triggerName, triggerType, triggerRunTimestamp, status, message, properties, triggeredPipelines, additionalProperties); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TriggerRun.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TriggerRun.cs new file mode 100644 index 000000000000..d80970077c35 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TriggerRun.cs @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Trigger runs. + public partial class TriggerRun : IReadOnlyDictionary + { + /// Initializes a new instance of TriggerRun. + internal TriggerRun() + { + AdditionalProperties = new Dictionary(); + } + + /// Initializes a new instance of TriggerRun. + /// Trigger run id. + /// Trigger name. + /// Trigger type. + /// Trigger run start time. + /// Trigger run status. + /// Trigger error message. + /// List of property name and value related to trigger run. Name, value pair depends on type of trigger. + /// List of pipeline name and run Id triggered by the trigger run. + /// . + internal TriggerRun(string triggerRunId, string triggerName, string triggerType, DateTimeOffset? triggerRunTimestamp, TriggerRunStatus? status, string message, IReadOnlyDictionary properties, IReadOnlyDictionary triggeredPipelines, IReadOnlyDictionary additionalProperties) + { + TriggerRunId = triggerRunId; + TriggerName = triggerName; + TriggerType = triggerType; + TriggerRunTimestamp = triggerRunTimestamp; + Status = status; + Message = message; + Properties = properties; + TriggeredPipelines = triggeredPipelines; + AdditionalProperties = additionalProperties ?? new Dictionary(); + } + + /// Trigger run id. + public string TriggerRunId { get; } + /// Trigger name. + public string TriggerName { get; } + /// Trigger type. + public string TriggerType { get; } + /// Trigger run start time. + public DateTimeOffset? TriggerRunTimestamp { get; } + /// Trigger run status. + public TriggerRunStatus? Status { get; } + /// Trigger error message. + public string Message { get; } + /// List of property name and value related to trigger run. Name, value pair depends on type of trigger. + public IReadOnlyDictionary Properties { get; } + /// List of pipeline name and run Id triggered by the trigger run. + public IReadOnlyDictionary TriggeredPipelines { get; } + internal IReadOnlyDictionary AdditionalProperties { get; } + /// + public IEnumerator> GetEnumerator() => AdditionalProperties.GetEnumerator(); + /// + IEnumerator IEnumerable.GetEnumerator() => AdditionalProperties.GetEnumerator(); + /// + public bool TryGetValue(string key, out object value) => AdditionalProperties.TryGetValue(key, out value); + /// + public bool ContainsKey(string key) => AdditionalProperties.ContainsKey(key); + /// + public IEnumerable Keys => AdditionalProperties.Keys; + /// + public IEnumerable Values => AdditionalProperties.Values; + /// + int IReadOnlyCollection>.Count => AdditionalProperties.Count; + /// + public object this[string key] + { + get => AdditionalProperties[key]; + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TriggerRunStatus.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TriggerRunStatus.cs new file mode 100644 index 000000000000..d844a41de592 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TriggerRunStatus.cs @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Trigger run status. + public readonly partial struct TriggerRunStatus : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + public TriggerRunStatus(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SucceededValue = "Succeeded"; + private const string FailedValue = "Failed"; + private const string InprogressValue = "Inprogress"; + + /// Succeeded. + public static TriggerRunStatus Succeeded { get; } = new TriggerRunStatus(SucceededValue); + /// Failed. + public static TriggerRunStatus Failed { get; } = new TriggerRunStatus(FailedValue); + /// Inprogress. + public static TriggerRunStatus Inprogress { get; } = new TriggerRunStatus(InprogressValue); + /// Determines if two values are the same. + public static bool operator ==(TriggerRunStatus left, TriggerRunStatus right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(TriggerRunStatus left, TriggerRunStatus right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator TriggerRunStatus(string value) => new TriggerRunStatus(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is TriggerRunStatus other && Equals(other); + /// + public bool Equals(TriggerRunStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TriggerRunsQueryResponse.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TriggerRunsQueryResponse.Serialization.cs new file mode 100644 index 000000000000..79f7929e2783 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TriggerRunsQueryResponse.Serialization.cs @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class TriggerRunsQueryResponse + { + internal static TriggerRunsQueryResponse DeserializeTriggerRunsQueryResponse(JsonElement element) + { + IReadOnlyList value = default; + string continuationToken = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value")) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(TriggerRun.DeserializeTriggerRun(item)); + } + } + value = array; + continue; + } + if (property.NameEquals("continuationToken")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + continuationToken = property.Value.GetString(); + continue; + } + } + return new TriggerRunsQueryResponse(value, continuationToken); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TriggerRunsQueryResponse.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TriggerRunsQueryResponse.cs new file mode 100644 index 000000000000..a38222a75e54 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TriggerRunsQueryResponse.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// A list of trigger runs. + public partial class TriggerRunsQueryResponse + { + /// Initializes a new instance of TriggerRunsQueryResponse. + /// List of trigger runs. + internal TriggerRunsQueryResponse(IEnumerable value) + { + if (value == null) + { + throw new ArgumentNullException(nameof(value)); + } + + Value = value.ToArray(); + } + + /// Initializes a new instance of TriggerRunsQueryResponse. + /// List of trigger runs. + /// The continuation token for getting the next page of results, if any remaining results exist, null otherwise. + internal TriggerRunsQueryResponse(IReadOnlyList value, string continuationToken) + { + Value = value; + ContinuationToken = continuationToken; + } + + /// List of trigger runs. + public IReadOnlyList Value { get; } + /// The continuation token for getting the next page of results, if any remaining results exist, null otherwise. + public string ContinuationToken { get; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TriggerRuntimeState.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TriggerRuntimeState.cs new file mode 100644 index 000000000000..07bb54fec6b1 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TriggerRuntimeState.cs @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Enumerates possible state of Triggers. + public readonly partial struct TriggerRuntimeState : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + public TriggerRuntimeState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string StartedValue = "Started"; + private const string StoppedValue = "Stopped"; + private const string DisabledValue = "Disabled"; + + /// Started. + public static TriggerRuntimeState Started { get; } = new TriggerRuntimeState(StartedValue); + /// Stopped. + public static TriggerRuntimeState Stopped { get; } = new TriggerRuntimeState(StoppedValue); + /// Disabled. + public static TriggerRuntimeState Disabled { get; } = new TriggerRuntimeState(DisabledValue); + /// Determines if two values are the same. + public static bool operator ==(TriggerRuntimeState left, TriggerRuntimeState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(TriggerRuntimeState left, TriggerRuntimeState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator TriggerRuntimeState(string value) => new TriggerRuntimeState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is TriggerRuntimeState other && Equals(other); + /// + public bool Equals(TriggerRuntimeState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TriggerSubscriptionOperationStatus.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TriggerSubscriptionOperationStatus.Serialization.cs new file mode 100644 index 000000000000..49e01fc05a34 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TriggerSubscriptionOperationStatus.Serialization.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class TriggerSubscriptionOperationStatus + { + internal static TriggerSubscriptionOperationStatus DeserializeTriggerSubscriptionOperationStatus(JsonElement element) + { + string triggerName = default; + EventSubscriptionStatus? status = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("triggerName")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + triggerName = property.Value.GetString(); + continue; + } + if (property.NameEquals("status")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + status = new EventSubscriptionStatus(property.Value.GetString()); + continue; + } + } + return new TriggerSubscriptionOperationStatus(triggerName, status); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TriggerSubscriptionOperationStatus.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TriggerSubscriptionOperationStatus.cs new file mode 100644 index 000000000000..c55665a64443 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TriggerSubscriptionOperationStatus.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Defines the response of a trigger subscription operation. + public partial class TriggerSubscriptionOperationStatus + { + /// Initializes a new instance of TriggerSubscriptionOperationStatus. + internal TriggerSubscriptionOperationStatus() + { + } + + /// Initializes a new instance of TriggerSubscriptionOperationStatus. + /// Trigger name. + /// Event Subscription Status. + internal TriggerSubscriptionOperationStatus(string triggerName, EventSubscriptionStatus? status) + { + TriggerName = triggerName; + Status = status; + } + + /// Trigger name. + public string TriggerName { get; } + /// Event Subscription Status. + public EventSubscriptionStatus? Status { get; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/UntilActivity.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/UntilActivity.Serialization.cs new file mode 100644 index 000000000000..0a82978ce63a --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/UntilActivity.Serialization.cs @@ -0,0 +1,200 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class UntilActivity : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("name"); + writer.WriteStringValue(Name); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (DependsOn != null) + { + writer.WritePropertyName("dependsOn"); + writer.WriteStartArray(); + foreach (var item in DependsOn) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (UserProperties != null) + { + writer.WritePropertyName("userProperties"); + writer.WriteStartArray(); + foreach (var item in UserProperties) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + writer.WritePropertyName("expression"); + writer.WriteObjectValue(Expression); + if (Timeout != null) + { + writer.WritePropertyName("timeout"); + writer.WriteObjectValue(Timeout); + } + writer.WritePropertyName("activities"); + writer.WriteStartArray(); + foreach (var item in Activities) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static UntilActivity DeserializeUntilActivity(JsonElement element) + { + string name = default; + string type = default; + string description = default; + IList dependsOn = default; + IList userProperties = default; + Expression expression = default; + object timeout = default; + IList activities = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("dependsOn")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(ActivityDependency.DeserializeActivityDependency(item)); + } + } + dependsOn = array; + continue; + } + if (property.NameEquals("userProperties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(UserProperty.DeserializeUserProperty(item)); + } + } + userProperties = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("expression")) + { + expression = Expression.DeserializeExpression(property0.Value); + continue; + } + if (property0.NameEquals("timeout")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + timeout = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("activities")) + { + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(DeserializeActivity(item)); + } + } + activities = array; + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new UntilActivity(name, type, description, dependsOn, userProperties, additionalProperties, expression, timeout, activities); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/UntilActivity.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/UntilActivity.cs new file mode 100644 index 000000000000..0f1757c7bf77 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/UntilActivity.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// This activity executes inner activities until the specified boolean expression results to true or timeout is reached, whichever is earlier. + public partial class UntilActivity : Activity + { + /// Initializes a new instance of UntilActivity. + /// Activity name. + /// An expression that would evaluate to Boolean. The loop will continue until this expression evaluates to true. + /// List of activities to execute. + public UntilActivity(string name, Expression expression, IEnumerable activities) : base(name) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (expression == null) + { + throw new ArgumentNullException(nameof(expression)); + } + if (activities == null) + { + throw new ArgumentNullException(nameof(activities)); + } + + Expression = expression; + Activities = activities.ToArray(); + Type = "Until"; + } + + /// Initializes a new instance of UntilActivity. + /// Activity name. + /// Type of activity. + /// Activity description. + /// Activity depends on condition. + /// Activity user properties. + /// . + /// An expression that would evaluate to Boolean. The loop will continue until this expression evaluates to true. + /// Specifies the timeout for the activity to run. If there is no value specified, it takes the value of TimeSpan.FromDays(7) which is 1 week as default. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// List of activities to execute. + internal UntilActivity(string name, string type, string description, IList dependsOn, IList userProperties, IDictionary additionalProperties, Expression expression, object timeout, IList activities) : base(name, type, description, dependsOn, userProperties, additionalProperties) + { + Expression = expression; + Timeout = timeout; + Activities = activities; + Type = type ?? "Until"; + } + + /// An expression that would evaluate to Boolean. The loop will continue until this expression evaluates to true. + public Expression Expression { get; set; } + /// Specifies the timeout for the activity to run. If there is no value specified, it takes the value of TimeSpan.FromDays(7) which is 1 week as default. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + public object Timeout { get; set; } + /// List of activities to execute. + public IList Activities { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/UserProperty.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/UserProperty.Serialization.cs new file mode 100644 index 000000000000..60210bb0ab5b --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/UserProperty.Serialization.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class UserProperty : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("name"); + writer.WriteStringValue(Name); + writer.WritePropertyName("value"); + writer.WriteObjectValue(Value); + writer.WriteEndObject(); + } + + internal static UserProperty DeserializeUserProperty(JsonElement element) + { + string name = default; + object value = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("value")) + { + value = property.Value.GetObject(); + continue; + } + } + return new UserProperty(name, value); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/UserProperty.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/UserProperty.cs new file mode 100644 index 000000000000..a46a3b61dc0e --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/UserProperty.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// User property. + public partial class UserProperty + { + /// Initializes a new instance of UserProperty. + /// User property name. + /// User property value. Type: string (or Expression with resultType string). + public UserProperty(string name, object value) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (value == null) + { + throw new ArgumentNullException(nameof(value)); + } + + Name = name; + Value = value; + } + + /// User property name. + public string Name { get; set; } + /// User property value. Type: string (or Expression with resultType string). + public object Value { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ValidationActivity.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ValidationActivity.Serialization.cs new file mode 100644 index 000000000000..ce3bd26df207 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ValidationActivity.Serialization.cs @@ -0,0 +1,220 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class ValidationActivity : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("name"); + writer.WriteStringValue(Name); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (DependsOn != null) + { + writer.WritePropertyName("dependsOn"); + writer.WriteStartArray(); + foreach (var item in DependsOn) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (UserProperties != null) + { + writer.WritePropertyName("userProperties"); + writer.WriteStartArray(); + foreach (var item in UserProperties) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + if (Timeout != null) + { + writer.WritePropertyName("timeout"); + writer.WriteObjectValue(Timeout); + } + if (Sleep != null) + { + writer.WritePropertyName("sleep"); + writer.WriteObjectValue(Sleep); + } + if (MinimumSize != null) + { + writer.WritePropertyName("minimumSize"); + writer.WriteObjectValue(MinimumSize); + } + if (ChildItems != null) + { + writer.WritePropertyName("childItems"); + writer.WriteObjectValue(ChildItems); + } + writer.WritePropertyName("dataset"); + writer.WriteObjectValue(Dataset); + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static ValidationActivity DeserializeValidationActivity(JsonElement element) + { + string name = default; + string type = default; + string description = default; + IList dependsOn = default; + IList userProperties = default; + object timeout = default; + object sleep = default; + object minimumSize = default; + object childItems = default; + DatasetReference dataset = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("dependsOn")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(ActivityDependency.DeserializeActivityDependency(item)); + } + } + dependsOn = array; + continue; + } + if (property.NameEquals("userProperties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(UserProperty.DeserializeUserProperty(item)); + } + } + userProperties = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("timeout")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + timeout = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("sleep")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sleep = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("minimumSize")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + minimumSize = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("childItems")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + childItems = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("dataset")) + { + dataset = DatasetReference.DeserializeDatasetReference(property0.Value); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new ValidationActivity(name, type, description, dependsOn, userProperties, additionalProperties, timeout, sleep, minimumSize, childItems, dataset); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ValidationActivity.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ValidationActivity.cs new file mode 100644 index 000000000000..e9e78e5cf116 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ValidationActivity.cs @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// This activity verifies that an external resource exists. + public partial class ValidationActivity : Activity + { + /// Initializes a new instance of ValidationActivity. + /// Activity name. + /// Validation activity dataset reference. + public ValidationActivity(string name, DatasetReference dataset) : base(name) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (dataset == null) + { + throw new ArgumentNullException(nameof(dataset)); + } + + Dataset = dataset; + Type = "Validation"; + } + + /// Initializes a new instance of ValidationActivity. + /// Activity name. + /// Type of activity. + /// Activity description. + /// Activity depends on condition. + /// Activity user properties. + /// . + /// Specifies the timeout for the activity to run. If there is no value specified, it takes the value of TimeSpan.FromDays(7) which is 1 week as default. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// A delay in seconds between validation attempts. If no value is specified, 10 seconds will be used as the default. Type: integer (or Expression with resultType integer). + /// Can be used if dataset points to a file. The file must be greater than or equal in size to the value specified. Type: integer (or Expression with resultType integer). + /// Can be used if dataset points to a folder. If set to true, the folder must have at least one file. If set to false, the folder must be empty. Type: boolean (or Expression with resultType boolean). + /// Validation activity dataset reference. + internal ValidationActivity(string name, string type, string description, IList dependsOn, IList userProperties, IDictionary additionalProperties, object timeout, object sleep, object minimumSize, object childItems, DatasetReference dataset) : base(name, type, description, dependsOn, userProperties, additionalProperties) + { + Timeout = timeout; + Sleep = sleep; + MinimumSize = minimumSize; + ChildItems = childItems; + Dataset = dataset; + Type = type ?? "Validation"; + } + + /// Specifies the timeout for the activity to run. If there is no value specified, it takes the value of TimeSpan.FromDays(7) which is 1 week as default. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + public object Timeout { get; set; } + /// A delay in seconds between validation attempts. If no value is specified, 10 seconds will be used as the default. Type: integer (or Expression with resultType integer). + public object Sleep { get; set; } + /// Can be used if dataset points to a file. The file must be greater than or equal in size to the value specified. Type: integer (or Expression with resultType integer). + public object MinimumSize { get; set; } + /// Can be used if dataset points to a folder. If set to true, the folder must have at least one file. If set to false, the folder must be empty. Type: boolean (or Expression with resultType boolean). + public object ChildItems { get; set; } + /// Validation activity dataset reference. + public DatasetReference Dataset { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/VariableSpecification.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/VariableSpecification.Serialization.cs new file mode 100644 index 000000000000..4f0c51ee51f1 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/VariableSpecification.Serialization.cs @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class VariableSpecification : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type.ToString()); + if (DefaultValue != null) + { + writer.WritePropertyName("defaultValue"); + writer.WriteObjectValue(DefaultValue); + } + writer.WriteEndObject(); + } + + internal static VariableSpecification DeserializeVariableSpecification(JsonElement element) + { + VariableType type = default; + object defaultValue = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = new VariableType(property.Value.GetString()); + continue; + } + if (property.NameEquals("defaultValue")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + defaultValue = property.Value.GetObject(); + continue; + } + } + return new VariableSpecification(type, defaultValue); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/VariableSpecification.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/VariableSpecification.cs new file mode 100644 index 000000000000..3537f8f283b4 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/VariableSpecification.cs @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Definition of a single variable for a Pipeline. + public partial class VariableSpecification + { + /// Initializes a new instance of VariableSpecification. + /// Variable type. + public VariableSpecification(VariableType type) + { + Type = type; + } + + /// Initializes a new instance of VariableSpecification. + /// Variable type. + /// Default value of variable. + internal VariableSpecification(VariableType type, object defaultValue) + { + Type = type; + DefaultValue = defaultValue; + } + + /// Variable type. + public VariableType Type { get; set; } + /// Default value of variable. + public object DefaultValue { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/VariableType.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/VariableType.cs new file mode 100644 index 000000000000..483cc806ee37 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/VariableType.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Variable type. + public readonly partial struct VariableType : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + public VariableType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string StringValue = "String"; + private const string BoolValue = "Bool"; + private const string BooleanValue = "Boolean"; + private const string ArrayValue = "Array"; + + /// String. + public static VariableType String { get; } = new VariableType(StringValue); + /// Bool. + public static VariableType Bool { get; } = new VariableType(BoolValue); + /// Boolean. + public static VariableType Boolean { get; } = new VariableType(BooleanValue); + /// Array. + public static VariableType Array { get; } = new VariableType(ArrayValue); + /// Determines if two values are the same. + public static bool operator ==(VariableType left, VariableType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(VariableType left, VariableType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator VariableType(string value) => new VariableType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is VariableType other && Equals(other); + /// + public bool Equals(VariableType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/VerticaLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/VerticaLinkedService.Serialization.cs new file mode 100644 index 000000000000..dc0bb6e4dcee --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/VerticaLinkedService.Serialization.cs @@ -0,0 +1,205 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class VerticaLinkedService : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (ConnectVia != null) + { + writer.WritePropertyName("connectVia"); + writer.WriteObjectValue(ConnectVia); + } + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + if (ConnectionString != null) + { + writer.WritePropertyName("connectionString"); + writer.WriteObjectValue(ConnectionString); + } + if (Pwd != null) + { + writer.WritePropertyName("pwd"); + writer.WriteObjectValue(Pwd); + } + if (EncryptedCredential != null) + { + writer.WritePropertyName("encryptedCredential"); + writer.WriteObjectValue(EncryptedCredential); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static VerticaLinkedService DeserializeVerticaLinkedService(JsonElement element) + { + string type = default; + IntegrationRuntimeReference connectVia = default; + string description = default; + IDictionary parameters = default; + IList annotations = default; + object connectionString = default; + AzureKeyVaultSecretReference pwd = default; + object encryptedCredential = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("connectVia")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("connectionString")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectionString = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("pwd")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + pwd = AzureKeyVaultSecretReference.DeserializeAzureKeyVaultSecretReference(property0.Value); + continue; + } + if (property0.NameEquals("encryptedCredential")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + encryptedCredential = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new VerticaLinkedService(type, connectVia, description, parameters, annotations, additionalProperties, connectionString, pwd, encryptedCredential); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/VerticaLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/VerticaLinkedService.cs new file mode 100644 index 000000000000..ba182bec1944 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/VerticaLinkedService.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Vertica linked service. + public partial class VerticaLinkedService : LinkedService + { + /// Initializes a new instance of VerticaLinkedService. + public VerticaLinkedService() + { + Type = "Vertica"; + } + + /// Initializes a new instance of VerticaLinkedService. + /// Type of linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for describing the linked service. + /// . + /// An ODBC connection string. Type: string, SecureString or AzureKeyVaultSecretReference. + /// The Azure key vault secret reference of password in connection string. + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + internal VerticaLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object connectionString, AzureKeyVaultSecretReference pwd, object encryptedCredential) : base(type, connectVia, description, parameters, annotations, additionalProperties) + { + ConnectionString = connectionString; + Pwd = pwd; + EncryptedCredential = encryptedCredential; + Type = type ?? "Vertica"; + } + + /// An ODBC connection string. Type: string, SecureString or AzureKeyVaultSecretReference. + public object ConnectionString { get; set; } + /// The Azure key vault secret reference of password in connection string. + public AzureKeyVaultSecretReference Pwd { get; set; } + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + public object EncryptedCredential { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/VerticaTableDataset.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/VerticaTableDataset.Serialization.cs new file mode 100644 index 000000000000..5be14a0c706a --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/VerticaTableDataset.Serialization.cs @@ -0,0 +1,243 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class VerticaTableDataset : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Structure != null) + { + writer.WritePropertyName("structure"); + writer.WriteObjectValue(Structure); + } + if (Schema != null) + { + writer.WritePropertyName("schema"); + writer.WriteObjectValue(Schema); + } + writer.WritePropertyName("linkedServiceName"); + writer.WriteObjectValue(LinkedServiceName); + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Folder != null) + { + writer.WritePropertyName("folder"); + writer.WriteObjectValue(Folder); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + if (TableName != null) + { + writer.WritePropertyName("tableName"); + writer.WriteObjectValue(TableName); + } + if (Table != null) + { + writer.WritePropertyName("table"); + writer.WriteObjectValue(Table); + } + if (SchemaTypePropertiesSchema != null) + { + writer.WritePropertyName("schema"); + writer.WriteObjectValue(SchemaTypePropertiesSchema); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static VerticaTableDataset DeserializeVerticaTableDataset(JsonElement element) + { + string type = default; + string description = default; + object structure = default; + object schema = default; + LinkedServiceReference linkedServiceName = default; + IDictionary parameters = default; + IList annotations = default; + DatasetFolder folder = default; + object tableName = default; + object table = default; + object schema0 = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("structure")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + structure = property.Value.GetObject(); + continue; + } + if (property.NameEquals("schema")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + schema = property.Value.GetObject(); + continue; + } + if (property.NameEquals("linkedServiceName")) + { + linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("folder")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + folder = DatasetFolder.DeserializeDatasetFolder(property.Value); + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("tableName")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + tableName = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("table")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + table = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("schema")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + schema0 = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new VerticaTableDataset(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties, tableName, table, schema0); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/VerticaTableDataset.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/VerticaTableDataset.cs new file mode 100644 index 000000000000..5643998f1729 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/VerticaTableDataset.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Vertica dataset. + public partial class VerticaTableDataset : Dataset + { + /// Initializes a new instance of VerticaTableDataset. + /// Linked service reference. + public VerticaTableDataset(LinkedServiceReference linkedServiceName) : base(linkedServiceName) + { + if (linkedServiceName == null) + { + throw new ArgumentNullException(nameof(linkedServiceName)); + } + + Type = "VerticaTable"; + } + + /// Initializes a new instance of VerticaTableDataset. + /// Type of dataset. + /// Dataset description. + /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. + /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. + /// Linked service reference. + /// Parameters for dataset. + /// List of tags that can be used for describing the Dataset. + /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. + /// . + /// This property will be retired. Please consider using schema + table properties instead. + /// The table name of the Vertica. Type: string (or Expression with resultType string). + /// The schema name of the Vertica. Type: string (or Expression with resultType string). + internal VerticaTableDataset(string type, string description, object structure, object schema, LinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary additionalProperties, object tableName, object table, object schemaTypePropertiesSchema) : base(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) + { + TableName = tableName; + Table = table; + SchemaTypePropertiesSchema = schemaTypePropertiesSchema; + Type = type ?? "VerticaTable"; + } + + /// This property will be retired. Please consider using schema + table properties instead. + public object TableName { get; set; } + /// The table name of the Vertica. Type: string (or Expression with resultType string). + public object Table { get; set; } + /// The schema name of the Vertica. Type: string (or Expression with resultType string). + public object SchemaTypePropertiesSchema { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/WaitActivity.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/WaitActivity.Serialization.cs new file mode 100644 index 000000000000..d06b0b8fa573 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/WaitActivity.Serialization.cs @@ -0,0 +1,160 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class WaitActivity : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("name"); + writer.WriteStringValue(Name); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (DependsOn != null) + { + writer.WritePropertyName("dependsOn"); + writer.WriteStartArray(); + foreach (var item in DependsOn) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (UserProperties != null) + { + writer.WritePropertyName("userProperties"); + writer.WriteStartArray(); + foreach (var item in UserProperties) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + writer.WritePropertyName("waitTimeInSeconds"); + writer.WriteNumberValue(WaitTimeInSeconds); + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static WaitActivity DeserializeWaitActivity(JsonElement element) + { + string name = default; + string type = default; + string description = default; + IList dependsOn = default; + IList userProperties = default; + int waitTimeInSeconds = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("dependsOn")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(ActivityDependency.DeserializeActivityDependency(item)); + } + } + dependsOn = array; + continue; + } + if (property.NameEquals("userProperties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(UserProperty.DeserializeUserProperty(item)); + } + } + userProperties = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("waitTimeInSeconds")) + { + waitTimeInSeconds = property0.Value.GetInt32(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new WaitActivity(name, type, description, dependsOn, userProperties, additionalProperties, waitTimeInSeconds); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/WaitActivity.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/WaitActivity.cs new file mode 100644 index 000000000000..f1b76d077e8c --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/WaitActivity.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// This activity suspends pipeline execution for the specified interval. + public partial class WaitActivity : Activity + { + /// Initializes a new instance of WaitActivity. + /// Activity name. + /// Duration in seconds. + public WaitActivity(string name, int waitTimeInSeconds) : base(name) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + + WaitTimeInSeconds = waitTimeInSeconds; + Type = "Wait"; + } + + /// Initializes a new instance of WaitActivity. + /// Activity name. + /// Type of activity. + /// Activity description. + /// Activity depends on condition. + /// Activity user properties. + /// . + /// Duration in seconds. + internal WaitActivity(string name, string type, string description, IList dependsOn, IList userProperties, IDictionary additionalProperties, int waitTimeInSeconds) : base(name, type, description, dependsOn, userProperties, additionalProperties) + { + WaitTimeInSeconds = waitTimeInSeconds; + Type = type ?? "Wait"; + } + + /// Duration in seconds. + public int WaitTimeInSeconds { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/WebActivity.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/WebActivity.Serialization.cs new file mode 100644 index 000000000000..0d1c3472a6be --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/WebActivity.Serialization.cs @@ -0,0 +1,322 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class WebActivity : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (LinkedServiceName != null) + { + writer.WritePropertyName("linkedServiceName"); + writer.WriteObjectValue(LinkedServiceName); + } + if (Policy != null) + { + writer.WritePropertyName("policy"); + writer.WriteObjectValue(Policy); + } + writer.WritePropertyName("name"); + writer.WriteStringValue(Name); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (DependsOn != null) + { + writer.WritePropertyName("dependsOn"); + writer.WriteStartArray(); + foreach (var item in DependsOn) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (UserProperties != null) + { + writer.WritePropertyName("userProperties"); + writer.WriteStartArray(); + foreach (var item in UserProperties) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + writer.WritePropertyName("method"); + writer.WriteStringValue(Method.ToString()); + writer.WritePropertyName("url"); + writer.WriteObjectValue(Url); + if (Headers != null) + { + writer.WritePropertyName("headers"); + writer.WriteObjectValue(Headers); + } + if (Body != null) + { + writer.WritePropertyName("body"); + writer.WriteObjectValue(Body); + } + if (Authentication != null) + { + writer.WritePropertyName("authentication"); + writer.WriteObjectValue(Authentication); + } + if (Datasets != null) + { + writer.WritePropertyName("datasets"); + writer.WriteStartArray(); + foreach (var item in Datasets) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (LinkedServices != null) + { + writer.WritePropertyName("linkedServices"); + writer.WriteStartArray(); + foreach (var item in LinkedServices) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (ConnectVia != null) + { + writer.WritePropertyName("connectVia"); + writer.WriteObjectValue(ConnectVia); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static WebActivity DeserializeWebActivity(JsonElement element) + { + LinkedServiceReference linkedServiceName = default; + ActivityPolicy policy = default; + string name = default; + string type = default; + string description = default; + IList dependsOn = default; + IList userProperties = default; + WebActivityMethod method = default; + object url = default; + object headers = default; + object body = default; + WebActivityAuthentication authentication = default; + IList datasets = default; + IList linkedServices = default; + IntegrationRuntimeReference connectVia = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("linkedServiceName")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value); + continue; + } + if (property.NameEquals("policy")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + policy = ActivityPolicy.DeserializeActivityPolicy(property.Value); + continue; + } + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("dependsOn")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(ActivityDependency.DeserializeActivityDependency(item)); + } + } + dependsOn = array; + continue; + } + if (property.NameEquals("userProperties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(UserProperty.DeserializeUserProperty(item)); + } + } + userProperties = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("method")) + { + method = new WebActivityMethod(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("url")) + { + url = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("headers")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + headers = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("body")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + body = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("authentication")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + authentication = WebActivityAuthentication.DeserializeWebActivityAuthentication(property0.Value); + continue; + } + if (property0.NameEquals("datasets")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(DatasetReference.DeserializeDatasetReference(item)); + } + } + datasets = array; + continue; + } + if (property0.NameEquals("linkedServices")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(LinkedServiceReference.DeserializeLinkedServiceReference(item)); + } + } + linkedServices = array; + continue; + } + if (property0.NameEquals("connectVia")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property0.Value); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new WebActivity(name, type, description, dependsOn, userProperties, additionalProperties, linkedServiceName, policy, method, url, headers, body, authentication, datasets, linkedServices, connectVia); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/WebActivity.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/WebActivity.cs new file mode 100644 index 000000000000..f75bfbabe144 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/WebActivity.cs @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Web activity. + public partial class WebActivity : ExecutionActivity + { + /// Initializes a new instance of WebActivity. + /// Activity name. + /// Rest API method for target endpoint. + /// Web activity target endpoint and path. Type: string (or Expression with resultType string). + public WebActivity(string name, WebActivityMethod method, object url) : base(name) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (url == null) + { + throw new ArgumentNullException(nameof(url)); + } + + Method = method; + Url = url; + Type = "WebActivity"; + } + + /// Initializes a new instance of WebActivity. + /// Activity name. + /// Type of activity. + /// Activity description. + /// Activity depends on condition. + /// Activity user properties. + /// . + /// Linked service reference. + /// Activity policy. + /// Rest API method for target endpoint. + /// Web activity target endpoint and path. Type: string (or Expression with resultType string). + /// Represents the headers that will be sent to the request. For example, to set the language and type on a request: "headers" : { "Accept-Language": "en-us", "Content-Type": "application/json" }. Type: string (or Expression with resultType string). + /// Represents the payload that will be sent to the endpoint. Required for POST/PUT method, not allowed for GET method Type: string (or Expression with resultType string). + /// Authentication method used for calling the endpoint. + /// List of datasets passed to web endpoint. + /// List of linked services passed to web endpoint. + /// The integration runtime reference. + internal WebActivity(string name, string type, string description, IList dependsOn, IList userProperties, IDictionary additionalProperties, LinkedServiceReference linkedServiceName, ActivityPolicy policy, WebActivityMethod method, object url, object headers, object body, WebActivityAuthentication authentication, IList datasets, IList linkedServices, IntegrationRuntimeReference connectVia) : base(name, type, description, dependsOn, userProperties, additionalProperties, linkedServiceName, policy) + { + Method = method; + Url = url; + Headers = headers; + Body = body; + Authentication = authentication; + Datasets = datasets; + LinkedServices = linkedServices; + ConnectVia = connectVia; + Type = type ?? "WebActivity"; + } + + /// Rest API method for target endpoint. + public WebActivityMethod Method { get; set; } + /// Web activity target endpoint and path. Type: string (or Expression with resultType string). + public object Url { get; set; } + /// Represents the headers that will be sent to the request. For example, to set the language and type on a request: "headers" : { "Accept-Language": "en-us", "Content-Type": "application/json" }. Type: string (or Expression with resultType string). + public object Headers { get; set; } + /// Represents the payload that will be sent to the endpoint. Required for POST/PUT method, not allowed for GET method Type: string (or Expression with resultType string). + public object Body { get; set; } + /// Authentication method used for calling the endpoint. + public WebActivityAuthentication Authentication { get; set; } + /// List of datasets passed to web endpoint. + public IList Datasets { get; set; } + /// List of linked services passed to web endpoint. + public IList LinkedServices { get; set; } + /// The integration runtime reference. + public IntegrationRuntimeReference ConnectVia { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/WebActivityAuthentication.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/WebActivityAuthentication.Serialization.cs new file mode 100644 index 000000000000..ddebe4234ee7 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/WebActivityAuthentication.Serialization.cs @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class WebActivityAuthentication : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Pfx != null) + { + writer.WritePropertyName("pfx"); + writer.WriteObjectValue(Pfx); + } + if (Username != null) + { + writer.WritePropertyName("username"); + writer.WriteStringValue(Username); + } + if (Password != null) + { + writer.WritePropertyName("password"); + writer.WriteObjectValue(Password); + } + if (Resource != null) + { + writer.WritePropertyName("resource"); + writer.WriteStringValue(Resource); + } + writer.WriteEndObject(); + } + + internal static WebActivityAuthentication DeserializeWebActivityAuthentication(JsonElement element) + { + string type = default; + SecretBase pfx = default; + string username = default; + SecretBase password = default; + string resource = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("pfx")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + pfx = SecretBase.DeserializeSecretBase(property.Value); + continue; + } + if (property.NameEquals("username")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + username = property.Value.GetString(); + continue; + } + if (property.NameEquals("password")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + password = SecretBase.DeserializeSecretBase(property.Value); + continue; + } + if (property.NameEquals("resource")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + resource = property.Value.GetString(); + continue; + } + } + return new WebActivityAuthentication(type, pfx, username, password, resource); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/WebActivityAuthentication.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/WebActivityAuthentication.cs new file mode 100644 index 000000000000..0261b1d26420 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/WebActivityAuthentication.cs @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Web activity authentication properties. + public partial class WebActivityAuthentication + { + /// Initializes a new instance of WebActivityAuthentication. + /// Web activity authentication (Basic/ClientCertificate/MSI). + public WebActivityAuthentication(string type) + { + if (type == null) + { + throw new ArgumentNullException(nameof(type)); + } + + Type = type; + } + + /// Initializes a new instance of WebActivityAuthentication. + /// Web activity authentication (Basic/ClientCertificate/MSI). + /// Base64-encoded contents of a PFX file. + /// Web activity authentication user name for basic authentication. + /// Password for the PFX file or basic authentication. + /// Resource for which Azure Auth token will be requested when using MSI Authentication. + internal WebActivityAuthentication(string type, SecretBase pfx, string username, SecretBase password, string resource) + { + Type = type; + Pfx = pfx; + Username = username; + Password = password; + Resource = resource; + } + + /// Web activity authentication (Basic/ClientCertificate/MSI). + public string Type { get; set; } + /// Base64-encoded contents of a PFX file. + public SecretBase Pfx { get; set; } + /// Web activity authentication user name for basic authentication. + public string Username { get; set; } + /// Password for the PFX file or basic authentication. + public SecretBase Password { get; set; } + /// Resource for which Azure Auth token will be requested when using MSI Authentication. + public string Resource { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/WebActivityMethod.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/WebActivityMethod.cs new file mode 100644 index 000000000000..de92ab1705c2 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/WebActivityMethod.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// The list of HTTP methods supported by a WebActivity. + public readonly partial struct WebActivityMethod : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + public WebActivityMethod(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string GETValue = "GET"; + private const string PostValue = "POST"; + private const string PUTValue = "PUT"; + private const string DeleteValue = "DELETE"; + + /// GET. + public static WebActivityMethod GET { get; } = new WebActivityMethod(GETValue); + /// POST. + public static WebActivityMethod Post { get; } = new WebActivityMethod(PostValue); + /// PUT. + public static WebActivityMethod PUT { get; } = new WebActivityMethod(PUTValue); + /// DELETE. + public static WebActivityMethod Delete { get; } = new WebActivityMethod(DeleteValue); + /// Determines if two values are the same. + public static bool operator ==(WebActivityMethod left, WebActivityMethod right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(WebActivityMethod left, WebActivityMethod right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator WebActivityMethod(string value) => new WebActivityMethod(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is WebActivityMethod other && Equals(other); + /// + public bool Equals(WebActivityMethod other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/WebAnonymousAuthentication.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/WebAnonymousAuthentication.Serialization.cs new file mode 100644 index 000000000000..affb3f3cdd26 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/WebAnonymousAuthentication.Serialization.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class WebAnonymousAuthentication : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("url"); + writer.WriteObjectValue(Url); + writer.WritePropertyName("authenticationType"); + writer.WriteStringValue(AuthenticationType.ToString()); + writer.WriteEndObject(); + } + + internal static WebAnonymousAuthentication DeserializeWebAnonymousAuthentication(JsonElement element) + { + object url = default; + WebAuthenticationType authenticationType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("url")) + { + url = property.Value.GetObject(); + continue; + } + if (property.NameEquals("authenticationType")) + { + authenticationType = new WebAuthenticationType(property.Value.GetString()); + continue; + } + } + return new WebAnonymousAuthentication(url, authenticationType); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/WebAnonymousAuthentication.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/WebAnonymousAuthentication.cs new file mode 100644 index 000000000000..96d5da1117b7 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/WebAnonymousAuthentication.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// A WebLinkedService that uses anonymous authentication to communicate with an HTTP endpoint. + public partial class WebAnonymousAuthentication : WebLinkedServiceTypeProperties + { + /// Initializes a new instance of WebAnonymousAuthentication. + /// The URL of the web service endpoint, e.g. http://www.microsoft.com . Type: string (or Expression with resultType string). + public WebAnonymousAuthentication(object url) : base(url) + { + if (url == null) + { + throw new ArgumentNullException(nameof(url)); + } + + AuthenticationType = "Anonymous"; + } + + /// Initializes a new instance of WebAnonymousAuthentication. + /// The URL of the web service endpoint, e.g. http://www.microsoft.com . Type: string (or Expression with resultType string). + /// Type of authentication used to connect to the web table source. + internal WebAnonymousAuthentication(object url, WebAuthenticationType authenticationType) : base(url, authenticationType) + { + AuthenticationType = authenticationType; + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/WebAuthenticationType.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/WebAuthenticationType.cs new file mode 100644 index 000000000000..1fcdf38aa208 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/WebAuthenticationType.cs @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Type of authentication used to connect to the web table source. + public readonly partial struct WebAuthenticationType : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + public WebAuthenticationType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string BasicValue = "Basic"; + private const string AnonymousValue = "Anonymous"; + private const string ClientCertificateValue = "ClientCertificate"; + + /// Basic. + public static WebAuthenticationType Basic { get; } = new WebAuthenticationType(BasicValue); + /// Anonymous. + public static WebAuthenticationType Anonymous { get; } = new WebAuthenticationType(AnonymousValue); + /// ClientCertificate. + public static WebAuthenticationType ClientCertificate { get; } = new WebAuthenticationType(ClientCertificateValue); + /// Determines if two values are the same. + public static bool operator ==(WebAuthenticationType left, WebAuthenticationType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(WebAuthenticationType left, WebAuthenticationType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator WebAuthenticationType(string value) => new WebAuthenticationType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is WebAuthenticationType other && Equals(other); + /// + public bool Equals(WebAuthenticationType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/WebBasicAuthentication.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/WebBasicAuthentication.Serialization.cs new file mode 100644 index 000000000000..dba1121f60f2 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/WebBasicAuthentication.Serialization.cs @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class WebBasicAuthentication : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("username"); + writer.WriteObjectValue(Username); + writer.WritePropertyName("password"); + writer.WriteObjectValue(Password); + writer.WritePropertyName("url"); + writer.WriteObjectValue(Url); + writer.WritePropertyName("authenticationType"); + writer.WriteStringValue(AuthenticationType.ToString()); + writer.WriteEndObject(); + } + + internal static WebBasicAuthentication DeserializeWebBasicAuthentication(JsonElement element) + { + object username = default; + SecretBase password = default; + object url = default; + WebAuthenticationType authenticationType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("username")) + { + username = property.Value.GetObject(); + continue; + } + if (property.NameEquals("password")) + { + password = SecretBase.DeserializeSecretBase(property.Value); + continue; + } + if (property.NameEquals("url")) + { + url = property.Value.GetObject(); + continue; + } + if (property.NameEquals("authenticationType")) + { + authenticationType = new WebAuthenticationType(property.Value.GetString()); + continue; + } + } + return new WebBasicAuthentication(url, authenticationType, username, password); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/WebBasicAuthentication.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/WebBasicAuthentication.cs new file mode 100644 index 000000000000..0d6bd0e3d079 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/WebBasicAuthentication.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// A WebLinkedService that uses basic authentication to communicate with an HTTP endpoint. + public partial class WebBasicAuthentication : WebLinkedServiceTypeProperties + { + /// Initializes a new instance of WebBasicAuthentication. + /// The URL of the web service endpoint, e.g. http://www.microsoft.com . Type: string (or Expression with resultType string). + /// User name for Basic authentication. Type: string (or Expression with resultType string). + /// The password for Basic authentication. + public WebBasicAuthentication(object url, object username, SecretBase password) : base(url) + { + if (url == null) + { + throw new ArgumentNullException(nameof(url)); + } + if (username == null) + { + throw new ArgumentNullException(nameof(username)); + } + if (password == null) + { + throw new ArgumentNullException(nameof(password)); + } + + Username = username; + Password = password; + AuthenticationType = "Basic"; + } + + /// Initializes a new instance of WebBasicAuthentication. + /// The URL of the web service endpoint, e.g. http://www.microsoft.com . Type: string (or Expression with resultType string). + /// Type of authentication used to connect to the web table source. + /// User name for Basic authentication. Type: string (or Expression with resultType string). + /// The password for Basic authentication. + internal WebBasicAuthentication(object url, WebAuthenticationType authenticationType, object username, SecretBase password) : base(url, authenticationType) + { + Username = username; + Password = password; + AuthenticationType = authenticationType; + } + + /// User name for Basic authentication. Type: string (or Expression with resultType string). + public object Username { get; set; } + /// The password for Basic authentication. + public SecretBase Password { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/WebClientCertificateAuthentication.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/WebClientCertificateAuthentication.Serialization.cs new file mode 100644 index 000000000000..194d338dbb8b --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/WebClientCertificateAuthentication.Serialization.cs @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class WebClientCertificateAuthentication : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("pfx"); + writer.WriteObjectValue(Pfx); + writer.WritePropertyName("password"); + writer.WriteObjectValue(Password); + writer.WritePropertyName("url"); + writer.WriteObjectValue(Url); + writer.WritePropertyName("authenticationType"); + writer.WriteStringValue(AuthenticationType.ToString()); + writer.WriteEndObject(); + } + + internal static WebClientCertificateAuthentication DeserializeWebClientCertificateAuthentication(JsonElement element) + { + SecretBase pfx = default; + SecretBase password = default; + object url = default; + WebAuthenticationType authenticationType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("pfx")) + { + pfx = SecretBase.DeserializeSecretBase(property.Value); + continue; + } + if (property.NameEquals("password")) + { + password = SecretBase.DeserializeSecretBase(property.Value); + continue; + } + if (property.NameEquals("url")) + { + url = property.Value.GetObject(); + continue; + } + if (property.NameEquals("authenticationType")) + { + authenticationType = new WebAuthenticationType(property.Value.GetString()); + continue; + } + } + return new WebClientCertificateAuthentication(url, authenticationType, pfx, password); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/WebClientCertificateAuthentication.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/WebClientCertificateAuthentication.cs new file mode 100644 index 000000000000..be560e7adeb7 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/WebClientCertificateAuthentication.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// A WebLinkedService that uses client certificate based authentication to communicate with an HTTP endpoint. This scheme follows mutual authentication; the server must also provide valid credentials to the client. + public partial class WebClientCertificateAuthentication : WebLinkedServiceTypeProperties + { + /// Initializes a new instance of WebClientCertificateAuthentication. + /// The URL of the web service endpoint, e.g. http://www.microsoft.com . Type: string (or Expression with resultType string). + /// Base64-encoded contents of a PFX file. + /// Password for the PFX file. + public WebClientCertificateAuthentication(object url, SecretBase pfx, SecretBase password) : base(url) + { + if (url == null) + { + throw new ArgumentNullException(nameof(url)); + } + if (pfx == null) + { + throw new ArgumentNullException(nameof(pfx)); + } + if (password == null) + { + throw new ArgumentNullException(nameof(password)); + } + + Pfx = pfx; + Password = password; + AuthenticationType = "ClientCertificate"; + } + + /// Initializes a new instance of WebClientCertificateAuthentication. + /// The URL of the web service endpoint, e.g. http://www.microsoft.com . Type: string (or Expression with resultType string). + /// Type of authentication used to connect to the web table source. + /// Base64-encoded contents of a PFX file. + /// Password for the PFX file. + internal WebClientCertificateAuthentication(object url, WebAuthenticationType authenticationType, SecretBase pfx, SecretBase password) : base(url, authenticationType) + { + Pfx = pfx; + Password = password; + AuthenticationType = authenticationType; + } + + /// Base64-encoded contents of a PFX file. + public SecretBase Pfx { get; set; } + /// Password for the PFX file. + public SecretBase Password { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/WebHookActivity.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/WebHookActivity.Serialization.cs new file mode 100644 index 000000000000..c4add76cb1ec --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/WebHookActivity.Serialization.cs @@ -0,0 +1,243 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class WebHookActivity : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("name"); + writer.WriteStringValue(Name); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (DependsOn != null) + { + writer.WritePropertyName("dependsOn"); + writer.WriteStartArray(); + foreach (var item in DependsOn) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (UserProperties != null) + { + writer.WritePropertyName("userProperties"); + writer.WriteStartArray(); + foreach (var item in UserProperties) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + writer.WritePropertyName("method"); + writer.WriteStringValue(Method); + writer.WritePropertyName("url"); + writer.WriteObjectValue(Url); + if (Timeout != null) + { + writer.WritePropertyName("timeout"); + writer.WriteStringValue(Timeout); + } + if (Headers != null) + { + writer.WritePropertyName("headers"); + writer.WriteObjectValue(Headers); + } + if (Body != null) + { + writer.WritePropertyName("body"); + writer.WriteObjectValue(Body); + } + if (Authentication != null) + { + writer.WritePropertyName("authentication"); + writer.WriteObjectValue(Authentication); + } + if (ReportStatusOnCallBack != null) + { + writer.WritePropertyName("reportStatusOnCallBack"); + writer.WriteObjectValue(ReportStatusOnCallBack); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static WebHookActivity DeserializeWebHookActivity(JsonElement element) + { + string name = default; + string type = default; + string description = default; + IList dependsOn = default; + IList userProperties = default; + string method = default; + object url = default; + string timeout = default; + object headers = default; + object body = default; + WebActivityAuthentication authentication = default; + object reportStatusOnCallBack = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("dependsOn")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(ActivityDependency.DeserializeActivityDependency(item)); + } + } + dependsOn = array; + continue; + } + if (property.NameEquals("userProperties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(UserProperty.DeserializeUserProperty(item)); + } + } + userProperties = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("method")) + { + method = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("url")) + { + url = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("timeout")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + timeout = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("headers")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + headers = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("body")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + body = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("authentication")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + authentication = WebActivityAuthentication.DeserializeWebActivityAuthentication(property0.Value); + continue; + } + if (property0.NameEquals("reportStatusOnCallBack")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + reportStatusOnCallBack = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new WebHookActivity(name, type, description, dependsOn, userProperties, additionalProperties, method, url, timeout, headers, body, authentication, reportStatusOnCallBack); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/WebHookActivity.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/WebHookActivity.cs new file mode 100644 index 000000000000..c75c63556b01 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/WebHookActivity.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// WebHook activity. + public partial class WebHookActivity : Activity + { + /// Initializes a new instance of WebHookActivity. + /// Activity name. + /// WebHook activity target endpoint and path. Type: string (or Expression with resultType string). + public WebHookActivity(string name, object url) : base(name) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (url == null) + { + throw new ArgumentNullException(nameof(url)); + } + + Method = "POST"; + Url = url; + Type = "WebHook"; + } + + /// Initializes a new instance of WebHookActivity. + /// Activity name. + /// Type of activity. + /// Activity description. + /// Activity depends on condition. + /// Activity user properties. + /// . + /// Rest API method for target endpoint. + /// WebHook activity target endpoint and path. Type: string (or Expression with resultType string). + /// The timeout within which the webhook should be called back. If there is no value specified, it defaults to 10 minutes. Type: string. Pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Represents the headers that will be sent to the request. For example, to set the language and type on a request: "headers" : { "Accept-Language": "en-us", "Content-Type": "application/json" }. Type: string (or Expression with resultType string). + /// Represents the payload that will be sent to the endpoint. Required for POST/PUT method, not allowed for GET method Type: string (or Expression with resultType string). + /// Authentication method used for calling the endpoint. + /// When set to true, statusCode, output and error in callback request body will be consumed by activity. The activity can be marked as failed by setting statusCode >= 400 in callback request. Default is false. Type: boolean (or Expression with resultType boolean). + internal WebHookActivity(string name, string type, string description, IList dependsOn, IList userProperties, IDictionary additionalProperties, string method, object url, string timeout, object headers, object body, WebActivityAuthentication authentication, object reportStatusOnCallBack) : base(name, type, description, dependsOn, userProperties, additionalProperties) + { + Method = method; + Url = url; + Timeout = timeout; + Headers = headers; + Body = body; + Authentication = authentication; + ReportStatusOnCallBack = reportStatusOnCallBack; + Type = type ?? "WebHook"; + } + + /// Rest API method for target endpoint. + public string Method { get; set; } + /// WebHook activity target endpoint and path. Type: string (or Expression with resultType string). + public object Url { get; set; } + /// The timeout within which the webhook should be called back. If there is no value specified, it defaults to 10 minutes. Type: string. Pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + public string Timeout { get; set; } + /// Represents the headers that will be sent to the request. For example, to set the language and type on a request: "headers" : { "Accept-Language": "en-us", "Content-Type": "application/json" }. Type: string (or Expression with resultType string). + public object Headers { get; set; } + /// Represents the payload that will be sent to the endpoint. Required for POST/PUT method, not allowed for GET method Type: string (or Expression with resultType string). + public object Body { get; set; } + /// Authentication method used for calling the endpoint. + public WebActivityAuthentication Authentication { get; set; } + /// When set to true, statusCode, output and error in callback request body will be consumed by activity. The activity can be marked as failed by setting statusCode >= 400 in callback request. Default is false. Type: boolean (or Expression with resultType boolean). + public object ReportStatusOnCallBack { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/WebLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/WebLinkedService.Serialization.cs new file mode 100644 index 000000000000..2467bff303db --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/WebLinkedService.Serialization.cs @@ -0,0 +1,158 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class WebLinkedService : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("typeProperties"); + writer.WriteObjectValue(TypeProperties); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (ConnectVia != null) + { + writer.WritePropertyName("connectVia"); + writer.WriteObjectValue(ConnectVia); + } + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static WebLinkedService DeserializeWebLinkedService(JsonElement element) + { + WebLinkedServiceTypeProperties typeProperties = default; + string type = default; + IntegrationRuntimeReference connectVia = default; + string description = default; + IDictionary parameters = default; + IList annotations = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("typeProperties")) + { + typeProperties = WebLinkedServiceTypeProperties.DeserializeWebLinkedServiceTypeProperties(property.Value); + continue; + } + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("connectVia")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new WebLinkedService(type, connectVia, description, parameters, annotations, additionalProperties, typeProperties); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/WebLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/WebLinkedService.cs new file mode 100644 index 000000000000..62ab61070ccf --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/WebLinkedService.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Web linked service. + public partial class WebLinkedService : LinkedService + { + /// Initializes a new instance of WebLinkedService. + /// Web linked service properties. + public WebLinkedService(WebLinkedServiceTypeProperties typeProperties) + { + if (typeProperties == null) + { + throw new ArgumentNullException(nameof(typeProperties)); + } + + TypeProperties = typeProperties; + Type = "Web"; + } + + /// Initializes a new instance of WebLinkedService. + /// Type of linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for describing the linked service. + /// . + /// Web linked service properties. + internal WebLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, WebLinkedServiceTypeProperties typeProperties) : base(type, connectVia, description, parameters, annotations, additionalProperties) + { + TypeProperties = typeProperties; + Type = type ?? "Web"; + } + + /// Web linked service properties. + public WebLinkedServiceTypeProperties TypeProperties { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/WebLinkedServiceTypeProperties.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/WebLinkedServiceTypeProperties.Serialization.cs new file mode 100644 index 000000000000..0babef6ba28c --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/WebLinkedServiceTypeProperties.Serialization.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class WebLinkedServiceTypeProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("url"); + writer.WriteObjectValue(Url); + writer.WritePropertyName("authenticationType"); + writer.WriteStringValue(AuthenticationType.ToString()); + writer.WriteEndObject(); + } + + internal static WebLinkedServiceTypeProperties DeserializeWebLinkedServiceTypeProperties(JsonElement element) + { + if (element.TryGetProperty("authenticationType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "Anonymous": return WebAnonymousAuthentication.DeserializeWebAnonymousAuthentication(element); + case "Basic": return WebBasicAuthentication.DeserializeWebBasicAuthentication(element); + case "ClientCertificate": return WebClientCertificateAuthentication.DeserializeWebClientCertificateAuthentication(element); + } + } + object url = default; + WebAuthenticationType authenticationType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("url")) + { + url = property.Value.GetObject(); + continue; + } + if (property.NameEquals("authenticationType")) + { + authenticationType = new WebAuthenticationType(property.Value.GetString()); + continue; + } + } + return new WebLinkedServiceTypeProperties(url, authenticationType); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/WebLinkedServiceTypeProperties.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/WebLinkedServiceTypeProperties.cs new file mode 100644 index 000000000000..cf8e4dd59da9 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/WebLinkedServiceTypeProperties.cs @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Base definition of WebLinkedServiceTypeProperties, this typeProperties is polymorphic based on authenticationType, so not flattened in SDK models. + public partial class WebLinkedServiceTypeProperties + { + /// Initializes a new instance of WebLinkedServiceTypeProperties. + /// The URL of the web service endpoint, e.g. http://www.microsoft.com . Type: string (or Expression with resultType string). + public WebLinkedServiceTypeProperties(object url) + { + if (url == null) + { + throw new ArgumentNullException(nameof(url)); + } + + Url = url; + AuthenticationType = null; + } + + /// Initializes a new instance of WebLinkedServiceTypeProperties. + /// The URL of the web service endpoint, e.g. http://www.microsoft.com . Type: string (or Expression with resultType string). + /// Type of authentication used to connect to the web table source. + internal WebLinkedServiceTypeProperties(object url, WebAuthenticationType authenticationType) + { + Url = url; + AuthenticationType = authenticationType; + } + + /// The URL of the web service endpoint, e.g. http://www.microsoft.com . Type: string (or Expression with resultType string). + public object Url { get; set; } + /// Type of authentication used to connect to the web table source. + internal WebAuthenticationType AuthenticationType { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/WebTableDataset.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/WebTableDataset.Serialization.cs new file mode 100644 index 000000000000..568010580724 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/WebTableDataset.Serialization.cs @@ -0,0 +1,221 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class WebTableDataset : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Structure != null) + { + writer.WritePropertyName("structure"); + writer.WriteObjectValue(Structure); + } + if (Schema != null) + { + writer.WritePropertyName("schema"); + writer.WriteObjectValue(Schema); + } + writer.WritePropertyName("linkedServiceName"); + writer.WriteObjectValue(LinkedServiceName); + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Folder != null) + { + writer.WritePropertyName("folder"); + writer.WriteObjectValue(Folder); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + writer.WritePropertyName("index"); + writer.WriteObjectValue(Index); + if (Path != null) + { + writer.WritePropertyName("path"); + writer.WriteObjectValue(Path); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static WebTableDataset DeserializeWebTableDataset(JsonElement element) + { + string type = default; + string description = default; + object structure = default; + object schema = default; + LinkedServiceReference linkedServiceName = default; + IDictionary parameters = default; + IList annotations = default; + DatasetFolder folder = default; + object index = default; + object path = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("structure")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + structure = property.Value.GetObject(); + continue; + } + if (property.NameEquals("schema")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + schema = property.Value.GetObject(); + continue; + } + if (property.NameEquals("linkedServiceName")) + { + linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("folder")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + folder = DatasetFolder.DeserializeDatasetFolder(property.Value); + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("index")) + { + index = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("path")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + path = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new WebTableDataset(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties, index, path); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/WebTableDataset.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/WebTableDataset.cs new file mode 100644 index 000000000000..6e38fce3b3dd --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/WebTableDataset.cs @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// The dataset points to a HTML table in the web page. + public partial class WebTableDataset : Dataset + { + /// Initializes a new instance of WebTableDataset. + /// Linked service reference. + /// The zero-based index of the table in the web page. Type: integer (or Expression with resultType integer), minimum: 0. + public WebTableDataset(LinkedServiceReference linkedServiceName, object index) : base(linkedServiceName) + { + if (linkedServiceName == null) + { + throw new ArgumentNullException(nameof(linkedServiceName)); + } + if (index == null) + { + throw new ArgumentNullException(nameof(index)); + } + + Index = index; + Type = "WebTable"; + } + + /// Initializes a new instance of WebTableDataset. + /// Type of dataset. + /// Dataset description. + /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. + /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. + /// Linked service reference. + /// Parameters for dataset. + /// List of tags that can be used for describing the Dataset. + /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. + /// . + /// The zero-based index of the table in the web page. Type: integer (or Expression with resultType integer), minimum: 0. + /// The relative URL to the web page from the linked service URL. Type: string (or Expression with resultType string). + internal WebTableDataset(string type, string description, object structure, object schema, LinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary additionalProperties, object index, object path) : base(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) + { + Index = index; + Path = path; + Type = type ?? "WebTable"; + } + + /// The zero-based index of the table in the web page. Type: integer (or Expression with resultType integer), minimum: 0. + public object Index { get; set; } + /// The relative URL to the web page from the linked service URL. Type: string (or Expression with resultType string). + public object Path { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/Workspace.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/Workspace.cs new file mode 100644 index 000000000000..828888d7c346 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/Workspace.cs @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Workspace resource type. + internal partial class Workspace : Resource, IReadOnlyDictionary + { + /// Initializes a new instance of Workspace. + internal Workspace() + { + AdditionalProperties = new Dictionary(); + } + + /// Initializes a new instance of Workspace. + /// The resource identifier. + /// The resource name. + /// The resource type. + /// The resource location. + /// The resource tags. + /// Etag identifies change in the resource. + /// Managed service identity of the workspace. + /// Workspace provisioning state, example Succeeded. + /// Time the workspace was created in ISO8601 format. + /// Version of the workspace. + /// Linked service reference. + /// Linked service reference. + /// . + internal Workspace(string id, string name, string type, string location, IReadOnlyDictionary tags, string eTag, WorkspaceIdentity identity, string provisioningState, DateTimeOffset? createTime, string version, LinkedServiceReference defaultStorage, LinkedServiceReference defaultSqlServer, IReadOnlyDictionary additionalProperties) : base(id, name, type, location, tags, eTag) + { + Identity = identity; + ProvisioningState = provisioningState; + CreateTime = createTime; + Version = version; + DefaultStorage = defaultStorage; + DefaultSqlServer = defaultSqlServer; + AdditionalProperties = additionalProperties ?? new Dictionary(); + } + + /// Managed service identity of the workspace. + public WorkspaceIdentity Identity { get; set; } + /// Workspace provisioning state, example Succeeded. + public string ProvisioningState { get; } + /// Time the workspace was created in ISO8601 format. + public DateTimeOffset? CreateTime { get; } + /// Version of the workspace. + public string Version { get; } + /// Linked service reference. + public LinkedServiceReference DefaultStorage { get; set; } + /// Linked service reference. + public LinkedServiceReference DefaultSqlServer { get; set; } + internal IReadOnlyDictionary AdditionalProperties { get; } + /// + public IEnumerator> GetEnumerator() => AdditionalProperties.GetEnumerator(); + /// + IEnumerator IEnumerable.GetEnumerator() => AdditionalProperties.GetEnumerator(); + /// + public bool TryGetValue(string key, out object value) => AdditionalProperties.TryGetValue(key, out value); + /// + public bool ContainsKey(string key) => AdditionalProperties.ContainsKey(key); + /// + public IEnumerable Keys => AdditionalProperties.Keys; + /// + public IEnumerable Values => AdditionalProperties.Values; + /// + int IReadOnlyCollection>.Count => AdditionalProperties.Count; + /// + public object this[string key] + { + get => AdditionalProperties[key]; + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/WorkspaceIdentity.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/WorkspaceIdentity.cs new file mode 100644 index 000000000000..ebe92fba4494 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/WorkspaceIdentity.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Identity properties of the workspace resource. + internal partial class WorkspaceIdentity + { + /// Initializes a new instance of WorkspaceIdentity. + internal WorkspaceIdentity() + { + Type = "SystemAssigned"; + } + + /// Initializes a new instance of WorkspaceIdentity. + /// The identity type. Currently the only supported type is 'SystemAssigned'. + /// The principal id of the identity. + /// The client tenant id of the identity. + internal WorkspaceIdentity(string type, string principalId, string tenantId) + { + Type = type; + PrincipalId = principalId; + TenantId = tenantId; + } + + /// The identity type. Currently the only supported type is 'SystemAssigned'. + public string Type { get; set; } + /// The principal id of the identity. + public string PrincipalId { get; } + /// The client tenant id of the identity. + public string TenantId { get; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/WorkspaceUpdateParameters.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/WorkspaceUpdateParameters.cs new file mode 100644 index 000000000000..8022677cae3c --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/WorkspaceUpdateParameters.cs @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Parameters for updating a workspace resource. + internal partial class WorkspaceUpdateParameters + { + /// Initializes a new instance of WorkspaceUpdateParameters. + internal WorkspaceUpdateParameters() + { + } + + /// Initializes a new instance of WorkspaceUpdateParameters. + /// The resource tags. + /// Managed service identity of the workspace. + internal WorkspaceUpdateParameters(IReadOnlyDictionary tags, WorkspaceIdentity identity) + { + Tags = tags; + Identity = identity; + } + + /// The resource tags. + public IReadOnlyDictionary Tags { get; set; } + /// Managed service identity of the workspace. + public WorkspaceIdentity Identity { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/XeroLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/XeroLinkedService.Serialization.cs new file mode 100644 index 000000000000..33a07938a4cb --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/XeroLinkedService.Serialization.cs @@ -0,0 +1,258 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class XeroLinkedService : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (ConnectVia != null) + { + writer.WritePropertyName("connectVia"); + writer.WriteObjectValue(ConnectVia); + } + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + writer.WritePropertyName("host"); + writer.WriteObjectValue(Host); + if (ConsumerKey != null) + { + writer.WritePropertyName("consumerKey"); + writer.WriteObjectValue(ConsumerKey); + } + if (PrivateKey != null) + { + writer.WritePropertyName("privateKey"); + writer.WriteObjectValue(PrivateKey); + } + if (UseEncryptedEndpoints != null) + { + writer.WritePropertyName("useEncryptedEndpoints"); + writer.WriteObjectValue(UseEncryptedEndpoints); + } + if (UseHostVerification != null) + { + writer.WritePropertyName("useHostVerification"); + writer.WriteObjectValue(UseHostVerification); + } + if (UsePeerVerification != null) + { + writer.WritePropertyName("usePeerVerification"); + writer.WriteObjectValue(UsePeerVerification); + } + if (EncryptedCredential != null) + { + writer.WritePropertyName("encryptedCredential"); + writer.WriteObjectValue(EncryptedCredential); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static XeroLinkedService DeserializeXeroLinkedService(JsonElement element) + { + string type = default; + IntegrationRuntimeReference connectVia = default; + string description = default; + IDictionary parameters = default; + IList annotations = default; + object host = default; + SecretBase consumerKey = default; + SecretBase privateKey = default; + object useEncryptedEndpoints = default; + object useHostVerification = default; + object usePeerVerification = default; + object encryptedCredential = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("connectVia")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("host")) + { + host = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("consumerKey")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + consumerKey = SecretBase.DeserializeSecretBase(property0.Value); + continue; + } + if (property0.NameEquals("privateKey")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + privateKey = SecretBase.DeserializeSecretBase(property0.Value); + continue; + } + if (property0.NameEquals("useEncryptedEndpoints")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + useEncryptedEndpoints = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("useHostVerification")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + useHostVerification = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("usePeerVerification")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + usePeerVerification = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("encryptedCredential")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + encryptedCredential = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new XeroLinkedService(type, connectVia, description, parameters, annotations, additionalProperties, host, consumerKey, privateKey, useEncryptedEndpoints, useHostVerification, usePeerVerification, encryptedCredential); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/XeroLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/XeroLinkedService.cs new file mode 100644 index 000000000000..8f98440674fa --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/XeroLinkedService.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Xero Service linked service. + public partial class XeroLinkedService : LinkedService + { + /// Initializes a new instance of XeroLinkedService. + /// The endpoint of the Xero server. (i.e. api.xero.com). + public XeroLinkedService(object host) + { + if (host == null) + { + throw new ArgumentNullException(nameof(host)); + } + + Host = host; + Type = "Xero"; + } + + /// Initializes a new instance of XeroLinkedService. + /// Type of linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for describing the linked service. + /// . + /// The endpoint of the Xero server. (i.e. api.xero.com). + /// The consumer key associated with the Xero application. + /// + /// The private key from the .pem file that was generated for your Xero private application. You must include all the text from the .pem file, including the Unix line endings( + /// ). + /// + /// Specifies whether the data source endpoints are encrypted using HTTPS. The default value is true. + /// Specifies whether to require the host name in the server's certificate to match the host name of the server when connecting over SSL. The default value is true. + /// Specifies whether to verify the identity of the server when connecting over SSL. The default value is true. + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + internal XeroLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object host, SecretBase consumerKey, SecretBase privateKey, object useEncryptedEndpoints, object useHostVerification, object usePeerVerification, object encryptedCredential) : base(type, connectVia, description, parameters, annotations, additionalProperties) + { + Host = host; + ConsumerKey = consumerKey; + PrivateKey = privateKey; + UseEncryptedEndpoints = useEncryptedEndpoints; + UseHostVerification = useHostVerification; + UsePeerVerification = usePeerVerification; + EncryptedCredential = encryptedCredential; + Type = type ?? "Xero"; + } + + /// The endpoint of the Xero server. (i.e. api.xero.com). + public object Host { get; set; } + /// The consumer key associated with the Xero application. + public SecretBase ConsumerKey { get; set; } + /// + /// The private key from the .pem file that was generated for your Xero private application. You must include all the text from the .pem file, including the Unix line endings( + /// ). + /// + public SecretBase PrivateKey { get; set; } + /// Specifies whether the data source endpoints are encrypted using HTTPS. The default value is true. + public object UseEncryptedEndpoints { get; set; } + /// Specifies whether to require the host name in the server's certificate to match the host name of the server when connecting over SSL. The default value is true. + public object UseHostVerification { get; set; } + /// Specifies whether to verify the identity of the server when connecting over SSL. The default value is true. + public object UsePeerVerification { get; set; } + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + public object EncryptedCredential { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/XeroObjectDataset.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/XeroObjectDataset.Serialization.cs new file mode 100644 index 000000000000..19f5bd8ce077 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/XeroObjectDataset.Serialization.cs @@ -0,0 +1,213 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class XeroObjectDataset : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Structure != null) + { + writer.WritePropertyName("structure"); + writer.WriteObjectValue(Structure); + } + if (Schema != null) + { + writer.WritePropertyName("schema"); + writer.WriteObjectValue(Schema); + } + writer.WritePropertyName("linkedServiceName"); + writer.WriteObjectValue(LinkedServiceName); + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Folder != null) + { + writer.WritePropertyName("folder"); + writer.WriteObjectValue(Folder); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + if (TableName != null) + { + writer.WritePropertyName("tableName"); + writer.WriteObjectValue(TableName); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static XeroObjectDataset DeserializeXeroObjectDataset(JsonElement element) + { + string type = default; + string description = default; + object structure = default; + object schema = default; + LinkedServiceReference linkedServiceName = default; + IDictionary parameters = default; + IList annotations = default; + DatasetFolder folder = default; + object tableName = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("structure")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + structure = property.Value.GetObject(); + continue; + } + if (property.NameEquals("schema")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + schema = property.Value.GetObject(); + continue; + } + if (property.NameEquals("linkedServiceName")) + { + linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("folder")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + folder = DatasetFolder.DeserializeDatasetFolder(property.Value); + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("tableName")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + tableName = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new XeroObjectDataset(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties, tableName); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/XeroObjectDataset.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/XeroObjectDataset.cs new file mode 100644 index 000000000000..6a0459d430d9 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/XeroObjectDataset.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Xero Service dataset. + public partial class XeroObjectDataset : Dataset + { + /// Initializes a new instance of XeroObjectDataset. + /// Linked service reference. + public XeroObjectDataset(LinkedServiceReference linkedServiceName) : base(linkedServiceName) + { + if (linkedServiceName == null) + { + throw new ArgumentNullException(nameof(linkedServiceName)); + } + + Type = "XeroObject"; + } + + /// Initializes a new instance of XeroObjectDataset. + /// Type of dataset. + /// Dataset description. + /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. + /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. + /// Linked service reference. + /// Parameters for dataset. + /// List of tags that can be used for describing the Dataset. + /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. + /// . + /// The table name. Type: string (or Expression with resultType string). + internal XeroObjectDataset(string type, string description, object structure, object schema, LinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary additionalProperties, object tableName) : base(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) + { + TableName = tableName; + Type = type ?? "XeroObject"; + } + + /// The table name. Type: string (or Expression with resultType string). + public object TableName { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ZohoLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ZohoLinkedService.Serialization.cs new file mode 100644 index 000000000000..d656acc37915 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ZohoLinkedService.Serialization.cs @@ -0,0 +1,243 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class ZohoLinkedService : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (ConnectVia != null) + { + writer.WritePropertyName("connectVia"); + writer.WriteObjectValue(ConnectVia); + } + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + writer.WritePropertyName("endpoint"); + writer.WriteObjectValue(Endpoint); + if (AccessToken != null) + { + writer.WritePropertyName("accessToken"); + writer.WriteObjectValue(AccessToken); + } + if (UseEncryptedEndpoints != null) + { + writer.WritePropertyName("useEncryptedEndpoints"); + writer.WriteObjectValue(UseEncryptedEndpoints); + } + if (UseHostVerification != null) + { + writer.WritePropertyName("useHostVerification"); + writer.WriteObjectValue(UseHostVerification); + } + if (UsePeerVerification != null) + { + writer.WritePropertyName("usePeerVerification"); + writer.WriteObjectValue(UsePeerVerification); + } + if (EncryptedCredential != null) + { + writer.WritePropertyName("encryptedCredential"); + writer.WriteObjectValue(EncryptedCredential); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static ZohoLinkedService DeserializeZohoLinkedService(JsonElement element) + { + string type = default; + IntegrationRuntimeReference connectVia = default; + string description = default; + IDictionary parameters = default; + IList annotations = default; + object endpoint = default; + SecretBase accessToken = default; + object useEncryptedEndpoints = default; + object useHostVerification = default; + object usePeerVerification = default; + object encryptedCredential = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("connectVia")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("endpoint")) + { + endpoint = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("accessToken")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + accessToken = SecretBase.DeserializeSecretBase(property0.Value); + continue; + } + if (property0.NameEquals("useEncryptedEndpoints")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + useEncryptedEndpoints = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("useHostVerification")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + useHostVerification = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("usePeerVerification")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + usePeerVerification = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("encryptedCredential")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + encryptedCredential = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new ZohoLinkedService(type, connectVia, description, parameters, annotations, additionalProperties, endpoint, accessToken, useEncryptedEndpoints, useHostVerification, usePeerVerification, encryptedCredential); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ZohoLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ZohoLinkedService.cs new file mode 100644 index 000000000000..931abd127e33 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ZohoLinkedService.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Zoho server linked service. + public partial class ZohoLinkedService : LinkedService + { + /// Initializes a new instance of ZohoLinkedService. + /// The endpoint of the Zoho server. (i.e. crm.zoho.com/crm/private). + public ZohoLinkedService(object endpoint) + { + if (endpoint == null) + { + throw new ArgumentNullException(nameof(endpoint)); + } + + Endpoint = endpoint; + Type = "Zoho"; + } + + /// Initializes a new instance of ZohoLinkedService. + /// Type of linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for describing the linked service. + /// . + /// The endpoint of the Zoho server. (i.e. crm.zoho.com/crm/private). + /// The access token for Zoho authentication. + /// Specifies whether the data source endpoints are encrypted using HTTPS. The default value is true. + /// Specifies whether to require the host name in the server's certificate to match the host name of the server when connecting over SSL. The default value is true. + /// Specifies whether to verify the identity of the server when connecting over SSL. The default value is true. + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + internal ZohoLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object endpoint, SecretBase accessToken, object useEncryptedEndpoints, object useHostVerification, object usePeerVerification, object encryptedCredential) : base(type, connectVia, description, parameters, annotations, additionalProperties) + { + Endpoint = endpoint; + AccessToken = accessToken; + UseEncryptedEndpoints = useEncryptedEndpoints; + UseHostVerification = useHostVerification; + UsePeerVerification = usePeerVerification; + EncryptedCredential = encryptedCredential; + Type = type ?? "Zoho"; + } + + /// The endpoint of the Zoho server. (i.e. crm.zoho.com/crm/private). + public object Endpoint { get; set; } + /// The access token for Zoho authentication. + public SecretBase AccessToken { get; set; } + /// Specifies whether the data source endpoints are encrypted using HTTPS. The default value is true. + public object UseEncryptedEndpoints { get; set; } + /// Specifies whether to require the host name in the server's certificate to match the host name of the server when connecting over SSL. The default value is true. + public object UseHostVerification { get; set; } + /// Specifies whether to verify the identity of the server when connecting over SSL. The default value is true. + public object UsePeerVerification { get; set; } + /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + public object EncryptedCredential { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ZohoObjectDataset.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ZohoObjectDataset.Serialization.cs new file mode 100644 index 000000000000..c461a44f778b --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ZohoObjectDataset.Serialization.cs @@ -0,0 +1,213 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + public partial class ZohoObjectDataset : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Structure != null) + { + writer.WritePropertyName("structure"); + writer.WriteObjectValue(Structure); + } + if (Schema != null) + { + writer.WritePropertyName("schema"); + writer.WriteObjectValue(Schema); + } + writer.WritePropertyName("linkedServiceName"); + writer.WriteObjectValue(LinkedServiceName); + if (Parameters != null) + { + writer.WritePropertyName("parameters"); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Annotations != null) + { + writer.WritePropertyName("annotations"); + writer.WriteStartArray(); + foreach (var item in Annotations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Folder != null) + { + writer.WritePropertyName("folder"); + writer.WriteObjectValue(Folder); + } + writer.WritePropertyName("typeProperties"); + writer.WriteStartObject(); + if (TableName != null) + { + writer.WritePropertyName("tableName"); + writer.WriteObjectValue(TableName); + } + writer.WriteEndObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static ZohoObjectDataset DeserializeZohoObjectDataset(JsonElement element) + { + string type = default; + string description = default; + object structure = default; + object schema = default; + LinkedServiceReference linkedServiceName = default; + IDictionary parameters = default; + IList annotations = default; + DatasetFolder folder = default; + object tableName = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("structure")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + structure = property.Value.GetObject(); + continue; + } + if (property.NameEquals("schema")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + schema = property.Value.GetObject(); + continue; + } + if (property.NameEquals("linkedServiceName")) + { + linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value); + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value)); + } + } + parameters = dictionary; + continue; + } + if (property.NameEquals("annotations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + annotations = array; + continue; + } + if (property.NameEquals("folder")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + folder = DatasetFolder.DeserializeDatasetFolder(property.Value); + continue; + } + if (property.NameEquals("typeProperties")) + { + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("tableName")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + tableName = property0.Value.GetObject(); + continue; + } + } + continue; + } + additionalPropertiesDictionary ??= new Dictionary(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + additionalPropertiesDictionary.Add(property.Name, null); + } + else + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + } + additionalProperties = additionalPropertiesDictionary; + return new ZohoObjectDataset(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties, tableName); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ZohoObjectDataset.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ZohoObjectDataset.cs new file mode 100644 index 000000000000..99bc77831d19 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ZohoObjectDataset.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Zoho server dataset. + public partial class ZohoObjectDataset : Dataset + { + /// Initializes a new instance of ZohoObjectDataset. + /// Linked service reference. + public ZohoObjectDataset(LinkedServiceReference linkedServiceName) : base(linkedServiceName) + { + if (linkedServiceName == null) + { + throw new ArgumentNullException(nameof(linkedServiceName)); + } + + Type = "ZohoObject"; + } + + /// Initializes a new instance of ZohoObjectDataset. + /// Type of dataset. + /// Dataset description. + /// Columns that define the structure of the dataset. Type: array (or Expression with resultType array), itemType: DatasetDataElement. + /// Columns that define the physical type schema of the dataset. Type: array (or Expression with resultType array), itemType: DatasetSchemaDataElement. + /// Linked service reference. + /// Parameters for dataset. + /// List of tags that can be used for describing the Dataset. + /// The folder that this Dataset is in. If not specified, Dataset will appear at the root level. + /// . + /// The table name. Type: string (or Expression with resultType string). + internal ZohoObjectDataset(string type, string description, object structure, object schema, LinkedServiceReference linkedServiceName, IDictionary parameters, IList annotations, DatasetFolder folder, IDictionary additionalProperties, object tableName) : base(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties) + { + TableName = tableName; + Type = type ?? "ZohoObject"; + } + + /// The table name. Type: string (or Expression with resultType string). + public object TableName { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/NotebookClient.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/NotebookClient.cs new file mode 100644 index 000000000000..90cbe47c6344 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/NotebookClient.cs @@ -0,0 +1,302 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Analytics.Synapse.Artifacts.Models; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.Analytics.Synapse.Artifacts +{ + /// The Notebook service client. + public partial class NotebookClient + { + private readonly ClientDiagnostics _clientDiagnostics; + private readonly HttpPipeline _pipeline; + internal NotebookRestClient RestClient { get; } + /// Initializes a new instance of NotebookClient for mocking. + protected NotebookClient() + { + } + /// Initializes a new instance of NotebookClient. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The workspace development endpoint, for example https://myworkspace.dev.azuresynapse.net. + /// Api Version. + internal NotebookClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string endpoint, string apiVersion = "2019-06-01-preview") + { + RestClient = new NotebookRestClient(clientDiagnostics, pipeline, endpoint, apiVersion); + _clientDiagnostics = clientDiagnostics; + _pipeline = pipeline; + } + + /// Creates or updates a Note Book. + /// The notebook name. + /// Note book resource definition. + /// ETag of the Note book entity. Should only be specified for update, for which it should match existing entity or can be * for unconditional update. + /// The cancellation token to use. + public virtual async Task> CreateOrUpdateNotebookAsync(string notebookName, NotebookResource notebook, string ifMatch = null, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("NotebookClient.CreateOrUpdateNotebook"); + scope.Start(); + try + { + return await RestClient.CreateOrUpdateNotebookAsync(notebookName, notebook, ifMatch, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Creates or updates a Note Book. + /// The notebook name. + /// Note book resource definition. + /// ETag of the Note book entity. Should only be specified for update, for which it should match existing entity or can be * for unconditional update. + /// The cancellation token to use. + public virtual Response CreateOrUpdateNotebook(string notebookName, NotebookResource notebook, string ifMatch = null, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("NotebookClient.CreateOrUpdateNotebook"); + scope.Start(); + try + { + return RestClient.CreateOrUpdateNotebook(notebookName, notebook, ifMatch, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets a Note Book. + /// The notebook name. + /// ETag of the Notebook 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 to use. + public virtual async Task> GetNotebookAsync(string notebookName, string ifNoneMatch = null, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("NotebookClient.GetNotebook"); + scope.Start(); + try + { + return await RestClient.GetNotebookAsync(notebookName, ifNoneMatch, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets a Note Book. + /// The notebook name. + /// ETag of the Notebook 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 to use. + public virtual Response GetNotebook(string notebookName, string ifNoneMatch = null, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("NotebookClient.GetNotebook"); + scope.Start(); + try + { + return RestClient.GetNotebook(notebookName, ifNoneMatch, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Deletes a Note book. + /// The notebook name. + /// The cancellation token to use. + public virtual async Task DeleteNotebookAsync(string notebookName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("NotebookClient.DeleteNotebook"); + scope.Start(); + try + { + return await RestClient.DeleteNotebookAsync(notebookName, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Deletes a Note book. + /// The notebook name. + /// The cancellation token to use. + public virtual Response DeleteNotebook(string notebookName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("NotebookClient.DeleteNotebook"); + scope.Start(); + try + { + return RestClient.DeleteNotebook(notebookName, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Lists Notebooks. + /// The cancellation token to use. + public virtual AsyncPageable GetNotebooksByWorkspaceAsync(CancellationToken cancellationToken = default) + { + async Task> FirstPageFunc(int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("NotebookClient.GetNotebooksByWorkspace"); + scope.Start(); + try + { + var response = await RestClient.GetNotebooksByWorkspaceAsync(cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + async Task> NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("NotebookClient.GetNotebooksByWorkspace"); + scope.Start(); + try + { + var response = await RestClient.GetNotebooksByWorkspaceNextPageAsync(nextLink, cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); + } + + /// Lists Notebooks. + /// The cancellation token to use. + public virtual Pageable GetNotebooksByWorkspace(CancellationToken cancellationToken = default) + { + Page FirstPageFunc(int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("NotebookClient.GetNotebooksByWorkspace"); + scope.Start(); + try + { + var response = RestClient.GetNotebooksByWorkspace(cancellationToken); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + Page NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("NotebookClient.GetNotebooksByWorkspace"); + scope.Start(); + try + { + var response = RestClient.GetNotebooksByWorkspaceNextPage(nextLink, cancellationToken); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); + } + + /// Lists a summary of Notebooks. + /// The cancellation token to use. + public virtual AsyncPageable GetNotebookSummaryByWorkSpaceAsync(CancellationToken cancellationToken = default) + { + async Task> FirstPageFunc(int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("NotebookClient.GetNotebookSummaryByWorkSpace"); + scope.Start(); + try + { + var response = await RestClient.GetNotebookSummaryByWorkSpaceAsync(cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + async Task> NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("NotebookClient.GetNotebookSummaryByWorkSpace"); + scope.Start(); + try + { + var response = await RestClient.GetNotebookSummaryByWorkSpaceNextPageAsync(nextLink, cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); + } + + /// Lists a summary of Notebooks. + /// The cancellation token to use. + public virtual Pageable GetNotebookSummaryByWorkSpace(CancellationToken cancellationToken = default) + { + Page FirstPageFunc(int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("NotebookClient.GetNotebookSummaryByWorkSpace"); + scope.Start(); + try + { + var response = RestClient.GetNotebookSummaryByWorkSpace(cancellationToken); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + Page NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("NotebookClient.GetNotebookSummaryByWorkSpace"); + scope.Start(); + try + { + var response = RestClient.GetNotebookSummaryByWorkSpaceNextPage(nextLink, cancellationToken); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/NotebookRestClient.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/NotebookRestClient.cs new file mode 100644 index 000000000000..fafcbd7f730a --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/NotebookRestClient.cs @@ -0,0 +1,587 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Analytics.Synapse.Artifacts.Models; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.Analytics.Synapse.Artifacts +{ + internal partial class NotebookRestClient + { + private string endpoint; + private string apiVersion; + private ClientDiagnostics _clientDiagnostics; + private HttpPipeline _pipeline; + + /// Initializes a new instance of NotebookRestClient. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The workspace development endpoint, for example https://myworkspace.dev.azuresynapse.net. + /// Api Version. + /// This occurs when one of the required arguments is null. + public NotebookRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string endpoint, string apiVersion = "2019-06-01-preview") + { + if (endpoint == null) + { + throw new ArgumentNullException(nameof(endpoint)); + } + if (apiVersion == null) + { + throw new ArgumentNullException(nameof(apiVersion)); + } + + this.endpoint = endpoint; + this.apiVersion = apiVersion; + _clientDiagnostics = clientDiagnostics; + _pipeline = pipeline; + } + + internal HttpMessage CreateGetNotebooksByWorkspaceRequest() + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.AppendRaw(endpoint, false); + uri.AppendPath("/notebooks", false); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + return message; + } + + /// Lists Notebooks. + /// The cancellation token to use. + public async Task> GetNotebooksByWorkspaceAsync(CancellationToken cancellationToken = default) + { + using var message = CreateGetNotebooksByWorkspaceRequest(); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + NotebookListResponse value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + value = NotebookListResponse.DeserializeNotebookListResponse(document.RootElement); + } + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Lists Notebooks. + /// The cancellation token to use. + public Response GetNotebooksByWorkspace(CancellationToken cancellationToken = default) + { + using var message = CreateGetNotebooksByWorkspaceRequest(); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + NotebookListResponse value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + value = NotebookListResponse.DeserializeNotebookListResponse(document.RootElement); + } + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetNotebookSummaryByWorkSpaceRequest() + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.AppendRaw(endpoint, false); + uri.AppendPath("/notebooks/summary", false); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + return message; + } + + /// Lists a summary of Notebooks. + /// The cancellation token to use. + public async Task> GetNotebookSummaryByWorkSpaceAsync(CancellationToken cancellationToken = default) + { + using var message = CreateGetNotebookSummaryByWorkSpaceRequest(); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + NotebookListResponse value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + value = NotebookListResponse.DeserializeNotebookListResponse(document.RootElement); + } + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Lists a summary of Notebooks. + /// The cancellation token to use. + public Response GetNotebookSummaryByWorkSpace(CancellationToken cancellationToken = default) + { + using var message = CreateGetNotebookSummaryByWorkSpaceRequest(); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + NotebookListResponse value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + value = NotebookListResponse.DeserializeNotebookListResponse(document.RootElement); + } + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateCreateOrUpdateNotebookRequest(string notebookName, NotebookResource notebook, string ifMatch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.AppendRaw(endpoint, false); + uri.AppendPath("/notebooks/", false); + uri.AppendPath(notebookName, true); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + if (ifMatch != null) + { + request.Headers.Add("If-Match", ifMatch); + } + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(notebook); + request.Content = content; + return message; + } + + /// Creates or updates a Note Book. + /// The notebook name. + /// Note book resource definition. + /// ETag of the Note book entity. Should only be specified for update, for which it should match existing entity or can be * for unconditional update. + /// The cancellation token to use. + public async Task> CreateOrUpdateNotebookAsync(string notebookName, NotebookResource notebook, string ifMatch = null, CancellationToken cancellationToken = default) + { + if (notebookName == null) + { + throw new ArgumentNullException(nameof(notebookName)); + } + if (notebook == null) + { + throw new ArgumentNullException(nameof(notebook)); + } + + using var message = CreateCreateOrUpdateNotebookRequest(notebookName, notebook, ifMatch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + NotebookResource value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + value = NotebookResource.DeserializeNotebookResource(document.RootElement); + } + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Creates or updates a Note Book. + /// The notebook name. + /// Note book resource definition. + /// ETag of the Note book entity. Should only be specified for update, for which it should match existing entity or can be * for unconditional update. + /// The cancellation token to use. + public Response CreateOrUpdateNotebook(string notebookName, NotebookResource notebook, string ifMatch = null, CancellationToken cancellationToken = default) + { + if (notebookName == null) + { + throw new ArgumentNullException(nameof(notebookName)); + } + if (notebook == null) + { + throw new ArgumentNullException(nameof(notebook)); + } + + using var message = CreateCreateOrUpdateNotebookRequest(notebookName, notebook, ifMatch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + NotebookResource value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + value = NotebookResource.DeserializeNotebookResource(document.RootElement); + } + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetNotebookRequest(string notebookName, string ifNoneMatch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.AppendRaw(endpoint, false); + uri.AppendPath("/notebooks/", false); + uri.AppendPath(notebookName, true); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + if (ifNoneMatch != null) + { + request.Headers.Add("If-None-Match", ifNoneMatch); + } + return message; + } + + /// Gets a Note Book. + /// The notebook name. + /// ETag of the Notebook 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 to use. + public async Task> GetNotebookAsync(string notebookName, string ifNoneMatch = null, CancellationToken cancellationToken = default) + { + if (notebookName == null) + { + throw new ArgumentNullException(nameof(notebookName)); + } + + using var message = CreateGetNotebookRequest(notebookName, ifNoneMatch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + NotebookResource value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + value = NotebookResource.DeserializeNotebookResource(document.RootElement); + } + return Response.FromValue(value, message.Response); + } + case 304: + return Response.FromValue(null, message.Response); + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Gets a Note Book. + /// The notebook name. + /// ETag of the Notebook 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 to use. + public Response GetNotebook(string notebookName, string ifNoneMatch = null, CancellationToken cancellationToken = default) + { + if (notebookName == null) + { + throw new ArgumentNullException(nameof(notebookName)); + } + + using var message = CreateGetNotebookRequest(notebookName, ifNoneMatch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + NotebookResource value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + value = NotebookResource.DeserializeNotebookResource(document.RootElement); + } + return Response.FromValue(value, message.Response); + } + case 304: + return Response.FromValue(null, message.Response); + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateDeleteNotebookRequest(string notebookName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.AppendRaw(endpoint, false); + uri.AppendPath("/notebooks/", false); + uri.AppendPath(notebookName, true); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + return message; + } + + /// Deletes a Note book. + /// The notebook name. + /// The cancellation token to use. + public async Task DeleteNotebookAsync(string notebookName, CancellationToken cancellationToken = default) + { + if (notebookName == null) + { + throw new ArgumentNullException(nameof(notebookName)); + } + + using var message = CreateDeleteNotebookRequest(notebookName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Deletes a Note book. + /// The notebook name. + /// The cancellation token to use. + public Response DeleteNotebook(string notebookName, CancellationToken cancellationToken = default) + { + if (notebookName == null) + { + throw new ArgumentNullException(nameof(notebookName)); + } + + using var message = CreateDeleteNotebookRequest(notebookName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetNotebooksByWorkspaceNextPageRequest(string nextLink) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.AppendRaw(endpoint, false); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + return message; + } + + /// Lists Notebooks. + /// The URL to the next page of results. + /// The cancellation token to use. + public async Task> GetNotebooksByWorkspaceNextPageAsync(string nextLink, CancellationToken cancellationToken = default) + { + if (nextLink == null) + { + throw new ArgumentNullException(nameof(nextLink)); + } + + using var message = CreateGetNotebooksByWorkspaceNextPageRequest(nextLink); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + NotebookListResponse value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + value = NotebookListResponse.DeserializeNotebookListResponse(document.RootElement); + } + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Lists Notebooks. + /// The URL to the next page of results. + /// The cancellation token to use. + public Response GetNotebooksByWorkspaceNextPage(string nextLink, CancellationToken cancellationToken = default) + { + if (nextLink == null) + { + throw new ArgumentNullException(nameof(nextLink)); + } + + using var message = CreateGetNotebooksByWorkspaceNextPageRequest(nextLink); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + NotebookListResponse value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + value = NotebookListResponse.DeserializeNotebookListResponse(document.RootElement); + } + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetNotebookSummaryByWorkSpaceNextPageRequest(string nextLink) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.AppendRaw(endpoint, false); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + return message; + } + + /// Lists a summary of Notebooks. + /// The URL to the next page of results. + /// The cancellation token to use. + public async Task> GetNotebookSummaryByWorkSpaceNextPageAsync(string nextLink, CancellationToken cancellationToken = default) + { + if (nextLink == null) + { + throw new ArgumentNullException(nameof(nextLink)); + } + + using var message = CreateGetNotebookSummaryByWorkSpaceNextPageRequest(nextLink); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + NotebookListResponse value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + value = NotebookListResponse.DeserializeNotebookListResponse(document.RootElement); + } + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Lists a summary of Notebooks. + /// The URL to the next page of results. + /// The cancellation token to use. + public Response GetNotebookSummaryByWorkSpaceNextPage(string nextLink, CancellationToken cancellationToken = default) + { + if (nextLink == null) + { + throw new ArgumentNullException(nameof(nextLink)); + } + + using var message = CreateGetNotebookSummaryByWorkSpaceNextPageRequest(nextLink); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + NotebookListResponse value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + value = NotebookListResponse.DeserializeNotebookListResponse(document.RootElement); + } + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/PipelineClient.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/PipelineClient.cs new file mode 100644 index 000000000000..1a9569c5339c --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/PipelineClient.cs @@ -0,0 +1,273 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Analytics.Synapse.Artifacts.Models; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.Analytics.Synapse.Artifacts +{ + /// The Pipeline service client. + public partial class PipelineClient + { + private readonly ClientDiagnostics _clientDiagnostics; + private readonly HttpPipeline _pipeline; + internal PipelineRestClient RestClient { get; } + /// Initializes a new instance of PipelineClient for mocking. + protected PipelineClient() + { + } + /// Initializes a new instance of PipelineClient. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The workspace development endpoint, for example https://myworkspace.dev.azuresynapse.net. + /// Api Version. + internal PipelineClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string endpoint, string apiVersion = "2019-06-01-preview") + { + RestClient = new PipelineRestClient(clientDiagnostics, pipeline, endpoint, apiVersion); + _clientDiagnostics = clientDiagnostics; + _pipeline = pipeline; + } + + /// Creates or updates a pipeline. + /// The pipeline name. + /// Pipeline resource definition. + /// ETag of the pipeline entity. Should only be specified for update, for which it should match existing entity or can be * for unconditional update. + /// The cancellation token to use. + public virtual async Task> CreateOrUpdatePipelineAsync(string pipelineName, PipelineResource pipeline, string ifMatch = null, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("PipelineClient.CreateOrUpdatePipeline"); + scope.Start(); + try + { + return await RestClient.CreateOrUpdatePipelineAsync(pipelineName, pipeline, ifMatch, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Creates or updates a pipeline. + /// The pipeline name. + /// Pipeline resource definition. + /// ETag of the pipeline entity. Should only be specified for update, for which it should match existing entity or can be * for unconditional update. + /// The cancellation token to use. + public virtual Response CreateOrUpdatePipeline(string pipelineName, PipelineResource pipeline, string ifMatch = null, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("PipelineClient.CreateOrUpdatePipeline"); + scope.Start(); + try + { + return RestClient.CreateOrUpdatePipeline(pipelineName, pipeline, ifMatch, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets a pipeline. + /// The pipeline name. + /// ETag of the pipeline 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 to use. + public virtual async Task> GetPipelineAsync(string pipelineName, string ifNoneMatch = null, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("PipelineClient.GetPipeline"); + scope.Start(); + try + { + return await RestClient.GetPipelineAsync(pipelineName, ifNoneMatch, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets a pipeline. + /// The pipeline name. + /// ETag of the pipeline 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 to use. + public virtual Response GetPipeline(string pipelineName, string ifNoneMatch = null, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("PipelineClient.GetPipeline"); + scope.Start(); + try + { + return RestClient.GetPipeline(pipelineName, ifNoneMatch, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Deletes a pipeline. + /// The pipeline name. + /// The cancellation token to use. + public virtual async Task DeletePipelineAsync(string pipelineName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("PipelineClient.DeletePipeline"); + scope.Start(); + try + { + return await RestClient.DeletePipelineAsync(pipelineName, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Deletes a pipeline. + /// The pipeline name. + /// The cancellation token to use. + public virtual Response DeletePipeline(string pipelineName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("PipelineClient.DeletePipeline"); + scope.Start(); + try + { + return RestClient.DeletePipeline(pipelineName, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Creates a run of a pipeline. + /// The pipeline name. + /// The pipeline run identifier. If run ID is specified the parameters of the specified run will be used to create a new run. + /// Recovery mode flag. If recovery mode is set to true, the specified referenced pipeline run and the new run will be grouped under the same groupId. + /// In recovery mode, the rerun will start from this activity. If not specified, all activities will run. + /// Parameters of the pipeline run. These parameters will be used only if the runId is not specified. + /// The cancellation token to use. + public virtual async Task> CreatePipelineRunAsync(string pipelineName, string referencePipelineRunId = null, bool? isRecovery = null, string startActivityName = null, IDictionary parameters = null, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("PipelineClient.CreatePipelineRun"); + scope.Start(); + try + { + return await RestClient.CreatePipelineRunAsync(pipelineName, referencePipelineRunId, isRecovery, startActivityName, parameters, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Creates a run of a pipeline. + /// The pipeline name. + /// The pipeline run identifier. If run ID is specified the parameters of the specified run will be used to create a new run. + /// Recovery mode flag. If recovery mode is set to true, the specified referenced pipeline run and the new run will be grouped under the same groupId. + /// In recovery mode, the rerun will start from this activity. If not specified, all activities will run. + /// Parameters of the pipeline run. These parameters will be used only if the runId is not specified. + /// The cancellation token to use. + public virtual Response CreatePipelineRun(string pipelineName, string referencePipelineRunId = null, bool? isRecovery = null, string startActivityName = null, IDictionary parameters = null, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("PipelineClient.CreatePipelineRun"); + scope.Start(); + try + { + return RestClient.CreatePipelineRun(pipelineName, referencePipelineRunId, isRecovery, startActivityName, parameters, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Lists pipelines. + /// The cancellation token to use. + public virtual AsyncPageable GetPipelinesByWorkspaceAsync(CancellationToken cancellationToken = default) + { + async Task> FirstPageFunc(int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("PipelineClient.GetPipelinesByWorkspace"); + scope.Start(); + try + { + var response = await RestClient.GetPipelinesByWorkspaceAsync(cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + async Task> NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("PipelineClient.GetPipelinesByWorkspace"); + scope.Start(); + try + { + var response = await RestClient.GetPipelinesByWorkspaceNextPageAsync(nextLink, cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); + } + + /// Lists pipelines. + /// The cancellation token to use. + public virtual Pageable GetPipelinesByWorkspace(CancellationToken cancellationToken = default) + { + Page FirstPageFunc(int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("PipelineClient.GetPipelinesByWorkspace"); + scope.Start(); + try + { + var response = RestClient.GetPipelinesByWorkspace(cancellationToken); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + Page NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("PipelineClient.GetPipelinesByWorkspace"); + scope.Start(); + try + { + var response = RestClient.GetPipelinesByWorkspaceNextPage(nextLink, cancellationToken); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/PipelineRestClient.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/PipelineRestClient.cs new file mode 100644 index 000000000000..7e68c075a860 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/PipelineRestClient.cs @@ -0,0 +1,557 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Analytics.Synapse.Artifacts.Models; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.Analytics.Synapse.Artifacts +{ + internal partial class PipelineRestClient + { + private string endpoint; + private string apiVersion; + private ClientDiagnostics _clientDiagnostics; + private HttpPipeline _pipeline; + + /// Initializes a new instance of PipelineRestClient. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The workspace development endpoint, for example https://myworkspace.dev.azuresynapse.net. + /// Api Version. + /// This occurs when one of the required arguments is null. + public PipelineRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string endpoint, string apiVersion = "2019-06-01-preview") + { + if (endpoint == null) + { + throw new ArgumentNullException(nameof(endpoint)); + } + if (apiVersion == null) + { + throw new ArgumentNullException(nameof(apiVersion)); + } + + this.endpoint = endpoint; + this.apiVersion = apiVersion; + _clientDiagnostics = clientDiagnostics; + _pipeline = pipeline; + } + + internal HttpMessage CreateGetPipelinesByWorkspaceRequest() + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.AppendRaw(endpoint, false); + uri.AppendPath("/pipelines", false); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + return message; + } + + /// Lists pipelines. + /// The cancellation token to use. + public async Task> GetPipelinesByWorkspaceAsync(CancellationToken cancellationToken = default) + { + using var message = CreateGetPipelinesByWorkspaceRequest(); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + PipelineListResponse value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + value = PipelineListResponse.DeserializePipelineListResponse(document.RootElement); + } + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Lists pipelines. + /// The cancellation token to use. + public Response GetPipelinesByWorkspace(CancellationToken cancellationToken = default) + { + using var message = CreateGetPipelinesByWorkspaceRequest(); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + PipelineListResponse value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + value = PipelineListResponse.DeserializePipelineListResponse(document.RootElement); + } + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateCreateOrUpdatePipelineRequest(string pipelineName, PipelineResource pipeline, string ifMatch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.AppendRaw(endpoint, false); + uri.AppendPath("/pipelines/", false); + uri.AppendPath(pipelineName, true); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + if (ifMatch != null) + { + request.Headers.Add("If-Match", ifMatch); + } + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(pipeline); + request.Content = content; + return message; + } + + /// Creates or updates a pipeline. + /// The pipeline name. + /// Pipeline resource definition. + /// ETag of the pipeline entity. Should only be specified for update, for which it should match existing entity or can be * for unconditional update. + /// The cancellation token to use. + public async Task> CreateOrUpdatePipelineAsync(string pipelineName, PipelineResource pipeline, string ifMatch = null, CancellationToken cancellationToken = default) + { + if (pipelineName == null) + { + throw new ArgumentNullException(nameof(pipelineName)); + } + if (pipeline == null) + { + throw new ArgumentNullException(nameof(pipeline)); + } + + using var message = CreateCreateOrUpdatePipelineRequest(pipelineName, pipeline, ifMatch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + PipelineResource value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + value = PipelineResource.DeserializePipelineResource(document.RootElement); + } + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Creates or updates a pipeline. + /// The pipeline name. + /// Pipeline resource definition. + /// ETag of the pipeline entity. Should only be specified for update, for which it should match existing entity or can be * for unconditional update. + /// The cancellation token to use. + public Response CreateOrUpdatePipeline(string pipelineName, PipelineResource pipeline, string ifMatch = null, CancellationToken cancellationToken = default) + { + if (pipelineName == null) + { + throw new ArgumentNullException(nameof(pipelineName)); + } + if (pipeline == null) + { + throw new ArgumentNullException(nameof(pipeline)); + } + + using var message = CreateCreateOrUpdatePipelineRequest(pipelineName, pipeline, ifMatch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + PipelineResource value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + value = PipelineResource.DeserializePipelineResource(document.RootElement); + } + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetPipelineRequest(string pipelineName, string ifNoneMatch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.AppendRaw(endpoint, false); + uri.AppendPath("/pipelines/", false); + uri.AppendPath(pipelineName, true); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + if (ifNoneMatch != null) + { + request.Headers.Add("If-None-Match", ifNoneMatch); + } + return message; + } + + /// Gets a pipeline. + /// The pipeline name. + /// ETag of the pipeline 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 to use. + public async Task> GetPipelineAsync(string pipelineName, string ifNoneMatch = null, CancellationToken cancellationToken = default) + { + if (pipelineName == null) + { + throw new ArgumentNullException(nameof(pipelineName)); + } + + using var message = CreateGetPipelineRequest(pipelineName, ifNoneMatch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + PipelineResource value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + value = PipelineResource.DeserializePipelineResource(document.RootElement); + } + return Response.FromValue(value, message.Response); + } + case 304: + return Response.FromValue(null, message.Response); + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Gets a pipeline. + /// The pipeline name. + /// ETag of the pipeline 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 to use. + public Response GetPipeline(string pipelineName, string ifNoneMatch = null, CancellationToken cancellationToken = default) + { + if (pipelineName == null) + { + throw new ArgumentNullException(nameof(pipelineName)); + } + + using var message = CreateGetPipelineRequest(pipelineName, ifNoneMatch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + PipelineResource value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + value = PipelineResource.DeserializePipelineResource(document.RootElement); + } + return Response.FromValue(value, message.Response); + } + case 304: + return Response.FromValue(null, message.Response); + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateDeletePipelineRequest(string pipelineName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.AppendRaw(endpoint, false); + uri.AppendPath("/pipelines/", false); + uri.AppendPath(pipelineName, true); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + return message; + } + + /// Deletes a pipeline. + /// The pipeline name. + /// The cancellation token to use. + public async Task DeletePipelineAsync(string pipelineName, CancellationToken cancellationToken = default) + { + if (pipelineName == null) + { + throw new ArgumentNullException(nameof(pipelineName)); + } + + using var message = CreateDeletePipelineRequest(pipelineName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Deletes a pipeline. + /// The pipeline name. + /// The cancellation token to use. + public Response DeletePipeline(string pipelineName, CancellationToken cancellationToken = default) + { + if (pipelineName == null) + { + throw new ArgumentNullException(nameof(pipelineName)); + } + + using var message = CreateDeletePipelineRequest(pipelineName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateCreatePipelineRunRequest(string pipelineName, string referencePipelineRunId, bool? isRecovery, string startActivityName, IDictionary parameters) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.AppendRaw(endpoint, false); + uri.AppendPath("/pipelines/", false); + uri.AppendPath(pipelineName, true); + uri.AppendPath("/createRun", false); + uri.AppendQuery("api-version", apiVersion, true); + if (referencePipelineRunId != null) + { + uri.AppendQuery("referencePipelineRunId", referencePipelineRunId, true); + } + if (isRecovery != null) + { + uri.AppendQuery("isRecovery", isRecovery.Value, true); + } + if (startActivityName != null) + { + uri.AppendQuery("startActivityName", startActivityName, true); + } + request.Uri = uri; + request.Headers.Add("Content-Type", "application/json"); + if (parameters != null) + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteStartObject(); + foreach (var item in parameters) + { + content.JsonWriter.WritePropertyName(item.Key); + content.JsonWriter.WriteObjectValue(item.Value); + } + content.JsonWriter.WriteEndObject(); + request.Content = content; + } + return message; + } + + /// Creates a run of a pipeline. + /// The pipeline name. + /// The pipeline run identifier. If run ID is specified the parameters of the specified run will be used to create a new run. + /// Recovery mode flag. If recovery mode is set to true, the specified referenced pipeline run and the new run will be grouped under the same groupId. + /// In recovery mode, the rerun will start from this activity. If not specified, all activities will run. + /// Parameters of the pipeline run. These parameters will be used only if the runId is not specified. + /// The cancellation token to use. + public async Task> CreatePipelineRunAsync(string pipelineName, string referencePipelineRunId = null, bool? isRecovery = null, string startActivityName = null, IDictionary parameters = null, CancellationToken cancellationToken = default) + { + if (pipelineName == null) + { + throw new ArgumentNullException(nameof(pipelineName)); + } + + using var message = CreateCreatePipelineRunRequest(pipelineName, referencePipelineRunId, isRecovery, startActivityName, parameters); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + CreateRunResponse value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + value = CreateRunResponse.DeserializeCreateRunResponse(document.RootElement); + } + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Creates a run of a pipeline. + /// The pipeline name. + /// The pipeline run identifier. If run ID is specified the parameters of the specified run will be used to create a new run. + /// Recovery mode flag. If recovery mode is set to true, the specified referenced pipeline run and the new run will be grouped under the same groupId. + /// In recovery mode, the rerun will start from this activity. If not specified, all activities will run. + /// Parameters of the pipeline run. These parameters will be used only if the runId is not specified. + /// The cancellation token to use. + public Response CreatePipelineRun(string pipelineName, string referencePipelineRunId = null, bool? isRecovery = null, string startActivityName = null, IDictionary parameters = null, CancellationToken cancellationToken = default) + { + if (pipelineName == null) + { + throw new ArgumentNullException(nameof(pipelineName)); + } + + using var message = CreateCreatePipelineRunRequest(pipelineName, referencePipelineRunId, isRecovery, startActivityName, parameters); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + CreateRunResponse value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + value = CreateRunResponse.DeserializeCreateRunResponse(document.RootElement); + } + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetPipelinesByWorkspaceNextPageRequest(string nextLink) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.AppendRaw(endpoint, false); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + return message; + } + + /// Lists pipelines. + /// The URL to the next page of results. + /// The cancellation token to use. + public async Task> GetPipelinesByWorkspaceNextPageAsync(string nextLink, CancellationToken cancellationToken = default) + { + if (nextLink == null) + { + throw new ArgumentNullException(nameof(nextLink)); + } + + using var message = CreateGetPipelinesByWorkspaceNextPageRequest(nextLink); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + PipelineListResponse value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + value = PipelineListResponse.DeserializePipelineListResponse(document.RootElement); + } + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Lists pipelines. + /// The URL to the next page of results. + /// The cancellation token to use. + public Response GetPipelinesByWorkspaceNextPage(string nextLink, CancellationToken cancellationToken = default) + { + if (nextLink == null) + { + throw new ArgumentNullException(nameof(nextLink)); + } + + using var message = CreateGetPipelinesByWorkspaceNextPageRequest(nextLink); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + PipelineListResponse value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + value = PipelineListResponse.DeserializePipelineListResponse(document.RootElement); + } + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/PipelineRunClient.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/PipelineRunClient.cs new file mode 100644 index 000000000000..5db18a9354ba --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/PipelineRunClient.cs @@ -0,0 +1,189 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Analytics.Synapse.Artifacts.Models; +using Azure.Core.Pipeline; + +namespace Azure.Analytics.Synapse.Artifacts +{ + /// The PipelineRun service client. + public partial class PipelineRunClient + { + private readonly ClientDiagnostics _clientDiagnostics; + private readonly HttpPipeline _pipeline; + internal PipelineRunRestClient RestClient { get; } + /// Initializes a new instance of PipelineRunClient for mocking. + protected PipelineRunClient() + { + } + /// Initializes a new instance of PipelineRunClient. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The workspace development endpoint, for example https://myworkspace.dev.azuresynapse.net. + /// Api Version. + internal PipelineRunClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string endpoint, string apiVersion = "2019-06-01-preview") + { + RestClient = new PipelineRunRestClient(clientDiagnostics, pipeline, endpoint, apiVersion); + _clientDiagnostics = clientDiagnostics; + _pipeline = pipeline; + } + + /// Query pipeline runs in the workspace based on input filter conditions. + /// Parameters to filter the pipeline run. + /// The cancellation token to use. + public virtual async Task> QueryPipelineRunsByWorkspaceAsync(RunFilterParameters filterParameters, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("PipelineRunClient.QueryPipelineRunsByWorkspace"); + scope.Start(); + try + { + return await RestClient.QueryPipelineRunsByWorkspaceAsync(filterParameters, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Query pipeline runs in the workspace based on input filter conditions. + /// Parameters to filter the pipeline run. + /// The cancellation token to use. + public virtual Response QueryPipelineRunsByWorkspace(RunFilterParameters filterParameters, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("PipelineRunClient.QueryPipelineRunsByWorkspace"); + scope.Start(); + try + { + return RestClient.QueryPipelineRunsByWorkspace(filterParameters, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Get a pipeline run by its run ID. + /// The pipeline run identifier. + /// The cancellation token to use. + public virtual async Task> GetPipelineRunAsync(string runId, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("PipelineRunClient.GetPipelineRun"); + scope.Start(); + try + { + return await RestClient.GetPipelineRunAsync(runId, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Get a pipeline run by its run ID. + /// The pipeline run identifier. + /// The cancellation token to use. + public virtual Response GetPipelineRun(string runId, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("PipelineRunClient.GetPipelineRun"); + scope.Start(); + try + { + return RestClient.GetPipelineRun(runId, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Query activity runs based on input filter conditions. + /// The pipeline name. + /// The pipeline run identifier. + /// Parameters to filter the activity runs. + /// The cancellation token to use. + public virtual async Task> QueryActivityRunsAsync(string pipelineName, string runId, RunFilterParameters filterParameters, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("PipelineRunClient.QueryActivityRuns"); + scope.Start(); + try + { + return await RestClient.QueryActivityRunsAsync(pipelineName, runId, filterParameters, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Query activity runs based on input filter conditions. + /// The pipeline name. + /// The pipeline run identifier. + /// Parameters to filter the activity runs. + /// The cancellation token to use. + public virtual Response QueryActivityRuns(string pipelineName, string runId, RunFilterParameters filterParameters, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("PipelineRunClient.QueryActivityRuns"); + scope.Start(); + try + { + return RestClient.QueryActivityRuns(pipelineName, runId, filterParameters, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Cancel a pipeline run by its run ID. + /// The pipeline run identifier. + /// If true, cancel all the Child pipelines that are triggered by the current pipeline. + /// The cancellation token to use. + public virtual async Task CancelPipelineRunAsync(string runId, bool? isRecursive = null, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("PipelineRunClient.CancelPipelineRun"); + scope.Start(); + try + { + return await RestClient.CancelPipelineRunAsync(runId, isRecursive, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Cancel a pipeline run by its run ID. + /// The pipeline run identifier. + /// If true, cancel all the Child pipelines that are triggered by the current pipeline. + /// The cancellation token to use. + public virtual Response CancelPipelineRun(string runId, bool? isRecursive = null, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("PipelineRunClient.CancelPipelineRun"); + scope.Start(); + try + { + return RestClient.CancelPipelineRun(runId, isRecursive, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/PipelineRunRestClient.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/PipelineRunRestClient.cs new file mode 100644 index 000000000000..8a792e798abd --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/PipelineRunRestClient.cs @@ -0,0 +1,382 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Analytics.Synapse.Artifacts.Models; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.Analytics.Synapse.Artifacts +{ + internal partial class PipelineRunRestClient + { + private string endpoint; + private string apiVersion; + private ClientDiagnostics _clientDiagnostics; + private HttpPipeline _pipeline; + + /// Initializes a new instance of PipelineRunRestClient. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The workspace development endpoint, for example https://myworkspace.dev.azuresynapse.net. + /// Api Version. + /// This occurs when one of the required arguments is null. + public PipelineRunRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string endpoint, string apiVersion = "2019-06-01-preview") + { + if (endpoint == null) + { + throw new ArgumentNullException(nameof(endpoint)); + } + if (apiVersion == null) + { + throw new ArgumentNullException(nameof(apiVersion)); + } + + this.endpoint = endpoint; + this.apiVersion = apiVersion; + _clientDiagnostics = clientDiagnostics; + _pipeline = pipeline; + } + + internal HttpMessage CreateQueryPipelineRunsByWorkspaceRequest(RunFilterParameters filterParameters) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.AppendRaw(endpoint, false); + uri.AppendPath("/queryPipelineRuns", false); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(filterParameters); + request.Content = content; + return message; + } + + /// Query pipeline runs in the workspace based on input filter conditions. + /// Parameters to filter the pipeline run. + /// The cancellation token to use. + public async Task> QueryPipelineRunsByWorkspaceAsync(RunFilterParameters filterParameters, CancellationToken cancellationToken = default) + { + if (filterParameters == null) + { + throw new ArgumentNullException(nameof(filterParameters)); + } + + using var message = CreateQueryPipelineRunsByWorkspaceRequest(filterParameters); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + PipelineRunsQueryResponse value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + value = PipelineRunsQueryResponse.DeserializePipelineRunsQueryResponse(document.RootElement); + } + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Query pipeline runs in the workspace based on input filter conditions. + /// Parameters to filter the pipeline run. + /// The cancellation token to use. + public Response QueryPipelineRunsByWorkspace(RunFilterParameters filterParameters, CancellationToken cancellationToken = default) + { + if (filterParameters == null) + { + throw new ArgumentNullException(nameof(filterParameters)); + } + + using var message = CreateQueryPipelineRunsByWorkspaceRequest(filterParameters); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + PipelineRunsQueryResponse value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + value = PipelineRunsQueryResponse.DeserializePipelineRunsQueryResponse(document.RootElement); + } + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetPipelineRunRequest(string runId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.AppendRaw(endpoint, false); + uri.AppendPath("/pipelineruns/", false); + uri.AppendPath(runId, true); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + return message; + } + + /// Get a pipeline run by its run ID. + /// The pipeline run identifier. + /// The cancellation token to use. + public async Task> GetPipelineRunAsync(string runId, CancellationToken cancellationToken = default) + { + if (runId == null) + { + throw new ArgumentNullException(nameof(runId)); + } + + using var message = CreateGetPipelineRunRequest(runId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + PipelineRun value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + value = PipelineRun.DeserializePipelineRun(document.RootElement); + } + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Get a pipeline run by its run ID. + /// The pipeline run identifier. + /// The cancellation token to use. + public Response GetPipelineRun(string runId, CancellationToken cancellationToken = default) + { + if (runId == null) + { + throw new ArgumentNullException(nameof(runId)); + } + + using var message = CreateGetPipelineRunRequest(runId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + PipelineRun value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + value = PipelineRun.DeserializePipelineRun(document.RootElement); + } + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateQueryActivityRunsRequest(string pipelineName, string runId, RunFilterParameters filterParameters) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.AppendRaw(endpoint, false); + uri.AppendPath("/pipelines/", false); + uri.AppendPath(pipelineName, true); + uri.AppendPath("/pipelineruns/", false); + uri.AppendPath(runId, true); + uri.AppendPath("/queryActivityruns", false); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(filterParameters); + request.Content = content; + return message; + } + + /// Query activity runs based on input filter conditions. + /// The pipeline name. + /// The pipeline run identifier. + /// Parameters to filter the activity runs. + /// The cancellation token to use. + public async Task> QueryActivityRunsAsync(string pipelineName, string runId, RunFilterParameters filterParameters, CancellationToken cancellationToken = default) + { + if (pipelineName == null) + { + throw new ArgumentNullException(nameof(pipelineName)); + } + if (runId == null) + { + throw new ArgumentNullException(nameof(runId)); + } + if (filterParameters == null) + { + throw new ArgumentNullException(nameof(filterParameters)); + } + + using var message = CreateQueryActivityRunsRequest(pipelineName, runId, filterParameters); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ActivityRunsQueryResponse value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + value = ActivityRunsQueryResponse.DeserializeActivityRunsQueryResponse(document.RootElement); + } + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Query activity runs based on input filter conditions. + /// The pipeline name. + /// The pipeline run identifier. + /// Parameters to filter the activity runs. + /// The cancellation token to use. + public Response QueryActivityRuns(string pipelineName, string runId, RunFilterParameters filterParameters, CancellationToken cancellationToken = default) + { + if (pipelineName == null) + { + throw new ArgumentNullException(nameof(pipelineName)); + } + if (runId == null) + { + throw new ArgumentNullException(nameof(runId)); + } + if (filterParameters == null) + { + throw new ArgumentNullException(nameof(filterParameters)); + } + + using var message = CreateQueryActivityRunsRequest(pipelineName, runId, filterParameters); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ActivityRunsQueryResponse value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + value = ActivityRunsQueryResponse.DeserializeActivityRunsQueryResponse(document.RootElement); + } + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateCancelPipelineRunRequest(string runId, bool? isRecursive) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.AppendRaw(endpoint, false); + uri.AppendPath("/pipelineruns/", false); + uri.AppendPath(runId, true); + uri.AppendPath("/cancel", false); + if (isRecursive != null) + { + uri.AppendQuery("isRecursive", isRecursive.Value, true); + } + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + return message; + } + + /// Cancel a pipeline run by its run ID. + /// The pipeline run identifier. + /// If true, cancel all the Child pipelines that are triggered by the current pipeline. + /// The cancellation token to use. + public async Task CancelPipelineRunAsync(string runId, bool? isRecursive = null, CancellationToken cancellationToken = default) + { + if (runId == null) + { + throw new ArgumentNullException(nameof(runId)); + } + + using var message = CreateCancelPipelineRunRequest(runId, isRecursive); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + return message.Response; + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Cancel a pipeline run by its run ID. + /// The pipeline run identifier. + /// If true, cancel all the Child pipelines that are triggered by the current pipeline. + /// The cancellation token to use. + public Response CancelPipelineRun(string runId, bool? isRecursive = null, CancellationToken cancellationToken = default) + { + if (runId == null) + { + throw new ArgumentNullException(nameof(runId)); + } + + using var message = CreateCancelPipelineRunRequest(runId, isRecursive); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + return message.Response; + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/SparkJobDefinitionClient.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/SparkJobDefinitionClient.cs new file mode 100644 index 000000000000..21e47c7a30ac --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/SparkJobDefinitionClient.cs @@ -0,0 +1,324 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Analytics.Synapse.Artifacts.Models; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.Analytics.Synapse.Artifacts +{ + /// The SparkJobDefinition service client. + public partial class SparkJobDefinitionClient + { + private readonly ClientDiagnostics _clientDiagnostics; + private readonly HttpPipeline _pipeline; + internal SparkJobDefinitionRestClient RestClient { get; } + /// Initializes a new instance of SparkJobDefinitionClient for mocking. + protected SparkJobDefinitionClient() + { + } + /// Initializes a new instance of SparkJobDefinitionClient. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The workspace development endpoint, for example https://myworkspace.dev.azuresynapse.net. + /// Api Version. + internal SparkJobDefinitionClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string endpoint, string apiVersion = "2019-06-01-preview") + { + RestClient = new SparkJobDefinitionRestClient(clientDiagnostics, pipeline, endpoint, apiVersion); + _clientDiagnostics = clientDiagnostics; + _pipeline = pipeline; + } + + /// Creates or updates a Spark Job Definition. + /// The spark job definition name. + /// Spark Job Definition resource definition. + /// ETag of the Spark Job Definition entity. Should only be specified for update, for which it should match existing entity or can be * for unconditional update. + /// The cancellation token to use. + public virtual async Task> CreateOrUpdateSparkJobDefinitionAsync(string sparkJobDefinitionName, SparkJobDefinitionResource sparkJobDefinition, string ifMatch = null, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("SparkJobDefinitionClient.CreateOrUpdateSparkJobDefinition"); + scope.Start(); + try + { + return await RestClient.CreateOrUpdateSparkJobDefinitionAsync(sparkJobDefinitionName, sparkJobDefinition, ifMatch, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Creates or updates a Spark Job Definition. + /// The spark job definition name. + /// Spark Job Definition resource definition. + /// ETag of the Spark Job Definition entity. Should only be specified for update, for which it should match existing entity or can be * for unconditional update. + /// The cancellation token to use. + public virtual Response CreateOrUpdateSparkJobDefinition(string sparkJobDefinitionName, SparkJobDefinitionResource sparkJobDefinition, string ifMatch = null, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("SparkJobDefinitionClient.CreateOrUpdateSparkJobDefinition"); + scope.Start(); + try + { + return RestClient.CreateOrUpdateSparkJobDefinition(sparkJobDefinitionName, sparkJobDefinition, ifMatch, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets a Spark Job Definition. + /// The spark job definition name. + /// ETag of the Spark Job Definition 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 to use. + public virtual async Task> GetSparkJobDefinitionAsync(string sparkJobDefinitionName, string ifNoneMatch = null, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("SparkJobDefinitionClient.GetSparkJobDefinition"); + scope.Start(); + try + { + return await RestClient.GetSparkJobDefinitionAsync(sparkJobDefinitionName, ifNoneMatch, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets a Spark Job Definition. + /// The spark job definition name. + /// ETag of the Spark Job Definition 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 to use. + public virtual Response GetSparkJobDefinition(string sparkJobDefinitionName, string ifNoneMatch = null, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("SparkJobDefinitionClient.GetSparkJobDefinition"); + scope.Start(); + try + { + return RestClient.GetSparkJobDefinition(sparkJobDefinitionName, ifNoneMatch, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Deletes a Spark Job Definition. + /// The spark job definition name. + /// The cancellation token to use. + public virtual async Task DeleteSparkJobDefinitionAsync(string sparkJobDefinitionName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("SparkJobDefinitionClient.DeleteSparkJobDefinition"); + scope.Start(); + try + { + return await RestClient.DeleteSparkJobDefinitionAsync(sparkJobDefinitionName, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Deletes a Spark Job Definition. + /// The spark job definition name. + /// The cancellation token to use. + public virtual Response DeleteSparkJobDefinition(string sparkJobDefinitionName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("SparkJobDefinitionClient.DeleteSparkJobDefinition"); + scope.Start(); + try + { + return RestClient.DeleteSparkJobDefinition(sparkJobDefinitionName, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Lists spark job definitions. + /// The cancellation token to use. + public virtual AsyncPageable GetSparkJobDefinitionsByWorkspaceAsync(CancellationToken cancellationToken = default) + { + async Task> FirstPageFunc(int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("SparkJobDefinitionClient.GetSparkJobDefinitionsByWorkspace"); + scope.Start(); + try + { + var response = await RestClient.GetSparkJobDefinitionsByWorkspaceAsync(cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + async Task> NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("SparkJobDefinitionClient.GetSparkJobDefinitionsByWorkspace"); + scope.Start(); + try + { + var response = await RestClient.GetSparkJobDefinitionsByWorkspaceNextPageAsync(nextLink, cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); + } + + /// Lists spark job definitions. + /// The cancellation token to use. + public virtual Pageable GetSparkJobDefinitionsByWorkspace(CancellationToken cancellationToken = default) + { + Page FirstPageFunc(int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("SparkJobDefinitionClient.GetSparkJobDefinitionsByWorkspace"); + scope.Start(); + try + { + var response = RestClient.GetSparkJobDefinitionsByWorkspace(cancellationToken); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + Page NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("SparkJobDefinitionClient.GetSparkJobDefinitionsByWorkspace"); + scope.Start(); + try + { + var response = RestClient.GetSparkJobDefinitionsByWorkspaceNextPage(nextLink, cancellationToken); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); + } + + /// Executes the spark job definition. + /// The spark job definition name. + /// The cancellation token to use. + public virtual async Task StartExecuteSparkJobDefinitionAsync(string sparkJobDefinitionName, CancellationToken cancellationToken = default) + { + if (sparkJobDefinitionName == null) + { + throw new ArgumentNullException(nameof(sparkJobDefinitionName)); + } + + using var scope = _clientDiagnostics.CreateScope("SparkJobDefinitionClient.StartExecuteSparkJobDefinition"); + scope.Start(); + try + { + var originalResponse = await RestClient.ExecuteSparkJobDefinitionAsync(sparkJobDefinitionName, cancellationToken).ConfigureAwait(false); + return new SparkJobDefinitionExecuteSparkJobDefinitionOperation(_clientDiagnostics, _pipeline, RestClient.CreateExecuteSparkJobDefinitionRequest(sparkJobDefinitionName).Request, originalResponse); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Executes the spark job definition. + /// The spark job definition name. + /// The cancellation token to use. + public virtual SparkJobDefinitionExecuteSparkJobDefinitionOperation StartExecuteSparkJobDefinition(string sparkJobDefinitionName, CancellationToken cancellationToken = default) + { + if (sparkJobDefinitionName == null) + { + throw new ArgumentNullException(nameof(sparkJobDefinitionName)); + } + + using var scope = _clientDiagnostics.CreateScope("SparkJobDefinitionClient.StartExecuteSparkJobDefinition"); + scope.Start(); + try + { + var originalResponse = RestClient.ExecuteSparkJobDefinition(sparkJobDefinitionName, cancellationToken); + return new SparkJobDefinitionExecuteSparkJobDefinitionOperation(_clientDiagnostics, _pipeline, RestClient.CreateExecuteSparkJobDefinitionRequest(sparkJobDefinitionName).Request, originalResponse); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Debug the spark job definition. + /// Spark Job Definition resource definition. + /// The cancellation token to use. + public virtual async Task StartDebugSparkJobDefinitionAsync(SparkJobDefinitionResource sparkJobDefinitionAzureResource, CancellationToken cancellationToken = default) + { + if (sparkJobDefinitionAzureResource == null) + { + throw new ArgumentNullException(nameof(sparkJobDefinitionAzureResource)); + } + + using var scope = _clientDiagnostics.CreateScope("SparkJobDefinitionClient.StartDebugSparkJobDefinition"); + scope.Start(); + try + { + var originalResponse = await RestClient.DebugSparkJobDefinitionAsync(sparkJobDefinitionAzureResource, cancellationToken).ConfigureAwait(false); + return new SparkJobDefinitionDebugSparkJobDefinitionOperation(_clientDiagnostics, _pipeline, RestClient.CreateDebugSparkJobDefinitionRequest(sparkJobDefinitionAzureResource).Request, originalResponse); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Debug the spark job definition. + /// Spark Job Definition resource definition. + /// The cancellation token to use. + public virtual SparkJobDefinitionDebugSparkJobDefinitionOperation StartDebugSparkJobDefinition(SparkJobDefinitionResource sparkJobDefinitionAzureResource, CancellationToken cancellationToken = default) + { + if (sparkJobDefinitionAzureResource == null) + { + throw new ArgumentNullException(nameof(sparkJobDefinitionAzureResource)); + } + + using var scope = _clientDiagnostics.CreateScope("SparkJobDefinitionClient.StartDebugSparkJobDefinition"); + scope.Start(); + try + { + var originalResponse = RestClient.DebugSparkJobDefinition(sparkJobDefinitionAzureResource, cancellationToken); + return new SparkJobDefinitionDebugSparkJobDefinitionOperation(_clientDiagnostics, _pipeline, RestClient.CreateDebugSparkJobDefinitionRequest(sparkJobDefinitionAzureResource).Request, originalResponse); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/SparkJobDefinitionDebugSparkJobDefinitionOperation.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/SparkJobDefinitionDebugSparkJobDefinitionOperation.cs new file mode 100644 index 000000000000..780d88103743 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/SparkJobDefinitionDebugSparkJobDefinitionOperation.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Analytics.Synapse.Artifacts.Models; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.Analytics.Synapse.Artifacts +{ + /// Debug the spark job definition. + public partial class SparkJobDefinitionDebugSparkJobDefinitionOperation : Operation, IOperationSource + { + private readonly ArmOperationHelpers _operation; + internal SparkJobDefinitionDebugSparkJobDefinitionOperation(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Request request, Response response) + { + _operation = new ArmOperationHelpers(this, clientDiagnostics, pipeline, request, response, OperationFinalStateVia.Location, "SparkJobDefinitionDebugSparkJobDefinitionOperation"); + } + /// + public override string Id => _operation.Id; + + /// + public override SparkBatchJob Value => _operation.Value; + + /// + public override bool HasCompleted => _operation.HasCompleted; + + /// + public override bool HasValue => _operation.HasValue; + + /// + public override Response GetRawResponse() => _operation.GetRawResponse(); + + /// + public override Response UpdateStatus(CancellationToken cancellationToken = default) => _operation.UpdateStatus(cancellationToken); + + /// + public override ValueTask UpdateStatusAsync(CancellationToken cancellationToken = default) => _operation.UpdateStatusAsync(cancellationToken); + + /// + public override ValueTask> WaitForCompletionAsync(CancellationToken cancellationToken = default) => _operation.WaitForCompletionAsync(cancellationToken); + + /// + public override ValueTask> WaitForCompletionAsync(TimeSpan pollingInterval, CancellationToken cancellationToken = default) => _operation.WaitForCompletionAsync(pollingInterval, cancellationToken); + + SparkBatchJob IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + return null; + } + else + { + return SparkBatchJob.DeserializeSparkBatchJob(document.RootElement); + } + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + return null; + } + else + { + return SparkBatchJob.DeserializeSparkBatchJob(document.RootElement); + } + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/SparkJobDefinitionExecuteSparkJobDefinitionOperation.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/SparkJobDefinitionExecuteSparkJobDefinitionOperation.cs new file mode 100644 index 000000000000..140b3f977c07 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/SparkJobDefinitionExecuteSparkJobDefinitionOperation.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Analytics.Synapse.Artifacts.Models; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.Analytics.Synapse.Artifacts +{ + /// Executes the spark job definition. + public partial class SparkJobDefinitionExecuteSparkJobDefinitionOperation : Operation, IOperationSource + { + private readonly ArmOperationHelpers _operation; + internal SparkJobDefinitionExecuteSparkJobDefinitionOperation(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Request request, Response response) + { + _operation = new ArmOperationHelpers(this, clientDiagnostics, pipeline, request, response, OperationFinalStateVia.Location, "SparkJobDefinitionExecuteSparkJobDefinitionOperation"); + } + /// + public override string Id => _operation.Id; + + /// + public override SparkBatchJob Value => _operation.Value; + + /// + public override bool HasCompleted => _operation.HasCompleted; + + /// + public override bool HasValue => _operation.HasValue; + + /// + public override Response GetRawResponse() => _operation.GetRawResponse(); + + /// + public override Response UpdateStatus(CancellationToken cancellationToken = default) => _operation.UpdateStatus(cancellationToken); + + /// + public override ValueTask UpdateStatusAsync(CancellationToken cancellationToken = default) => _operation.UpdateStatusAsync(cancellationToken); + + /// + public override ValueTask> WaitForCompletionAsync(CancellationToken cancellationToken = default) => _operation.WaitForCompletionAsync(cancellationToken); + + /// + public override ValueTask> WaitForCompletionAsync(TimeSpan pollingInterval, CancellationToken cancellationToken = default) => _operation.WaitForCompletionAsync(pollingInterval, cancellationToken); + + SparkBatchJob IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + return null; + } + else + { + return SparkBatchJob.DeserializeSparkBatchJob(document.RootElement); + } + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + return null; + } + else + { + return SparkBatchJob.DeserializeSparkBatchJob(document.RootElement); + } + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/SparkJobDefinitionRestClient.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/SparkJobDefinitionRestClient.cs new file mode 100644 index 000000000000..65636c1f54b8 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/SparkJobDefinitionRestClient.cs @@ -0,0 +1,562 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Analytics.Synapse.Artifacts.Models; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.Analytics.Synapse.Artifacts +{ + internal partial class SparkJobDefinitionRestClient + { + private string endpoint; + private string apiVersion; + private ClientDiagnostics _clientDiagnostics; + private HttpPipeline _pipeline; + + /// Initializes a new instance of SparkJobDefinitionRestClient. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The workspace development endpoint, for example https://myworkspace.dev.azuresynapse.net. + /// Api Version. + /// This occurs when one of the required arguments is null. + public SparkJobDefinitionRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string endpoint, string apiVersion = "2019-06-01-preview") + { + if (endpoint == null) + { + throw new ArgumentNullException(nameof(endpoint)); + } + if (apiVersion == null) + { + throw new ArgumentNullException(nameof(apiVersion)); + } + + this.endpoint = endpoint; + this.apiVersion = apiVersion; + _clientDiagnostics = clientDiagnostics; + _pipeline = pipeline; + } + + internal HttpMessage CreateGetSparkJobDefinitionsByWorkspaceRequest() + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.AppendRaw(endpoint, false); + uri.AppendPath("/sparkJobDefinitions", false); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + return message; + } + + /// Lists spark job definitions. + /// The cancellation token to use. + public async Task> GetSparkJobDefinitionsByWorkspaceAsync(CancellationToken cancellationToken = default) + { + using var message = CreateGetSparkJobDefinitionsByWorkspaceRequest(); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SparkJobDefinitionsListResponse value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + value = SparkJobDefinitionsListResponse.DeserializeSparkJobDefinitionsListResponse(document.RootElement); + } + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Lists spark job definitions. + /// The cancellation token to use. + public Response GetSparkJobDefinitionsByWorkspace(CancellationToken cancellationToken = default) + { + using var message = CreateGetSparkJobDefinitionsByWorkspaceRequest(); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SparkJobDefinitionsListResponse value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + value = SparkJobDefinitionsListResponse.DeserializeSparkJobDefinitionsListResponse(document.RootElement); + } + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateCreateOrUpdateSparkJobDefinitionRequest(string sparkJobDefinitionName, SparkJobDefinitionResource sparkJobDefinition, string ifMatch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.AppendRaw(endpoint, false); + uri.AppendPath("/sparkJobDefinitions/", false); + uri.AppendPath(sparkJobDefinitionName, true); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + if (ifMatch != null) + { + request.Headers.Add("If-Match", ifMatch); + } + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(sparkJobDefinition); + request.Content = content; + return message; + } + + /// Creates or updates a Spark Job Definition. + /// The spark job definition name. + /// Spark Job Definition resource definition. + /// ETag of the Spark Job Definition entity. Should only be specified for update, for which it should match existing entity or can be * for unconditional update. + /// The cancellation token to use. + public async Task> CreateOrUpdateSparkJobDefinitionAsync(string sparkJobDefinitionName, SparkJobDefinitionResource sparkJobDefinition, string ifMatch = null, CancellationToken cancellationToken = default) + { + if (sparkJobDefinitionName == null) + { + throw new ArgumentNullException(nameof(sparkJobDefinitionName)); + } + if (sparkJobDefinition == null) + { + throw new ArgumentNullException(nameof(sparkJobDefinition)); + } + + using var message = CreateCreateOrUpdateSparkJobDefinitionRequest(sparkJobDefinitionName, sparkJobDefinition, ifMatch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SparkJobDefinitionResource value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + value = SparkJobDefinitionResource.DeserializeSparkJobDefinitionResource(document.RootElement); + } + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Creates or updates a Spark Job Definition. + /// The spark job definition name. + /// Spark Job Definition resource definition. + /// ETag of the Spark Job Definition entity. Should only be specified for update, for which it should match existing entity or can be * for unconditional update. + /// The cancellation token to use. + public Response CreateOrUpdateSparkJobDefinition(string sparkJobDefinitionName, SparkJobDefinitionResource sparkJobDefinition, string ifMatch = null, CancellationToken cancellationToken = default) + { + if (sparkJobDefinitionName == null) + { + throw new ArgumentNullException(nameof(sparkJobDefinitionName)); + } + if (sparkJobDefinition == null) + { + throw new ArgumentNullException(nameof(sparkJobDefinition)); + } + + using var message = CreateCreateOrUpdateSparkJobDefinitionRequest(sparkJobDefinitionName, sparkJobDefinition, ifMatch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SparkJobDefinitionResource value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + value = SparkJobDefinitionResource.DeserializeSparkJobDefinitionResource(document.RootElement); + } + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetSparkJobDefinitionRequest(string sparkJobDefinitionName, string ifNoneMatch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.AppendRaw(endpoint, false); + uri.AppendPath("/sparkJobDefinitions/", false); + uri.AppendPath(sparkJobDefinitionName, true); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + if (ifNoneMatch != null) + { + request.Headers.Add("If-None-Match", ifNoneMatch); + } + return message; + } + + /// Gets a Spark Job Definition. + /// The spark job definition name. + /// ETag of the Spark Job Definition 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 to use. + public async Task> GetSparkJobDefinitionAsync(string sparkJobDefinitionName, string ifNoneMatch = null, CancellationToken cancellationToken = default) + { + if (sparkJobDefinitionName == null) + { + throw new ArgumentNullException(nameof(sparkJobDefinitionName)); + } + + using var message = CreateGetSparkJobDefinitionRequest(sparkJobDefinitionName, ifNoneMatch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SparkJobDefinitionResource value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + value = SparkJobDefinitionResource.DeserializeSparkJobDefinitionResource(document.RootElement); + } + return Response.FromValue(value, message.Response); + } + case 304: + return Response.FromValue(null, message.Response); + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Gets a Spark Job Definition. + /// The spark job definition name. + /// ETag of the Spark Job Definition 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 to use. + public Response GetSparkJobDefinition(string sparkJobDefinitionName, string ifNoneMatch = null, CancellationToken cancellationToken = default) + { + if (sparkJobDefinitionName == null) + { + throw new ArgumentNullException(nameof(sparkJobDefinitionName)); + } + + using var message = CreateGetSparkJobDefinitionRequest(sparkJobDefinitionName, ifNoneMatch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SparkJobDefinitionResource value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + value = SparkJobDefinitionResource.DeserializeSparkJobDefinitionResource(document.RootElement); + } + return Response.FromValue(value, message.Response); + } + case 304: + return Response.FromValue(null, message.Response); + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateDeleteSparkJobDefinitionRequest(string sparkJobDefinitionName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.AppendRaw(endpoint, false); + uri.AppendPath("/sparkJobDefinitions/", false); + uri.AppendPath(sparkJobDefinitionName, true); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + return message; + } + + /// Deletes a Spark Job Definition. + /// The spark job definition name. + /// The cancellation token to use. + public async Task DeleteSparkJobDefinitionAsync(string sparkJobDefinitionName, CancellationToken cancellationToken = default) + { + if (sparkJobDefinitionName == null) + { + throw new ArgumentNullException(nameof(sparkJobDefinitionName)); + } + + using var message = CreateDeleteSparkJobDefinitionRequest(sparkJobDefinitionName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Deletes a Spark Job Definition. + /// The spark job definition name. + /// The cancellation token to use. + public Response DeleteSparkJobDefinition(string sparkJobDefinitionName, CancellationToken cancellationToken = default) + { + if (sparkJobDefinitionName == null) + { + throw new ArgumentNullException(nameof(sparkJobDefinitionName)); + } + + using var message = CreateDeleteSparkJobDefinitionRequest(sparkJobDefinitionName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateExecuteSparkJobDefinitionRequest(string sparkJobDefinitionName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.AppendRaw(endpoint, false); + uri.AppendPath("/sparkJobDefinitions/", false); + uri.AppendPath(sparkJobDefinitionName, true); + uri.AppendPath("/execute", false); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + return message; + } + + /// Executes the spark job definition. + /// The spark job definition name. + /// The cancellation token to use. + public async Task ExecuteSparkJobDefinitionAsync(string sparkJobDefinitionName, CancellationToken cancellationToken = default) + { + if (sparkJobDefinitionName == null) + { + throw new ArgumentNullException(nameof(sparkJobDefinitionName)); + } + + using var message = CreateExecuteSparkJobDefinitionRequest(sparkJobDefinitionName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Executes the spark job definition. + /// The spark job definition name. + /// The cancellation token to use. + public Response ExecuteSparkJobDefinition(string sparkJobDefinitionName, CancellationToken cancellationToken = default) + { + if (sparkJobDefinitionName == null) + { + throw new ArgumentNullException(nameof(sparkJobDefinitionName)); + } + + using var message = CreateExecuteSparkJobDefinitionRequest(sparkJobDefinitionName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateDebugSparkJobDefinitionRequest(SparkJobDefinitionResource sparkJobDefinitionAzureResource) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.AppendRaw(endpoint, false); + uri.AppendPath("/debugSparkJobDefinition", false); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(sparkJobDefinitionAzureResource); + request.Content = content; + return message; + } + + /// Debug the spark job definition. + /// Spark Job Definition resource definition. + /// The cancellation token to use. + public async Task DebugSparkJobDefinitionAsync(SparkJobDefinitionResource sparkJobDefinitionAzureResource, CancellationToken cancellationToken = default) + { + if (sparkJobDefinitionAzureResource == null) + { + throw new ArgumentNullException(nameof(sparkJobDefinitionAzureResource)); + } + + using var message = CreateDebugSparkJobDefinitionRequest(sparkJobDefinitionAzureResource); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Debug the spark job definition. + /// Spark Job Definition resource definition. + /// The cancellation token to use. + public Response DebugSparkJobDefinition(SparkJobDefinitionResource sparkJobDefinitionAzureResource, CancellationToken cancellationToken = default) + { + if (sparkJobDefinitionAzureResource == null) + { + throw new ArgumentNullException(nameof(sparkJobDefinitionAzureResource)); + } + + using var message = CreateDebugSparkJobDefinitionRequest(sparkJobDefinitionAzureResource); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetSparkJobDefinitionsByWorkspaceNextPageRequest(string nextLink) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.AppendRaw(endpoint, false); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + return message; + } + + /// Lists spark job definitions. + /// The URL to the next page of results. + /// The cancellation token to use. + public async Task> GetSparkJobDefinitionsByWorkspaceNextPageAsync(string nextLink, CancellationToken cancellationToken = default) + { + if (nextLink == null) + { + throw new ArgumentNullException(nameof(nextLink)); + } + + using var message = CreateGetSparkJobDefinitionsByWorkspaceNextPageRequest(nextLink); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SparkJobDefinitionsListResponse value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + value = SparkJobDefinitionsListResponse.DeserializeSparkJobDefinitionsListResponse(document.RootElement); + } + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Lists spark job definitions. + /// The URL to the next page of results. + /// The cancellation token to use. + public Response GetSparkJobDefinitionsByWorkspaceNextPage(string nextLink, CancellationToken cancellationToken = default) + { + if (nextLink == null) + { + throw new ArgumentNullException(nameof(nextLink)); + } + + using var message = CreateGetSparkJobDefinitionsByWorkspaceNextPageRequest(nextLink); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SparkJobDefinitionsListResponse value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + value = SparkJobDefinitionsListResponse.DeserializeSparkJobDefinitionsListResponse(document.RootElement); + } + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/SqlScriptClient.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/SqlScriptClient.cs new file mode 100644 index 000000000000..93e9da518f91 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/SqlScriptClient.cs @@ -0,0 +1,228 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Analytics.Synapse.Artifacts.Models; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.Analytics.Synapse.Artifacts +{ + /// The SqlScript service client. + public partial class SqlScriptClient + { + private readonly ClientDiagnostics _clientDiagnostics; + private readonly HttpPipeline _pipeline; + internal SqlScriptRestClient RestClient { get; } + /// Initializes a new instance of SqlScriptClient for mocking. + protected SqlScriptClient() + { + } + /// Initializes a new instance of SqlScriptClient. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The workspace development endpoint, for example https://myworkspace.dev.azuresynapse.net. + /// Api Version. + internal SqlScriptClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string endpoint, string apiVersion = "2019-06-01-preview") + { + RestClient = new SqlScriptRestClient(clientDiagnostics, pipeline, endpoint, apiVersion); + _clientDiagnostics = clientDiagnostics; + _pipeline = pipeline; + } + + /// Creates or updates a Sql Script. + /// The sql script name. + /// Sql Script resource definition. + /// ETag of the SQL script entity. Should only be specified for update, for which it should match existing entity or can be * for unconditional update. + /// The cancellation token to use. + public virtual async Task> CreateOrUpdateSqlScriptAsync(string sqlScriptName, SqlScriptResource sqlScript, string ifMatch = null, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("SqlScriptClient.CreateOrUpdateSqlScript"); + scope.Start(); + try + { + return await RestClient.CreateOrUpdateSqlScriptAsync(sqlScriptName, sqlScript, ifMatch, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Creates or updates a Sql Script. + /// The sql script name. + /// Sql Script resource definition. + /// ETag of the SQL script entity. Should only be specified for update, for which it should match existing entity or can be * for unconditional update. + /// The cancellation token to use. + public virtual Response CreateOrUpdateSqlScript(string sqlScriptName, SqlScriptResource sqlScript, string ifMatch = null, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("SqlScriptClient.CreateOrUpdateSqlScript"); + scope.Start(); + try + { + return RestClient.CreateOrUpdateSqlScript(sqlScriptName, sqlScript, ifMatch, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets a sql script. + /// The sql script name. + /// ETag of the sql compute 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 to use. + public virtual async Task> GetSqlScriptAsync(string sqlScriptName, string ifNoneMatch = null, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("SqlScriptClient.GetSqlScript"); + scope.Start(); + try + { + return await RestClient.GetSqlScriptAsync(sqlScriptName, ifNoneMatch, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets a sql script. + /// The sql script name. + /// ETag of the sql compute 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 to use. + public virtual Response GetSqlScript(string sqlScriptName, string ifNoneMatch = null, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("SqlScriptClient.GetSqlScript"); + scope.Start(); + try + { + return RestClient.GetSqlScript(sqlScriptName, ifNoneMatch, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Deletes a Sql Script. + /// The sql script name. + /// The cancellation token to use. + public virtual async Task DeleteSqlScriptAsync(string sqlScriptName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("SqlScriptClient.DeleteSqlScript"); + scope.Start(); + try + { + return await RestClient.DeleteSqlScriptAsync(sqlScriptName, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Deletes a Sql Script. + /// The sql script name. + /// The cancellation token to use. + public virtual Response DeleteSqlScript(string sqlScriptName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("SqlScriptClient.DeleteSqlScript"); + scope.Start(); + try + { + return RestClient.DeleteSqlScript(sqlScriptName, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Lists sql scripts. + /// The cancellation token to use. + public virtual AsyncPageable GetSqlScriptsByWorkspaceAsync(CancellationToken cancellationToken = default) + { + async Task> FirstPageFunc(int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("SqlScriptClient.GetSqlScriptsByWorkspace"); + scope.Start(); + try + { + var response = await RestClient.GetSqlScriptsByWorkspaceAsync(cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + async Task> NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("SqlScriptClient.GetSqlScriptsByWorkspace"); + scope.Start(); + try + { + var response = await RestClient.GetSqlScriptsByWorkspaceNextPageAsync(nextLink, cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); + } + + /// Lists sql scripts. + /// The cancellation token to use. + public virtual Pageable GetSqlScriptsByWorkspace(CancellationToken cancellationToken = default) + { + Page FirstPageFunc(int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("SqlScriptClient.GetSqlScriptsByWorkspace"); + scope.Start(); + try + { + var response = RestClient.GetSqlScriptsByWorkspace(cancellationToken); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + Page NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("SqlScriptClient.GetSqlScriptsByWorkspace"); + scope.Start(); + try + { + var response = RestClient.GetSqlScriptsByWorkspaceNextPage(nextLink, cancellationToken); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/SqlScriptRestClient.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/SqlScriptRestClient.cs new file mode 100644 index 000000000000..14f6fc76c84d --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/SqlScriptRestClient.cs @@ -0,0 +1,442 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Analytics.Synapse.Artifacts.Models; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.Analytics.Synapse.Artifacts +{ + internal partial class SqlScriptRestClient + { + private string endpoint; + private string apiVersion; + private ClientDiagnostics _clientDiagnostics; + private HttpPipeline _pipeline; + + /// Initializes a new instance of SqlScriptRestClient. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The workspace development endpoint, for example https://myworkspace.dev.azuresynapse.net. + /// Api Version. + /// This occurs when one of the required arguments is null. + public SqlScriptRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string endpoint, string apiVersion = "2019-06-01-preview") + { + if (endpoint == null) + { + throw new ArgumentNullException(nameof(endpoint)); + } + if (apiVersion == null) + { + throw new ArgumentNullException(nameof(apiVersion)); + } + + this.endpoint = endpoint; + this.apiVersion = apiVersion; + _clientDiagnostics = clientDiagnostics; + _pipeline = pipeline; + } + + internal HttpMessage CreateGetSqlScriptsByWorkspaceRequest() + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.AppendRaw(endpoint, false); + uri.AppendPath("/sqlScripts", false); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + return message; + } + + /// Lists sql scripts. + /// The cancellation token to use. + public async Task> GetSqlScriptsByWorkspaceAsync(CancellationToken cancellationToken = default) + { + using var message = CreateGetSqlScriptsByWorkspaceRequest(); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SqlScriptsListResponse value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + value = SqlScriptsListResponse.DeserializeSqlScriptsListResponse(document.RootElement); + } + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Lists sql scripts. + /// The cancellation token to use. + public Response GetSqlScriptsByWorkspace(CancellationToken cancellationToken = default) + { + using var message = CreateGetSqlScriptsByWorkspaceRequest(); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SqlScriptsListResponse value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + value = SqlScriptsListResponse.DeserializeSqlScriptsListResponse(document.RootElement); + } + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateCreateOrUpdateSqlScriptRequest(string sqlScriptName, SqlScriptResource sqlScript, string ifMatch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.AppendRaw(endpoint, false); + uri.AppendPath("/sqlScripts/", false); + uri.AppendPath(sqlScriptName, true); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + if (ifMatch != null) + { + request.Headers.Add("If-Match", ifMatch); + } + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(sqlScript); + request.Content = content; + return message; + } + + /// Creates or updates a Sql Script. + /// The sql script name. + /// Sql Script resource definition. + /// ETag of the SQL script entity. Should only be specified for update, for which it should match existing entity or can be * for unconditional update. + /// The cancellation token to use. + public async Task> CreateOrUpdateSqlScriptAsync(string sqlScriptName, SqlScriptResource sqlScript, string ifMatch = null, CancellationToken cancellationToken = default) + { + if (sqlScriptName == null) + { + throw new ArgumentNullException(nameof(sqlScriptName)); + } + if (sqlScript == null) + { + throw new ArgumentNullException(nameof(sqlScript)); + } + + using var message = CreateCreateOrUpdateSqlScriptRequest(sqlScriptName, sqlScript, ifMatch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SqlScriptResource value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + value = SqlScriptResource.DeserializeSqlScriptResource(document.RootElement); + } + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Creates or updates a Sql Script. + /// The sql script name. + /// Sql Script resource definition. + /// ETag of the SQL script entity. Should only be specified for update, for which it should match existing entity or can be * for unconditional update. + /// The cancellation token to use. + public Response CreateOrUpdateSqlScript(string sqlScriptName, SqlScriptResource sqlScript, string ifMatch = null, CancellationToken cancellationToken = default) + { + if (sqlScriptName == null) + { + throw new ArgumentNullException(nameof(sqlScriptName)); + } + if (sqlScript == null) + { + throw new ArgumentNullException(nameof(sqlScript)); + } + + using var message = CreateCreateOrUpdateSqlScriptRequest(sqlScriptName, sqlScript, ifMatch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SqlScriptResource value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + value = SqlScriptResource.DeserializeSqlScriptResource(document.RootElement); + } + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetSqlScriptRequest(string sqlScriptName, string ifNoneMatch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.AppendRaw(endpoint, false); + uri.AppendPath("/sqlScripts/", false); + uri.AppendPath(sqlScriptName, true); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + if (ifNoneMatch != null) + { + request.Headers.Add("If-None-Match", ifNoneMatch); + } + return message; + } + + /// Gets a sql script. + /// The sql script name. + /// ETag of the sql compute 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 to use. + public async Task> GetSqlScriptAsync(string sqlScriptName, string ifNoneMatch = null, CancellationToken cancellationToken = default) + { + if (sqlScriptName == null) + { + throw new ArgumentNullException(nameof(sqlScriptName)); + } + + using var message = CreateGetSqlScriptRequest(sqlScriptName, ifNoneMatch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SqlScriptResource value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + value = SqlScriptResource.DeserializeSqlScriptResource(document.RootElement); + } + return Response.FromValue(value, message.Response); + } + case 304: + return Response.FromValue(null, message.Response); + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Gets a sql script. + /// The sql script name. + /// ETag of the sql compute 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 to use. + public Response GetSqlScript(string sqlScriptName, string ifNoneMatch = null, CancellationToken cancellationToken = default) + { + if (sqlScriptName == null) + { + throw new ArgumentNullException(nameof(sqlScriptName)); + } + + using var message = CreateGetSqlScriptRequest(sqlScriptName, ifNoneMatch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SqlScriptResource value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + value = SqlScriptResource.DeserializeSqlScriptResource(document.RootElement); + } + return Response.FromValue(value, message.Response); + } + case 304: + return Response.FromValue(null, message.Response); + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateDeleteSqlScriptRequest(string sqlScriptName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.AppendRaw(endpoint, false); + uri.AppendPath("/sqlScripts/", false); + uri.AppendPath(sqlScriptName, true); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + return message; + } + + /// Deletes a Sql Script. + /// The sql script name. + /// The cancellation token to use. + public async Task DeleteSqlScriptAsync(string sqlScriptName, CancellationToken cancellationToken = default) + { + if (sqlScriptName == null) + { + throw new ArgumentNullException(nameof(sqlScriptName)); + } + + using var message = CreateDeleteSqlScriptRequest(sqlScriptName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Deletes a Sql Script. + /// The sql script name. + /// The cancellation token to use. + public Response DeleteSqlScript(string sqlScriptName, CancellationToken cancellationToken = default) + { + if (sqlScriptName == null) + { + throw new ArgumentNullException(nameof(sqlScriptName)); + } + + using var message = CreateDeleteSqlScriptRequest(sqlScriptName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetSqlScriptsByWorkspaceNextPageRequest(string nextLink) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.AppendRaw(endpoint, false); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + return message; + } + + /// Lists sql scripts. + /// The URL to the next page of results. + /// The cancellation token to use. + public async Task> GetSqlScriptsByWorkspaceNextPageAsync(string nextLink, CancellationToken cancellationToken = default) + { + if (nextLink == null) + { + throw new ArgumentNullException(nameof(nextLink)); + } + + using var message = CreateGetSqlScriptsByWorkspaceNextPageRequest(nextLink); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SqlScriptsListResponse value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + value = SqlScriptsListResponse.DeserializeSqlScriptsListResponse(document.RootElement); + } + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Lists sql scripts. + /// The URL to the next page of results. + /// The cancellation token to use. + public Response GetSqlScriptsByWorkspaceNextPage(string nextLink, CancellationToken cancellationToken = default) + { + if (nextLink == null) + { + throw new ArgumentNullException(nameof(nextLink)); + } + + using var message = CreateGetSqlScriptsByWorkspaceNextPageRequest(nextLink); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SqlScriptsListResponse value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + value = SqlScriptsListResponse.DeserializeSqlScriptsListResponse(document.RootElement); + } + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/TriggerClient.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/TriggerClient.cs new file mode 100644 index 000000000000..b43190959581 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/TriggerClient.cs @@ -0,0 +1,456 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Analytics.Synapse.Artifacts.Models; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.Analytics.Synapse.Artifacts +{ + /// The Trigger service client. + public partial class TriggerClient + { + private readonly ClientDiagnostics _clientDiagnostics; + private readonly HttpPipeline _pipeline; + internal TriggerRestClient RestClient { get; } + /// Initializes a new instance of TriggerClient for mocking. + protected TriggerClient() + { + } + /// Initializes a new instance of TriggerClient. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The workspace development endpoint, for example https://myworkspace.dev.azuresynapse.net. + /// Api Version. + internal TriggerClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string endpoint, string apiVersion = "2019-06-01-preview") + { + RestClient = new TriggerRestClient(clientDiagnostics, pipeline, endpoint, apiVersion); + _clientDiagnostics = clientDiagnostics; + _pipeline = pipeline; + } + + /// Creates or updates a trigger. + /// The trigger name. + /// Trigger resource definition. + /// ETag of the trigger entity. Should only be specified for update, for which it should match existing entity or can be * for unconditional update. + /// The cancellation token to use. + public virtual async Task> CreateOrUpdateTriggerAsync(string triggerName, TriggerResource trigger, string ifMatch = null, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("TriggerClient.CreateOrUpdateTrigger"); + scope.Start(); + try + { + return await RestClient.CreateOrUpdateTriggerAsync(triggerName, trigger, ifMatch, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Creates or updates a trigger. + /// The trigger name. + /// Trigger resource definition. + /// ETag of the trigger entity. Should only be specified for update, for which it should match existing entity or can be * for unconditional update. + /// The cancellation token to use. + public virtual Response CreateOrUpdateTrigger(string triggerName, TriggerResource trigger, string ifMatch = null, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("TriggerClient.CreateOrUpdateTrigger"); + scope.Start(); + try + { + return RestClient.CreateOrUpdateTrigger(triggerName, trigger, ifMatch, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets a trigger. + /// The trigger name. + /// ETag of the trigger 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 to use. + public virtual async Task> GetTriggerAsync(string triggerName, string ifNoneMatch = null, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("TriggerClient.GetTrigger"); + scope.Start(); + try + { + return await RestClient.GetTriggerAsync(triggerName, ifNoneMatch, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets a trigger. + /// The trigger name. + /// ETag of the trigger 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 to use. + public virtual Response GetTrigger(string triggerName, string ifNoneMatch = null, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("TriggerClient.GetTrigger"); + scope.Start(); + try + { + return RestClient.GetTrigger(triggerName, ifNoneMatch, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Deletes a trigger. + /// The trigger name. + /// The cancellation token to use. + public virtual async Task DeleteTriggerAsync(string triggerName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("TriggerClient.DeleteTrigger"); + scope.Start(); + try + { + return await RestClient.DeleteTriggerAsync(triggerName, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Deletes a trigger. + /// The trigger name. + /// The cancellation token to use. + public virtual Response DeleteTrigger(string triggerName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("TriggerClient.DeleteTrigger"); + scope.Start(); + try + { + return RestClient.DeleteTrigger(triggerName, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Get a trigger's event subscription status. + /// The trigger name. + /// The cancellation token to use. + public virtual async Task> GetEventSubscriptionStatusAsync(string triggerName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("TriggerClient.GetEventSubscriptionStatus"); + scope.Start(); + try + { + return await RestClient.GetEventSubscriptionStatusAsync(triggerName, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Get a trigger's event subscription status. + /// The trigger name. + /// The cancellation token to use. + public virtual Response GetEventSubscriptionStatus(string triggerName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("TriggerClient.GetEventSubscriptionStatus"); + scope.Start(); + try + { + return RestClient.GetEventSubscriptionStatus(triggerName, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Lists triggers. + /// The cancellation token to use. + public virtual AsyncPageable GetTriggersByWorkspaceAsync(CancellationToken cancellationToken = default) + { + async Task> FirstPageFunc(int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("TriggerClient.GetTriggersByWorkspace"); + scope.Start(); + try + { + var response = await RestClient.GetTriggersByWorkspaceAsync(cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + async Task> NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("TriggerClient.GetTriggersByWorkspace"); + scope.Start(); + try + { + var response = await RestClient.GetTriggersByWorkspaceNextPageAsync(nextLink, cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); + } + + /// Lists triggers. + /// The cancellation token to use. + public virtual Pageable GetTriggersByWorkspace(CancellationToken cancellationToken = default) + { + Page FirstPageFunc(int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("TriggerClient.GetTriggersByWorkspace"); + scope.Start(); + try + { + var response = RestClient.GetTriggersByWorkspace(cancellationToken); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + Page NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("TriggerClient.GetTriggersByWorkspace"); + scope.Start(); + try + { + var response = RestClient.GetTriggersByWorkspaceNextPage(nextLink, cancellationToken); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); + } + + /// Subscribe event trigger to events. + /// The trigger name. + /// The cancellation token to use. + public virtual async Task StartSubscribeTriggerToEventsAsync(string triggerName, CancellationToken cancellationToken = default) + { + if (triggerName == null) + { + throw new ArgumentNullException(nameof(triggerName)); + } + + using var scope = _clientDiagnostics.CreateScope("TriggerClient.StartSubscribeTriggerToEvents"); + scope.Start(); + try + { + var originalResponse = await RestClient.SubscribeTriggerToEventsAsync(triggerName, cancellationToken).ConfigureAwait(false); + return new TriggerSubscribeTriggerToEventsOperation(_clientDiagnostics, _pipeline, RestClient.CreateSubscribeTriggerToEventsRequest(triggerName).Request, originalResponse); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Subscribe event trigger to events. + /// The trigger name. + /// The cancellation token to use. + public virtual TriggerSubscribeTriggerToEventsOperation StartSubscribeTriggerToEvents(string triggerName, CancellationToken cancellationToken = default) + { + if (triggerName == null) + { + throw new ArgumentNullException(nameof(triggerName)); + } + + using var scope = _clientDiagnostics.CreateScope("TriggerClient.StartSubscribeTriggerToEvents"); + scope.Start(); + try + { + var originalResponse = RestClient.SubscribeTriggerToEvents(triggerName, cancellationToken); + return new TriggerSubscribeTriggerToEventsOperation(_clientDiagnostics, _pipeline, RestClient.CreateSubscribeTriggerToEventsRequest(triggerName).Request, originalResponse); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Unsubscribe event trigger from events. + /// The trigger name. + /// The cancellation token to use. + public virtual async Task StartUnsubscribeTriggerFromEventsAsync(string triggerName, CancellationToken cancellationToken = default) + { + if (triggerName == null) + { + throw new ArgumentNullException(nameof(triggerName)); + } + + using var scope = _clientDiagnostics.CreateScope("TriggerClient.StartUnsubscribeTriggerFromEvents"); + scope.Start(); + try + { + var originalResponse = await RestClient.UnsubscribeTriggerFromEventsAsync(triggerName, cancellationToken).ConfigureAwait(false); + return new TriggerUnsubscribeTriggerFromEventsOperation(_clientDiagnostics, _pipeline, RestClient.CreateUnsubscribeTriggerFromEventsRequest(triggerName).Request, originalResponse); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Unsubscribe event trigger from events. + /// The trigger name. + /// The cancellation token to use. + public virtual TriggerUnsubscribeTriggerFromEventsOperation StartUnsubscribeTriggerFromEvents(string triggerName, CancellationToken cancellationToken = default) + { + if (triggerName == null) + { + throw new ArgumentNullException(nameof(triggerName)); + } + + using var scope = _clientDiagnostics.CreateScope("TriggerClient.StartUnsubscribeTriggerFromEvents"); + scope.Start(); + try + { + var originalResponse = RestClient.UnsubscribeTriggerFromEvents(triggerName, cancellationToken); + return new TriggerUnsubscribeTriggerFromEventsOperation(_clientDiagnostics, _pipeline, RestClient.CreateUnsubscribeTriggerFromEventsRequest(triggerName).Request, originalResponse); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Starts a trigger. + /// The trigger name. + /// The cancellation token to use. + public virtual async Task StartStartTriggerAsync(string triggerName, CancellationToken cancellationToken = default) + { + if (triggerName == null) + { + throw new ArgumentNullException(nameof(triggerName)); + } + + using var scope = _clientDiagnostics.CreateScope("TriggerClient.StartStartTrigger"); + scope.Start(); + try + { + var originalResponse = await RestClient.StartTriggerAsync(triggerName, cancellationToken).ConfigureAwait(false); + return new TriggerStartTriggerOperation(_clientDiagnostics, _pipeline, RestClient.CreateStartTriggerRequest(triggerName).Request, originalResponse); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Starts a trigger. + /// The trigger name. + /// The cancellation token to use. + public virtual TriggerStartTriggerOperation StartStartTrigger(string triggerName, CancellationToken cancellationToken = default) + { + if (triggerName == null) + { + throw new ArgumentNullException(nameof(triggerName)); + } + + using var scope = _clientDiagnostics.CreateScope("TriggerClient.StartStartTrigger"); + scope.Start(); + try + { + var originalResponse = RestClient.StartTrigger(triggerName, cancellationToken); + return new TriggerStartTriggerOperation(_clientDiagnostics, _pipeline, RestClient.CreateStartTriggerRequest(triggerName).Request, originalResponse); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Stops a trigger. + /// The trigger name. + /// The cancellation token to use. + public virtual async Task StartStopTriggerAsync(string triggerName, CancellationToken cancellationToken = default) + { + if (triggerName == null) + { + throw new ArgumentNullException(nameof(triggerName)); + } + + using var scope = _clientDiagnostics.CreateScope("TriggerClient.StartStopTrigger"); + scope.Start(); + try + { + var originalResponse = await RestClient.StopTriggerAsync(triggerName, cancellationToken).ConfigureAwait(false); + return new TriggerStopTriggerOperation(_clientDiagnostics, _pipeline, RestClient.CreateStopTriggerRequest(triggerName).Request, originalResponse); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Stops a trigger. + /// The trigger name. + /// The cancellation token to use. + public virtual TriggerStopTriggerOperation StartStopTrigger(string triggerName, CancellationToken cancellationToken = default) + { + if (triggerName == null) + { + throw new ArgumentNullException(nameof(triggerName)); + } + + using var scope = _clientDiagnostics.CreateScope("TriggerClient.StartStopTrigger"); + scope.Start(); + try + { + var originalResponse = RestClient.StopTrigger(triggerName, cancellationToken); + return new TriggerStopTriggerOperation(_clientDiagnostics, _pipeline, RestClient.CreateStopTriggerRequest(triggerName).Request, originalResponse); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/TriggerRestClient.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/TriggerRestClient.cs new file mode 100644 index 000000000000..382024507175 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/TriggerRestClient.cs @@ -0,0 +1,755 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Analytics.Synapse.Artifacts.Models; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.Analytics.Synapse.Artifacts +{ + internal partial class TriggerRestClient + { + private string endpoint; + private string apiVersion; + private ClientDiagnostics _clientDiagnostics; + private HttpPipeline _pipeline; + + /// Initializes a new instance of TriggerRestClient. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The workspace development endpoint, for example https://myworkspace.dev.azuresynapse.net. + /// Api Version. + /// This occurs when one of the required arguments is null. + public TriggerRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string endpoint, string apiVersion = "2019-06-01-preview") + { + if (endpoint == null) + { + throw new ArgumentNullException(nameof(endpoint)); + } + if (apiVersion == null) + { + throw new ArgumentNullException(nameof(apiVersion)); + } + + this.endpoint = endpoint; + this.apiVersion = apiVersion; + _clientDiagnostics = clientDiagnostics; + _pipeline = pipeline; + } + + internal HttpMessage CreateGetTriggersByWorkspaceRequest() + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.AppendRaw(endpoint, false); + uri.AppendPath("/triggers", false); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + return message; + } + + /// Lists triggers. + /// The cancellation token to use. + public async Task> GetTriggersByWorkspaceAsync(CancellationToken cancellationToken = default) + { + using var message = CreateGetTriggersByWorkspaceRequest(); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + TriggerListResponse value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + value = TriggerListResponse.DeserializeTriggerListResponse(document.RootElement); + } + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Lists triggers. + /// The cancellation token to use. + public Response GetTriggersByWorkspace(CancellationToken cancellationToken = default) + { + using var message = CreateGetTriggersByWorkspaceRequest(); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + TriggerListResponse value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + value = TriggerListResponse.DeserializeTriggerListResponse(document.RootElement); + } + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateCreateOrUpdateTriggerRequest(string triggerName, TriggerResource trigger, string ifMatch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.AppendRaw(endpoint, false); + uri.AppendPath("/triggers/", false); + uri.AppendPath(triggerName, true); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + if (ifMatch != null) + { + request.Headers.Add("If-Match", ifMatch); + } + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(trigger); + request.Content = content; + return message; + } + + /// Creates or updates a trigger. + /// The trigger name. + /// Trigger resource definition. + /// ETag of the trigger entity. Should only be specified for update, for which it should match existing entity or can be * for unconditional update. + /// The cancellation token to use. + public async Task> CreateOrUpdateTriggerAsync(string triggerName, TriggerResource trigger, string ifMatch = null, CancellationToken cancellationToken = default) + { + if (triggerName == null) + { + throw new ArgumentNullException(nameof(triggerName)); + } + if (trigger == null) + { + throw new ArgumentNullException(nameof(trigger)); + } + + using var message = CreateCreateOrUpdateTriggerRequest(triggerName, trigger, ifMatch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + TriggerResource value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + value = TriggerResource.DeserializeTriggerResource(document.RootElement); + } + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Creates or updates a trigger. + /// The trigger name. + /// Trigger resource definition. + /// ETag of the trigger entity. Should only be specified for update, for which it should match existing entity or can be * for unconditional update. + /// The cancellation token to use. + public Response CreateOrUpdateTrigger(string triggerName, TriggerResource trigger, string ifMatch = null, CancellationToken cancellationToken = default) + { + if (triggerName == null) + { + throw new ArgumentNullException(nameof(triggerName)); + } + if (trigger == null) + { + throw new ArgumentNullException(nameof(trigger)); + } + + using var message = CreateCreateOrUpdateTriggerRequest(triggerName, trigger, ifMatch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + TriggerResource value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + value = TriggerResource.DeserializeTriggerResource(document.RootElement); + } + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetTriggerRequest(string triggerName, string ifNoneMatch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.AppendRaw(endpoint, false); + uri.AppendPath("/triggers/", false); + uri.AppendPath(triggerName, true); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + if (ifNoneMatch != null) + { + request.Headers.Add("If-None-Match", ifNoneMatch); + } + return message; + } + + /// Gets a trigger. + /// The trigger name. + /// ETag of the trigger 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 to use. + public async Task> GetTriggerAsync(string triggerName, string ifNoneMatch = null, CancellationToken cancellationToken = default) + { + if (triggerName == null) + { + throw new ArgumentNullException(nameof(triggerName)); + } + + using var message = CreateGetTriggerRequest(triggerName, ifNoneMatch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + TriggerResource value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + value = TriggerResource.DeserializeTriggerResource(document.RootElement); + } + return Response.FromValue(value, message.Response); + } + case 304: + return Response.FromValue(null, message.Response); + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Gets a trigger. + /// The trigger name. + /// ETag of the trigger 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 to use. + public Response GetTrigger(string triggerName, string ifNoneMatch = null, CancellationToken cancellationToken = default) + { + if (triggerName == null) + { + throw new ArgumentNullException(nameof(triggerName)); + } + + using var message = CreateGetTriggerRequest(triggerName, ifNoneMatch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + TriggerResource value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + value = TriggerResource.DeserializeTriggerResource(document.RootElement); + } + return Response.FromValue(value, message.Response); + } + case 304: + return Response.FromValue(null, message.Response); + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateDeleteTriggerRequest(string triggerName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.AppendRaw(endpoint, false); + uri.AppendPath("/triggers/", false); + uri.AppendPath(triggerName, true); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + return message; + } + + /// Deletes a trigger. + /// The trigger name. + /// The cancellation token to use. + public async Task DeleteTriggerAsync(string triggerName, CancellationToken cancellationToken = default) + { + if (triggerName == null) + { + throw new ArgumentNullException(nameof(triggerName)); + } + + using var message = CreateDeleteTriggerRequest(triggerName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Deletes a trigger. + /// The trigger name. + /// The cancellation token to use. + public Response DeleteTrigger(string triggerName, CancellationToken cancellationToken = default) + { + if (triggerName == null) + { + throw new ArgumentNullException(nameof(triggerName)); + } + + using var message = CreateDeleteTriggerRequest(triggerName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateSubscribeTriggerToEventsRequest(string triggerName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.AppendRaw(endpoint, false); + uri.AppendPath("/triggers/", false); + uri.AppendPath(triggerName, true); + uri.AppendPath("/subscribeToEvents", false); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + return message; + } + + /// Subscribe event trigger to events. + /// The trigger name. + /// The cancellation token to use. + public async Task SubscribeTriggerToEventsAsync(string triggerName, CancellationToken cancellationToken = default) + { + if (triggerName == null) + { + throw new ArgumentNullException(nameof(triggerName)); + } + + using var message = CreateSubscribeTriggerToEventsRequest(triggerName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Subscribe event trigger to events. + /// The trigger name. + /// The cancellation token to use. + public Response SubscribeTriggerToEvents(string triggerName, CancellationToken cancellationToken = default) + { + if (triggerName == null) + { + throw new ArgumentNullException(nameof(triggerName)); + } + + using var message = CreateSubscribeTriggerToEventsRequest(triggerName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetEventSubscriptionStatusRequest(string triggerName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.AppendRaw(endpoint, false); + uri.AppendPath("/triggers/", false); + uri.AppendPath(triggerName, true); + uri.AppendPath("/getEventSubscriptionStatus", false); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + return message; + } + + /// Get a trigger's event subscription status. + /// The trigger name. + /// The cancellation token to use. + public async Task> GetEventSubscriptionStatusAsync(string triggerName, CancellationToken cancellationToken = default) + { + if (triggerName == null) + { + throw new ArgumentNullException(nameof(triggerName)); + } + + using var message = CreateGetEventSubscriptionStatusRequest(triggerName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + TriggerSubscriptionOperationStatus value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + value = TriggerSubscriptionOperationStatus.DeserializeTriggerSubscriptionOperationStatus(document.RootElement); + } + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Get a trigger's event subscription status. + /// The trigger name. + /// The cancellation token to use. + public Response GetEventSubscriptionStatus(string triggerName, CancellationToken cancellationToken = default) + { + if (triggerName == null) + { + throw new ArgumentNullException(nameof(triggerName)); + } + + using var message = CreateGetEventSubscriptionStatusRequest(triggerName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + TriggerSubscriptionOperationStatus value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + value = TriggerSubscriptionOperationStatus.DeserializeTriggerSubscriptionOperationStatus(document.RootElement); + } + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateUnsubscribeTriggerFromEventsRequest(string triggerName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.AppendRaw(endpoint, false); + uri.AppendPath("/triggers/", false); + uri.AppendPath(triggerName, true); + uri.AppendPath("/unsubscribeFromEvents", false); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + return message; + } + + /// Unsubscribe event trigger from events. + /// The trigger name. + /// The cancellation token to use. + public async Task UnsubscribeTriggerFromEventsAsync(string triggerName, CancellationToken cancellationToken = default) + { + if (triggerName == null) + { + throw new ArgumentNullException(nameof(triggerName)); + } + + using var message = CreateUnsubscribeTriggerFromEventsRequest(triggerName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Unsubscribe event trigger from events. + /// The trigger name. + /// The cancellation token to use. + public Response UnsubscribeTriggerFromEvents(string triggerName, CancellationToken cancellationToken = default) + { + if (triggerName == null) + { + throw new ArgumentNullException(nameof(triggerName)); + } + + using var message = CreateUnsubscribeTriggerFromEventsRequest(triggerName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateStartTriggerRequest(string triggerName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.AppendRaw(endpoint, false); + uri.AppendPath("/triggers/", false); + uri.AppendPath(triggerName, true); + uri.AppendPath("/start", false); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + return message; + } + + /// Starts a trigger. + /// The trigger name. + /// The cancellation token to use. + public async Task StartTriggerAsync(string triggerName, CancellationToken cancellationToken = default) + { + if (triggerName == null) + { + throw new ArgumentNullException(nameof(triggerName)); + } + + using var message = CreateStartTriggerRequest(triggerName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + return message.Response; + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Starts a trigger. + /// The trigger name. + /// The cancellation token to use. + public Response StartTrigger(string triggerName, CancellationToken cancellationToken = default) + { + if (triggerName == null) + { + throw new ArgumentNullException(nameof(triggerName)); + } + + using var message = CreateStartTriggerRequest(triggerName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + return message.Response; + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateStopTriggerRequest(string triggerName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.AppendRaw(endpoint, false); + uri.AppendPath("/triggers/", false); + uri.AppendPath(triggerName, true); + uri.AppendPath("/stop", false); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + return message; + } + + /// Stops a trigger. + /// The trigger name. + /// The cancellation token to use. + public async Task StopTriggerAsync(string triggerName, CancellationToken cancellationToken = default) + { + if (triggerName == null) + { + throw new ArgumentNullException(nameof(triggerName)); + } + + using var message = CreateStopTriggerRequest(triggerName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + return message.Response; + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Stops a trigger. + /// The trigger name. + /// The cancellation token to use. + public Response StopTrigger(string triggerName, CancellationToken cancellationToken = default) + { + if (triggerName == null) + { + throw new ArgumentNullException(nameof(triggerName)); + } + + using var message = CreateStopTriggerRequest(triggerName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + return message.Response; + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetTriggersByWorkspaceNextPageRequest(string nextLink) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.AppendRaw(endpoint, false); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + return message; + } + + /// Lists triggers. + /// The URL to the next page of results. + /// The cancellation token to use. + public async Task> GetTriggersByWorkspaceNextPageAsync(string nextLink, CancellationToken cancellationToken = default) + { + if (nextLink == null) + { + throw new ArgumentNullException(nameof(nextLink)); + } + + using var message = CreateGetTriggersByWorkspaceNextPageRequest(nextLink); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + TriggerListResponse value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + value = TriggerListResponse.DeserializeTriggerListResponse(document.RootElement); + } + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Lists triggers. + /// The URL to the next page of results. + /// The cancellation token to use. + public Response GetTriggersByWorkspaceNextPage(string nextLink, CancellationToken cancellationToken = default) + { + if (nextLink == null) + { + throw new ArgumentNullException(nameof(nextLink)); + } + + using var message = CreateGetTriggersByWorkspaceNextPageRequest(nextLink); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + TriggerListResponse value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + value = TriggerListResponse.DeserializeTriggerListResponse(document.RootElement); + } + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/TriggerRunClient.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/TriggerRunClient.cs new file mode 100644 index 000000000000..a2d03076a584 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/TriggerRunClient.cs @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Analytics.Synapse.Artifacts.Models; +using Azure.Core.Pipeline; + +namespace Azure.Analytics.Synapse.Artifacts +{ + /// The TriggerRun service client. + public partial class TriggerRunClient + { + private readonly ClientDiagnostics _clientDiagnostics; + private readonly HttpPipeline _pipeline; + internal TriggerRunRestClient RestClient { get; } + /// Initializes a new instance of TriggerRunClient for mocking. + protected TriggerRunClient() + { + } + /// Initializes a new instance of TriggerRunClient. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The workspace development endpoint, for example https://myworkspace.dev.azuresynapse.net. + /// Api Version. + internal TriggerRunClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string endpoint, string apiVersion = "2019-06-01-preview") + { + RestClient = new TriggerRunRestClient(clientDiagnostics, pipeline, endpoint, apiVersion); + _clientDiagnostics = clientDiagnostics; + _pipeline = pipeline; + } + + /// Rerun single trigger instance by runId. + /// The trigger name. + /// The pipeline run identifier. + /// The cancellation token to use. + public virtual async Task RerunTriggerInstanceAsync(string triggerName, string runId, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("TriggerRunClient.RerunTriggerInstance"); + scope.Start(); + try + { + return await RestClient.RerunTriggerInstanceAsync(triggerName, runId, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Rerun single trigger instance by runId. + /// The trigger name. + /// The pipeline run identifier. + /// The cancellation token to use. + public virtual Response RerunTriggerInstance(string triggerName, string runId, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("TriggerRunClient.RerunTriggerInstance"); + scope.Start(); + try + { + return RestClient.RerunTriggerInstance(triggerName, runId, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Query trigger runs. + /// Parameters to filter the pipeline run. + /// The cancellation token to use. + public virtual async Task> QueryTriggerRunsByWorkspaceAsync(RunFilterParameters filterParameters, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("TriggerRunClient.QueryTriggerRunsByWorkspace"); + scope.Start(); + try + { + return await RestClient.QueryTriggerRunsByWorkspaceAsync(filterParameters, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Query trigger runs. + /// Parameters to filter the pipeline run. + /// The cancellation token to use. + public virtual Response QueryTriggerRunsByWorkspace(RunFilterParameters filterParameters, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("TriggerRunClient.QueryTriggerRunsByWorkspace"); + scope.Start(); + try + { + return RestClient.QueryTriggerRunsByWorkspace(filterParameters, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/TriggerRunRestClient.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/TriggerRunRestClient.cs new file mode 100644 index 000000000000..a6b22f22dbfb --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/TriggerRunRestClient.cs @@ -0,0 +1,201 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Analytics.Synapse.Artifacts.Models; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.Analytics.Synapse.Artifacts +{ + internal partial class TriggerRunRestClient + { + private string endpoint; + private string apiVersion; + private ClientDiagnostics _clientDiagnostics; + private HttpPipeline _pipeline; + + /// Initializes a new instance of TriggerRunRestClient. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The workspace development endpoint, for example https://myworkspace.dev.azuresynapse.net. + /// Api Version. + /// This occurs when one of the required arguments is null. + public TriggerRunRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string endpoint, string apiVersion = "2019-06-01-preview") + { + if (endpoint == null) + { + throw new ArgumentNullException(nameof(endpoint)); + } + if (apiVersion == null) + { + throw new ArgumentNullException(nameof(apiVersion)); + } + + this.endpoint = endpoint; + this.apiVersion = apiVersion; + _clientDiagnostics = clientDiagnostics; + _pipeline = pipeline; + } + + internal HttpMessage CreateRerunTriggerInstanceRequest(string triggerName, string runId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.AppendRaw(endpoint, false); + uri.AppendPath("/triggers/", false); + uri.AppendPath(triggerName, true); + uri.AppendPath("/triggerRuns/", false); + uri.AppendPath(runId, true); + uri.AppendPath("/rerun", false); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + return message; + } + + /// Rerun single trigger instance by runId. + /// The trigger name. + /// The pipeline run identifier. + /// The cancellation token to use. + public async Task RerunTriggerInstanceAsync(string triggerName, string runId, CancellationToken cancellationToken = default) + { + if (triggerName == null) + { + throw new ArgumentNullException(nameof(triggerName)); + } + if (runId == null) + { + throw new ArgumentNullException(nameof(runId)); + } + + using var message = CreateRerunTriggerInstanceRequest(triggerName, runId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + return message.Response; + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Rerun single trigger instance by runId. + /// The trigger name. + /// The pipeline run identifier. + /// The cancellation token to use. + public Response RerunTriggerInstance(string triggerName, string runId, CancellationToken cancellationToken = default) + { + if (triggerName == null) + { + throw new ArgumentNullException(nameof(triggerName)); + } + if (runId == null) + { + throw new ArgumentNullException(nameof(runId)); + } + + using var message = CreateRerunTriggerInstanceRequest(triggerName, runId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + return message.Response; + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateQueryTriggerRunsByWorkspaceRequest(RunFilterParameters filterParameters) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.AppendRaw(endpoint, false); + uri.AppendPath("/queryTriggerRuns", false); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(filterParameters); + request.Content = content; + return message; + } + + /// Query trigger runs. + /// Parameters to filter the pipeline run. + /// The cancellation token to use. + public async Task> QueryTriggerRunsByWorkspaceAsync(RunFilterParameters filterParameters, CancellationToken cancellationToken = default) + { + if (filterParameters == null) + { + throw new ArgumentNullException(nameof(filterParameters)); + } + + using var message = CreateQueryTriggerRunsByWorkspaceRequest(filterParameters); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + TriggerRunsQueryResponse value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + value = TriggerRunsQueryResponse.DeserializeTriggerRunsQueryResponse(document.RootElement); + } + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Query trigger runs. + /// Parameters to filter the pipeline run. + /// The cancellation token to use. + public Response QueryTriggerRunsByWorkspace(RunFilterParameters filterParameters, CancellationToken cancellationToken = default) + { + if (filterParameters == null) + { + throw new ArgumentNullException(nameof(filterParameters)); + } + + using var message = CreateQueryTriggerRunsByWorkspaceRequest(filterParameters); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + TriggerRunsQueryResponse value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + value = TriggerRunsQueryResponse.DeserializeTriggerRunsQueryResponse(document.RootElement); + } + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/TriggerStartTriggerOperation.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/TriggerStartTriggerOperation.cs new file mode 100644 index 000000000000..f6573f7588a1 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/TriggerStartTriggerOperation.cs @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.Analytics.Synapse.Artifacts +{ + /// Starts a trigger. + public partial class TriggerStartTriggerOperation : Operation, IOperationSource + { + private readonly ArmOperationHelpers _operation; + internal TriggerStartTriggerOperation(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Request request, Response response) + { + _operation = new ArmOperationHelpers(this, clientDiagnostics, pipeline, request, response, OperationFinalStateVia.Location, "TriggerStartTriggerOperation"); + } + /// + public override string Id => _operation.Id; + + /// + public override Response Value => _operation.Value; + + /// + public override bool HasCompleted => _operation.HasCompleted; + + /// + public override bool HasValue => _operation.HasValue; + + /// + public override Response GetRawResponse() => _operation.GetRawResponse(); + + /// + public override Response UpdateStatus(CancellationToken cancellationToken = default) => _operation.UpdateStatus(cancellationToken); + + /// + public override ValueTask UpdateStatusAsync(CancellationToken cancellationToken = default) => _operation.UpdateStatusAsync(cancellationToken); + + /// + public override ValueTask> WaitForCompletionAsync(CancellationToken cancellationToken = default) => _operation.WaitForCompletionAsync(cancellationToken); + + /// + public override ValueTask> WaitForCompletionAsync(TimeSpan pollingInterval, CancellationToken cancellationToken = default) => _operation.WaitForCompletionAsync(pollingInterval, cancellationToken); + + Response IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + return response; + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + return await new ValueTask(response).ConfigureAwait(false); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/TriggerStopTriggerOperation.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/TriggerStopTriggerOperation.cs new file mode 100644 index 000000000000..6cb80f8325f4 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/TriggerStopTriggerOperation.cs @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.Analytics.Synapse.Artifacts +{ + /// Stops a trigger. + public partial class TriggerStopTriggerOperation : Operation, IOperationSource + { + private readonly ArmOperationHelpers _operation; + internal TriggerStopTriggerOperation(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Request request, Response response) + { + _operation = new ArmOperationHelpers(this, clientDiagnostics, pipeline, request, response, OperationFinalStateVia.Location, "TriggerStopTriggerOperation"); + } + /// + public override string Id => _operation.Id; + + /// + public override Response Value => _operation.Value; + + /// + public override bool HasCompleted => _operation.HasCompleted; + + /// + public override bool HasValue => _operation.HasValue; + + /// + public override Response GetRawResponse() => _operation.GetRawResponse(); + + /// + public override Response UpdateStatus(CancellationToken cancellationToken = default) => _operation.UpdateStatus(cancellationToken); + + /// + public override ValueTask UpdateStatusAsync(CancellationToken cancellationToken = default) => _operation.UpdateStatusAsync(cancellationToken); + + /// + public override ValueTask> WaitForCompletionAsync(CancellationToken cancellationToken = default) => _operation.WaitForCompletionAsync(cancellationToken); + + /// + public override ValueTask> WaitForCompletionAsync(TimeSpan pollingInterval, CancellationToken cancellationToken = default) => _operation.WaitForCompletionAsync(pollingInterval, cancellationToken); + + Response IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + return response; + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + return await new ValueTask(response).ConfigureAwait(false); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/TriggerSubscribeTriggerToEventsOperation.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/TriggerSubscribeTriggerToEventsOperation.cs new file mode 100644 index 000000000000..140d923df1a9 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/TriggerSubscribeTriggerToEventsOperation.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Analytics.Synapse.Artifacts.Models; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.Analytics.Synapse.Artifacts +{ + /// Subscribe event trigger to events. + public partial class TriggerSubscribeTriggerToEventsOperation : Operation, IOperationSource + { + private readonly ArmOperationHelpers _operation; + internal TriggerSubscribeTriggerToEventsOperation(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Request request, Response response) + { + _operation = new ArmOperationHelpers(this, clientDiagnostics, pipeline, request, response, OperationFinalStateVia.Location, "TriggerSubscribeTriggerToEventsOperation"); + } + /// + public override string Id => _operation.Id; + + /// + public override TriggerSubscriptionOperationStatus Value => _operation.Value; + + /// + public override bool HasCompleted => _operation.HasCompleted; + + /// + public override bool HasValue => _operation.HasValue; + + /// + public override Response GetRawResponse() => _operation.GetRawResponse(); + + /// + public override Response UpdateStatus(CancellationToken cancellationToken = default) => _operation.UpdateStatus(cancellationToken); + + /// + public override ValueTask UpdateStatusAsync(CancellationToken cancellationToken = default) => _operation.UpdateStatusAsync(cancellationToken); + + /// + public override ValueTask> WaitForCompletionAsync(CancellationToken cancellationToken = default) => _operation.WaitForCompletionAsync(cancellationToken); + + /// + public override ValueTask> WaitForCompletionAsync(TimeSpan pollingInterval, CancellationToken cancellationToken = default) => _operation.WaitForCompletionAsync(pollingInterval, cancellationToken); + + TriggerSubscriptionOperationStatus IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + return null; + } + else + { + return TriggerSubscriptionOperationStatus.DeserializeTriggerSubscriptionOperationStatus(document.RootElement); + } + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + return null; + } + else + { + return TriggerSubscriptionOperationStatus.DeserializeTriggerSubscriptionOperationStatus(document.RootElement); + } + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/TriggerUnsubscribeTriggerFromEventsOperation.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/TriggerUnsubscribeTriggerFromEventsOperation.cs new file mode 100644 index 000000000000..ea96c0014d7e --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/TriggerUnsubscribeTriggerFromEventsOperation.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Analytics.Synapse.Artifacts.Models; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.Analytics.Synapse.Artifacts +{ + /// Unsubscribe event trigger from events. + public partial class TriggerUnsubscribeTriggerFromEventsOperation : Operation, IOperationSource + { + private readonly ArmOperationHelpers _operation; + internal TriggerUnsubscribeTriggerFromEventsOperation(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Request request, Response response) + { + _operation = new ArmOperationHelpers(this, clientDiagnostics, pipeline, request, response, OperationFinalStateVia.Location, "TriggerUnsubscribeTriggerFromEventsOperation"); + } + /// + public override string Id => _operation.Id; + + /// + public override TriggerSubscriptionOperationStatus Value => _operation.Value; + + /// + public override bool HasCompleted => _operation.HasCompleted; + + /// + public override bool HasValue => _operation.HasValue; + + /// + public override Response GetRawResponse() => _operation.GetRawResponse(); + + /// + public override Response UpdateStatus(CancellationToken cancellationToken = default) => _operation.UpdateStatus(cancellationToken); + + /// + public override ValueTask UpdateStatusAsync(CancellationToken cancellationToken = default) => _operation.UpdateStatusAsync(cancellationToken); + + /// + public override ValueTask> WaitForCompletionAsync(CancellationToken cancellationToken = default) => _operation.WaitForCompletionAsync(cancellationToken); + + /// + public override ValueTask> WaitForCompletionAsync(TimeSpan pollingInterval, CancellationToken cancellationToken = default) => _operation.WaitForCompletionAsync(pollingInterval, cancellationToken); + + TriggerSubscriptionOperationStatus IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + return null; + } + else + { + return TriggerSubscriptionOperationStatus.DeserializeTriggerSubscriptionOperationStatus(document.RootElement); + } + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + return null; + } + else + { + return TriggerSubscriptionOperationStatus.DeserializeTriggerSubscriptionOperationStatus(document.RootElement); + } + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Properties/AssemblyInfo.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..f752319a6530 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Properties/AssemblyInfo.cs @@ -0,0 +1,14 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System.Diagnostics.CodeAnalysis; +using System.Runtime.CompilerServices; + +[assembly: InternalsVisibleTo("Azure.Analytics.Synapse.Artifacts.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100d15ddcb29688295338af4b7686603fe614abd555e09efba8fb88ee09e1f7b1ccaeed2e8f823fa9eef3fdd60217fc012ea67d2479751a0b8c087a4185541b851bd8b16f8d91b840e51b1cb0ba6fe647997e57429265e85ef62d565db50a69ae1647d54d7bd855e4db3d8a91510e5bcbd0edfbbecaa20a7bd9ae74593daa7b11b4")] +[assembly: Azure.Core.AzureResourceProviderNamespace("Microsoft.Synapse")] +[assembly: SuppressMessage("Usage", "AZC0012:Avoid single word type names", Justification = "", Scope = "type", Target = "~T:Azure.Analytics.Synapse.Artifacts.Models.Expression")] +[assembly: SuppressMessage("Usage", "AZC0012:Avoid single word type names", Justification = "", Scope = "type", Target = "~T:Azure.Analytics.Synapse.Artifacts.Models.Transformation")] +[assembly: SuppressMessage("Usage", "AZC0012:Avoid single word type names", Justification = "", Scope = "type", Target = "~T:Azure.Analytics.Synapse.Artifacts.Models.Trigger")] +[assembly: SuppressMessage("Usage", "AZC0012:Avoid single word type names", Justification = "", Scope = "type", Target = "~T:Azure.Analytics.Synapse.Artifacts.Models.Activity")] +[assembly: SuppressMessage("Usage", "AZC0012:Avoid single word type names", Justification = "", Scope = "type", Target = "~T:Azure.Analytics.Synapse.Artifacts.Models.Dataset")] +[assembly: SuppressMessage("Usage", "AZC0012:Avoid single word type names", Justification = "", Scope = "type", Target = "~T:Azure.Analytics.Synapse.Artifacts.Models.Notebook")] diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/autorest.md b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/autorest.md new file mode 100644 index 000000000000..7772ba2fa973 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/autorest.md @@ -0,0 +1,16 @@ +# Microsoft.Azure.Synapse + +Run `dotnet msbuild /t:GenerateCode` to generate code. + +### AutoRest Configuration +> see https://aka.ms/autorest + +```yaml +repo: https://github.com/Azure/azure-rest-api-specs/blob/fdf4bbfd7a73b28960d3a62490440345d6f2e8e3 +``` + +``` yaml +public-clients: true +input-file: + - $(repo)/specification/synapse/data-plane/Microsoft.Synapse/preview/2019-06-01-preview/artifacts.json +``` diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/tests/ArtifactsClientTestBase.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/tests/ArtifactsClientTestBase.cs new file mode 100644 index 000000000000..b0cca067a22c --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/tests/ArtifactsClientTestBase.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure.Analytics.Synapse.Artifacts; +using Azure.Core.TestFramework; +using NUnit.Framework; +using System; +using System.IO; + +namespace Azure.Analytics.Synapse.Tests.Artifacts +{ + [NonParallelizable] + public abstract class ArtifactsClientTestBase : RecordedTestBase + { + public PipelineClient PipelineClient { get; set; } + + public NotebookClient NotebookClient { get; set; } + + protected ArtifactsClientTestBase(bool isAsync) : base(isAsync) + { +#if DEBUG + SaveDebugRecordingsOnFailure = true; +#endif + } + + public override void StartTestRecording() + { + base.StartTestRecording(); + + PipelineClient = CreatePipelineClient(); + NotebookClient = CreateNotebookClient(); + } + + public override void StopTestRecording() + { + Recording.RewriteSessionRecords(GetSessionFilePath()); + Recording.ClearTextReplacementRules(); + base.StopTestRecording(); + } + + private string GetSessionFilePath(string name = null) + { + TestContext.TestAdapter testAdapter = TestContext.CurrentContext.Test; + + name ??= testAdapter.Name; + + string className = testAdapter.ClassName.Substring(testAdapter.ClassName.LastIndexOf('.') + 1); + string fileName = name + (IsAsync ? "Async" : string.Empty) + ".json"; + return Path.Combine(TestContext.CurrentContext.TestDirectory, "SessionRecords", className, fileName); + } + + internal PipelineClient CreatePipelineClient(TestRecording recording = null) + { + recording ??= Recording; + return InstrumentClient(new PipelineClient( + new Uri(TestEnvironment.WorkspaceUrl), + TestEnvironment.Credential, + recording.InstrumentClientOptions(new ArtifactsClientOptions()))); + } + + internal NotebookClient CreateNotebookClient(TestRecording recording = null) + { + recording ??= Recording; + return InstrumentClient(new NotebookClient( + new Uri(TestEnvironment.WorkspaceUrl), + TestEnvironment.Credential, + recording.InstrumentClientOptions(new ArtifactsClientOptions()))); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/tests/Azure.Analytics.Synapse.Artifacts.Tests.csproj b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/tests/Azure.Analytics.Synapse.Artifacts.Tests.csproj new file mode 100644 index 000000000000..bb7dfddf3ae0 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/tests/Azure.Analytics.Synapse.Artifacts.Tests.csproj @@ -0,0 +1,20 @@ + + + $(RequiredTargetFrameworks) + + + + + + + + + + + + + + + + + diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/tests/NotebookClientLiveTests.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/tests/NotebookClientLiveTests.cs new file mode 100644 index 000000000000..b83fbdde09ac --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/tests/NotebookClientLiveTests.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System.Threading.Tasks; +using Azure.Analytics.Synapse.Artifacts.Models; +using Azure.Analytics.Synapse.Artifacts; +using NUnit.Framework; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Tests.Artifacts +{ + /// + /// The suite of tests for the class. + /// + /// + /// These tests have a dependency on live Azure services and may incur costs for the associated + /// Azure subscription. + /// + public class NotebookClientLiveTests : ArtifactsClientTestBase + { + /// + /// Initializes a new instance of the class. + /// + /// A flag used by the Azure Core Test Framework to differentiate between tests for asynchronous and synchronous methods. + public NotebookClientLiveTests(bool isAsync) : base(isAsync) + { + } + + [Test] + public async Task TestGetNotebook() + { + await foreach (var expectedNotebook in NotebookClient.GetNotebooksByWorkspaceAsync()) + { + NotebookResource actualNotebook = await NotebookClient.GetNotebookAsync(expectedNotebook.Name); + Assert.AreEqual(expectedNotebook.Name, actualNotebook.Name); + Assert.AreEqual(expectedNotebook.Id, actualNotebook.Id); + Assert.AreEqual(expectedNotebook.Properties.BigDataPool?.ReferenceName, actualNotebook.Properties.BigDataPool?.ReferenceName); + } + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/tests/PipelineClientLiveTests.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/tests/PipelineClientLiveTests.cs new file mode 100644 index 000000000000..29585d7b83d2 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/tests/PipelineClientLiveTests.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System.Threading.Tasks; +using Azure.Analytics.Synapse.Artifacts.Models; +using NUnit.Framework; + +namespace Azure.Analytics.Synapse.Tests.Artifacts +{ + /// + /// The suite of tests for the class. + /// + /// + /// These tests have a dependency on live Azure services and may incur costs for the associated + /// Azure subscription. + /// + public class PipelineClientLiveTests : ArtifactsClientTestBase + { + /// + /// Initializes a new instance of the class. + /// + /// A flag used by the Azure Core Test Framework to differentiate between tests for asynchronous and synchronous methods. + public PipelineClientLiveTests(bool isAsync) : base(isAsync) + { + } + + [Test] + public async Task TestGetPipeline() + { + await foreach (var expectedPipeline in PipelineClient.GetPipelinesByWorkspaceAsync()) + { + PipelineResource actualPipeline = await PipelineClient.GetPipelineAsync(expectedPipeline.Name); + Assert.AreEqual(expectedPipeline.Name, actualPipeline.Name); + Assert.AreEqual(expectedPipeline.Id, actualPipeline.Id); + } + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/tests/SessionRecords/NotebookClientLiveTests/TestGetNotebook.json b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/tests/SessionRecords/NotebookClientLiveTests/TestGetNotebook.json new file mode 100644 index 000000000000..cb25759ba6eb --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/tests/SessionRecords/NotebookClientLiveTests/TestGetNotebook.json @@ -0,0 +1,161 @@ +{ + "Entries": [ + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/notebooks?api-version=2019-06-01-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.Artifacts/1.0.0-dev.20200528.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "a353c8c84d48d750254927b42874ee69", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Length": "2425", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 29 May 2020 05:45:10 GMT", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "x-ms-client-request-id": "a353c8c84d48d750254927b42874ee69", + "x-ms-request-id": "5d51fffd-d258-4714-96f3-a5d6e9c90700" + }, + "ResponseBody": "{\u0022value\u0022:[{\u0022id\u0022:\u0022/subscriptions/051ddeca-1ed6-4d8b-ba6f-1ff561e5f3b3/resourceGroups/zzy-test-rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/notebooks/Notebook 1\u0022,\u0022name\u0022:\u0022Notebook 1\u0022,\u0022type\u0022:\u0022Microsoft.Synapse/workspaces/notebooks\u0022,\u0022etag\u0022:\u002210003327-0000-0100-0000-5e031adb0000\u0022,\u0022properties\u0022:{\u0022nbformat\u0022:4,\u0022nbformat_minor\u0022:2,\u0022bigDataPool\u0022:{\u0022referenceName\u0022:\u0022testsparkpool\u0022,\u0022type\u0022:\u0022BigDataPoolReference\u0022},\u0022sessionProperties\u0022:{\u0022driverMemory\u0022:\u002228g\u0022,\u0022driverCores\u0022:4,\u0022executorMemory\u0022:\u002228g\u0022,\u0022executorCores\u0022:4,\u0022numExecutors\u0022:1},\u0022metadata\u0022:{\u0022language_info\u0022:{\u0022name\u0022:\u0022python\u0022},\u0022a365ComputeOptions\u0022:{\u0022id\u0022:\u0022/subscriptions/051ddeca-1ed6-4d8b-ba6f-1ff561e5f3b3/resourceGroups/zzy-test-rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/bigDataPools/testsparkpool\u0022,\u0022name\u0022:\u0022testsparkpool\u0022,\u0022type\u0022:\u0022Spark\u0022,\u0022endpoint\u0022:\u0022https://testsynapseworkspace.dev.azuresynapse.net/livyApi/versions/2019-11-01-preview/sparkPools/testsparkpool\u0022,\u0022auth\u0022:{\u0022type\u0022:\u0022AAD\u0022,\u0022authResource\u0022:\u0022https://dev.azuresynapse.net\u0022},\u0022sparkVersion\u0022:\u00222.4\u0022,\u0022nodeCount\u0022:41,\u0022cores\u0022:8,\u0022memory\u0022:56,\u0022extraHeader\u0022:{}}},\u0022cells\u0022:[{\u0022cell_type\u0022:\u0022code\u0022,\u0022metadata\u0022:{},\u0022source\u0022:[\u0022print(\\\u0022hello from portal\\\u0022)\u0022],\u0022attachments\u0022:{},\u0022outputs\u0022:[],\u0022execution_count\u0022:null}]}},{\u0022id\u0022:\u0022/subscriptions/051ddeca-1ed6-4d8b-ba6f-1ff561e5f3b3/resourceGroups/zzy-test-rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/notebooks/dongwwaTestNotebook\u0022,\u0022name\u0022:\u0022dongwwaTestNotebook\u0022,\u0022type\u0022:\u0022Microsoft.Synapse/workspaces/notebooks\u0022,\u0022etag\u0022:\u00220100d5a0-0000-0100-0000-5ecba4720000\u0022,\u0022properties\u0022:{\u0022nbformat\u0022:4,\u0022nbformat_minor\u0022:2,\u0022sessionProperties\u0022:{\u0022driverMemory\u0022:\u002228g\u0022,\u0022driverCores\u0022:4,\u0022executorMemory\u0022:\u002228g\u0022,\u0022executorCores\u0022:4,\u0022numExecutors\u0022:2},\u0022metadata\u0022:{\u0022language_info\u0022:{\u0022name\u0022:\u0022python\u0022},\u0022sessionKeepAliveTimeout\u0022:30},\u0022cells\u0022:[{\u0022cell_type\u0022:\u0022code\u0022,\u0022metadata\u0022:{},\u0022source\u0022:[\u0022print(\u0027hello\u0027)\u0022],\u0022attachments\u0022:{},\u0022outputs\u0022:[],\u0022execution_count\u0022:null}]}},{\u0022id\u0022:\u0022/subscriptions/051ddeca-1ed6-4d8b-ba6f-1ff561e5f3b3/resourceGroups/zzy-test-rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/notebooks/dongwwaNb2\u0022,\u0022name\u0022:\u0022dongwwaNb2\u0022,\u0022type\u0022:\u0022Microsoft.Synapse/workspaces/notebooks\u0022,\u0022etag\u0022:\u00220100f6a0-0000-0100-0000-5ecba61e0000\u0022,\u0022properties\u0022:{\u0022nbformat\u0022:4,\u0022nbformat_minor\u0022:2,\u0022sessionProperties\u0022:{\u0022driverMemory\u0022:\u002228g\u0022,\u0022driverCores\u0022:4,\u0022executorMemory\u0022:\u002228g\u0022,\u0022executorCores\u0022:4,\u0022numExecutors\u0022:2},\u0022metadata\u0022:{\u0022language_info\u0022:{\u0022name\u0022:\u0022python\u0022},\u0022sessionKeepAliveTimeout\u0022:30},\u0022cells\u0022:[]}}]}" + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/notebooks/Notebook%201?api-version=2019-06-01-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-0a556081a73bce4598649b5834545de7-c5fa653f5194b74b-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.Artifacts/1.0.0-dev.20200528.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "4a0bc19ed1af8774eec1dd87ae8fc195", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1212", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 29 May 2020 05:45:10 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": [ + "Microsoft-IIS/10.0", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-client-request-id": "4a0bc19ed1af8774eec1dd87ae8fc195", + "x-ms-correlation-request-id": "cdead47f-271e-4488-afd5-74334d9207ce", + "x-ms-request-id": "195a5e02-89ef-4287-89bc-8e3354a924d2", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": "{\u0022id\u0022:\u0022/subscriptions/051ddeca-1ed6-4d8b-ba6f-1ff561e5f3b3/resourceGroups/zzy-test-rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/notebooks/Notebook 1\u0022,\u0022name\u0022:\u0022Notebook 1\u0022,\u0022type\u0022:\u0022Microsoft.Synapse/workspaces/notebooks\u0022,\u0022properties\u0022:{\u0022nbformat\u0022:4,\u0022nbformat_minor\u0022:2,\u0022bigDataPool\u0022:{\u0022referenceName\u0022:\u0022testsparkpool\u0022,\u0022type\u0022:\u0022BigDataPoolReference\u0022},\u0022sessionProperties\u0022:{\u0022driverMemory\u0022:\u002228g\u0022,\u0022driverCores\u0022:4,\u0022executorMemory\u0022:\u002228g\u0022,\u0022executorCores\u0022:4,\u0022numExecutors\u0022:1},\u0022metadata\u0022:{\u0022language_info\u0022:{\u0022name\u0022:\u0022python\u0022},\u0022a365ComputeOptions\u0022:{\u0022id\u0022:\u0022/subscriptions/051ddeca-1ed6-4d8b-ba6f-1ff561e5f3b3/resourceGroups/zzy-test-rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/bigDataPools/testsparkpool\u0022,\u0022name\u0022:\u0022testsparkpool\u0022,\u0022type\u0022:\u0022Spark\u0022,\u0022endpoint\u0022:\u0022https://testsynapseworkspace.dev.azuresynapse.net/livyApi/versions/2019-11-01-preview/sparkPools/testsparkpool\u0022,\u0022auth\u0022:{\u0022type\u0022:\u0022AAD\u0022,\u0022authResource\u0022:\u0022https://dev.azuresynapse.net\u0022},\u0022sparkVersion\u0022:\u00222.4\u0022,\u0022nodeCount\u0022:41,\u0022cores\u0022:8,\u0022memory\u0022:56,\u0022extraHeader\u0022:{}}},\u0022cells\u0022:[{\u0022cell_type\u0022:\u0022code\u0022,\u0022metadata\u0022:{},\u0022source\u0022:[\u0022print(\\\u0022hello from portal\\\u0022)\u0022],\u0022attachments\u0022:{},\u0022outputs\u0022:[],\u0022execution_count\u0022:null}]},\u0022etag\u0022:\u002210003327-0000-0100-0000-5e031adb0000\u0022}" + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/notebooks/dongwwaTestNotebook?api-version=2019-06-01-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-b01ee48f79851747b82b830ea3db6046-7697169d77771b4b-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.Artifacts/1.0.0-dev.20200528.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "a5ce45d6e1c2bab2e43cbea51f9fa1ea", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "666", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 29 May 2020 05:45:10 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": [ + "Microsoft-IIS/10.0", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-client-request-id": "a5ce45d6e1c2bab2e43cbea51f9fa1ea", + "x-ms-correlation-request-id": "6f411dae-44b2-45a4-aaec-561cdec7a1eb", + "x-ms-request-id": "c411570f-c651-46d1-9b26-982ef54dc8d8", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": "{\u0022id\u0022:\u0022/subscriptions/051ddeca-1ed6-4d8b-ba6f-1ff561e5f3b3/resourceGroups/zzy-test-rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/notebooks/dongwwaTestNotebook\u0022,\u0022name\u0022:\u0022dongwwaTestNotebook\u0022,\u0022type\u0022:\u0022Microsoft.Synapse/workspaces/notebooks\u0022,\u0022properties\u0022:{\u0022nbformat\u0022:4,\u0022nbformat_minor\u0022:2,\u0022sessionProperties\u0022:{\u0022driverMemory\u0022:\u002228g\u0022,\u0022driverCores\u0022:4,\u0022executorMemory\u0022:\u002228g\u0022,\u0022executorCores\u0022:4,\u0022numExecutors\u0022:2},\u0022metadata\u0022:{\u0022language_info\u0022:{\u0022name\u0022:\u0022python\u0022},\u0022sessionKeepAliveTimeout\u0022:30},\u0022cells\u0022:[{\u0022cell_type\u0022:\u0022code\u0022,\u0022metadata\u0022:{},\u0022source\u0022:[\u0022print(\u0027hello\u0027)\u0022],\u0022attachments\u0022:{},\u0022outputs\u0022:[],\u0022execution_count\u0022:null}]},\u0022etag\u0022:\u00220100d5a0-0000-0100-0000-5ecba4720000\u0022}" + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/notebooks/dongwwaNb2?api-version=2019-06-01-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-032d70851dcb9a4f901cdbefd815e5d8-570ddd3dede9fc4f-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.Artifacts/1.0.0-dev.20200528.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "9afc5697cb4df7be53cbb58670c82995", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "533", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 29 May 2020 05:45:10 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": [ + "Microsoft-IIS/10.0", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-client-request-id": "9afc5697cb4df7be53cbb58670c82995", + "x-ms-correlation-request-id": "70468554-77b6-4863-a4e4-3775d53ace39", + "x-ms-request-id": "89159e06-fde9-4b72-b483-9479fb4c5b15", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": { + "id": "/subscriptions/051ddeca-1ed6-4d8b-ba6f-1ff561e5f3b3/resourceGroups/zzy-test-rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/notebooks/dongwwaNb2", + "name": "dongwwaNb2", + "type": "Microsoft.Synapse/workspaces/notebooks", + "properties": { + "nbformat": 4, + "nbformat_minor": 2, + "sessionProperties": { + "driverMemory": "28g", + "driverCores": 4, + "executorMemory": "28g", + "executorCores": 4, + "numExecutors": 2 + }, + "metadata": { + "language_info": { + "name": "python" + }, + "sessionKeepAliveTimeout": 30 + }, + "cells": [] + }, + "etag": "0100f6a0-0000-0100-0000-5ecba61e0000" + } + } + ], + "Variables": { + "AZURE_SYNAPSE_WORKSPACE_URL": "https://testsynapseworkspace.dev.azuresynapse.net", + "RandomSeed": "1257903385" + } +} \ No newline at end of file diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/tests/SessionRecords/NotebookClientLiveTests/TestGetNotebookAsync.json b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/tests/SessionRecords/NotebookClientLiveTests/TestGetNotebookAsync.json new file mode 100644 index 000000000000..bcfc9b6ff128 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/tests/SessionRecords/NotebookClientLiveTests/TestGetNotebookAsync.json @@ -0,0 +1,161 @@ +{ + "Entries": [ + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/notebooks?api-version=2019-06-01-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.Artifacts/1.0.0-dev.20200528.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "765dcd98fbeb2794bc56547da66ebf7d", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Length": "2425", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 29 May 2020 05:45:11 GMT", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "x-ms-client-request-id": "765dcd98fbeb2794bc56547da66ebf7d", + "x-ms-request-id": "252645df-52f1-4258-9a4f-efe51e81d444" + }, + "ResponseBody": "{\u0022value\u0022:[{\u0022id\u0022:\u0022/subscriptions/051ddeca-1ed6-4d8b-ba6f-1ff561e5f3b3/resourceGroups/zzy-test-rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/notebooks/Notebook 1\u0022,\u0022name\u0022:\u0022Notebook 1\u0022,\u0022type\u0022:\u0022Microsoft.Synapse/workspaces/notebooks\u0022,\u0022etag\u0022:\u002210003327-0000-0100-0000-5e031adb0000\u0022,\u0022properties\u0022:{\u0022nbformat\u0022:4,\u0022nbformat_minor\u0022:2,\u0022bigDataPool\u0022:{\u0022referenceName\u0022:\u0022testsparkpool\u0022,\u0022type\u0022:\u0022BigDataPoolReference\u0022},\u0022sessionProperties\u0022:{\u0022driverMemory\u0022:\u002228g\u0022,\u0022driverCores\u0022:4,\u0022executorMemory\u0022:\u002228g\u0022,\u0022executorCores\u0022:4,\u0022numExecutors\u0022:1},\u0022metadata\u0022:{\u0022language_info\u0022:{\u0022name\u0022:\u0022python\u0022},\u0022a365ComputeOptions\u0022:{\u0022id\u0022:\u0022/subscriptions/051ddeca-1ed6-4d8b-ba6f-1ff561e5f3b3/resourceGroups/zzy-test-rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/bigDataPools/testsparkpool\u0022,\u0022name\u0022:\u0022testsparkpool\u0022,\u0022type\u0022:\u0022Spark\u0022,\u0022endpoint\u0022:\u0022https://testsynapseworkspace.dev.azuresynapse.net/livyApi/versions/2019-11-01-preview/sparkPools/testsparkpool\u0022,\u0022auth\u0022:{\u0022type\u0022:\u0022AAD\u0022,\u0022authResource\u0022:\u0022https://dev.azuresynapse.net\u0022},\u0022sparkVersion\u0022:\u00222.4\u0022,\u0022nodeCount\u0022:41,\u0022cores\u0022:8,\u0022memory\u0022:56,\u0022extraHeader\u0022:{}}},\u0022cells\u0022:[{\u0022cell_type\u0022:\u0022code\u0022,\u0022metadata\u0022:{},\u0022source\u0022:[\u0022print(\\\u0022hello from portal\\\u0022)\u0022],\u0022attachments\u0022:{},\u0022outputs\u0022:[],\u0022execution_count\u0022:null}]}},{\u0022id\u0022:\u0022/subscriptions/051ddeca-1ed6-4d8b-ba6f-1ff561e5f3b3/resourceGroups/zzy-test-rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/notebooks/dongwwaTestNotebook\u0022,\u0022name\u0022:\u0022dongwwaTestNotebook\u0022,\u0022type\u0022:\u0022Microsoft.Synapse/workspaces/notebooks\u0022,\u0022etag\u0022:\u00220100d5a0-0000-0100-0000-5ecba4720000\u0022,\u0022properties\u0022:{\u0022nbformat\u0022:4,\u0022nbformat_minor\u0022:2,\u0022sessionProperties\u0022:{\u0022driverMemory\u0022:\u002228g\u0022,\u0022driverCores\u0022:4,\u0022executorMemory\u0022:\u002228g\u0022,\u0022executorCores\u0022:4,\u0022numExecutors\u0022:2},\u0022metadata\u0022:{\u0022language_info\u0022:{\u0022name\u0022:\u0022python\u0022},\u0022sessionKeepAliveTimeout\u0022:30},\u0022cells\u0022:[{\u0022cell_type\u0022:\u0022code\u0022,\u0022metadata\u0022:{},\u0022source\u0022:[\u0022print(\u0027hello\u0027)\u0022],\u0022attachments\u0022:{},\u0022outputs\u0022:[],\u0022execution_count\u0022:null}]}},{\u0022id\u0022:\u0022/subscriptions/051ddeca-1ed6-4d8b-ba6f-1ff561e5f3b3/resourceGroups/zzy-test-rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/notebooks/dongwwaNb2\u0022,\u0022name\u0022:\u0022dongwwaNb2\u0022,\u0022type\u0022:\u0022Microsoft.Synapse/workspaces/notebooks\u0022,\u0022etag\u0022:\u00220100f6a0-0000-0100-0000-5ecba61e0000\u0022,\u0022properties\u0022:{\u0022nbformat\u0022:4,\u0022nbformat_minor\u0022:2,\u0022sessionProperties\u0022:{\u0022driverMemory\u0022:\u002228g\u0022,\u0022driverCores\u0022:4,\u0022executorMemory\u0022:\u002228g\u0022,\u0022executorCores\u0022:4,\u0022numExecutors\u0022:2},\u0022metadata\u0022:{\u0022language_info\u0022:{\u0022name\u0022:\u0022python\u0022},\u0022sessionKeepAliveTimeout\u0022:30},\u0022cells\u0022:[]}}]}" + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/notebooks/Notebook%201?api-version=2019-06-01-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-94c04f9ff271a2489a13db47e7333e9f-cb8fecc87ad37e49-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.Artifacts/1.0.0-dev.20200528.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "8fac1d1f3467c3a7c68b0cee7d692513", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1212", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 29 May 2020 05:45:11 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": [ + "Microsoft-IIS/10.0", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-client-request-id": "8fac1d1f3467c3a7c68b0cee7d692513", + "x-ms-correlation-request-id": "98ef2347-39c9-46dc-8601-a59b0cc20940", + "x-ms-request-id": "649b1210-7ece-416f-a596-976d919b427a", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": "{\u0022id\u0022:\u0022/subscriptions/051ddeca-1ed6-4d8b-ba6f-1ff561e5f3b3/resourceGroups/zzy-test-rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/notebooks/Notebook 1\u0022,\u0022name\u0022:\u0022Notebook 1\u0022,\u0022type\u0022:\u0022Microsoft.Synapse/workspaces/notebooks\u0022,\u0022properties\u0022:{\u0022nbformat\u0022:4,\u0022nbformat_minor\u0022:2,\u0022bigDataPool\u0022:{\u0022referenceName\u0022:\u0022testsparkpool\u0022,\u0022type\u0022:\u0022BigDataPoolReference\u0022},\u0022sessionProperties\u0022:{\u0022driverMemory\u0022:\u002228g\u0022,\u0022driverCores\u0022:4,\u0022executorMemory\u0022:\u002228g\u0022,\u0022executorCores\u0022:4,\u0022numExecutors\u0022:1},\u0022metadata\u0022:{\u0022language_info\u0022:{\u0022name\u0022:\u0022python\u0022},\u0022a365ComputeOptions\u0022:{\u0022id\u0022:\u0022/subscriptions/051ddeca-1ed6-4d8b-ba6f-1ff561e5f3b3/resourceGroups/zzy-test-rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/bigDataPools/testsparkpool\u0022,\u0022name\u0022:\u0022testsparkpool\u0022,\u0022type\u0022:\u0022Spark\u0022,\u0022endpoint\u0022:\u0022https://testsynapseworkspace.dev.azuresynapse.net/livyApi/versions/2019-11-01-preview/sparkPools/testsparkpool\u0022,\u0022auth\u0022:{\u0022type\u0022:\u0022AAD\u0022,\u0022authResource\u0022:\u0022https://dev.azuresynapse.net\u0022},\u0022sparkVersion\u0022:\u00222.4\u0022,\u0022nodeCount\u0022:41,\u0022cores\u0022:8,\u0022memory\u0022:56,\u0022extraHeader\u0022:{}}},\u0022cells\u0022:[{\u0022cell_type\u0022:\u0022code\u0022,\u0022metadata\u0022:{},\u0022source\u0022:[\u0022print(\\\u0022hello from portal\\\u0022)\u0022],\u0022attachments\u0022:{},\u0022outputs\u0022:[],\u0022execution_count\u0022:null}]},\u0022etag\u0022:\u002210003327-0000-0100-0000-5e031adb0000\u0022}" + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/notebooks/dongwwaTestNotebook?api-version=2019-06-01-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-349203ec89f56842bb8fc3efe5791085-72125645c4782040-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.Artifacts/1.0.0-dev.20200528.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "0a2d2b55c619c1c6a5e590fbfec3543a", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "666", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 29 May 2020 05:45:11 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": [ + "Microsoft-IIS/10.0", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-client-request-id": "0a2d2b55c619c1c6a5e590fbfec3543a", + "x-ms-correlation-request-id": "09659443-44b5-45b6-9443-60b3ce5ed763", + "x-ms-request-id": "bfdfc370-77f1-4eea-880c-43cdcadd2353", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": "{\u0022id\u0022:\u0022/subscriptions/051ddeca-1ed6-4d8b-ba6f-1ff561e5f3b3/resourceGroups/zzy-test-rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/notebooks/dongwwaTestNotebook\u0022,\u0022name\u0022:\u0022dongwwaTestNotebook\u0022,\u0022type\u0022:\u0022Microsoft.Synapse/workspaces/notebooks\u0022,\u0022properties\u0022:{\u0022nbformat\u0022:4,\u0022nbformat_minor\u0022:2,\u0022sessionProperties\u0022:{\u0022driverMemory\u0022:\u002228g\u0022,\u0022driverCores\u0022:4,\u0022executorMemory\u0022:\u002228g\u0022,\u0022executorCores\u0022:4,\u0022numExecutors\u0022:2},\u0022metadata\u0022:{\u0022language_info\u0022:{\u0022name\u0022:\u0022python\u0022},\u0022sessionKeepAliveTimeout\u0022:30},\u0022cells\u0022:[{\u0022cell_type\u0022:\u0022code\u0022,\u0022metadata\u0022:{},\u0022source\u0022:[\u0022print(\u0027hello\u0027)\u0022],\u0022attachments\u0022:{},\u0022outputs\u0022:[],\u0022execution_count\u0022:null}]},\u0022etag\u0022:\u00220100d5a0-0000-0100-0000-5ecba4720000\u0022}" + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/notebooks/dongwwaNb2?api-version=2019-06-01-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-d74dd0d5fc0dcc43836687ca8551d9f4-1f0ea5b2cfa54e44-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.Artifacts/1.0.0-dev.20200528.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "271e15196f6b6498269aaf5feea6a952", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "533", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 29 May 2020 05:45:11 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": [ + "Microsoft-IIS/10.0", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-client-request-id": "271e15196f6b6498269aaf5feea6a952", + "x-ms-correlation-request-id": "73d36d3c-4eb0-455b-9a28-a12e8b43424d", + "x-ms-request-id": "91ddedf3-65d1-4bc6-896b-d91a1e37ea1e", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": { + "id": "/subscriptions/051ddeca-1ed6-4d8b-ba6f-1ff561e5f3b3/resourceGroups/zzy-test-rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/notebooks/dongwwaNb2", + "name": "dongwwaNb2", + "type": "Microsoft.Synapse/workspaces/notebooks", + "properties": { + "nbformat": 4, + "nbformat_minor": 2, + "sessionProperties": { + "driverMemory": "28g", + "driverCores": 4, + "executorMemory": "28g", + "executorCores": 4, + "numExecutors": 2 + }, + "metadata": { + "language_info": { + "name": "python" + }, + "sessionKeepAliveTimeout": 30 + }, + "cells": [] + }, + "etag": "0100f6a0-0000-0100-0000-5ecba61e0000" + } + } + ], + "Variables": { + "AZURE_SYNAPSE_WORKSPACE_URL": "https://testsynapseworkspace.dev.azuresynapse.net", + "RandomSeed": "2131167218" + } +} \ No newline at end of file diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/tests/SessionRecords/PipelineClientLiveTests/TestGetPipeline.json b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/tests/SessionRecords/PipelineClientLiveTests/TestGetPipeline.json new file mode 100644 index 000000000000..2f456ab0909b --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/tests/SessionRecords/PipelineClientLiveTests/TestGetPipeline.json @@ -0,0 +1,130 @@ +{ + "Entries": [ + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/pipelines?api-version=2019-06-01-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.Artifacts/1.0.0-dev.20200528.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "33fb91d27c5a3010474b58bf2270acbd", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Length": "623", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 29 May 2020 05:51:01 GMT", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "x-ms-client-request-id": "33fb91d27c5a3010474b58bf2270acbd", + "x-ms-request-id": "d5cd5201-b1f1-428b-adda-9be905d2a333" + }, + "ResponseBody": { + "value": [ + { + "id": "/subscriptions/051ddeca-1ed6-4d8b-ba6f-1ff561e5f3b3/resourceGroups/zzy-test-rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/pipelines/Pipeline 1", + "name": "Pipeline 1", + "type": "Microsoft.Synapse/workspaces/pipelines", + "etag": "4200191d-0000-0100-0000-5eb8c9b40000", + "properties": { + "activities": [ + { + "name": "Notebook1", + "type": "SynapseNotebook", + "dependsOn": [], + "policy": { + "timeout": "7.00:00:00", + "retry": 0, + "retryIntervalInSeconds": 30, + "secureOutput": false, + "secureInput": false + }, + "userProperties": [], + "typeProperties": { + "notebook": { + "referenceName": "Notebook 1", + "type": "NotebookReference" + } + } + } + ], + "annotations": [] + } + } + ] + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/pipelines/Pipeline%201?api-version=2019-06-01-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-e8fe8b1a5f24f4418785075a996cf9d6-5176c3c7274cfe4f-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.Artifacts/1.0.0-dev.20200528.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "eb51ee2b1608ec5afe9637bbb301e7f3", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "611", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 29 May 2020 05:51:01 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": [ + "Microsoft-IIS/10.0", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-client-request-id": "eb51ee2b1608ec5afe9637bbb301e7f3", + "x-ms-correlation-request-id": "845123fc-6889-47a9-8078-98e147bbbe9c", + "x-ms-request-id": "cc2399d3-052c-489b-a968-e2dd7463a18d", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": { + "id": "/subscriptions/051ddeca-1ed6-4d8b-ba6f-1ff561e5f3b3/resourceGroups/zzy-test-rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/pipelines/Pipeline 1", + "name": "Pipeline 1", + "type": "Microsoft.Synapse/workspaces/pipelines", + "properties": { + "activities": [ + { + "name": "Notebook1", + "type": "SynapseNotebook", + "dependsOn": [], + "policy": { + "timeout": "7.00:00:00", + "retry": 0, + "retryIntervalInSeconds": 30, + "secureOutput": false, + "secureInput": false + }, + "userProperties": [], + "typeProperties": { + "notebook": { + "referenceName": "Notebook 1", + "type": "NotebookReference" + } + } + } + ], + "annotations": [] + }, + "etag": "4200191d-0000-0100-0000-5eb8c9b40000" + } + } + ], + "Variables": { + "AZURE_SYNAPSE_WORKSPACE_URL": "https://testsynapseworkspace.dev.azuresynapse.net", + "RandomSeed": "1947362839" + } +} \ No newline at end of file diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/tests/SessionRecords/PipelineClientLiveTests/TestGetPipelineAsync.json b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/tests/SessionRecords/PipelineClientLiveTests/TestGetPipelineAsync.json new file mode 100644 index 000000000000..74370ac587b1 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/tests/SessionRecords/PipelineClientLiveTests/TestGetPipelineAsync.json @@ -0,0 +1,130 @@ +{ + "Entries": [ + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/pipelines?api-version=2019-06-01-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.Artifacts/1.0.0-dev.20200528.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "fdc6e542e37e5e08c973bcea091afcd3", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Length": "623", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 29 May 2020 05:51:02 GMT", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "x-ms-client-request-id": "fdc6e542e37e5e08c973bcea091afcd3", + "x-ms-request-id": "b5dc358e-42eb-4e15-83d6-421b05e4c7a1" + }, + "ResponseBody": { + "value": [ + { + "id": "/subscriptions/051ddeca-1ed6-4d8b-ba6f-1ff561e5f3b3/resourceGroups/zzy-test-rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/pipelines/Pipeline 1", + "name": "Pipeline 1", + "type": "Microsoft.Synapse/workspaces/pipelines", + "etag": "4200191d-0000-0100-0000-5eb8c9b40000", + "properties": { + "activities": [ + { + "name": "Notebook1", + "type": "SynapseNotebook", + "dependsOn": [], + "policy": { + "timeout": "7.00:00:00", + "retry": 0, + "retryIntervalInSeconds": 30, + "secureOutput": false, + "secureInput": false + }, + "userProperties": [], + "typeProperties": { + "notebook": { + "referenceName": "Notebook 1", + "type": "NotebookReference" + } + } + } + ], + "annotations": [] + } + } + ] + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/pipelines/Pipeline%201?api-version=2019-06-01-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-549b977b582fd3488336d659caaf181e-1ddb1eda104c4249-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.Artifacts/1.0.0-dev.20200528.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "6be4bf56645b387ef2a76c787d751108", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "611", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 29 May 2020 05:51:02 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": [ + "Microsoft-IIS/10.0", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-client-request-id": "6be4bf56645b387ef2a76c787d751108", + "x-ms-correlation-request-id": "32332c07-2395-427f-80d7-e5d1284a3642", + "x-ms-request-id": "db89207e-e33d-40d3-98db-0d52273ee7db", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": { + "id": "/subscriptions/051ddeca-1ed6-4d8b-ba6f-1ff561e5f3b3/resourceGroups/zzy-test-rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/pipelines/Pipeline 1", + "name": "Pipeline 1", + "type": "Microsoft.Synapse/workspaces/pipelines", + "properties": { + "activities": [ + { + "name": "Notebook1", + "type": "SynapseNotebook", + "dependsOn": [], + "policy": { + "timeout": "7.00:00:00", + "retry": 0, + "retryIntervalInSeconds": 30, + "secureOutput": false, + "secureInput": false + }, + "userProperties": [], + "typeProperties": { + "notebook": { + "referenceName": "Notebook 1", + "type": "NotebookReference" + } + } + } + ], + "annotations": [] + }, + "etag": "4200191d-0000-0100-0000-5eb8c9b40000" + } + } + ], + "Variables": { + "AZURE_SYNAPSE_WORKSPACE_URL": "https://testsynapseworkspace.dev.azuresynapse.net", + "RandomSeed": "571412598" + } +} \ No newline at end of file diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/tests/samples/NotebookSampleSnippets.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/tests/samples/NotebookSampleSnippets.cs new file mode 100644 index 000000000000..da2fb70855df --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/tests/samples/NotebookSampleSnippets.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using Azure.Analytics.Synapse.Samples; +using Azure.Identity; +using NUnit.Framework; +using System.Collections.Generic; +using Azure.Analytics.Synapse.Artifacts.Models; + +namespace Azure.Analytics.Synapse.Artifacts.Samples +{ + public partial class NotebookSnippets : SampleFixture + { + private NotebookClient notebookClient; + + [OneTimeSetUp] + public void CreateClient() + { + // Environment variable with the Synapse workspace endpoint. + string workspaceUrl = TestEnvironment.WorkspaceUrl; + + #region Snippet:CreateNotebookClient + // Create a new notebook client using the default credential from Azure.Identity using environment variables previously set, + // including AZURE_CLIENT_ID, AZURE_CLIENT_SECRET, and AZURE_TENANT_ID. + NotebookClient client = new NotebookClient(endpoint: new Uri(workspaceUrl), credential: new DefaultAzureCredential()); + #endregion + + this.notebookClient = client; + } + + [Test] + public void CreateNotebook() + { + #region Snippet:CreateNotebook + Notebook notebook = new Notebook( + new NotebookMetadata + { + LanguageInfo = new NotebookLanguageInfo(name: "Python") + }, + nbformat: 4, + nbformatMinor: 2, + new List() + ); + NotebookResource createdNotebook = notebookClient.CreateOrUpdateNotebook("MyNotebook", new NotebookResource(notebook)); + #endregion + } + + [Test] + public void RetrieveNotebook() + { + #region Snippet:RetrieveNotebook + NotebookResource notebook = notebookClient.GetNotebook("MyNotebook"); + #endregion + } + + [Test] + public void ListNotebooks() + { + #region Snippet:ListNotebooks + Pageable notebooks = notebookClient.GetNotebooksByWorkspace(); + foreach (NotebookResource notebook in notebooks) + { + System.Console.WriteLine(notebook.Name); + } + #endregion + } + + [Test] + public void DeleteNotebook() + { + #region Snippet:DeleteNotebook + notebookClient.DeleteNotebook("MyNotebook"); + #endregion + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Shared/src/Azure.Analytics.Synapse.Shared.projitems b/sdk/synapse/Azure.Analytics.Synapse.Shared/src/Azure.Analytics.Synapse.Shared.projitems new file mode 100644 index 000000000000..172d51588ecf --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Shared/src/Azure.Analytics.Synapse.Shared.projitems @@ -0,0 +1,17 @@ + + + + $(MSBuildAllProjects);$(MSBuildThisFileFullPath) + true + 6742c536-bd25-45d9-9296-e43f03ba888d + + + Azure.Analytics.Synapse + + + + + + + + \ No newline at end of file diff --git a/sdk/synapse/Azure.Analytics.Synapse.Shared/src/Azure.Analytics.Synapse.Shared.shproj b/sdk/synapse/Azure.Analytics.Synapse.Shared/src/Azure.Analytics.Synapse.Shared.shproj new file mode 100644 index 000000000000..a93b8abce831 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Shared/src/Azure.Analytics.Synapse.Shared.shproj @@ -0,0 +1,14 @@ + + + + 6742c536-bd25-45d9-9296-e43f03ba888d + 14.0 + + + + + + + + + diff --git a/sdk/synapse/Azure.Analytics.Synapse.Shared/src/SynapseClientPipeline.cs b/sdk/synapse/Azure.Analytics.Synapse.Shared/src/SynapseClientPipeline.cs new file mode 100644 index 000000000000..8889a15d367b --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Shared/src/SynapseClientPipeline.cs @@ -0,0 +1,18 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.Analytics.Synapse +{ + internal static class SynapseClientPipeline + { + private const string DefaultScope = "https://dev.azuresynapse.net/.default"; + + public static HttpPipeline Build(ClientOptions options, TokenCredential credential) + { + return HttpPipelineBuilder.Build(options, new BearerTokenAuthenticationPolicy(credential, DefaultScope)); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Shared/tests/Azure.Analytics.Synapse.Shared.Tests.projitems b/sdk/synapse/Azure.Analytics.Synapse.Shared/tests/Azure.Analytics.Synapse.Shared.Tests.projitems new file mode 100644 index 000000000000..49a699771a51 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Shared/tests/Azure.Analytics.Synapse.Shared.Tests.projitems @@ -0,0 +1,17 @@ + + + + $(MSBuildAllProjects);$(MSBuildThisFileFullPath) + true + 1afa2644-a1d9-419f-b87d-9b519b673f24 + + + Azure.Security.KeyVault.Tests + + + + + + + + \ No newline at end of file diff --git a/sdk/synapse/Azure.Analytics.Synapse.Shared/tests/Azure.Analytics.Synapse.Shared.Tests.shproj b/sdk/synapse/Azure.Analytics.Synapse.Shared/tests/Azure.Analytics.Synapse.Shared.Tests.shproj new file mode 100644 index 000000000000..f1588c67ce0a --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Shared/tests/Azure.Analytics.Synapse.Shared.Tests.shproj @@ -0,0 +1,13 @@ + + + + 1afa2644-a1d9-419f-b87d-9b519b673f24 + 14.0 + + + + + + + + diff --git a/sdk/synapse/Azure.Analytics.Synapse.Shared/tests/SampleFixture.cs b/sdk/synapse/Azure.Analytics.Synapse.Shared/tests/SampleFixture.cs new file mode 100644 index 000000000000..e0f0bfd47807 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Shared/tests/SampleFixture.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure.Analytics.Synapse.Tests; +using Azure.Core.TestFramework; +using NUnit.Framework; + +namespace Azure.Analytics.Synapse.Samples +{ + [LiveOnly] + [NonParallelizable] + public class SampleFixture: SamplesBase + { + private SynapseTestEventListener _listener; + + [SetUp] + public void SetUp() => _listener = new SynapseTestEventListener(); + + [TearDown] + public void TearDown() => _listener?.Dispose(); + } + +#pragma warning disable SA1402 // File may only contain a single type + public partial class SubmitSparkJob : SampleFixture { } + public partial class ExecuteSparkStatement : SampleFixture { } + public partial class AddAndRemoveRoleAssignment : SampleFixture { } +#pragma warning restore SA1402 // File may only contain a single type +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Shared/tests/SynapseTestEnvironment.cs b/sdk/synapse/Azure.Analytics.Synapse.Shared/tests/SynapseTestEnvironment.cs new file mode 100644 index 000000000000..4d246054a3e9 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Shared/tests/SynapseTestEnvironment.cs @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + + +using Azure.Core.TestFramework; + +namespace Azure.Analytics.Synapse.Tests +{ + public class SynapseTestEnvironment : TestEnvironment + { + public SynapseTestEnvironment() : base("synapse") + { + } + + public string WorkspaceUrl => GetRecordedVariable("AZURE_SYNAPSE_WORKSPACE_URL"); + public string SparkPoolName => GetRecordedVariable("AZURE_SYNAPSE_SPARK_POOL_NAME"); + public string StorageAccountName => GetRecordedVariable("AZURE_STORAGE_ACCOUNT_NAME"); + public string StorageFileSystemName => GetRecordedVariable("AZURE_STORAGE_FILE_SYSTEM_NAME"); + public string PrincipalId => GetRecordedVariable("AZURE_SYNAPSE_PRINCIPAL_ID"); + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Shared/tests/SynapseTestEventListener.cs b/sdk/synapse/Azure.Analytics.Synapse.Shared/tests/SynapseTestEventListener.cs new file mode 100644 index 000000000000..2cddb1f6aed9 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Shared/tests/SynapseTestEventListener.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Diagnostics.Tracing; +using Azure.Core.Diagnostics; + +namespace Azure.Analytics.Synapse.Tests +{ + /// + /// Wraps an when running live tests. + /// + internal class SynapseTestEventListener : IDisposable + { + private AzureEventSourceListener _listener; + + /// + /// Creates a new instance of the class. + /// + public SynapseTestEventListener() + { + // Log responses when running live tests for diagnostics. + if ("Live".Equals(Environment.GetEnvironmentVariable("AZURE_SYNAPSE_TEST_MODE"), StringComparison.OrdinalIgnoreCase)) + { + _listener = AzureEventSourceListener.CreateConsoleLogger(EventLevel.Verbose); + } + } + + /// + public void Dispose() + { + if (_listener != null) + { + _listener.Dispose(); + _listener = null; + } + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Shared/tests/SynapseTestUtilities.cs b/sdk/synapse/Azure.Analytics.Synapse.Shared/tests/SynapseTestUtilities.cs new file mode 100644 index 000000000000..b792cc7feed6 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Shared/tests/SynapseTestUtilities.cs @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading; +using Azure.Core.TestFramework; + +namespace Azure.Analytics.Synapse.Tests +{ + /// + /// Test utilities. + /// + internal static class SynapseTestUtilities + { + /// + /// Text replacement rules. + /// Key is real data to be replaced while value is the replacement. + /// + private static readonly Dictionary textReplacementRules; + + static SynapseTestUtilities() + { + textReplacementRules = new Dictionary(); + } + + /// + /// Add a single text replacement rule. + /// + /// + /// + internal static void AddTextReplacementRule(this TestRecording recording, string regex, string replacement) + { + if (string.IsNullOrEmpty(regex)) + { + throw new ArgumentException($"String cannot be of zero length. Parameter name: {nameof(regex)}"); + } + + textReplacementRules.Add(regex, replacement); + } + + /// + /// Clear text replacement rules. + /// + internal static void ClearTextReplacementRules(this TestRecording recording) + { + textReplacementRules.Clear(); + } + + /// + /// Apply text replacement rules. + /// + /// + /// + internal static string ApplyTextReplacementRules(string line) + { + foreach (var rule in textReplacementRules) + { + line = line.Replace(rule.Key, rule.Value); + } + + return line; + } + + internal static string GenerateName(this TestRecording recording, string prefix) + { + return prefix + recording.GenerateId(); + } + + internal static void RewriteSessionRecords(this TestRecording recording, string recordedFilePath) + { + if (recording.Mode == RecordedTestMode.Record) + { + if (File.Exists(recordedFilePath)) + { + var lines = File.ReadAllLines(recordedFilePath).Select(ApplyTextReplacementRules); + File.WriteAllLines(recordedFilePath, lines); + } + } + } + + /// + /// Wait for the specified span unless we are in mock playback mode. + /// + /// The span of time to wait for. + internal static void Wait(this TestRecording recording, TimeSpan timeout) + { + if (recording.Mode != RecordedTestMode.Playback) + { + Thread.Sleep(timeout); + } + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Spark/CHANGELOG.md b/sdk/synapse/Azure.Analytics.Synapse.Spark/CHANGELOG.md new file mode 100644 index 000000000000..6bb129c6bb9a --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Spark/CHANGELOG.md @@ -0,0 +1,4 @@ +# Release History + +## 1.0.0-preview.1 (Unreleased) +- Initial release diff --git a/sdk/synapse/Azure.Analytics.Synapse.Spark/Directory.Build.props b/sdk/synapse/Azure.Analytics.Synapse.Spark/Directory.Build.props new file mode 100644 index 000000000000..1a9611bd4924 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Spark/Directory.Build.props @@ -0,0 +1,6 @@ + + + + diff --git a/sdk/synapse/Azure.Analytics.Synapse.Spark/README.md b/sdk/synapse/Azure.Analytics.Synapse.Spark/README.md new file mode 100644 index 000000000000..5be6f2de5d39 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Spark/README.md @@ -0,0 +1,124 @@ +# Azure Synapse Spark client library for .NET + +This directory contains the open source subset of the .NET SDK. For documentation of the complete Azure SDK, please see the [Microsoft Azure .NET Developer Center](http://azure.microsoft.com/en-us/develop/net/). + +Use the client library for Synapse to: + +- Submit Spark Batch job and Spark Session Job + +Azure Synapse is a limitless analytics service that brings together enterprise data warehousing and Big Data analytics. It gives you the freedom to query data on your terms, using either serverless on-demand or provisioned resources—at scale. Azure Synapse brings these two worlds together with a unified experience to ingest, prepare, manage, and serve data for immediate BI and machine learning needs. + +## Getting started + +The complete Microsoft Azure SDK can be downloaded from the [Microsoft Azure Downloads Page](http://azure.microsoft.com/en-us/downloads/?sdk=net) and ships with support for building deployment packages, integrating with tooling, rich command line tooling, and more. + +For the best development experience, developers should use the official Microsoft NuGet packages for libraries. NuGet packages are regularly updated with new functionality and hotfixes. + +### Install the package +Install the Spark client library for Azure Synapse Analytics for .NET with [NuGet][nuget]: + +```PowerShell +dotnet add package Azure.Analytics.Synapse.Spark --version 0.1.0-preview.1 +``` + +### Prerequisites +* An [Azure subscription][azure_sub]. +* An existing Azure Synapse workspace. If you need to create an Azure Synapse workspace, you can use the Azure Portal or [Azure CLI][azure_cli]. + +If you use the Azure CLI, the command looks like below: + +```PowerShell +az synapse workspace create \ + --name \ + --resource-group \ + --storage-account \ + --file-system \ + --sql-admin-login-user \ + --sql-admin-login-password \ + --location +``` + +### Authenticate the client +In order to interact with the Azure Synapse Analytics service, you'll need to create an instance of the [SparkBatchClient][spark_batch_client_class] or [SparkSessionClient][spark_session_client_class] class. You need a **workspace endpoint**, which you may see as "Development endpoint" in the portal, + and **client secret credentials (client id, client secret, tenant id)** to instantiate a client object. + +Client secret credential authentication is being used in this getting started section but you can find more ways to authenticate with [Azure identity][azure_identity]. To use the [DefaultAzureCredential][DefaultAzureCredential] provider shown below, +or other credential providers provided with the Azure SDK, you should install the Azure.Identity package: + +```PowerShell +Install-Package Azure.Identity +``` + +## Examples +The Microsoft.Azure.Synapse supports the CRUD of spark batch job. + +### Spark Batch Job examples +* [List spark batch job](#list-spark-batch-job) +* [Create spark batch job](#create-spark-batch-job) +* [Delete spark batch job](#delete-spark-batch-job) + +### List spark batch job +List the spark batch job under the specific spark pool of a specific synapse workspace + +```C# Snippet:ListSparkBatchJobs +Response jobs = batchClient.GetSparkBatchJobs(); +foreach (SparkBatchJob job in jobs.Value.Sessions) +{ + Console.WriteLine(job.Name); +} +``` + +### Create spark batch job +Create spark batch job under specific workspace and spark pool. + +```C# Snippet:CreateBatchJob +string name = $"batchSample"; +string file = string.Format("abfss://{0}@{1}.dfs.core.windows.net/samples/java/wordcount/wordcount.jar", fileSystem, storageAccount); +SparkBatchJobOptions options = new SparkBatchJobOptions(name: name, file: file) +{ + ClassName = "WordCount", + Arguments = new List + { + string.Format("abfss://{0}@{1}.dfs.core.windows.net/samples/java/wordcount/shakespeare.txt", fileSystem, storageAccount), + string.Format("abfss://{0}@{1}.dfs.core.windows.net/samples/java/wordcount/result/", fileSystem, storageAccount), + }, + DriverMemory = "28g", + DriverCores = 4, + ExecutorMemory = "28g", + ExecutorCores = 4, + ExecutorCount = 2 +}; + +SparkBatchJob jobCreated = batchClient.CreateSparkBatchJob(options); +``` + +### Cancel spark batch job +Cancel a Spark batch job with Spark batch id under specific workspace and Spark pool. + +```C# Snippet:DeleteSparkBatchJob +Response operation = batchClient.CancelSparkBatchJob(jobId); +``` + +## To build + +For information on building the Azure Synapse client library, please see [Building the Microsoft Azure SDK for .NET](https://github.com/azure/azure-sdk-for-net#to-build) + +## Target frameworks + +For information about the target frameworks of the Azure Synapse client library, please refer to the [Target Frameworks](https://github.com/azure/azure-sdk-for-net#target-frameworks) of the Microsoft Azure SDK for .NET. + +## Key concepts + +Submit Spark job. + +## Troubleshooting + +Please open issue in github. + +## Next steps + +The next step is adding more examples + +## Contributing + +This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. diff --git a/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Azure.Analytics.Synapse.Spark.csproj b/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Azure.Analytics.Synapse.Spark.csproj new file mode 100644 index 000000000000..7deef9952cba --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Azure.Analytics.Synapse.Spark.csproj @@ -0,0 +1,45 @@ + + + This is the Microsoft Azure Synapse Analytics Spark client library + Azure.Analytics.Synapse.Spark + 1.0.0-preview.1 + Microsoft Azure Synapse Spark;$(PackageCommonTags) + $(RequiredTargetFrameworks) + false + + + $(NoWarn); + SA1649; + CA1812; + + CS1591; + + + Azure.Analytics.Synapse.Spark + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Customization/Models/ErrorSource.cs b/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Customization/Models/ErrorSource.cs new file mode 100644 index 000000000000..d049cd7b7cb1 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Customization/Models/ErrorSource.cs @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure.Core; +using System; + +namespace Azure.Analytics.Synapse.Spark.Models +{ + /// The ErrorSource. + [CodeGenModel("SparkErrorSource")] + public readonly partial struct SparkErrorSource : IEquatable + { + /// Determines if two values are the same. + public SparkErrorSource(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SystemValue = "System"; + private const string UserValue = "User"; + private const string UnknownValue = "Unknown"; + private const string DependencyValue = "Dependency"; + + /// System. + [CodeGenMember("System")] + public static SparkErrorSource SystemError { get; } = new SparkErrorSource(SystemValue); + /// User. + [CodeGenMember("User")] + public static SparkErrorSource UserError { get; } = new SparkErrorSource(UserValue); + /// Unknown. + [CodeGenMember("Unknown")] + public static SparkErrorSource UnknownError { get; } = new SparkErrorSource(UnknownValue); + /// Dependency. + [CodeGenMember("Dependency")] + public static SparkErrorSource DependencyError { get; } = new SparkErrorSource(DependencyValue); + + /// + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SparkErrorSource other && Equals(other); + /// + public bool Equals(SparkErrorSource other) => string.Equals(_value, other._value, System.StringComparison.Ordinal); + + /// + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Customization/SparkBatchClient.cs b/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Customization/SparkBatchClient.cs new file mode 100644 index 000000000000..932fc243a543 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Customization/SparkBatchClient.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.Analytics.Synapse.Spark +{ + public partial class SparkBatchClient + { + /// + /// Initializes a new instance of the . + /// + public SparkBatchClient(Uri endpoint, string sparkPoolName, TokenCredential credential) + : this(endpoint, sparkPoolName, credential, SparkClientOptions.Default) + { + } + + /// + /// Initializes a new instance of the . + /// + public SparkBatchClient(Uri endpoint, string sparkPoolName, TokenCredential credential, SparkClientOptions options) + : this(new ClientDiagnostics(options), + SynapseClientPipeline.Build(options, credential), + endpoint.ToString(), + sparkPoolName, + options.VersionString) + { + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Customization/SparkClientOptions.cs b/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Customization/SparkClientOptions.cs new file mode 100644 index 000000000000..bef1c4c7a67d --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Customization/SparkClientOptions.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure.Core; +using System; + +namespace Azure.Analytics.Synapse.Spark +{ + /// + /// The options for and . + /// + public class SparkClientOptions : ClientOptions + { + private const ServiceVersion Latest = ServiceVersion.V2019_11_01_preview; + + internal static SparkClientOptions Default { get; } = new SparkClientOptions(); + + /// + /// Initializes a new instance of the . + /// + public SparkClientOptions(ServiceVersion serviceVersion = Latest) + { + VersionString = serviceVersion switch + { + ServiceVersion.V2019_11_01_preview => "2019-11-01-preview", + _ => throw new ArgumentOutOfRangeException(nameof(serviceVersion)) + }; + } + + /// + /// API version for Spark job service. + /// + internal string VersionString { get; } + + /// + /// The Synapse service version. + /// + public enum ServiceVersion + { + /// + /// The 2019-06-01-preview of the template service. + /// +#pragma warning disable CA1707 + V2019_11_01_preview = 1 +#pragma warning restore CA1707 + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Customization/SparkSessionClient.cs b/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Customization/SparkSessionClient.cs new file mode 100644 index 000000000000..6edf837eb63e --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Customization/SparkSessionClient.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.Analytics.Synapse.Spark +{ + public partial class SparkSessionClient + { + /// + /// Initializes a new instance of the . + /// + public SparkSessionClient(Uri endpoint, string sparkPoolName, TokenCredential credential) + : this(endpoint, sparkPoolName, credential, SparkClientOptions.Default) + { + } + + /// + /// Initializes a new instance of the . + /// + public SparkSessionClient(Uri endpoint, string sparkPoolName, TokenCredential credential, SparkClientOptions options) + : this(new ClientDiagnostics(options), + SynapseClientPipeline.Build(options, credential), + endpoint.ToString(), + sparkPoolName, + options.VersionString) + { + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/PluginCurrentState.cs b/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/PluginCurrentState.cs new file mode 100644 index 000000000000..758b7cd76003 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/PluginCurrentState.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Analytics.Synapse.Spark.Models +{ + /// The PluginCurrentState. + public readonly partial struct PluginCurrentState : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + public PluginCurrentState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string PreparationValue = "Preparation"; + private const string ResourceAcquisitionValue = "ResourceAcquisition"; + private const string QueuedValue = "Queued"; + private const string SubmissionValue = "Submission"; + private const string MonitoringValue = "Monitoring"; + private const string CleanupValue = "Cleanup"; + private const string EndedValue = "Ended"; + + /// Preparation. + public static PluginCurrentState Preparation { get; } = new PluginCurrentState(PreparationValue); + /// ResourceAcquisition. + public static PluginCurrentState ResourceAcquisition { get; } = new PluginCurrentState(ResourceAcquisitionValue); + /// Queued. + public static PluginCurrentState Queued { get; } = new PluginCurrentState(QueuedValue); + /// Submission. + public static PluginCurrentState Submission { get; } = new PluginCurrentState(SubmissionValue); + /// Monitoring. + public static PluginCurrentState Monitoring { get; } = new PluginCurrentState(MonitoringValue); + /// Cleanup. + public static PluginCurrentState Cleanup { get; } = new PluginCurrentState(CleanupValue); + /// Ended. + public static PluginCurrentState Ended { get; } = new PluginCurrentState(EndedValue); + /// Determines if two values are the same. + public static bool operator ==(PluginCurrentState left, PluginCurrentState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(PluginCurrentState left, PluginCurrentState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator PluginCurrentState(string value) => new PluginCurrentState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is PluginCurrentState other && Equals(other); + /// + public bool Equals(PluginCurrentState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SchedulerCurrentState.cs b/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SchedulerCurrentState.cs new file mode 100644 index 000000000000..2fcae28711d7 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SchedulerCurrentState.cs @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Analytics.Synapse.Spark.Models +{ + /// The SchedulerCurrentState. + public readonly partial struct SchedulerCurrentState : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + public SchedulerCurrentState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string QueuedValue = "Queued"; + private const string ScheduledValue = "Scheduled"; + private const string EndedValue = "Ended"; + + /// Queued. + public static SchedulerCurrentState Queued { get; } = new SchedulerCurrentState(QueuedValue); + /// Scheduled. + public static SchedulerCurrentState Scheduled { get; } = new SchedulerCurrentState(ScheduledValue); + /// Ended. + public static SchedulerCurrentState Ended { get; } = new SchedulerCurrentState(EndedValue); + /// Determines if two values are the same. + public static bool operator ==(SchedulerCurrentState left, SchedulerCurrentState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SchedulerCurrentState left, SchedulerCurrentState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator SchedulerCurrentState(string value) => new SchedulerCurrentState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SchedulerCurrentState other && Equals(other); + /// + public bool Equals(SchedulerCurrentState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SparkBatchJob.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SparkBatchJob.Serialization.cs new file mode 100644 index 000000000000..27874007f290 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SparkBatchJob.Serialization.cs @@ -0,0 +1,248 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Spark.Models +{ + public partial class SparkBatchJob + { + internal static SparkBatchJob DeserializeSparkBatchJob(JsonElement element) + { + SparkBatchJobState livyInfo = default; + string name = default; + string workspaceName = default; + string sparkPoolName = default; + string submitterName = default; + string submitterId = default; + string artifactId = default; + SparkJobType? jobType = default; + SparkBatchJobResultType? result = default; + SparkScheduler schedulerInfo = default; + SparkServicePlugin pluginInfo = default; + IReadOnlyList errorInfo = default; + IReadOnlyDictionary tags = default; + int id = default; + string appId = default; + IReadOnlyDictionary appInfo = default; + string state = default; + IReadOnlyList log = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("livyInfo")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + livyInfo = SparkBatchJobState.DeserializeSparkBatchJobState(property.Value); + continue; + } + if (property.NameEquals("name")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("workspaceName")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + workspaceName = property.Value.GetString(); + continue; + } + if (property.NameEquals("sparkPoolName")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sparkPoolName = property.Value.GetString(); + continue; + } + if (property.NameEquals("submitterName")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + submitterName = property.Value.GetString(); + continue; + } + if (property.NameEquals("submitterId")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + submitterId = property.Value.GetString(); + continue; + } + if (property.NameEquals("artifactId")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + artifactId = property.Value.GetString(); + continue; + } + if (property.NameEquals("jobType")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + jobType = new SparkJobType(property.Value.GetString()); + continue; + } + if (property.NameEquals("result")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + result = new SparkBatchJobResultType(property.Value.GetString()); + continue; + } + if (property.NameEquals("schedulerInfo")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + schedulerInfo = SparkScheduler.DeserializeSparkScheduler(property.Value); + continue; + } + if (property.NameEquals("pluginInfo")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + pluginInfo = SparkServicePlugin.DeserializeSparkServicePlugin(property.Value); + continue; + } + if (property.NameEquals("errorInfo")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(SparkServiceError.DeserializeSparkServiceError(item)); + } + } + errorInfo = array; + continue; + } + if (property.NameEquals("tags")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + } + tags = dictionary; + continue; + } + if (property.NameEquals("id")) + { + id = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("appId")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + appId = property.Value.GetString(); + continue; + } + if (property.NameEquals("appInfo")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + } + appInfo = dictionary; + continue; + } + if (property.NameEquals("state")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + state = property.Value.GetString(); + continue; + } + if (property.NameEquals("log")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetString()); + } + } + log = array; + continue; + } + } + return new SparkBatchJob(livyInfo, name, workspaceName, sparkPoolName, submitterName, submitterId, artifactId, jobType, result, schedulerInfo, pluginInfo, errorInfo, tags, id, appId, appInfo, state, log); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SparkBatchJob.cs b/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SparkBatchJob.cs new file mode 100644 index 000000000000..25b45e2330b5 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SparkBatchJob.cs @@ -0,0 +1,99 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Spark.Models +{ + /// The SparkBatchJob. + public partial class SparkBatchJob + { + /// Initializes a new instance of SparkBatchJob. + /// The session Id. + internal SparkBatchJob(int id) + { + Id = id; + } + + /// Initializes a new instance of SparkBatchJob. + /// . + /// The batch name. + /// The workspace name. + /// The Spark pool name. + /// The submitter name. + /// The submitter identifier. + /// The artifact identifier. + /// The job type. + /// The Spark batch job result. + /// The scheduler information. + /// The plugin information. + /// The error information. + /// The tags. + /// The session Id. + /// The application id of this session. + /// The detailed application info. + /// The batch state. + /// The log lines. + internal SparkBatchJob(SparkBatchJobState livyInfo, string name, string workspaceName, string sparkPoolName, string submitterName, string submitterId, string artifactId, SparkJobType? jobType, SparkBatchJobResultType? result, SparkScheduler scheduler, SparkServicePlugin plugin, IReadOnlyList errors, IReadOnlyDictionary tags, int id, string appId, IReadOnlyDictionary appInfo, string state, IReadOnlyList logLines) + { + LivyInfo = livyInfo; + Name = name; + WorkspaceName = workspaceName; + SparkPoolName = sparkPoolName; + SubmitterName = submitterName; + SubmitterId = submitterId; + ArtifactId = artifactId; + JobType = jobType; + Result = result; + Scheduler = scheduler; + Plugin = plugin; + Errors = errors; + Tags = tags; + Id = id; + AppId = appId; + AppInfo = appInfo; + State = state; + LogLines = logLines; + } + + public SparkBatchJobState LivyInfo { get; } + /// The batch name. + public string Name { get; } + /// The workspace name. + public string WorkspaceName { get; } + /// The Spark pool name. + public string SparkPoolName { get; } + /// The submitter name. + public string SubmitterName { get; } + /// The submitter identifier. + public string SubmitterId { get; } + /// The artifact identifier. + public string ArtifactId { get; } + /// The job type. + public SparkJobType? JobType { get; } + /// The Spark batch job result. + public SparkBatchJobResultType? Result { get; } + /// The scheduler information. + public SparkScheduler Scheduler { get; } + /// The plugin information. + public SparkServicePlugin Plugin { get; } + /// The error information. + public IReadOnlyList Errors { get; } + /// The tags. + public IReadOnlyDictionary Tags { get; } + /// The session Id. + public int Id { get; } + /// The application id of this session. + public string AppId { get; } + /// The detailed application info. + public IReadOnlyDictionary AppInfo { get; } + /// The batch state. + public string State { get; } + /// The log lines. + public IReadOnlyList LogLines { get; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SparkBatchJobCollection.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SparkBatchJobCollection.Serialization.cs new file mode 100644 index 000000000000..15512f0eb101 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SparkBatchJobCollection.Serialization.cs @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Spark.Models +{ + public partial class SparkBatchJobCollection + { + internal static SparkBatchJobCollection DeserializeSparkBatchJobCollection(JsonElement element) + { + int @from = default; + int total = default; + IReadOnlyList sessions = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("from")) + { + @from = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("total")) + { + total = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("sessions")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(SparkBatchJob.DeserializeSparkBatchJob(item)); + } + } + sessions = array; + continue; + } + } + return new SparkBatchJobCollection(@from, total, sessions); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SparkBatchJobCollection.cs b/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SparkBatchJobCollection.cs new file mode 100644 index 000000000000..d93e318a124b --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SparkBatchJobCollection.cs @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Spark.Models +{ + /// Response for batch list operation. + public partial class SparkBatchJobCollection + { + /// Initializes a new instance of SparkBatchJobCollection. + /// The start index of fetched sessions. + /// Number of sessions fetched. + internal SparkBatchJobCollection(int @from, int total) + { + From = @from; + Total = total; + } + + /// Initializes a new instance of SparkBatchJobCollection. + /// The start index of fetched sessions. + /// Number of sessions fetched. + /// Batch list. + internal SparkBatchJobCollection(int @from, int total, IReadOnlyList sessions) + { + From = @from; + Total = total; + Sessions = sessions; + } + + /// The start index of fetched sessions. + public int From { get; } + /// Number of sessions fetched. + public int Total { get; } + /// Batch list. + public IReadOnlyList Sessions { get; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SparkBatchJobOptions.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SparkBatchJobOptions.Serialization.cs new file mode 100644 index 000000000000..9cda4d8d84f4 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SparkBatchJobOptions.Serialization.cs @@ -0,0 +1,132 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Spark.Models +{ + public partial class SparkBatchJobOptions : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Tags != null) + { + writer.WritePropertyName("tags"); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (ArtifactId != null) + { + writer.WritePropertyName("artifactId"); + writer.WriteStringValue(ArtifactId); + } + writer.WritePropertyName("name"); + writer.WriteStringValue(Name); + writer.WritePropertyName("file"); + writer.WriteStringValue(File); + if (ClassName != null) + { + writer.WritePropertyName("className"); + writer.WriteStringValue(ClassName); + } + if (Arguments != null) + { + writer.WritePropertyName("args"); + writer.WriteStartArray(); + foreach (var item in Arguments) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Jars != null) + { + writer.WritePropertyName("jars"); + writer.WriteStartArray(); + foreach (var item in Jars) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (PythonFiles != null) + { + writer.WritePropertyName("pyFiles"); + writer.WriteStartArray(); + foreach (var item in PythonFiles) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Files != null) + { + writer.WritePropertyName("files"); + writer.WriteStartArray(); + foreach (var item in Files) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Archives != null) + { + writer.WritePropertyName("archives"); + writer.WriteStartArray(); + foreach (var item in Archives) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Configuration != null) + { + writer.WritePropertyName("conf"); + writer.WriteStartObject(); + foreach (var item in Configuration) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (DriverMemory != null) + { + writer.WritePropertyName("driverMemory"); + writer.WriteStringValue(DriverMemory); + } + if (DriverCores != null) + { + writer.WritePropertyName("driverCores"); + writer.WriteNumberValue(DriverCores.Value); + } + if (ExecutorMemory != null) + { + writer.WritePropertyName("executorMemory"); + writer.WriteStringValue(ExecutorMemory); + } + if (ExecutorCores != null) + { + writer.WritePropertyName("executorCores"); + writer.WriteNumberValue(ExecutorCores.Value); + } + if (ExecutorCount != null) + { + writer.WritePropertyName("numExecutors"); + writer.WriteNumberValue(ExecutorCount.Value); + } + writer.WriteEndObject(); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SparkBatchJobOptions.cs b/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SparkBatchJobOptions.cs new file mode 100644 index 000000000000..6448fa2e40c2 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SparkBatchJobOptions.cs @@ -0,0 +1,90 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Spark.Models +{ + /// The SparkBatchJobOptions. + public partial class SparkBatchJobOptions + { + /// Initializes a new instance of SparkBatchJobOptions. + /// . + /// . + public SparkBatchJobOptions(string name, string file) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (file == null) + { + throw new ArgumentNullException(nameof(file)); + } + + Name = name; + File = file; + } + + /// Initializes a new instance of SparkBatchJobOptions. + /// Dictionary of <string>. + /// . + /// . + /// . + /// . + /// . + /// . + /// . + /// . + /// . + /// Dictionary of <string>. + /// . + /// . + /// . + /// . + /// . + internal SparkBatchJobOptions(IDictionary tags, string artifactId, string name, string file, string className, IList arguments, IList jars, IList pythonFiles, IList files, IList archives, IDictionary configuration, string driverMemory, int? driverCores, string executorMemory, int? executorCores, int? executorCount) + { + Tags = tags; + ArtifactId = artifactId; + Name = name; + File = file; + ClassName = className; + Arguments = arguments; + Jars = jars; + PythonFiles = pythonFiles; + Files = files; + Archives = archives; + Configuration = configuration; + DriverMemory = driverMemory; + DriverCores = driverCores; + ExecutorMemory = executorMemory; + ExecutorCores = executorCores; + ExecutorCount = executorCount; + } + + /// Dictionary of <string>. + public IDictionary Tags { get; set; } + public string ArtifactId { get; set; } + public string Name { get; } + public string File { get; } + public string ClassName { get; set; } + public IList Arguments { get; set; } + public IList Jars { get; set; } + public IList PythonFiles { get; set; } + public IList Files { get; set; } + public IList Archives { get; set; } + /// Dictionary of <string>. + public IDictionary Configuration { get; set; } + public string DriverMemory { get; set; } + public int? DriverCores { get; set; } + public string ExecutorMemory { get; set; } + public int? ExecutorCores { get; set; } + public int? ExecutorCount { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SparkBatchJobResultType.cs b/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SparkBatchJobResultType.cs new file mode 100644 index 000000000000..2660db33a02d --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SparkBatchJobResultType.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Analytics.Synapse.Spark.Models +{ + /// The Spark batch job result. + public readonly partial struct SparkBatchJobResultType : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + public SparkBatchJobResultType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string UncertainValue = "Uncertain"; + private const string SucceededValue = "Succeeded"; + private const string FailedValue = "Failed"; + private const string CancelledValue = "Cancelled"; + + /// Uncertain. + public static SparkBatchJobResultType Uncertain { get; } = new SparkBatchJobResultType(UncertainValue); + /// Succeeded. + public static SparkBatchJobResultType Succeeded { get; } = new SparkBatchJobResultType(SucceededValue); + /// Failed. + public static SparkBatchJobResultType Failed { get; } = new SparkBatchJobResultType(FailedValue); + /// Cancelled. + public static SparkBatchJobResultType Cancelled { get; } = new SparkBatchJobResultType(CancelledValue); + /// Determines if two values are the same. + public static bool operator ==(SparkBatchJobResultType left, SparkBatchJobResultType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SparkBatchJobResultType left, SparkBatchJobResultType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator SparkBatchJobResultType(string value) => new SparkBatchJobResultType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SparkBatchJobResultType other && Equals(other); + /// + public bool Equals(SparkBatchJobResultType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SparkBatchJobState.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SparkBatchJobState.Serialization.cs new file mode 100644 index 000000000000..926cbbaefa86 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SparkBatchJobState.Serialization.cs @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Spark.Models +{ + public partial class SparkBatchJobState + { + internal static SparkBatchJobState DeserializeSparkBatchJobState(JsonElement element) + { + DateTimeOffset? notStartedAt = default; + DateTimeOffset? startingAt = default; + DateTimeOffset? runningAt = default; + DateTimeOffset? deadAt = default; + DateTimeOffset? successAt = default; + DateTimeOffset? killedAt = default; + DateTimeOffset? recoveringAt = default; + string currentState = default; + SparkRequest jobCreationRequest = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("notStartedAt")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + notStartedAt = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("startingAt")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + startingAt = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("runningAt")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + runningAt = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("deadAt")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + deadAt = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("successAt")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + successAt = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("killedAt")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + killedAt = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("recoveringAt")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + recoveringAt = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("currentState")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + currentState = property.Value.GetString(); + continue; + } + if (property.NameEquals("jobCreationRequest")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + jobCreationRequest = SparkRequest.DeserializeSparkRequest(property.Value); + continue; + } + } + return new SparkBatchJobState(notStartedAt, startingAt, runningAt, deadAt, successAt, killedAt, recoveringAt, currentState, jobCreationRequest); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SparkBatchJobState.cs b/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SparkBatchJobState.cs new file mode 100644 index 000000000000..41c7184748a5 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SparkBatchJobState.cs @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Analytics.Synapse.Spark.Models +{ + /// The SparkBatchJobState. + public partial class SparkBatchJobState + { + /// Initializes a new instance of SparkBatchJobState. + internal SparkBatchJobState() + { + } + + /// Initializes a new instance of SparkBatchJobState. + /// the time that at which "not_started" livy state was first seen. + /// the time that at which "starting" livy state was first seen. + /// the time that at which "running" livy state was first seen. + /// time that at which "dead" livy state was first seen. + /// the time that at which "success" livy state was first seen. + /// the time that at which "killed" livy state was first seen. + /// the time that at which "recovering" livy state was first seen. + /// the Spark job state. + /// . + internal SparkBatchJobState(DateTimeOffset? notStartedAt, DateTimeOffset? startingAt, DateTimeOffset? runningAt, DateTimeOffset? deadAt, DateTimeOffset? successAt, DateTimeOffset? terminatedAt, DateTimeOffset? recoveringAt, string currentState, SparkRequest jobCreationRequest) + { + NotStartedAt = notStartedAt; + StartingAt = startingAt; + RunningAt = runningAt; + DeadAt = deadAt; + SuccessAt = successAt; + TerminatedAt = terminatedAt; + RecoveringAt = recoveringAt; + CurrentState = currentState; + JobCreationRequest = jobCreationRequest; + } + + /// the time that at which "not_started" livy state was first seen. + public DateTimeOffset? NotStartedAt { get; } + /// the time that at which "starting" livy state was first seen. + public DateTimeOffset? StartingAt { get; } + /// the time that at which "running" livy state was first seen. + public DateTimeOffset? RunningAt { get; } + /// time that at which "dead" livy state was first seen. + public DateTimeOffset? DeadAt { get; } + /// the time that at which "success" livy state was first seen. + public DateTimeOffset? SuccessAt { get; } + /// the time that at which "killed" livy state was first seen. + public DateTimeOffset? TerminatedAt { get; } + /// the time that at which "recovering" livy state was first seen. + public DateTimeOffset? RecoveringAt { get; } + /// the Spark job state. + public string CurrentState { get; } + public SparkRequest JobCreationRequest { get; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SparkErrorSource.cs b/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SparkErrorSource.cs new file mode 100644 index 000000000000..70c9f168d745 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SparkErrorSource.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Analytics.Synapse.Spark.Models +{ + /// The SparkErrorSource. + public readonly partial struct SparkErrorSource : IEquatable + { + private readonly string _value; + + private const string SystemErrorValue = "System"; + private const string UserErrorValue = "User"; + private const string UnknownErrorValue = "Unknown"; + private const string DependencyErrorValue = "Dependency"; + /// Determines if two values are the same. + public static bool operator ==(SparkErrorSource left, SparkErrorSource right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SparkErrorSource left, SparkErrorSource right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator SparkErrorSource(string value) => new SparkErrorSource(value); + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SparkJobType.cs b/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SparkJobType.cs new file mode 100644 index 000000000000..65acb1b30105 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SparkJobType.cs @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Analytics.Synapse.Spark.Models +{ + /// The job type. + public readonly partial struct SparkJobType : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + public SparkJobType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SparkBatchValue = "SparkBatch"; + private const string SparkSessionValue = "SparkSession"; + + /// SparkBatch. + public static SparkJobType SparkBatch { get; } = new SparkJobType(SparkBatchValue); + /// SparkSession. + public static SparkJobType SparkSession { get; } = new SparkJobType(SparkSessionValue); + /// Determines if two values are the same. + public static bool operator ==(SparkJobType left, SparkJobType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SparkJobType left, SparkJobType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator SparkJobType(string value) => new SparkJobType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SparkJobType other && Equals(other); + /// + public bool Equals(SparkJobType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SparkRequest.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SparkRequest.Serialization.cs new file mode 100644 index 000000000000..2dbf7e596a83 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SparkRequest.Serialization.cs @@ -0,0 +1,236 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Spark.Models +{ + public partial class SparkRequest + { + internal static SparkRequest DeserializeSparkRequest(JsonElement element) + { + string name = default; + string file = default; + string className = default; + IReadOnlyList args = default; + IReadOnlyList jars = default; + IReadOnlyList pyFiles = default; + IReadOnlyList files = default; + IReadOnlyList archives = default; + IReadOnlyDictionary conf = default; + string driverMemory = default; + int? driverCores = default; + string executorMemory = default; + int? executorCores = default; + int? numExecutors = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("file")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + file = property.Value.GetString(); + continue; + } + if (property.NameEquals("className")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + className = property.Value.GetString(); + continue; + } + if (property.NameEquals("args")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetString()); + } + } + args = array; + continue; + } + if (property.NameEquals("jars")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetString()); + } + } + jars = array; + continue; + } + if (property.NameEquals("pyFiles")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetString()); + } + } + pyFiles = array; + continue; + } + if (property.NameEquals("files")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetString()); + } + } + files = array; + continue; + } + if (property.NameEquals("archives")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetString()); + } + } + archives = array; + continue; + } + if (property.NameEquals("conf")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + } + conf = dictionary; + continue; + } + if (property.NameEquals("driverMemory")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + driverMemory = property.Value.GetString(); + continue; + } + if (property.NameEquals("driverCores")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + driverCores = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("executorMemory")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + executorMemory = property.Value.GetString(); + continue; + } + if (property.NameEquals("executorCores")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + executorCores = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("numExecutors")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + numExecutors = property.Value.GetInt32(); + continue; + } + } + return new SparkRequest(name, file, className, args, jars, pyFiles, files, archives, conf, driverMemory, driverCores, executorMemory, executorCores, numExecutors); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SparkRequest.cs b/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SparkRequest.cs new file mode 100644 index 000000000000..7fa6418376d7 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SparkRequest.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Spark.Models +{ + /// The SparkRequest. + public partial class SparkRequest + { + /// Initializes a new instance of SparkRequest. + internal SparkRequest() + { + } + + /// Initializes a new instance of SparkRequest. + /// . + /// . + /// . + /// . + /// . + /// . + /// . + /// . + /// Dictionary of <string>. + /// . + /// . + /// . + /// . + /// . + internal SparkRequest(string name, string file, string className, IReadOnlyList arguments, IReadOnlyList jars, IReadOnlyList pythonFiles, IReadOnlyList files, IReadOnlyList archives, IReadOnlyDictionary configuration, string driverMemory, int? driverCores, string executorMemory, int? executorCores, int? executorCount) + { + Name = name; + File = file; + ClassName = className; + Arguments = arguments; + Jars = jars; + PythonFiles = pythonFiles; + Files = files; + Archives = archives; + Configuration = configuration; + DriverMemory = driverMemory; + DriverCores = driverCores; + ExecutorMemory = executorMemory; + ExecutorCores = executorCores; + ExecutorCount = executorCount; + } + + public string Name { get; } + public string File { get; } + public string ClassName { get; } + public IReadOnlyList Arguments { get; } + public IReadOnlyList Jars { get; } + public IReadOnlyList PythonFiles { get; } + public IReadOnlyList Files { get; } + public IReadOnlyList Archives { get; } + /// Dictionary of <string>. + public IReadOnlyDictionary Configuration { get; } + public string DriverMemory { get; } + public int? DriverCores { get; } + public string ExecutorMemory { get; } + public int? ExecutorCores { get; } + public int? ExecutorCount { get; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SparkScheduler.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SparkScheduler.Serialization.cs new file mode 100644 index 000000000000..29821f9777ff --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SparkScheduler.Serialization.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Spark.Models +{ + public partial class SparkScheduler + { + internal static SparkScheduler DeserializeSparkScheduler(JsonElement element) + { + DateTimeOffset? submittedAt = default; + DateTimeOffset? scheduledAt = default; + DateTimeOffset? endedAt = default; + DateTimeOffset? cancellationRequestedAt = default; + SchedulerCurrentState? currentState = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("submittedAt")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + submittedAt = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("scheduledAt")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + scheduledAt = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("endedAt")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + endedAt = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("cancellationRequestedAt")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + cancellationRequestedAt = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("currentState")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + currentState = new SchedulerCurrentState(property.Value.GetString()); + continue; + } + } + return new SparkScheduler(submittedAt, scheduledAt, endedAt, cancellationRequestedAt, currentState); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SparkScheduler.cs b/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SparkScheduler.cs new file mode 100644 index 000000000000..072b129979b2 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SparkScheduler.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Analytics.Synapse.Spark.Models +{ + /// The SparkScheduler. + public partial class SparkScheduler + { + /// Initializes a new instance of SparkScheduler. + internal SparkScheduler() + { + } + + /// Initializes a new instance of SparkScheduler. + /// . + /// . + /// . + /// . + /// . + internal SparkScheduler(DateTimeOffset? submittedAt, DateTimeOffset? scheduledAt, DateTimeOffset? endedAt, DateTimeOffset? cancellationRequestedAt, SchedulerCurrentState? currentState) + { + SubmittedAt = submittedAt; + ScheduledAt = scheduledAt; + EndedAt = endedAt; + CancellationRequestedAt = cancellationRequestedAt; + CurrentState = currentState; + } + + public DateTimeOffset? SubmittedAt { get; } + public DateTimeOffset? ScheduledAt { get; } + public DateTimeOffset? EndedAt { get; } + public DateTimeOffset? CancellationRequestedAt { get; } + public SchedulerCurrentState? CurrentState { get; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SparkServiceError.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SparkServiceError.Serialization.cs new file mode 100644 index 000000000000..3e134b97e3ad --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SparkServiceError.Serialization.cs @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Spark.Models +{ + public partial class SparkServiceError + { + internal static SparkServiceError DeserializeSparkServiceError(JsonElement element) + { + string message = default; + string errorCode = default; + SparkErrorSource? source = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("message")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + message = property.Value.GetString(); + continue; + } + if (property.NameEquals("errorCode")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + errorCode = property.Value.GetString(); + continue; + } + if (property.NameEquals("source")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + source = new SparkErrorSource(property.Value.GetString()); + continue; + } + } + return new SparkServiceError(message, errorCode, source); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SparkServiceError.cs b/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SparkServiceError.cs new file mode 100644 index 000000000000..b2608633c360 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SparkServiceError.cs @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Analytics.Synapse.Spark.Models +{ + /// The SparkServiceError. + public partial class SparkServiceError + { + /// Initializes a new instance of SparkServiceError. + internal SparkServiceError() + { + } + + /// Initializes a new instance of SparkServiceError. + /// . + /// . + /// . + internal SparkServiceError(string message, string errorCode, SparkErrorSource? source) + { + Message = message; + ErrorCode = errorCode; + Source = source; + } + + public string Message { get; } + public string ErrorCode { get; } + public SparkErrorSource? Source { get; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SparkServicePlugin.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SparkServicePlugin.Serialization.cs new file mode 100644 index 000000000000..d8e643491318 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SparkServicePlugin.Serialization.cs @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Spark.Models +{ + public partial class SparkServicePlugin + { + internal static SparkServicePlugin DeserializeSparkServicePlugin(JsonElement element) + { + DateTimeOffset? preparationStartedAt = default; + DateTimeOffset? resourceAcquisitionStartedAt = default; + DateTimeOffset? submissionStartedAt = default; + DateTimeOffset? monitoringStartedAt = default; + DateTimeOffset? cleanupStartedAt = default; + PluginCurrentState? currentState = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("preparationStartedAt")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + preparationStartedAt = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("resourceAcquisitionStartedAt")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + resourceAcquisitionStartedAt = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("submissionStartedAt")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + submissionStartedAt = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("monitoringStartedAt")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + monitoringStartedAt = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("cleanupStartedAt")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + cleanupStartedAt = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("currentState")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + currentState = new PluginCurrentState(property.Value.GetString()); + continue; + } + } + return new SparkServicePlugin(preparationStartedAt, resourceAcquisitionStartedAt, submissionStartedAt, monitoringStartedAt, cleanupStartedAt, currentState); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SparkServicePlugin.cs b/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SparkServicePlugin.cs new file mode 100644 index 000000000000..ed4bae6897b8 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SparkServicePlugin.cs @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Analytics.Synapse.Spark.Models +{ + /// The SparkServicePlugin. + public partial class SparkServicePlugin + { + /// Initializes a new instance of SparkServicePlugin. + internal SparkServicePlugin() + { + } + + /// Initializes a new instance of SparkServicePlugin. + /// . + /// . + /// . + /// . + /// . + /// . + internal SparkServicePlugin(DateTimeOffset? preparationStartedAt, DateTimeOffset? resourceAcquisitionStartedAt, DateTimeOffset? submissionStartedAt, DateTimeOffset? monitoringStartedAt, DateTimeOffset? cleanupStartedAt, PluginCurrentState? currentState) + { + PreparationStartedAt = preparationStartedAt; + ResourceAcquisitionStartedAt = resourceAcquisitionStartedAt; + SubmissionStartedAt = submissionStartedAt; + MonitoringStartedAt = monitoringStartedAt; + CleanupStartedAt = cleanupStartedAt; + CurrentState = currentState; + } + + public DateTimeOffset? PreparationStartedAt { get; } + public DateTimeOffset? ResourceAcquisitionStartedAt { get; } + public DateTimeOffset? SubmissionStartedAt { get; } + public DateTimeOffset? MonitoringStartedAt { get; } + public DateTimeOffset? CleanupStartedAt { get; } + public PluginCurrentState? CurrentState { get; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SparkSession.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SparkSession.Serialization.cs new file mode 100644 index 000000000000..de57d517f686 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SparkSession.Serialization.cs @@ -0,0 +1,248 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Spark.Models +{ + public partial class SparkSession + { + internal static SparkSession DeserializeSparkSession(JsonElement element) + { + SparkSessionState livyInfo = default; + string name = default; + string workspaceName = default; + string sparkPoolName = default; + string submitterName = default; + string submitterId = default; + string artifactId = default; + SparkJobType? jobType = default; + SparkSessionResultType? result = default; + SparkScheduler schedulerInfo = default; + SparkServicePlugin pluginInfo = default; + IReadOnlyList errorInfo = default; + IReadOnlyDictionary tags = default; + int id = default; + string appId = default; + IReadOnlyDictionary appInfo = default; + string state = default; + IReadOnlyList log = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("livyInfo")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + livyInfo = SparkSessionState.DeserializeSparkSessionState(property.Value); + continue; + } + if (property.NameEquals("name")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("workspaceName")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + workspaceName = property.Value.GetString(); + continue; + } + if (property.NameEquals("sparkPoolName")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sparkPoolName = property.Value.GetString(); + continue; + } + if (property.NameEquals("submitterName")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + submitterName = property.Value.GetString(); + continue; + } + if (property.NameEquals("submitterId")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + submitterId = property.Value.GetString(); + continue; + } + if (property.NameEquals("artifactId")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + artifactId = property.Value.GetString(); + continue; + } + if (property.NameEquals("jobType")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + jobType = new SparkJobType(property.Value.GetString()); + continue; + } + if (property.NameEquals("result")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + result = new SparkSessionResultType(property.Value.GetString()); + continue; + } + if (property.NameEquals("schedulerInfo")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + schedulerInfo = SparkScheduler.DeserializeSparkScheduler(property.Value); + continue; + } + if (property.NameEquals("pluginInfo")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + pluginInfo = SparkServicePlugin.DeserializeSparkServicePlugin(property.Value); + continue; + } + if (property.NameEquals("errorInfo")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(SparkServiceError.DeserializeSparkServiceError(item)); + } + } + errorInfo = array; + continue; + } + if (property.NameEquals("tags")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + } + tags = dictionary; + continue; + } + if (property.NameEquals("id")) + { + id = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("appId")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + appId = property.Value.GetString(); + continue; + } + if (property.NameEquals("appInfo")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + } + appInfo = dictionary; + continue; + } + if (property.NameEquals("state")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + state = property.Value.GetString(); + continue; + } + if (property.NameEquals("log")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetString()); + } + } + log = array; + continue; + } + } + return new SparkSession(livyInfo, name, workspaceName, sparkPoolName, submitterName, submitterId, artifactId, jobType, result, schedulerInfo, pluginInfo, errorInfo, tags, id, appId, appInfo, state, log); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SparkSession.cs b/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SparkSession.cs new file mode 100644 index 000000000000..16478f97d393 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SparkSession.cs @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Spark.Models +{ + /// The SparkSession. + public partial class SparkSession + { + /// Initializes a new instance of SparkSession. + /// . + internal SparkSession(int id) + { + Id = id; + } + + /// Initializes a new instance of SparkSession. + /// . + /// . + /// . + /// . + /// . + /// . + /// . + /// The job type. + /// . + /// . + /// . + /// The error information. + /// Dictionary of <string>. + /// . + /// . + /// Dictionary of <string>. + /// . + /// . + internal SparkSession(SparkSessionState livyInfo, string name, string workspaceName, string sparkPoolName, string submitterName, string submitterId, string artifactId, SparkJobType? jobType, SparkSessionResultType? result, SparkScheduler scheduler, SparkServicePlugin plugin, IReadOnlyList errors, IReadOnlyDictionary tags, int id, string appId, IReadOnlyDictionary appInfo, string state, IReadOnlyList logLines) + { + LivyInfo = livyInfo; + Name = name; + WorkspaceName = workspaceName; + SparkPoolName = sparkPoolName; + SubmitterName = submitterName; + SubmitterId = submitterId; + ArtifactId = artifactId; + JobType = jobType; + Result = result; + Scheduler = scheduler; + Plugin = plugin; + Errors = errors; + Tags = tags; + Id = id; + AppId = appId; + AppInfo = appInfo; + State = state; + LogLines = logLines; + } + + public SparkSessionState LivyInfo { get; } + public string Name { get; } + public string WorkspaceName { get; } + public string SparkPoolName { get; } + public string SubmitterName { get; } + public string SubmitterId { get; } + public string ArtifactId { get; } + /// The job type. + public SparkJobType? JobType { get; } + public SparkSessionResultType? Result { get; } + public SparkScheduler Scheduler { get; } + public SparkServicePlugin Plugin { get; } + /// The error information. + public IReadOnlyList Errors { get; } + /// Dictionary of <string>. + public IReadOnlyDictionary Tags { get; } + public int Id { get; } + public string AppId { get; } + /// Dictionary of <string>. + public IReadOnlyDictionary AppInfo { get; } + public string State { get; } + public IReadOnlyList LogLines { get; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SparkSessionCollection.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SparkSessionCollection.Serialization.cs new file mode 100644 index 000000000000..d78beec17e6f --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SparkSessionCollection.Serialization.cs @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Spark.Models +{ + public partial class SparkSessionCollection + { + internal static SparkSessionCollection DeserializeSparkSessionCollection(JsonElement element) + { + int @from = default; + int total = default; + IReadOnlyList sessions = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("from")) + { + @from = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("total")) + { + total = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("sessions")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(SparkSession.DeserializeSparkSession(item)); + } + } + sessions = array; + continue; + } + } + return new SparkSessionCollection(@from, total, sessions); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SparkSessionCollection.cs b/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SparkSessionCollection.cs new file mode 100644 index 000000000000..1a66e017f9ae --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SparkSessionCollection.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Spark.Models +{ + /// The SparkSessionCollection. + public partial class SparkSessionCollection + { + /// Initializes a new instance of SparkSessionCollection. + /// . + /// . + internal SparkSessionCollection(int @from, int total) + { + From = @from; + Total = total; + } + + /// Initializes a new instance of SparkSessionCollection. + /// . + /// . + /// . + internal SparkSessionCollection(int @from, int total, IReadOnlyList sessions) + { + From = @from; + Total = total; + Sessions = sessions; + } + + public int From { get; } + public int Total { get; } + public IReadOnlyList Sessions { get; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SparkSessionOptions.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SparkSessionOptions.Serialization.cs new file mode 100644 index 000000000000..f9587cfc7031 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SparkSessionOptions.Serialization.cs @@ -0,0 +1,135 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Spark.Models +{ + public partial class SparkSessionOptions : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Tags != null) + { + writer.WritePropertyName("tags"); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (ArtifactId != null) + { + writer.WritePropertyName("artifactId"); + writer.WriteStringValue(ArtifactId); + } + writer.WritePropertyName("name"); + writer.WriteStringValue(Name); + if (File != null) + { + writer.WritePropertyName("file"); + writer.WriteStringValue(File); + } + if (ClassName != null) + { + writer.WritePropertyName("className"); + writer.WriteStringValue(ClassName); + } + if (Arguments != null) + { + writer.WritePropertyName("args"); + writer.WriteStartArray(); + foreach (var item in Arguments) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Jars != null) + { + writer.WritePropertyName("jars"); + writer.WriteStartArray(); + foreach (var item in Jars) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (PythonFiles != null) + { + writer.WritePropertyName("pyFiles"); + writer.WriteStartArray(); + foreach (var item in PythonFiles) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Files != null) + { + writer.WritePropertyName("files"); + writer.WriteStartArray(); + foreach (var item in Files) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Archives != null) + { + writer.WritePropertyName("archives"); + writer.WriteStartArray(); + foreach (var item in Archives) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Configuration != null) + { + writer.WritePropertyName("conf"); + writer.WriteStartObject(); + foreach (var item in Configuration) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (DriverMemory != null) + { + writer.WritePropertyName("driverMemory"); + writer.WriteStringValue(DriverMemory); + } + if (DriverCores != null) + { + writer.WritePropertyName("driverCores"); + writer.WriteNumberValue(DriverCores.Value); + } + if (ExecutorMemory != null) + { + writer.WritePropertyName("executorMemory"); + writer.WriteStringValue(ExecutorMemory); + } + if (ExecutorCores != null) + { + writer.WritePropertyName("executorCores"); + writer.WriteNumberValue(ExecutorCores.Value); + } + if (ExecutorCount != null) + { + writer.WritePropertyName("numExecutors"); + writer.WriteNumberValue(ExecutorCount.Value); + } + writer.WriteEndObject(); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SparkSessionOptions.cs b/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SparkSessionOptions.cs new file mode 100644 index 000000000000..052438799289 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SparkSessionOptions.cs @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Spark.Models +{ + /// The SparkSessionOptions. + public partial class SparkSessionOptions + { + /// Initializes a new instance of SparkSessionOptions. + /// . + public SparkSessionOptions(string name) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + + Name = name; + } + + /// Initializes a new instance of SparkSessionOptions. + /// Dictionary of <string>. + /// . + /// . + /// . + /// . + /// . + /// . + /// . + /// . + /// . + /// Dictionary of <string>. + /// . + /// . + /// . + /// . + /// . + internal SparkSessionOptions(IDictionary tags, string artifactId, string name, string file, string className, IList arguments, IList jars, IList pythonFiles, IList files, IList archives, IDictionary configuration, string driverMemory, int? driverCores, string executorMemory, int? executorCores, int? executorCount) + { + Tags = tags; + ArtifactId = artifactId; + Name = name; + File = file; + ClassName = className; + Arguments = arguments; + Jars = jars; + PythonFiles = pythonFiles; + Files = files; + Archives = archives; + Configuration = configuration; + DriverMemory = driverMemory; + DriverCores = driverCores; + ExecutorMemory = executorMemory; + ExecutorCores = executorCores; + ExecutorCount = executorCount; + } + + /// Dictionary of <string>. + public IDictionary Tags { get; set; } + public string ArtifactId { get; set; } + public string Name { get; } + public string File { get; set; } + public string ClassName { get; set; } + public IList Arguments { get; set; } + public IList Jars { get; set; } + public IList PythonFiles { get; set; } + public IList Files { get; set; } + public IList Archives { get; set; } + /// Dictionary of <string>. + public IDictionary Configuration { get; set; } + public string DriverMemory { get; set; } + public int? DriverCores { get; set; } + public string ExecutorMemory { get; set; } + public int? ExecutorCores { get; set; } + public int? ExecutorCount { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SparkSessionResultType.cs b/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SparkSessionResultType.cs new file mode 100644 index 000000000000..3c8586ae3509 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SparkSessionResultType.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Analytics.Synapse.Spark.Models +{ + /// The SparkSessionResultType. + public readonly partial struct SparkSessionResultType : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + public SparkSessionResultType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string UncertainValue = "Uncertain"; + private const string SucceededValue = "Succeeded"; + private const string FailedValue = "Failed"; + private const string CancelledValue = "Cancelled"; + + /// Uncertain. + public static SparkSessionResultType Uncertain { get; } = new SparkSessionResultType(UncertainValue); + /// Succeeded. + public static SparkSessionResultType Succeeded { get; } = new SparkSessionResultType(SucceededValue); + /// Failed. + public static SparkSessionResultType Failed { get; } = new SparkSessionResultType(FailedValue); + /// Cancelled. + public static SparkSessionResultType Cancelled { get; } = new SparkSessionResultType(CancelledValue); + /// Determines if two values are the same. + public static bool operator ==(SparkSessionResultType left, SparkSessionResultType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SparkSessionResultType left, SparkSessionResultType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator SparkSessionResultType(string value) => new SparkSessionResultType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SparkSessionResultType other && Equals(other); + /// + public bool Equals(SparkSessionResultType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SparkSessionState.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SparkSessionState.Serialization.cs new file mode 100644 index 000000000000..8cc0884a1437 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SparkSessionState.Serialization.cs @@ -0,0 +1,134 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Spark.Models +{ + public partial class SparkSessionState + { + internal static SparkSessionState DeserializeSparkSessionState(JsonElement element) + { + DateTimeOffset? notStartedAt = default; + DateTimeOffset? startingAt = default; + DateTimeOffset? idleAt = default; + DateTimeOffset? deadAt = default; + DateTimeOffset? shuttingDownAt = default; + DateTimeOffset? killedAt = default; + DateTimeOffset? recoveringAt = default; + DateTimeOffset? busyAt = default; + DateTimeOffset? errorAt = default; + string currentState = default; + SparkRequest jobCreationRequest = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("notStartedAt")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + notStartedAt = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("startingAt")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + startingAt = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("idleAt")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + idleAt = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("deadAt")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + deadAt = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("shuttingDownAt")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + shuttingDownAt = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("killedAt")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + killedAt = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("recoveringAt")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + recoveringAt = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("busyAt")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + busyAt = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("errorAt")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + errorAt = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("currentState")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + currentState = property.Value.GetString(); + continue; + } + if (property.NameEquals("jobCreationRequest")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + jobCreationRequest = SparkRequest.DeserializeSparkRequest(property.Value); + continue; + } + } + return new SparkSessionState(notStartedAt, startingAt, idleAt, deadAt, shuttingDownAt, killedAt, recoveringAt, busyAt, errorAt, currentState, jobCreationRequest); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SparkSessionState.cs b/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SparkSessionState.cs new file mode 100644 index 000000000000..bb1f903496bd --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SparkSessionState.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Analytics.Synapse.Spark.Models +{ + /// The SparkSessionState. + public partial class SparkSessionState + { + /// Initializes a new instance of SparkSessionState. + internal SparkSessionState() + { + } + + /// Initializes a new instance of SparkSessionState. + /// . + /// . + /// . + /// . + /// . + /// the time that at which "killed" livy state was first seen. + /// . + /// . + /// . + /// . + /// . + internal SparkSessionState(DateTimeOffset? notStartedAt, DateTimeOffset? startingAt, DateTimeOffset? idleAt, DateTimeOffset? deadAt, DateTimeOffset? shuttingDownAt, DateTimeOffset? terminatedAt, DateTimeOffset? recoveringAt, DateTimeOffset? busyAt, DateTimeOffset? errorAt, string currentState, SparkRequest jobCreationRequest) + { + NotStartedAt = notStartedAt; + StartingAt = startingAt; + IdleAt = idleAt; + DeadAt = deadAt; + ShuttingDownAt = shuttingDownAt; + TerminatedAt = terminatedAt; + RecoveringAt = recoveringAt; + BusyAt = busyAt; + ErrorAt = errorAt; + CurrentState = currentState; + JobCreationRequest = jobCreationRequest; + } + + public DateTimeOffset? NotStartedAt { get; } + public DateTimeOffset? StartingAt { get; } + public DateTimeOffset? IdleAt { get; } + public DateTimeOffset? DeadAt { get; } + public DateTimeOffset? ShuttingDownAt { get; } + /// the time that at which "killed" livy state was first seen. + public DateTimeOffset? TerminatedAt { get; } + public DateTimeOffset? RecoveringAt { get; } + public DateTimeOffset? BusyAt { get; } + public DateTimeOffset? ErrorAt { get; } + public string CurrentState { get; } + public SparkRequest JobCreationRequest { get; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SparkStatement.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SparkStatement.Serialization.cs new file mode 100644 index 000000000000..660fba467812 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SparkStatement.Serialization.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Spark.Models +{ + public partial class SparkStatement + { + internal static SparkStatement DeserializeSparkStatement(JsonElement element) + { + int id = default; + string code = default; + string state = default; + SparkStatementOutput output = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id")) + { + id = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("code")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + code = property.Value.GetString(); + continue; + } + if (property.NameEquals("state")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + state = property.Value.GetString(); + continue; + } + if (property.NameEquals("output")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + output = SparkStatementOutput.DeserializeSparkStatementOutput(property.Value); + continue; + } + } + return new SparkStatement(id, code, state, output); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SparkStatement.cs b/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SparkStatement.cs new file mode 100644 index 000000000000..df2fdd6c13a2 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SparkStatement.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Analytics.Synapse.Spark.Models +{ + /// The SparkStatement. + public partial class SparkStatement + { + /// Initializes a new instance of SparkStatement. + /// . + internal SparkStatement(int id) + { + Id = id; + } + + /// Initializes a new instance of SparkStatement. + /// . + /// . + /// . + /// . + internal SparkStatement(int id, string code, string state, SparkStatementOutput output) + { + Id = id; + Code = code; + State = state; + Output = output; + } + + public int Id { get; } + public string Code { get; } + public string State { get; } + public SparkStatementOutput Output { get; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SparkStatementCancellationResult.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SparkStatementCancellationResult.Serialization.cs new file mode 100644 index 000000000000..4e04fbc385b8 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SparkStatementCancellationResult.Serialization.cs @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Spark.Models +{ + public partial class SparkStatementCancellationResult + { + internal static SparkStatementCancellationResult DeserializeSparkStatementCancellationResult(JsonElement element) + { + string msg = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("msg")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + msg = property.Value.GetString(); + continue; + } + } + return new SparkStatementCancellationResult(msg); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SparkStatementCancellationResult.cs b/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SparkStatementCancellationResult.cs new file mode 100644 index 000000000000..d5aca2a5ebaf --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SparkStatementCancellationResult.cs @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Analytics.Synapse.Spark.Models +{ + /// The SparkStatementCancellationResult. + public partial class SparkStatementCancellationResult + { + /// Initializes a new instance of SparkStatementCancellationResult. + internal SparkStatementCancellationResult() + { + } + + /// Initializes a new instance of SparkStatementCancellationResult. + /// . + internal SparkStatementCancellationResult(string msg) + { + Msg = msg; + } + + public string Msg { get; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SparkStatementCollection.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SparkStatementCollection.Serialization.cs new file mode 100644 index 000000000000..4c2773e56220 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SparkStatementCollection.Serialization.cs @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Spark.Models +{ + public partial class SparkStatementCollection + { + internal static SparkStatementCollection DeserializeSparkStatementCollection(JsonElement element) + { + int totalStatements = default; + IReadOnlyList statements = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("total_statements")) + { + totalStatements = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("statements")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(SparkStatement.DeserializeSparkStatement(item)); + } + } + statements = array; + continue; + } + } + return new SparkStatementCollection(totalStatements, statements); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SparkStatementCollection.cs b/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SparkStatementCollection.cs new file mode 100644 index 000000000000..e9cadc555d17 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SparkStatementCollection.cs @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Spark.Models +{ + /// The SparkStatementCollection. + public partial class SparkStatementCollection + { + /// Initializes a new instance of SparkStatementCollection. + /// . + internal SparkStatementCollection(int total) + { + Total = total; + } + + /// Initializes a new instance of SparkStatementCollection. + /// . + /// . + internal SparkStatementCollection(int total, IReadOnlyList statements) + { + Total = total; + Statements = statements; + } + + public int Total { get; } + public IReadOnlyList Statements { get; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SparkStatementLanguageType.cs b/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SparkStatementLanguageType.cs new file mode 100644 index 000000000000..36cd5ffa65f0 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SparkStatementLanguageType.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Analytics.Synapse.Spark.Models +{ + /// The SparkStatementLanguageType. + public readonly partial struct SparkStatementLanguageType : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + public SparkStatementLanguageType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SparkValue = "spark"; + private const string PysparkValue = "pyspark"; + private const string DotnetsparkValue = "dotnetspark"; + private const string SqlValue = "sql"; + + /// spark. + public static SparkStatementLanguageType Spark { get; } = new SparkStatementLanguageType(SparkValue); + /// pyspark. + public static SparkStatementLanguageType Pyspark { get; } = new SparkStatementLanguageType(PysparkValue); + /// dotnetspark. + public static SparkStatementLanguageType Dotnetspark { get; } = new SparkStatementLanguageType(DotnetsparkValue); + /// sql. + public static SparkStatementLanguageType Sql { get; } = new SparkStatementLanguageType(SqlValue); + /// Determines if two values are the same. + public static bool operator ==(SparkStatementLanguageType left, SparkStatementLanguageType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SparkStatementLanguageType left, SparkStatementLanguageType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator SparkStatementLanguageType(string value) => new SparkStatementLanguageType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SparkStatementLanguageType other && Equals(other); + /// + public bool Equals(SparkStatementLanguageType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SparkStatementOptions.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SparkStatementOptions.Serialization.cs new file mode 100644 index 000000000000..589a138dd484 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SparkStatementOptions.Serialization.cs @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Spark.Models +{ + public partial class SparkStatementOptions : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Code != null) + { + writer.WritePropertyName("code"); + writer.WriteStringValue(Code); + } + if (Kind != null) + { + writer.WritePropertyName("kind"); + writer.WriteStringValue(Kind.Value.ToString()); + } + writer.WriteEndObject(); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SparkStatementOptions.cs b/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SparkStatementOptions.cs new file mode 100644 index 000000000000..4221b3ad7b0d --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SparkStatementOptions.cs @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Analytics.Synapse.Spark.Models +{ + /// The SparkStatementOptions. + public partial class SparkStatementOptions + { + /// Initializes a new instance of SparkStatementOptions. + public SparkStatementOptions() + { + } + + /// Initializes a new instance of SparkStatementOptions. + /// . + /// . + internal SparkStatementOptions(string code, SparkStatementLanguageType? kind) + { + Code = code; + Kind = kind; + } + + public string Code { get; set; } + public SparkStatementLanguageType? Kind { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SparkStatementOutput.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SparkStatementOutput.Serialization.cs new file mode 100644 index 000000000000..b31c51467a3d --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SparkStatementOutput.Serialization.cs @@ -0,0 +1,92 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Spark.Models +{ + public partial class SparkStatementOutput + { + internal static SparkStatementOutput DeserializeSparkStatementOutput(JsonElement element) + { + string status = default; + int executionCount = default; + object data = default; + string ename = default; + string evalue = default; + IReadOnlyList traceback = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("status")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + status = property.Value.GetString(); + continue; + } + if (property.NameEquals("execution_count")) + { + executionCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("data")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + data = property.Value.GetObject(); + continue; + } + if (property.NameEquals("ename")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + ename = property.Value.GetString(); + continue; + } + if (property.NameEquals("evalue")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + evalue = property.Value.GetString(); + continue; + } + if (property.NameEquals("traceback")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetString()); + } + } + traceback = array; + continue; + } + } + return new SparkStatementOutput(status, executionCount, data, ename, evalue, traceback); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SparkStatementOutput.cs b/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SparkStatementOutput.cs new file mode 100644 index 000000000000..8e318e27eece --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/SparkStatementOutput.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Spark.Models +{ + /// The SparkStatementOutput. + public partial class SparkStatementOutput + { + /// Initializes a new instance of SparkStatementOutput. + /// . + internal SparkStatementOutput(int executionCount) + { + ExecutionCount = executionCount; + } + + /// Initializes a new instance of SparkStatementOutput. + /// . + /// . + /// Any object. + /// . + /// . + /// . + internal SparkStatementOutput(string status, int executionCount, object data, string errorName, string errorValue, IReadOnlyList traceback) + { + Status = status; + ExecutionCount = executionCount; + Data = data; + ErrorName = errorName; + ErrorValue = errorValue; + Traceback = traceback; + } + + public string Status { get; } + public int ExecutionCount { get; } + /// Any object. + public object Data { get; } + public string ErrorName { get; } + public string ErrorValue { get; } + public IReadOnlyList Traceback { get; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/SparkBatchClient.cs b/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/SparkBatchClient.cs new file mode 100644 index 000000000000..9e3e6ec44ec9 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/SparkBatchClient.cs @@ -0,0 +1,200 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Analytics.Synapse.Spark.Models; +using Azure.Core.Pipeline; + +namespace Azure.Analytics.Synapse.Spark +{ + /// The SparkBatch service client. + public partial class SparkBatchClient + { + private readonly ClientDiagnostics _clientDiagnostics; + private readonly HttpPipeline _pipeline; + internal SparkBatchRestClient RestClient { get; } + /// Initializes a new instance of SparkBatchClient for mocking. + protected SparkBatchClient() + { + } + /// Initializes a new instance of SparkBatchClient. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The workspace development endpoint, for example https://myworkspace.dev.azuresynapse.net. + /// Name of the spark pool. + /// Valid api-version for the request. + internal SparkBatchClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string endpoint, string sparkPoolName, string livyApiVersion = "2019-11-01-preview") + { + RestClient = new SparkBatchRestClient(clientDiagnostics, pipeline, endpoint, sparkPoolName, livyApiVersion); + _clientDiagnostics = clientDiagnostics; + _pipeline = pipeline; + } + + /// List all spark batch jobs which are running under a particular spark pool. + /// Optional param specifying which index the list should begin from. + /// + /// Optional param specifying the size of the returned list. + /// + /// By default it is 20 and that is the maximum. + /// + /// Optional query param specifying whether detailed response is returned beyond plain livy. + /// The cancellation token to use. + public virtual async Task> GetSparkBatchJobsAsync(int? @from = null, int? size = null, bool? detailed = null, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("SparkBatchClient.GetSparkBatchJobs"); + scope.Start(); + try + { + return await RestClient.GetSparkBatchJobsAsync(@from, size, detailed, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// List all spark batch jobs which are running under a particular spark pool. + /// Optional param specifying which index the list should begin from. + /// + /// Optional param specifying the size of the returned list. + /// + /// By default it is 20 and that is the maximum. + /// + /// Optional query param specifying whether detailed response is returned beyond plain livy. + /// The cancellation token to use. + public virtual Response GetSparkBatchJobs(int? @from = null, int? size = null, bool? detailed = null, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("SparkBatchClient.GetSparkBatchJobs"); + scope.Start(); + try + { + return RestClient.GetSparkBatchJobs(@from, size, detailed, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Create new spark batch job. + /// Livy compatible batch job request payload. + /// Optional query param specifying whether detailed response is returned beyond plain livy. + /// The cancellation token to use. + public virtual async Task> CreateSparkBatchJobAsync(SparkBatchJobOptions sparkBatchJobOptions, bool? detailed = null, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("SparkBatchClient.CreateSparkBatchJob"); + scope.Start(); + try + { + return await RestClient.CreateSparkBatchJobAsync(sparkBatchJobOptions, detailed, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Create new spark batch job. + /// Livy compatible batch job request payload. + /// Optional query param specifying whether detailed response is returned beyond plain livy. + /// The cancellation token to use. + public virtual Response CreateSparkBatchJob(SparkBatchJobOptions sparkBatchJobOptions, bool? detailed = null, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("SparkBatchClient.CreateSparkBatchJob"); + scope.Start(); + try + { + return RestClient.CreateSparkBatchJob(sparkBatchJobOptions, detailed, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets a single spark batch job. + /// Identifier for the batch job. + /// Optional query param specifying whether detailed response is returned beyond plain livy. + /// The cancellation token to use. + public virtual async Task> GetSparkBatchJobAsync(int batchId, bool? detailed = null, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("SparkBatchClient.GetSparkBatchJob"); + scope.Start(); + try + { + return await RestClient.GetSparkBatchJobAsync(batchId, detailed, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets a single spark batch job. + /// Identifier for the batch job. + /// Optional query param specifying whether detailed response is returned beyond plain livy. + /// The cancellation token to use. + public virtual Response GetSparkBatchJob(int batchId, bool? detailed = null, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("SparkBatchClient.GetSparkBatchJob"); + scope.Start(); + try + { + return RestClient.GetSparkBatchJob(batchId, detailed, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Cancels a running spark batch job. + /// Identifier for the batch job. + /// The cancellation token to use. + public virtual async Task CancelSparkBatchJobAsync(int batchId, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("SparkBatchClient.CancelSparkBatchJob"); + scope.Start(); + try + { + return await RestClient.CancelSparkBatchJobAsync(batchId, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Cancels a running spark batch job. + /// Identifier for the batch job. + /// The cancellation token to use. + public virtual Response CancelSparkBatchJob(int batchId, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("SparkBatchClient.CancelSparkBatchJob"); + scope.Start(); + try + { + return RestClient.CancelSparkBatchJob(batchId, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/SparkBatchRestClient.cs b/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/SparkBatchRestClient.cs new file mode 100644 index 000000000000..828caafa5c19 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/SparkBatchRestClient.cs @@ -0,0 +1,372 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Analytics.Synapse.Spark.Models; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.Analytics.Synapse.Spark +{ + internal partial class SparkBatchRestClient + { + private string endpoint; + private string sparkPoolName; + private string livyApiVersion; + private ClientDiagnostics _clientDiagnostics; + private HttpPipeline _pipeline; + + /// Initializes a new instance of SparkBatchRestClient. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The workspace development endpoint, for example https://myworkspace.dev.azuresynapse.net. + /// Name of the spark pool. + /// Valid api-version for the request. + /// This occurs when one of the required arguments is null. + public SparkBatchRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string endpoint, string sparkPoolName, string livyApiVersion = "2019-11-01-preview") + { + if (endpoint == null) + { + throw new ArgumentNullException(nameof(endpoint)); + } + if (sparkPoolName == null) + { + throw new ArgumentNullException(nameof(sparkPoolName)); + } + if (livyApiVersion == null) + { + throw new ArgumentNullException(nameof(livyApiVersion)); + } + + this.endpoint = endpoint; + this.sparkPoolName = sparkPoolName; + this.livyApiVersion = livyApiVersion; + _clientDiagnostics = clientDiagnostics; + _pipeline = pipeline; + } + + internal HttpMessage CreateGetSparkBatchJobsRequest(int? @from, int? size, bool? detailed) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.AppendRaw(endpoint, false); + uri.AppendRaw("/livyApi/versions/", false); + uri.AppendRaw(livyApiVersion, false); + uri.AppendRaw("/sparkPools/", false); + uri.AppendRaw(sparkPoolName, false); + uri.AppendPath("/batches", false); + if (@from != null) + { + uri.AppendQuery("from", @from.Value, true); + } + if (size != null) + { + uri.AppendQuery("size", size.Value, true); + } + if (detailed != null) + { + uri.AppendQuery("detailed", detailed.Value, true); + } + request.Uri = uri; + return message; + } + + /// List all spark batch jobs which are running under a particular spark pool. + /// Optional param specifying which index the list should begin from. + /// + /// Optional param specifying the size of the returned list. + /// + /// By default it is 20 and that is the maximum. + /// + /// Optional query param specifying whether detailed response is returned beyond plain livy. + /// The cancellation token to use. + public async Task> GetSparkBatchJobsAsync(int? @from = null, int? size = null, bool? detailed = null, CancellationToken cancellationToken = default) + { + using var message = CreateGetSparkBatchJobsRequest(@from, size, detailed); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SparkBatchJobCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + value = SparkBatchJobCollection.DeserializeSparkBatchJobCollection(document.RootElement); + } + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// List all spark batch jobs which are running under a particular spark pool. + /// Optional param specifying which index the list should begin from. + /// + /// Optional param specifying the size of the returned list. + /// + /// By default it is 20 and that is the maximum. + /// + /// Optional query param specifying whether detailed response is returned beyond plain livy. + /// The cancellation token to use. + public Response GetSparkBatchJobs(int? @from = null, int? size = null, bool? detailed = null, CancellationToken cancellationToken = default) + { + using var message = CreateGetSparkBatchJobsRequest(@from, size, detailed); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SparkBatchJobCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + value = SparkBatchJobCollection.DeserializeSparkBatchJobCollection(document.RootElement); + } + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateCreateSparkBatchJobRequest(SparkBatchJobOptions sparkBatchJobOptions, bool? detailed) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.AppendRaw(endpoint, false); + uri.AppendRaw("/livyApi/versions/", false); + uri.AppendRaw(livyApiVersion, false); + uri.AppendRaw("/sparkPools/", false); + uri.AppendRaw(sparkPoolName, false); + uri.AppendPath("/batches", false); + if (detailed != null) + { + uri.AppendQuery("detailed", detailed.Value, true); + } + request.Uri = uri; + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(sparkBatchJobOptions); + request.Content = content; + return message; + } + + /// Create new spark batch job. + /// Livy compatible batch job request payload. + /// Optional query param specifying whether detailed response is returned beyond plain livy. + /// The cancellation token to use. + public async Task> CreateSparkBatchJobAsync(SparkBatchJobOptions sparkBatchJobOptions, bool? detailed = null, CancellationToken cancellationToken = default) + { + if (sparkBatchJobOptions == null) + { + throw new ArgumentNullException(nameof(sparkBatchJobOptions)); + } + + using var message = CreateCreateSparkBatchJobRequest(sparkBatchJobOptions, detailed); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SparkBatchJob value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + value = SparkBatchJob.DeserializeSparkBatchJob(document.RootElement); + } + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Create new spark batch job. + /// Livy compatible batch job request payload. + /// Optional query param specifying whether detailed response is returned beyond plain livy. + /// The cancellation token to use. + public Response CreateSparkBatchJob(SparkBatchJobOptions sparkBatchJobOptions, bool? detailed = null, CancellationToken cancellationToken = default) + { + if (sparkBatchJobOptions == null) + { + throw new ArgumentNullException(nameof(sparkBatchJobOptions)); + } + + using var message = CreateCreateSparkBatchJobRequest(sparkBatchJobOptions, detailed); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SparkBatchJob value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + value = SparkBatchJob.DeserializeSparkBatchJob(document.RootElement); + } + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetSparkBatchJobRequest(int batchId, bool? detailed) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.AppendRaw(endpoint, false); + uri.AppendRaw("/livyApi/versions/", false); + uri.AppendRaw(livyApiVersion, false); + uri.AppendRaw("/sparkPools/", false); + uri.AppendRaw(sparkPoolName, false); + uri.AppendPath("/batches/", false); + uri.AppendPath(batchId, true); + if (detailed != null) + { + uri.AppendQuery("detailed", detailed.Value, true); + } + request.Uri = uri; + return message; + } + + /// Gets a single spark batch job. + /// Identifier for the batch job. + /// Optional query param specifying whether detailed response is returned beyond plain livy. + /// The cancellation token to use. + public async Task> GetSparkBatchJobAsync(int batchId, bool? detailed = null, CancellationToken cancellationToken = default) + { + using var message = CreateGetSparkBatchJobRequest(batchId, detailed); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SparkBatchJob value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + value = SparkBatchJob.DeserializeSparkBatchJob(document.RootElement); + } + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Gets a single spark batch job. + /// Identifier for the batch job. + /// Optional query param specifying whether detailed response is returned beyond plain livy. + /// The cancellation token to use. + public Response GetSparkBatchJob(int batchId, bool? detailed = null, CancellationToken cancellationToken = default) + { + using var message = CreateGetSparkBatchJobRequest(batchId, detailed); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SparkBatchJob value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + value = SparkBatchJob.DeserializeSparkBatchJob(document.RootElement); + } + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateCancelSparkBatchJobRequest(int batchId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.AppendRaw(endpoint, false); + uri.AppendRaw("/livyApi/versions/", false); + uri.AppendRaw(livyApiVersion, false); + uri.AppendRaw("/sparkPools/", false); + uri.AppendRaw(sparkPoolName, false); + uri.AppendPath("/batches/", false); + uri.AppendPath(batchId, true); + request.Uri = uri; + return message; + } + + /// Cancels a running spark batch job. + /// Identifier for the batch job. + /// The cancellation token to use. + public async Task CancelSparkBatchJobAsync(int batchId, CancellationToken cancellationToken = default) + { + using var message = CreateCancelSparkBatchJobRequest(batchId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + return message.Response; + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Cancels a running spark batch job. + /// Identifier for the batch job. + /// The cancellation token to use. + public Response CancelSparkBatchJob(int batchId, CancellationToken cancellationToken = default) + { + using var message = CreateCancelSparkBatchJobRequest(batchId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + return message.Response; + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/SparkSessionClient.cs b/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/SparkSessionClient.cs new file mode 100644 index 000000000000..d1ef2de88244 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/SparkSessionClient.cs @@ -0,0 +1,386 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Analytics.Synapse.Spark.Models; +using Azure.Core.Pipeline; + +namespace Azure.Analytics.Synapse.Spark +{ + /// The SparkSession service client. + public partial class SparkSessionClient + { + private readonly ClientDiagnostics _clientDiagnostics; + private readonly HttpPipeline _pipeline; + internal SparkSessionRestClient RestClient { get; } + /// Initializes a new instance of SparkSessionClient for mocking. + protected SparkSessionClient() + { + } + /// Initializes a new instance of SparkSessionClient. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The workspace development endpoint, for example https://myworkspace.dev.azuresynapse.net. + /// Name of the spark pool. + /// Valid api-version for the request. + internal SparkSessionClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string endpoint, string sparkPoolName, string livyApiVersion = "2019-11-01-preview") + { + RestClient = new SparkSessionRestClient(clientDiagnostics, pipeline, endpoint, sparkPoolName, livyApiVersion); + _clientDiagnostics = clientDiagnostics; + _pipeline = pipeline; + } + + /// List all spark sessions which are running under a particular spark pool. + /// Optional param specifying which index the list should begin from. + /// + /// Optional param specifying the size of the returned list. + /// + /// By default it is 20 and that is the maximum. + /// + /// Optional query param specifying whether detailed response is returned beyond plain livy. + /// The cancellation token to use. + public virtual async Task> GetSparkSessionsAsync(int? @from = null, int? size = null, bool? detailed = null, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("SparkSessionClient.GetSparkSessions"); + scope.Start(); + try + { + return await RestClient.GetSparkSessionsAsync(@from, size, detailed, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// List all spark sessions which are running under a particular spark pool. + /// Optional param specifying which index the list should begin from. + /// + /// Optional param specifying the size of the returned list. + /// + /// By default it is 20 and that is the maximum. + /// + /// Optional query param specifying whether detailed response is returned beyond plain livy. + /// The cancellation token to use. + public virtual Response GetSparkSessions(int? @from = null, int? size = null, bool? detailed = null, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("SparkSessionClient.GetSparkSessions"); + scope.Start(); + try + { + return RestClient.GetSparkSessions(@from, size, detailed, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Create new spark session. + /// Livy compatible batch job request payload. + /// Optional query param specifying whether detailed response is returned beyond plain livy. + /// The cancellation token to use. + public virtual async Task> CreateSparkSessionAsync(SparkSessionOptions sparkSessionOptions, bool? detailed = null, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("SparkSessionClient.CreateSparkSession"); + scope.Start(); + try + { + return await RestClient.CreateSparkSessionAsync(sparkSessionOptions, detailed, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Create new spark session. + /// Livy compatible batch job request payload. + /// Optional query param specifying whether detailed response is returned beyond plain livy. + /// The cancellation token to use. + public virtual Response CreateSparkSession(SparkSessionOptions sparkSessionOptions, bool? detailed = null, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("SparkSessionClient.CreateSparkSession"); + scope.Start(); + try + { + return RestClient.CreateSparkSession(sparkSessionOptions, detailed, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets a single spark session. + /// Identifier for the session. + /// Optional query param specifying whether detailed response is returned beyond plain livy. + /// The cancellation token to use. + public virtual async Task> GetSparkSessionAsync(int sessionId, bool? detailed = null, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("SparkSessionClient.GetSparkSession"); + scope.Start(); + try + { + return await RestClient.GetSparkSessionAsync(sessionId, detailed, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets a single spark session. + /// Identifier for the session. + /// Optional query param specifying whether detailed response is returned beyond plain livy. + /// The cancellation token to use. + public virtual Response GetSparkSession(int sessionId, bool? detailed = null, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("SparkSessionClient.GetSparkSession"); + scope.Start(); + try + { + return RestClient.GetSparkSession(sessionId, detailed, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Cancels a running spark session. + /// Identifier for the session. + /// The cancellation token to use. + public virtual async Task CancelSparkSessionAsync(int sessionId, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("SparkSessionClient.CancelSparkSession"); + scope.Start(); + try + { + return await RestClient.CancelSparkSessionAsync(sessionId, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Cancels a running spark session. + /// Identifier for the session. + /// The cancellation token to use. + public virtual Response CancelSparkSession(int sessionId, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("SparkSessionClient.CancelSparkSession"); + scope.Start(); + try + { + return RestClient.CancelSparkSession(sessionId, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Sends a keep alive call to the current session to reset the session timeout. + /// Identifier for the session. + /// The cancellation token to use. + public virtual async Task ResetSparkSessionTimeoutAsync(int sessionId, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("SparkSessionClient.ResetSparkSessionTimeout"); + scope.Start(); + try + { + return await RestClient.ResetSparkSessionTimeoutAsync(sessionId, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Sends a keep alive call to the current session to reset the session timeout. + /// Identifier for the session. + /// The cancellation token to use. + public virtual Response ResetSparkSessionTimeout(int sessionId, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("SparkSessionClient.ResetSparkSessionTimeout"); + scope.Start(); + try + { + return RestClient.ResetSparkSessionTimeout(sessionId, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets a list of statements within a spark session. + /// Identifier for the session. + /// The cancellation token to use. + public virtual async Task> GetSparkStatementsAsync(int sessionId, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("SparkSessionClient.GetSparkStatements"); + scope.Start(); + try + { + return await RestClient.GetSparkStatementsAsync(sessionId, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets a list of statements within a spark session. + /// Identifier for the session. + /// The cancellation token to use. + public virtual Response GetSparkStatements(int sessionId, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("SparkSessionClient.GetSparkStatements"); + scope.Start(); + try + { + return RestClient.GetSparkStatements(sessionId, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Create statement within a spark session. + /// Identifier for the session. + /// Livy compatible batch job request payload. + /// The cancellation token to use. + public virtual async Task> CreateSparkStatementAsync(int sessionId, SparkStatementOptions sparkStatementOptions, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("SparkSessionClient.CreateSparkStatement"); + scope.Start(); + try + { + return await RestClient.CreateSparkStatementAsync(sessionId, sparkStatementOptions, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Create statement within a spark session. + /// Identifier for the session. + /// Livy compatible batch job request payload. + /// The cancellation token to use. + public virtual Response CreateSparkStatement(int sessionId, SparkStatementOptions sparkStatementOptions, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("SparkSessionClient.CreateSparkStatement"); + scope.Start(); + try + { + return RestClient.CreateSparkStatement(sessionId, sparkStatementOptions, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets a single statement within a spark session. + /// Identifier for the session. + /// Identifier for the statement. + /// The cancellation token to use. + public virtual async Task> GetSparkStatementAsync(int sessionId, int statementId, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("SparkSessionClient.GetSparkStatement"); + scope.Start(); + try + { + return await RestClient.GetSparkStatementAsync(sessionId, statementId, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets a single statement within a spark session. + /// Identifier for the session. + /// Identifier for the statement. + /// The cancellation token to use. + public virtual Response GetSparkStatement(int sessionId, int statementId, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("SparkSessionClient.GetSparkStatement"); + scope.Start(); + try + { + return RestClient.GetSparkStatement(sessionId, statementId, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Kill a statement within a session. + /// Identifier for the session. + /// Identifier for the statement. + /// The cancellation token to use. + public virtual async Task> CancelSparkStatementAsync(int sessionId, int statementId, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("SparkSessionClient.CancelSparkStatement"); + scope.Start(); + try + { + return await RestClient.CancelSparkStatementAsync(sessionId, statementId, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Kill a statement within a session. + /// Identifier for the session. + /// Identifier for the statement. + /// The cancellation token to use. + public virtual Response CancelSparkStatement(int sessionId, int statementId, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("SparkSessionClient.CancelSparkStatement"); + scope.Start(); + try + { + return RestClient.CancelSparkStatement(sessionId, statementId, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/SparkSessionRestClient.cs b/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/SparkSessionRestClient.cs new file mode 100644 index 000000000000..89c78399116a --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/SparkSessionRestClient.cs @@ -0,0 +1,741 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Analytics.Synapse.Spark.Models; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.Analytics.Synapse.Spark +{ + internal partial class SparkSessionRestClient + { + private string endpoint; + private string sparkPoolName; + private string livyApiVersion; + private ClientDiagnostics _clientDiagnostics; + private HttpPipeline _pipeline; + + /// Initializes a new instance of SparkSessionRestClient. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The workspace development endpoint, for example https://myworkspace.dev.azuresynapse.net. + /// Name of the spark pool. + /// Valid api-version for the request. + /// This occurs when one of the required arguments is null. + public SparkSessionRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string endpoint, string sparkPoolName, string livyApiVersion = "2019-11-01-preview") + { + if (endpoint == null) + { + throw new ArgumentNullException(nameof(endpoint)); + } + if (sparkPoolName == null) + { + throw new ArgumentNullException(nameof(sparkPoolName)); + } + if (livyApiVersion == null) + { + throw new ArgumentNullException(nameof(livyApiVersion)); + } + + this.endpoint = endpoint; + this.sparkPoolName = sparkPoolName; + this.livyApiVersion = livyApiVersion; + _clientDiagnostics = clientDiagnostics; + _pipeline = pipeline; + } + + internal HttpMessage CreateGetSparkSessionsRequest(int? @from, int? size, bool? detailed) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.AppendRaw(endpoint, false); + uri.AppendRaw("/livyApi/versions/", false); + uri.AppendRaw(livyApiVersion, false); + uri.AppendRaw("/sparkPools/", false); + uri.AppendRaw(sparkPoolName, false); + uri.AppendPath("/sessions", false); + if (@from != null) + { + uri.AppendQuery("from", @from.Value, true); + } + if (size != null) + { + uri.AppendQuery("size", size.Value, true); + } + if (detailed != null) + { + uri.AppendQuery("detailed", detailed.Value, true); + } + request.Uri = uri; + return message; + } + + /// List all spark sessions which are running under a particular spark pool. + /// Optional param specifying which index the list should begin from. + /// + /// Optional param specifying the size of the returned list. + /// + /// By default it is 20 and that is the maximum. + /// + /// Optional query param specifying whether detailed response is returned beyond plain livy. + /// The cancellation token to use. + public async Task> GetSparkSessionsAsync(int? @from = null, int? size = null, bool? detailed = null, CancellationToken cancellationToken = default) + { + using var message = CreateGetSparkSessionsRequest(@from, size, detailed); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SparkSessionCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + value = SparkSessionCollection.DeserializeSparkSessionCollection(document.RootElement); + } + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// List all spark sessions which are running under a particular spark pool. + /// Optional param specifying which index the list should begin from. + /// + /// Optional param specifying the size of the returned list. + /// + /// By default it is 20 and that is the maximum. + /// + /// Optional query param specifying whether detailed response is returned beyond plain livy. + /// The cancellation token to use. + public Response GetSparkSessions(int? @from = null, int? size = null, bool? detailed = null, CancellationToken cancellationToken = default) + { + using var message = CreateGetSparkSessionsRequest(@from, size, detailed); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SparkSessionCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + value = SparkSessionCollection.DeserializeSparkSessionCollection(document.RootElement); + } + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateCreateSparkSessionRequest(SparkSessionOptions sparkSessionOptions, bool? detailed) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.AppendRaw(endpoint, false); + uri.AppendRaw("/livyApi/versions/", false); + uri.AppendRaw(livyApiVersion, false); + uri.AppendRaw("/sparkPools/", false); + uri.AppendRaw(sparkPoolName, false); + uri.AppendPath("/sessions", false); + if (detailed != null) + { + uri.AppendQuery("detailed", detailed.Value, true); + } + request.Uri = uri; + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(sparkSessionOptions); + request.Content = content; + return message; + } + + /// Create new spark session. + /// Livy compatible batch job request payload. + /// Optional query param specifying whether detailed response is returned beyond plain livy. + /// The cancellation token to use. + public async Task> CreateSparkSessionAsync(SparkSessionOptions sparkSessionOptions, bool? detailed = null, CancellationToken cancellationToken = default) + { + if (sparkSessionOptions == null) + { + throw new ArgumentNullException(nameof(sparkSessionOptions)); + } + + using var message = CreateCreateSparkSessionRequest(sparkSessionOptions, detailed); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SparkSession value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + value = SparkSession.DeserializeSparkSession(document.RootElement); + } + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Create new spark session. + /// Livy compatible batch job request payload. + /// Optional query param specifying whether detailed response is returned beyond plain livy. + /// The cancellation token to use. + public Response CreateSparkSession(SparkSessionOptions sparkSessionOptions, bool? detailed = null, CancellationToken cancellationToken = default) + { + if (sparkSessionOptions == null) + { + throw new ArgumentNullException(nameof(sparkSessionOptions)); + } + + using var message = CreateCreateSparkSessionRequest(sparkSessionOptions, detailed); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SparkSession value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + value = SparkSession.DeserializeSparkSession(document.RootElement); + } + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetSparkSessionRequest(int sessionId, bool? detailed) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.AppendRaw(endpoint, false); + uri.AppendRaw("/livyApi/versions/", false); + uri.AppendRaw(livyApiVersion, false); + uri.AppendRaw("/sparkPools/", false); + uri.AppendRaw(sparkPoolName, false); + uri.AppendPath("/sessions/", false); + uri.AppendPath(sessionId, true); + if (detailed != null) + { + uri.AppendQuery("detailed", detailed.Value, true); + } + request.Uri = uri; + return message; + } + + /// Gets a single spark session. + /// Identifier for the session. + /// Optional query param specifying whether detailed response is returned beyond plain livy. + /// The cancellation token to use. + public async Task> GetSparkSessionAsync(int sessionId, bool? detailed = null, CancellationToken cancellationToken = default) + { + using var message = CreateGetSparkSessionRequest(sessionId, detailed); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SparkSession value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + value = SparkSession.DeserializeSparkSession(document.RootElement); + } + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Gets a single spark session. + /// Identifier for the session. + /// Optional query param specifying whether detailed response is returned beyond plain livy. + /// The cancellation token to use. + public Response GetSparkSession(int sessionId, bool? detailed = null, CancellationToken cancellationToken = default) + { + using var message = CreateGetSparkSessionRequest(sessionId, detailed); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SparkSession value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + value = SparkSession.DeserializeSparkSession(document.RootElement); + } + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateCancelSparkSessionRequest(int sessionId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.AppendRaw(endpoint, false); + uri.AppendRaw("/livyApi/versions/", false); + uri.AppendRaw(livyApiVersion, false); + uri.AppendRaw("/sparkPools/", false); + uri.AppendRaw(sparkPoolName, false); + uri.AppendPath("/sessions/", false); + uri.AppendPath(sessionId, true); + request.Uri = uri; + return message; + } + + /// Cancels a running spark session. + /// Identifier for the session. + /// The cancellation token to use. + public async Task CancelSparkSessionAsync(int sessionId, CancellationToken cancellationToken = default) + { + using var message = CreateCancelSparkSessionRequest(sessionId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + return message.Response; + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Cancels a running spark session. + /// Identifier for the session. + /// The cancellation token to use. + public Response CancelSparkSession(int sessionId, CancellationToken cancellationToken = default) + { + using var message = CreateCancelSparkSessionRequest(sessionId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + return message.Response; + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateResetSparkSessionTimeoutRequest(int sessionId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.AppendRaw(endpoint, false); + uri.AppendRaw("/livyApi/versions/", false); + uri.AppendRaw(livyApiVersion, false); + uri.AppendRaw("/sparkPools/", false); + uri.AppendRaw(sparkPoolName, false); + uri.AppendPath("/sessions/", false); + uri.AppendPath(sessionId, true); + uri.AppendPath("/reset-timeout", false); + request.Uri = uri; + return message; + } + + /// Sends a keep alive call to the current session to reset the session timeout. + /// Identifier for the session. + /// The cancellation token to use. + public async Task ResetSparkSessionTimeoutAsync(int sessionId, CancellationToken cancellationToken = default) + { + using var message = CreateResetSparkSessionTimeoutRequest(sessionId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + return message.Response; + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Sends a keep alive call to the current session to reset the session timeout. + /// Identifier for the session. + /// The cancellation token to use. + public Response ResetSparkSessionTimeout(int sessionId, CancellationToken cancellationToken = default) + { + using var message = CreateResetSparkSessionTimeoutRequest(sessionId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + return message.Response; + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetSparkStatementsRequest(int sessionId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.AppendRaw(endpoint, false); + uri.AppendRaw("/livyApi/versions/", false); + uri.AppendRaw(livyApiVersion, false); + uri.AppendRaw("/sparkPools/", false); + uri.AppendRaw(sparkPoolName, false); + uri.AppendPath("/sessions/", false); + uri.AppendPath(sessionId, true); + uri.AppendPath("/statements", false); + request.Uri = uri; + return message; + } + + /// Gets a list of statements within a spark session. + /// Identifier for the session. + /// The cancellation token to use. + public async Task> GetSparkStatementsAsync(int sessionId, CancellationToken cancellationToken = default) + { + using var message = CreateGetSparkStatementsRequest(sessionId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SparkStatementCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + value = SparkStatementCollection.DeserializeSparkStatementCollection(document.RootElement); + } + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Gets a list of statements within a spark session. + /// Identifier for the session. + /// The cancellation token to use. + public Response GetSparkStatements(int sessionId, CancellationToken cancellationToken = default) + { + using var message = CreateGetSparkStatementsRequest(sessionId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SparkStatementCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + value = SparkStatementCollection.DeserializeSparkStatementCollection(document.RootElement); + } + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateCreateSparkStatementRequest(int sessionId, SparkStatementOptions sparkStatementOptions) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.AppendRaw(endpoint, false); + uri.AppendRaw("/livyApi/versions/", false); + uri.AppendRaw(livyApiVersion, false); + uri.AppendRaw("/sparkPools/", false); + uri.AppendRaw(sparkPoolName, false); + uri.AppendPath("/sessions/", false); + uri.AppendPath(sessionId, true); + uri.AppendPath("/statements", false); + request.Uri = uri; + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(sparkStatementOptions); + request.Content = content; + return message; + } + + /// Create statement within a spark session. + /// Identifier for the session. + /// Livy compatible batch job request payload. + /// The cancellation token to use. + public async Task> CreateSparkStatementAsync(int sessionId, SparkStatementOptions sparkStatementOptions, CancellationToken cancellationToken = default) + { + if (sparkStatementOptions == null) + { + throw new ArgumentNullException(nameof(sparkStatementOptions)); + } + + using var message = CreateCreateSparkStatementRequest(sessionId, sparkStatementOptions); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SparkStatement value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + value = SparkStatement.DeserializeSparkStatement(document.RootElement); + } + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Create statement within a spark session. + /// Identifier for the session. + /// Livy compatible batch job request payload. + /// The cancellation token to use. + public Response CreateSparkStatement(int sessionId, SparkStatementOptions sparkStatementOptions, CancellationToken cancellationToken = default) + { + if (sparkStatementOptions == null) + { + throw new ArgumentNullException(nameof(sparkStatementOptions)); + } + + using var message = CreateCreateSparkStatementRequest(sessionId, sparkStatementOptions); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SparkStatement value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + value = SparkStatement.DeserializeSparkStatement(document.RootElement); + } + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetSparkStatementRequest(int sessionId, int statementId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.AppendRaw(endpoint, false); + uri.AppendRaw("/livyApi/versions/", false); + uri.AppendRaw(livyApiVersion, false); + uri.AppendRaw("/sparkPools/", false); + uri.AppendRaw(sparkPoolName, false); + uri.AppendPath("/sessions/", false); + uri.AppendPath(sessionId, true); + uri.AppendPath("/statements/", false); + uri.AppendPath(statementId, true); + request.Uri = uri; + return message; + } + + /// Gets a single statement within a spark session. + /// Identifier for the session. + /// Identifier for the statement. + /// The cancellation token to use. + public async Task> GetSparkStatementAsync(int sessionId, int statementId, CancellationToken cancellationToken = default) + { + using var message = CreateGetSparkStatementRequest(sessionId, statementId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SparkStatement value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + value = SparkStatement.DeserializeSparkStatement(document.RootElement); + } + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Gets a single statement within a spark session. + /// Identifier for the session. + /// Identifier for the statement. + /// The cancellation token to use. + public Response GetSparkStatement(int sessionId, int statementId, CancellationToken cancellationToken = default) + { + using var message = CreateGetSparkStatementRequest(sessionId, statementId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SparkStatement value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + value = SparkStatement.DeserializeSparkStatement(document.RootElement); + } + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateCancelSparkStatementRequest(int sessionId, int statementId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.AppendRaw(endpoint, false); + uri.AppendRaw("/livyApi/versions/", false); + uri.AppendRaw(livyApiVersion, false); + uri.AppendRaw("/sparkPools/", false); + uri.AppendRaw(sparkPoolName, false); + uri.AppendPath("/sessions/", false); + uri.AppendPath(sessionId, true); + uri.AppendPath("/statements/", false); + uri.AppendPath(statementId, true); + uri.AppendPath("/cancel", false); + request.Uri = uri; + return message; + } + + /// Kill a statement within a session. + /// Identifier for the session. + /// Identifier for the statement. + /// The cancellation token to use. + public async Task> CancelSparkStatementAsync(int sessionId, int statementId, CancellationToken cancellationToken = default) + { + using var message = CreateCancelSparkStatementRequest(sessionId, statementId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SparkStatementCancellationResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + value = SparkStatementCancellationResult.DeserializeSparkStatementCancellationResult(document.RootElement); + } + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Kill a statement within a session. + /// Identifier for the session. + /// Identifier for the statement. + /// The cancellation token to use. + public Response CancelSparkStatement(int sessionId, int statementId, CancellationToken cancellationToken = default) + { + using var message = CreateCancelSparkStatementRequest(sessionId, statementId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SparkStatementCancellationResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + value = SparkStatementCancellationResult.DeserializeSparkStatementCancellationResult(document.RootElement); + } + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Properties/AssemblyInfo.cs b/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..3ecd31292cd5 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Properties/AssemblyInfo.cs @@ -0,0 +1,7 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System.Runtime.CompilerServices; + +[assembly: InternalsVisibleTo("Azure.Analytics.Synapse.Spark.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100d15ddcb29688295338af4b7686603fe614abd555e09efba8fb88ee09e1f7b1ccaeed2e8f823fa9eef3fdd60217fc012ea67d2479751a0b8c087a4185541b851bd8b16f8d91b840e51b1cb0ba6fe647997e57429265e85ef62d565db50a69ae1647d54d7bd855e4db3d8a91510e5bcbd0edfbbecaa20a7bd9ae74593daa7b11b4")] +[assembly: Azure.Core.AzureResourceProviderNamespace("Microsoft.Synapse")] diff --git a/sdk/synapse/Azure.Analytics.Synapse.Spark/src/autorest.md b/sdk/synapse/Azure.Analytics.Synapse.Spark/src/autorest.md new file mode 100644 index 000000000000..96e4ae054efa --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Spark/src/autorest.md @@ -0,0 +1,16 @@ +# Microsoft.Azure.Synapse + +Run `dotnet msbuild /t:GenerateCode` to generate code. + +### AutoRest Configuration +> see https://aka.ms/autorest + +```yaml +repo: https://github.com/Azure/azure-rest-api-specs/blob/fdf4bbfd7a73b28960d3a62490440345d6f2e8e3 +``` + +``` yaml +public-clients: true +input-file: + - $(repo)/specification/synapse/data-plane/Microsoft.Synapse/preview/2019-11-01-preview/sparkJob.json +``` diff --git a/sdk/synapse/Azure.Analytics.Synapse.Spark/tests/Azure.Analytics.Synapse.Spark.Tests.csproj b/sdk/synapse/Azure.Analytics.Synapse.Spark/tests/Azure.Analytics.Synapse.Spark.Tests.csproj new file mode 100644 index 000000000000..1f423de0cb40 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Spark/tests/Azure.Analytics.Synapse.Spark.Tests.csproj @@ -0,0 +1,26 @@ + + + $(RequiredTargetFrameworks) + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sdk/synapse/Azure.Analytics.Synapse.Spark/tests/SessionRecords/SparkBatchClientLiveTests/TestGetSparkBatchJob.json b/sdk/synapse/Azure.Analytics.Synapse.Spark/tests/SessionRecords/SparkBatchClientLiveTests/TestGetSparkBatchJob.json new file mode 100644 index 000000000000..7c7da137e931 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Spark/tests/SessionRecords/SparkBatchClientLiveTests/TestGetSparkBatchJob.json @@ -0,0 +1,1716 @@ +{ + "Entries": [ + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/livyApi/versions/2019-11-01-preview/sparkPools/testsparkpool/batches", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-f7038707e79e78489c204515f70266be-55cfae302f7fa949-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.Spark/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "5152ab3c3fc5ba1c5111bcb11d9ed725", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:47:08 GMT", + "Server": [ + "Kestrel", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "x-ms-activity-id": "bf458dc3-05bb-4e1a-9b4a-c88fac5d09f8", + "x-ms-client-request-id": [ + "5152ab3c3fc5ba1c5111bcb11d9ed725", + "5152ab3c3fc5ba1c5111bcb11d9ed725" + ], + "x-ms-request-id": "99b59cd8-c39a-474a-894d-bafcc29c89f0", + "x-ms-response-time-ms": "77" + }, + "ResponseBody": { + "from": 0, + "total": 20, + "sessions": [ + { + "id": 0, + "appId": "application_1576224831757_0002", + "appInfo": { + "driverLogUrl": "http://53e52930712f4bd2a64da26879c4751c0076c436679:8042/node/containerlogs/container_1576224831757_0002_01_000001/trusted-service-user", + "sparkUiUrl": "http://53e52930712f4bd2a64da26879c4751c01223913297:8088/proxy/application_1576224831757_0002/" + }, + "state": "success", + "log": [ + "\t tracking URL: http://53e52930712f4bd2a64da26879c4751c01223913297:8088/proxy/application_1576224831757_0002/", + "\t user: trusted-service-user", + "19/12/13 08:14:22 INFO ShutdownHookManager: Shutdown hook called", + "19/12/13 08:14:22 INFO ShutdownHookManager: Deleting directory /tmp/spark-badf96dc-0837-41ba-9944-05f55277f611", + "19/12/13 08:14:22 INFO ShutdownHookManager: Deleting directory /tmp/spark-04ab468f-e186-458c-91cd-ef6c97f5dff5", + "19/12/13 08:14:22 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "19/12/13 08:14:22 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "19/12/13 08:14:22 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nstderr: ", + "\nYARN Diagnostics: " + ] + }, + { + "id": 1, + "appId": "application_1576224831757_0001", + "appInfo": { + "driverLogUrl": "http://53e52930712f4bd2a64da26879c4751c03817035090:8042/node/containerlogs/container_1576224831757_0001_01_000001/trusted-service-user", + "sparkUiUrl": "http://53e52930712f4bd2a64da26879c4751c01223913297:8088/proxy/application_1576224831757_0001/" + }, + "state": "success", + "log": [ + "\t tracking URL: http://53e52930712f4bd2a64da26879c4751c01223913297:8088/proxy/application_1576224831757_0001/", + "\t user: trusted-service-user", + "19/12/13 08:14:22 INFO ShutdownHookManager: Shutdown hook called", + "19/12/13 08:14:22 INFO ShutdownHookManager: Deleting directory /tmp/spark-080c8c63-d0dd-487d-a757-faf7b5efd9f1", + "19/12/13 08:14:22 INFO ShutdownHookManager: Deleting directory /tmp/spark-aaed5be7-2685-4c28-a43c-8f37b9521d4f", + "19/12/13 08:14:22 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "19/12/13 08:14:22 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "19/12/13 08:14:22 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nstderr: ", + "\nYARN Diagnostics: " + ] + }, + { + "id": 3, + "appId": null, + "appInfo": { + "driverLogUrl": null, + "sparkUiUrl": null + }, + "state": "dead", + "log": [ + "\tat org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:933)", + "\tat org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)", + "19/12/25 03:56:47 INFO ShutdownHookManager: Shutdown hook called", + "19/12/25 03:56:47 INFO ShutdownHookManager: Deleting directory /tmp/spark-3ae6f965-dcbc-4b3e-9c59-d5c0da9d1d66", + "19/12/25 03:56:47 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "19/12/25 03:56:47 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "19/12/25 03:56:47 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nstderr: ", + "\nYARN Diagnostics: ", + "No YARN application is found with tag livy-batch-0-7v8dgkxr in 300 seconds. This may be because 1) spark-submit fail to submit application to YARN; or 2) YARN cluster doesn\u0027t have enough resources to start the application in time. Please check Livy log and YARN log to know the details." + ] + }, + { + "id": 4, + "appId": "application_1577252484917_0001", + "appInfo": { + "driverLogUrl": "http://59cc110db6dc46ac89103137e0c646e100149e16655:8042/node/containerlogs/container_1577252484917_0001_01_000001/trusted-service-user", + "sparkUiUrl": "http://59cc110db6dc46ac89103137e0c646e104164268157:8088/proxy/application_1577252484917_0001/" + }, + "state": "success", + "log": [ + "\t tracking URL: http://59cc110db6dc46ac89103137e0c646e104164268157:8088/proxy/application_1577252484917_0001/", + "\t user: trusted-service-user", + "19/12/25 05:42:14 INFO ShutdownHookManager: Shutdown hook called", + "19/12/25 05:42:14 INFO ShutdownHookManager: Deleting directory /tmp/spark-0c814ed9-49f2-4d82-8e8f-28b2f089f7fd", + "19/12/25 05:42:14 INFO ShutdownHookManager: Deleting directory /tmp/spark-2f0a0fda-0d9d-40b2-a300-795d45a67025", + "19/12/25 05:42:14 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "19/12/25 05:42:14 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "19/12/25 05:42:14 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nstderr: ", + "\nYARN Diagnostics: " + ] + }, + { + "id": 5, + "appId": null, + "appInfo": { + "driverLogUrl": null, + "sparkUiUrl": null + }, + "state": "killed", + "log": [ + "stdout: ", + "\nstderr: ", + "\nYARN Diagnostics: " + ] + }, + { + "id": 12, + "appId": "application_1578623882988_0001", + "appInfo": { + "driverLogUrl": "http://ce76a4b8792e4537a006d10d8954727a0370ec92478:8042/node/containerlogs/container_1578623882988_0001_01_000001/trusted-service-user", + "sparkUiUrl": "http://ce76a4b8792e4537a006d10d8954727a04390958445:8088/proxy/application_1578623882988_0001/" + }, + "state": "success", + "log": [ + "\t tracking URL: http://ce76a4b8792e4537a006d10d8954727a04390958445:8088/proxy/application_1578623882988_0001/", + "\t user: trusted-service-user", + "20/01/10 02:39:19 INFO ShutdownHookManager: Shutdown hook called", + "20/01/10 02:39:19 INFO ShutdownHookManager: Deleting directory /tmp/spark-5ecda28f-e4b9-4a78-8c2d-da3048be2f0e", + "20/01/10 02:39:19 INFO ShutdownHookManager: Deleting directory /tmp/spark-0164a65c-591c-460d-ab19-c67ae8b411d6", + "20/01/10 02:39:19 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "20/01/10 02:39:19 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "20/01/10 02:39:19 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nstderr: ", + "\nYARN Diagnostics: " + ] + }, + { + "id": 13, + "appId": "application_1578627484298_0001", + "appInfo": { + "driverLogUrl": "http://9b16e3f9ff074564bf178da319ac14c60157d104065:8042/node/containerlogs/container_1578627484298_0001_01_000001/trusted-service-user", + "sparkUiUrl": "http://9b16e3f9ff074564bf178da319ac14c6021e9217492:8088/proxy/application_1578627484298_0001/" + }, + "state": "success", + "log": [ + "\t tracking URL: http://9b16e3f9ff074564bf178da319ac14c6021e9217492:8088/proxy/application_1578627484298_0001/", + "\t user: trusted-service-user", + "20/01/10 03:38:58 INFO ShutdownHookManager: Shutdown hook called", + "20/01/10 03:38:58 INFO ShutdownHookManager: Deleting directory /tmp/spark-3510c3ec-19c2-4675-8431-9d4c4b2e3cf5", + "20/01/10 03:38:58 INFO ShutdownHookManager: Deleting directory /tmp/spark-925b68f4-72d8-4ac7-b62d-f7005eb5adaf", + "20/01/10 03:38:58 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "20/01/10 03:38:58 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "20/01/10 03:38:58 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nstderr: ", + "\nYARN Diagnostics: " + ] + }, + { + "id": 14, + "appId": "application_1578627484298_0002", + "appInfo": { + "driverLogUrl": "http://9b16e3f9ff074564bf178da319ac14c6013fa834371:8042/node/containerlogs/container_1578627484298_0002_01_000001/trusted-service-user", + "sparkUiUrl": "http://9b16e3f9ff074564bf178da319ac14c6021e9217492:8088/proxy/application_1578627484298_0002/" + }, + "state": "success", + "log": [ + "\t tracking URL: http://9b16e3f9ff074564bf178da319ac14c6021e9217492:8088/proxy/application_1578627484298_0002/", + "\t user: trusted-service-user", + "20/01/10 03:40:45 INFO ShutdownHookManager: Shutdown hook called", + "20/01/10 03:40:45 INFO ShutdownHookManager: Deleting directory /tmp/spark-05372e52-3f31-435b-9a89-f0e59d031147", + "20/01/10 03:40:45 INFO ShutdownHookManager: Deleting directory /tmp/spark-6d758165-8230-4281-b7ba-9b8fef9d6d19", + "20/01/10 03:40:45 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "20/01/10 03:40:45 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "20/01/10 03:40:45 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nstderr: ", + "\nYARN Diagnostics: " + ] + }, + { + "id": 15, + "appId": "application_1578630430582_0001", + "appInfo": { + "driverLogUrl": "http://8e6f1bbb1f0d402ead227bfb3f9541ce029e8073802:8042/node/containerlogs/container_1578630430582_0001_01_000001/trusted-service-user", + "sparkUiUrl": "http://8e6f1bbb1f0d402ead227bfb3f9541ce019a8a47711:8088/proxy/application_1578630430582_0001/" + }, + "state": "success", + "log": [ + "\t tracking URL: http://8e6f1bbb1f0d402ead227bfb3f9541ce019a8a47711:8088/proxy/application_1578630430582_0001/", + "\t user: trusted-service-user", + "20/01/10 04:28:11 INFO ShutdownHookManager: Shutdown hook called", + "20/01/10 04:28:11 INFO ShutdownHookManager: Deleting directory /tmp/spark-e7390b6e-3c89-4d15-8504-dfc0713dbac2", + "20/01/10 04:28:11 INFO ShutdownHookManager: Deleting directory /tmp/spark-1aa9ff81-602d-483e-8523-72db6bf69662", + "20/01/10 04:28:11 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "20/01/10 04:28:11 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "20/01/10 04:28:11 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nstderr: ", + "\nYARN Diagnostics: " + ] + }, + { + "id": 16, + "appId": "application_1578883706606_0001", + "appInfo": { + "driverLogUrl": "http://e3c1df4b4aa94ae6b7e5d19359b699fe041b3e01222:8042/node/containerlogs/container_1578883706606_0001_01_000001/trusted-service-user", + "sparkUiUrl": "http://e3c1df4b4aa94ae6b7e5d19359b699fe0302c276274:8088/proxy/application_1578883706606_0001/" + }, + "state": "success", + "log": [ + "\t tracking URL: http://e3c1df4b4aa94ae6b7e5d19359b699fe0302c276274:8088/proxy/application_1578883706606_0001/", + "\t user: trusted-service-user", + "20/01/13 02:49:38 INFO ShutdownHookManager: Shutdown hook called", + "20/01/13 02:49:38 INFO ShutdownHookManager: Deleting directory /tmp/spark-2c25f086-79bf-4db5-98ef-a50ec241447f", + "20/01/13 02:49:38 INFO ShutdownHookManager: Deleting directory /tmp/spark-6e4d32f6-a1ab-4b78-967e-068b74920ad7", + "20/01/13 02:49:38 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "20/01/13 02:49:38 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "20/01/13 02:49:38 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nstderr: ", + "\nYARN Diagnostics: " + ] + }, + { + "id": 17, + "appId": "application_1578989125483_0001", + "appInfo": { + "driverLogUrl": "http://1657321302a648dcb31a6629c8d3bc9b040d6388685:8042/node/containerlogs/container_1578989125483_0001_02_000001/trusted-service-user", + "sparkUiUrl": "http://1657321302a648dcb31a6629c8d3bc9b0230e607756:8088/cluster/app/application_1578989125483_0001" + }, + "state": "dead", + "log": [ + "20/01/14 08:07:59 WARN AzureFileSystemThreadPoolExecutor: Disabling threads for Delete operation as thread count 0 is \u003C= 1", + "20/01/14 08:07:59 INFO AzureFileSystemThreadPoolExecutor: Time taken for Delete operation is: 13 ms with threads: 0", + "20/01/14 08:07:59 INFO ShutdownHookManager: Shutdown hook called", + "20/01/14 08:07:59 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "20/01/14 08:07:59 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "20/01/14 08:07:59 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "", + "", + "For more detailed output, check the application tracking page: http://1657321302a648dcb31a6629c8d3bc9b0230e607756:8088/cluster/app/application_1578989125483_0001 Then click on links to logs of each attempt.", + ". Failing the application." + ] + }, + { + "id": 18, + "appId": "application_1578989125483_0002", + "appInfo": { + "driverLogUrl": "http://1657321302a648dcb31a6629c8d3bc9b012e5f40483:8042/node/containerlogs/container_1578989125483_0002_01_000001/trusted-service-user", + "sparkUiUrl": "http://1657321302a648dcb31a6629c8d3bc9b0230e607756:8088/proxy/application_1578989125483_0002/" + }, + "state": "success", + "log": [ + "\t tracking URL: http://1657321302a648dcb31a6629c8d3bc9b0230e607756:8088/proxy/application_1578989125483_0002/", + "\t user: trusted-service-user", + "20/01/14 08:23:13 INFO ShutdownHookManager: Shutdown hook called", + "20/01/14 08:23:13 INFO ShutdownHookManager: Deleting directory /tmp/spark-07aae8db-d0be-4c05-803a-474c353ffeb4", + "20/01/14 08:23:13 INFO ShutdownHookManager: Deleting directory /tmp/spark-dd484af5-ca45-44d9-adac-609c2a76e34e", + "20/01/14 08:23:13 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "20/01/14 08:23:13 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "20/01/14 08:23:13 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nstderr: ", + "\nYARN Diagnostics: " + ] + }, + { + "id": 19, + "appId": "application_1579051421404_0001", + "appInfo": { + "driverLogUrl": "http://1b69b0a4ed994f7ea95f9d85f63a3083009f3081028:8042/node/containerlogs/container_1579051421404_0001_01_000001/trusted-service-user", + "sparkUiUrl": "http://1b69b0a4ed994f7ea95f9d85f63a308302603012606:8088/proxy/application_1579051421404_0001/" + }, + "state": "success", + "log": [ + "\t tracking URL: http://1b69b0a4ed994f7ea95f9d85f63a308302603012606:8088/proxy/application_1579051421404_0001/", + "\t user: trusted-service-user", + "20/01/15 01:24:14 INFO ShutdownHookManager: Shutdown hook called", + "20/01/15 01:24:14 INFO ShutdownHookManager: Deleting directory /tmp/spark-e9350640-4f8f-4f9d-8b8b-6dff3a6104fa", + "20/01/15 01:24:14 INFO ShutdownHookManager: Deleting directory /tmp/spark-dc37dd45-d38e-4c84-b821-602d8c111e23", + "20/01/15 01:24:14 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "20/01/15 01:24:14 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "20/01/15 01:24:14 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nstderr: ", + "\nYARN Diagnostics: " + ] + }, + { + "id": 20, + "appId": "application_1579140649715_0001", + "appInfo": { + "driverLogUrl": "http://c5bf52cc122a4e8b8e42bb633501e6770007eb66248:8042/node/containerlogs/container_1579140649715_0001_01_000001/trusted-service-user", + "sparkUiUrl": "http://c5bf52cc122a4e8b8e42bb633501e67704015827933:8088/proxy/application_1579140649715_0001/" + }, + "state": "success", + "log": [ + "\t tracking URL: http://c5bf52cc122a4e8b8e42bb633501e67704015827933:8088/proxy/application_1579140649715_0001/", + "\t user: trusted-service-user", + "20/01/16 02:11:50 INFO ShutdownHookManager: Shutdown hook called", + "20/01/16 02:11:50 INFO ShutdownHookManager: Deleting directory /tmp/spark-dcd3cb18-f03f-4ac5-967f-51fa07df172f", + "20/01/16 02:11:50 INFO ShutdownHookManager: Deleting directory /tmp/spark-68628a62-1cf0-4f58-bb6b-22fc97b2cc0b", + "20/01/16 02:11:51 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "20/01/16 02:11:51 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "20/01/16 02:11:51 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nstderr: ", + "\nYARN Diagnostics: " + ] + }, + { + "id": 21, + "appId": "application_1579140649715_0002", + "appInfo": { + "driverLogUrl": "http://c5bf52cc122a4e8b8e42bb633501e67702199d05116:8042/node/containerlogs/container_1579140649715_0002_01_000001/trusted-service-user", + "sparkUiUrl": "http://c5bf52cc122a4e8b8e42bb633501e67704015827933:8088/proxy/application_1579140649715_0002/" + }, + "state": "success", + "log": [ + "\t tracking URL: http://c5bf52cc122a4e8b8e42bb633501e67704015827933:8088/proxy/application_1579140649715_0002/", + "\t user: trusted-service-user", + "20/01/16 02:21:17 INFO ShutdownHookManager: Shutdown hook called", + "20/01/16 02:21:17 INFO ShutdownHookManager: Deleting directory /tmp/spark-acb065c5-b5a0-43f5-9bfc-13a0dc232598", + "20/01/16 02:21:17 INFO ShutdownHookManager: Deleting directory /tmp/spark-2f39dc65-0986-4470-ac8c-e41754627e0e", + "20/01/16 02:21:17 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "20/01/16 02:21:17 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "20/01/16 02:21:17 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nstderr: ", + "\nYARN Diagnostics: " + ] + }, + { + "id": 22, + "appId": "application_1579140649715_0003", + "appInfo": { + "driverLogUrl": "http://c5bf52cc122a4e8b8e42bb633501e67702712f69936:8042/node/containerlogs/container_1579140649715_0003_01_000001/trusted-service-user", + "sparkUiUrl": "http://c5bf52cc122a4e8b8e42bb633501e67704015827933:8088/proxy/application_1579140649715_0003/" + }, + "state": "success", + "log": [ + "\t tracking URL: http://c5bf52cc122a4e8b8e42bb633501e67704015827933:8088/proxy/application_1579140649715_0003/", + "\t user: trusted-service-user", + "20/01/16 02:24:06 INFO ShutdownHookManager: Shutdown hook called", + "20/01/16 02:24:06 INFO ShutdownHookManager: Deleting directory /tmp/spark-91ae2c9d-68e6-463f-8777-3cb4943600e8", + "20/01/16 02:24:06 INFO ShutdownHookManager: Deleting directory /tmp/spark-7bb6fe6c-9aed-4d01-a39a-e21b9a04cf8a", + "20/01/16 02:24:06 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "20/01/16 02:24:06 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "20/01/16 02:24:06 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nstderr: ", + "\nYARN Diagnostics: " + ] + }, + { + "id": 23, + "appId": "application_1579167542444_0001", + "appInfo": { + "driverLogUrl": "http://dff5fe0bf844496b896e527ae28480c20308c150511:8042/node/containerlogs/container_1579167542444_0001_01_000001/trusted-service-user", + "sparkUiUrl": "http://dff5fe0bf844496b896e527ae28480c20442ee71008:8088/proxy/application_1579167542444_0001/" + }, + "state": "success", + "log": [ + "\t tracking URL: http://dff5fe0bf844496b896e527ae28480c20442ee71008:8088/proxy/application_1579167542444_0001/", + "\t user: trusted-service-user", + "20/01/16 09:40:38 INFO ShutdownHookManager: Shutdown hook called", + "20/01/16 09:40:38 INFO ShutdownHookManager: Deleting directory /tmp/spark-64d62c83-9956-4af6-abce-3d4f6084e2f2", + "20/01/16 09:40:38 INFO ShutdownHookManager: Deleting directory /tmp/spark-8191d5d3-b207-474d-969f-290f74820b3e", + "20/01/16 09:40:38 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "20/01/16 09:40:38 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "20/01/16 09:40:38 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nstderr: ", + "\nYARN Diagnostics: " + ] + }, + { + "id": 24, + "appId": null, + "appInfo": null, + "state": "error", + "log": null + }, + { + "id": 25, + "appId": null, + "appInfo": null, + "state": "error", + "log": null + }, + { + "id": 26, + "appId": "application_1579416350077_0001", + "appInfo": { + "driverLogUrl": "http://35c3cd39703446f7b5879bc0b8805f8c001de530649:8042/node/containerlogs/container_1579416350077_0001_01_000001/trusted-service-user", + "sparkUiUrl": "http://35c3cd39703446f7b5879bc0b8805f8c016c6327596:8088/proxy/application_1579416350077_0001/" + }, + "state": "success", + "log": [ + "\t tracking URL: http://35c3cd39703446f7b5879bc0b8805f8c016c6327596:8088/proxy/application_1579416350077_0001/", + "\t user: trusted-service-user", + "20/01/19 06:46:18 INFO ShutdownHookManager: Shutdown hook called", + "20/01/19 06:46:18 INFO ShutdownHookManager: Deleting directory /tmp/spark-de3d608d-97b0-4ca5-a6c5-b05df4a40e8e", + "20/01/19 06:46:18 INFO ShutdownHookManager: Deleting directory /tmp/spark-ab19f399-5768-4010-a5aa-0257fc7ccc71", + "20/01/19 06:46:18 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "20/01/19 06:46:18 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "20/01/19 06:46:18 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nstderr: ", + "\nYARN Diagnostics: " + ] + } + ] + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/livyApi/versions/2019-11-01-preview/sparkPools/testsparkpool/batches/0", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-fe855be6523a8d479b9baae7ea7ffd67-99b1083dbef86e48-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.Spark/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "b427c52c8868683f7c1211581d92e221", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:47:08 GMT", + "Server": [ + "Kestrel", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "x-ms-activity-id": "02c54416-2be1-4a81-af8c-17dfbc437da2", + "x-ms-client-request-id": [ + "b427c52c8868683f7c1211581d92e221", + "b427c52c8868683f7c1211581d92e221" + ], + "x-ms-job-cluster": "http://171.1.154.21:8998/", + "x-ms-job-clusterrequested-on": "12/13/2019 8:11:39 AM \u002B00:00", + "x-ms-job-ended-on": "12/13/2019 8:15:16 AM \u002B00:00", + "x-ms-job-internal-id": "0", + "x-ms-job-livysubmission-on": "12/13/2019 8:13:59 AM \u002B00:00", + "x-ms-job-queued-on": "12/13/2019 8:13:58 AM \u002B00:00", + "x-ms-job-result": "Succeeded", + "x-ms-job-scheduled-on": "12/13/2019 8:11:39 AM \u002B00:00", + "x-ms-job-scheduler-state": "Ended", + "x-ms-job-submitted-by-name": "ca728363-7297-4e35-a9c3-c6400837883e", + "x-ms-job-submitted-on": "12/13/2019 8:11:38 AM \u002B00:00", + "x-ms-job-type": "SparkServiceBatch", + "x-ms-request-id": "ab029bf8-9381-4a23-aecf-0f746224ebe3", + "x-ms-response-time-ms": "54" + }, + "ResponseBody": { + "id": 0, + "appId": "application_1576224831757_0002", + "appInfo": { + "driverLogUrl": "http://53e52930712f4bd2a64da26879c4751c0076c436679:8042/node/containerlogs/container_1576224831757_0002_01_000001/trusted-service-user", + "sparkUiUrl": "http://53e52930712f4bd2a64da26879c4751c01223913297:8088/proxy/application_1576224831757_0002/" + }, + "state": "success", + "log": [ + "\t tracking URL: http://53e52930712f4bd2a64da26879c4751c01223913297:8088/proxy/application_1576224831757_0002/", + "\t user: trusted-service-user", + "19/12/13 08:14:22 INFO ShutdownHookManager: Shutdown hook called", + "19/12/13 08:14:22 INFO ShutdownHookManager: Deleting directory /tmp/spark-badf96dc-0837-41ba-9944-05f55277f611", + "19/12/13 08:14:22 INFO ShutdownHookManager: Deleting directory /tmp/spark-04ab468f-e186-458c-91cd-ef6c97f5dff5", + "19/12/13 08:14:22 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "19/12/13 08:14:22 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "19/12/13 08:14:22 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nstderr: ", + "\nYARN Diagnostics: " + ] + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/livyApi/versions/2019-11-01-preview/sparkPools/testsparkpool/batches/1", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-a47816d4111cf040b0fd920b497a2ffe-94ed0b579aa9104e-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.Spark/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "00cfcb8c74f7c0f7dbac215caa692891", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:47:08 GMT", + "Server": [ + "Kestrel", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "x-ms-activity-id": "618ae471-db4e-476c-9a4f-94bc45e1250e", + "x-ms-client-request-id": [ + "00cfcb8c74f7c0f7dbac215caa692891", + "00cfcb8c74f7c0f7dbac215caa692891" + ], + "x-ms-job-cluster": "http://171.1.154.21:8998/", + "x-ms-job-clusterrequested-on": "12/13/2019 8:12:13 AM \u002B00:00", + "x-ms-job-ended-on": "12/13/2019 8:15:38 AM \u002B00:00", + "x-ms-job-internal-id": "1", + "x-ms-job-livysubmission-on": "12/13/2019 8:13:59 AM \u002B00:00", + "x-ms-job-queued-on": "12/13/2019 8:13:58 AM \u002B00:00", + "x-ms-job-result": "Succeeded", + "x-ms-job-scheduled-on": "12/13/2019 8:12:12 AM \u002B00:00", + "x-ms-job-scheduler-state": "Ended", + "x-ms-job-submitted-by-name": "ca728363-7297-4e35-a9c3-c6400837883e", + "x-ms-job-submitted-on": "12/13/2019 8:12:11 AM \u002B00:00", + "x-ms-job-type": "SparkServiceBatch", + "x-ms-request-id": "8e61d3de-9711-4f81-b03f-d89f3587c317", + "x-ms-response-time-ms": "16" + }, + "ResponseBody": { + "id": 1, + "appId": "application_1576224831757_0001", + "appInfo": { + "driverLogUrl": "http://53e52930712f4bd2a64da26879c4751c03817035090:8042/node/containerlogs/container_1576224831757_0001_01_000001/trusted-service-user", + "sparkUiUrl": "http://53e52930712f4bd2a64da26879c4751c01223913297:8088/proxy/application_1576224831757_0001/" + }, + "state": "success", + "log": [ + "\t tracking URL: http://53e52930712f4bd2a64da26879c4751c01223913297:8088/proxy/application_1576224831757_0001/", + "\t user: trusted-service-user", + "19/12/13 08:14:22 INFO ShutdownHookManager: Shutdown hook called", + "19/12/13 08:14:22 INFO ShutdownHookManager: Deleting directory /tmp/spark-080c8c63-d0dd-487d-a757-faf7b5efd9f1", + "19/12/13 08:14:22 INFO ShutdownHookManager: Deleting directory /tmp/spark-aaed5be7-2685-4c28-a43c-8f37b9521d4f", + "19/12/13 08:14:22 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "19/12/13 08:14:22 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "19/12/13 08:14:22 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nstderr: ", + "\nYARN Diagnostics: " + ] + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/livyApi/versions/2019-11-01-preview/sparkPools/testsparkpool/batches/3", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-51445b740441c944bd41f1b2695cb8b9-82f41cdb5e5f4b44-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.Spark/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "ce39b7252406b3d46bead5b22ec49cbe", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:47:09 GMT", + "Server": [ + "Kestrel", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "x-ms-activity-id": "13b74d3e-9046-420d-9847-20d82e9fd650", + "x-ms-client-request-id": [ + "ce39b7252406b3d46bead5b22ec49cbe", + "ce39b7252406b3d46bead5b22ec49cbe" + ], + "x-ms-job-cluster": "http://171.1.155.33:8998/", + "x-ms-job-clusterrequested-on": "12/25/2019 3:54:32 AM \u002B00:00", + "x-ms-job-ended-on": "12/25/2019 4:01:30 AM \u002B00:00", + "x-ms-job-internal-id": "3", + "x-ms-job-livysubmission-on": "12/25/2019 3:56:21 AM \u002B00:00", + "x-ms-job-queued-on": "12/25/2019 3:56:20 AM \u002B00:00", + "x-ms-job-result": "Failed", + "x-ms-job-scheduled-on": "12/25/2019 3:54:32 AM \u002B00:00", + "x-ms-job-scheduler-state": "Ended", + "x-ms-job-submitted-by-name": "zhezhou@microsoft.com", + "x-ms-job-submitted-on": "12/25/2019 3:54:31 AM \u002B00:00", + "x-ms-job-type": "SparkServiceBatch", + "x-ms-request-id": "de318627-9598-4f1e-91ea-c2465616a8f4", + "x-ms-response-time-ms": "15" + }, + "ResponseBody": { + "id": 3, + "appId": null, + "appInfo": { + "driverLogUrl": null, + "sparkUiUrl": null + }, + "state": "dead", + "log": [ + "\tat org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:933)", + "\tat org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)", + "19/12/25 03:56:47 INFO ShutdownHookManager: Shutdown hook called", + "19/12/25 03:56:47 INFO ShutdownHookManager: Deleting directory /tmp/spark-3ae6f965-dcbc-4b3e-9c59-d5c0da9d1d66", + "19/12/25 03:56:47 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "19/12/25 03:56:47 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "19/12/25 03:56:47 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nstderr: ", + "\nYARN Diagnostics: ", + "No YARN application is found with tag livy-batch-0-7v8dgkxr in 300 seconds. This may be because 1) spark-submit fail to submit application to YARN; or 2) YARN cluster doesn\u0027t have enough resources to start the application in time. Please check Livy log and YARN log to know the details." + ] + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/livyApi/versions/2019-11-01-preview/sparkPools/testsparkpool/batches/4", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-a6109f641ded624791f24f05a5ee2979-42a888879ef6184d-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.Spark/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "51249a2fd7cfb82dce66d9bc67e2be13", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:47:09 GMT", + "Server": [ + "Kestrel", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "x-ms-activity-id": "bda79f6e-21ad-4763-9fc9-7c96737f9639", + "x-ms-client-request-id": [ + "51249a2fd7cfb82dce66d9bc67e2be13", + "51249a2fd7cfb82dce66d9bc67e2be13" + ], + "x-ms-job-cluster": "http://171.3.43.22:8998/", + "x-ms-job-clusterrequested-on": "12/25/2019 5:39:14 AM \u002B00:00", + "x-ms-job-ended-on": "12/25/2019 5:43:41 AM \u002B00:00", + "x-ms-job-internal-id": "4", + "x-ms-job-livysubmission-on": "12/25/2019 5:41:50 AM \u002B00:00", + "x-ms-job-queued-on": "12/25/2019 5:41:09 AM \u002B00:00", + "x-ms-job-result": "Succeeded", + "x-ms-job-scheduled-on": "12/25/2019 5:39:14 AM \u002B00:00", + "x-ms-job-scheduler-state": "Ended", + "x-ms-job-submitted-by-name": "zhezhou@microsoft.com", + "x-ms-job-submitted-on": "12/25/2019 5:39:13 AM \u002B00:00", + "x-ms-job-type": "SparkServiceBatch", + "x-ms-request-id": "95d341aa-64ad-4231-bb21-e08556f8cb66", + "x-ms-response-time-ms": "18" + }, + "ResponseBody": { + "id": 4, + "appId": "application_1577252484917_0001", + "appInfo": { + "driverLogUrl": "http://59cc110db6dc46ac89103137e0c646e100149e16655:8042/node/containerlogs/container_1577252484917_0001_01_000001/trusted-service-user", + "sparkUiUrl": "http://59cc110db6dc46ac89103137e0c646e104164268157:8088/proxy/application_1577252484917_0001/" + }, + "state": "success", + "log": [ + "\t tracking URL: http://59cc110db6dc46ac89103137e0c646e104164268157:8088/proxy/application_1577252484917_0001/", + "\t user: trusted-service-user", + "19/12/25 05:42:14 INFO ShutdownHookManager: Shutdown hook called", + "19/12/25 05:42:14 INFO ShutdownHookManager: Deleting directory /tmp/spark-0c814ed9-49f2-4d82-8e8f-28b2f089f7fd", + "19/12/25 05:42:14 INFO ShutdownHookManager: Deleting directory /tmp/spark-2f0a0fda-0d9d-40b2-a300-795d45a67025", + "19/12/25 05:42:14 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "19/12/25 05:42:14 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "19/12/25 05:42:14 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nstderr: ", + "\nYARN Diagnostics: " + ] + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/livyApi/versions/2019-11-01-preview/sparkPools/testsparkpool/batches/5", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-7e34649ec0360f47834096bda8034a85-86af71c38cc08b4b-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.Spark/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "66337fea1359681af61b940d9f449217", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:47:09 GMT", + "Server": [ + "Kestrel", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "x-ms-activity-id": "45c026a3-0409-4695-9487-344df92db590", + "x-ms-client-request-id": [ + "66337fea1359681af61b940d9f449217", + "66337fea1359681af61b940d9f449217" + ], + "x-ms-job-cluster": "http://171.3.43.22:8998/", + "x-ms-job-clusterrequested-on": "12/25/2019 5:48:35 AM \u002B00:00", + "x-ms-job-ended-on": "12/25/2019 5:48:48 AM \u002B00:00", + "x-ms-job-internal-id": "5", + "x-ms-job-livysubmission-on": "12/25/2019 5:48:37 AM \u002B00:00", + "x-ms-job-queued-on": "12/25/2019 5:48:37 AM \u002B00:00", + "x-ms-job-result": "Cancelled", + "x-ms-job-scheduled-on": "12/25/2019 5:48:34 AM \u002B00:00", + "x-ms-job-scheduler-state": "Ended", + "x-ms-job-submitted-by-name": "zhezhou@microsoft.com", + "x-ms-job-submitted-on": "12/25/2019 5:48:34 AM \u002B00:00", + "x-ms-job-type": "SparkServiceBatch", + "x-ms-request-id": "519047a9-d8a7-4aa4-9402-a268afb39ffa", + "x-ms-response-time-ms": "15" + }, + "ResponseBody": { + "id": 5, + "appId": null, + "appInfo": { + "driverLogUrl": null, + "sparkUiUrl": null + }, + "state": "killed", + "log": [ + "stdout: ", + "\nstderr: ", + "\nYARN Diagnostics: " + ] + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/livyApi/versions/2019-11-01-preview/sparkPools/testsparkpool/batches/12", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-fb6f3b62e33eff43ae50e5605e86164d-a4e5c82778e87a43-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.Spark/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "0f2d620fd6444ec28981ffa04a184c88", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:47:09 GMT", + "Server": [ + "Kestrel", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "x-ms-activity-id": "5e8f583f-3889-4a3d-9aa5-390bc31690ba", + "x-ms-client-request-id": [ + "0f2d620fd6444ec28981ffa04a184c88", + "0f2d620fd6444ec28981ffa04a184c88" + ], + "x-ms-job-cluster": "http://171.0.6.20:8998/", + "x-ms-job-clusterrequested-on": "1/10/2020 2:36:05 AM \u002B00:00", + "x-ms-job-ended-on": "1/10/2020 2:41:21 AM \u002B00:00", + "x-ms-job-internal-id": "12", + "x-ms-job-livysubmission-on": "1/10/2020 2:38:45 AM \u002B00:00", + "x-ms-job-queued-on": "1/10/2020 2:37:52 AM \u002B00:00", + "x-ms-job-result": "Succeeded", + "x-ms-job-scheduled-on": "1/10/2020 2:36:04 AM \u002B00:00", + "x-ms-job-scheduler-state": "Ended", + "x-ms-job-submitted-by-name": "zhezhou@microsoft.com", + "x-ms-job-submitted-on": "1/10/2020 2:36:03 AM \u002B00:00", + "x-ms-job-type": "SparkServiceBatch", + "x-ms-request-id": "c17950d6-98b1-462f-91cb-3aa35586b508", + "x-ms-response-time-ms": "17" + }, + "ResponseBody": { + "id": 12, + "appId": "application_1578623882988_0001", + "appInfo": { + "driverLogUrl": "http://ce76a4b8792e4537a006d10d8954727a0370ec92478:8042/node/containerlogs/container_1578623882988_0001_01_000001/trusted-service-user", + "sparkUiUrl": "http://ce76a4b8792e4537a006d10d8954727a04390958445:8088/proxy/application_1578623882988_0001/" + }, + "state": "success", + "log": [ + "\t tracking URL: http://ce76a4b8792e4537a006d10d8954727a04390958445:8088/proxy/application_1578623882988_0001/", + "\t user: trusted-service-user", + "20/01/10 02:39:19 INFO ShutdownHookManager: Shutdown hook called", + "20/01/10 02:39:19 INFO ShutdownHookManager: Deleting directory /tmp/spark-5ecda28f-e4b9-4a78-8c2d-da3048be2f0e", + "20/01/10 02:39:19 INFO ShutdownHookManager: Deleting directory /tmp/spark-0164a65c-591c-460d-ab19-c67ae8b411d6", + "20/01/10 02:39:19 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "20/01/10 02:39:19 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "20/01/10 02:39:19 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nstderr: ", + "\nYARN Diagnostics: " + ] + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/livyApi/versions/2019-11-01-preview/sparkPools/testsparkpool/batches/13", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-922fe2701b46a1499dc6e8fec7778714-b380b09535fc4c45-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.Spark/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "afc8c12c36911b6580bc5ab34220188a", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:47:09 GMT", + "Server": [ + "Kestrel", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "x-ms-activity-id": "0f2f9937-c01e-4248-855d-2e7c52da5426", + "x-ms-client-request-id": [ + "afc8c12c36911b6580bc5ab34220188a", + "afc8c12c36911b6580bc5ab34220188a" + ], + "x-ms-job-cluster": "http://171.5.120.15:8998/", + "x-ms-job-clusterrequested-on": "1/10/2020 3:35:50 AM \u002B00:00", + "x-ms-job-ended-on": "1/10/2020 3:40:37 AM \u002B00:00", + "x-ms-job-internal-id": "13", + "x-ms-job-livysubmission-on": "1/10/2020 3:38:29 AM \u002B00:00", + "x-ms-job-queued-on": "1/10/2020 3:38:05 AM \u002B00:00", + "x-ms-job-result": "Succeeded", + "x-ms-job-scheduled-on": "1/10/2020 3:35:42 AM \u002B00:00", + "x-ms-job-scheduler-state": "Ended", + "x-ms-job-submitted-by-name": "zhezhou@microsoft.com", + "x-ms-job-submitted-on": "1/10/2020 3:35:41 AM \u002B00:00", + "x-ms-job-type": "SparkServiceBatch", + "x-ms-request-id": "d3967436-8bad-4398-a251-e54ae2952c85", + "x-ms-response-time-ms": "16" + }, + "ResponseBody": { + "id": 13, + "appId": "application_1578627484298_0001", + "appInfo": { + "driverLogUrl": "http://9b16e3f9ff074564bf178da319ac14c60157d104065:8042/node/containerlogs/container_1578627484298_0001_01_000001/trusted-service-user", + "sparkUiUrl": "http://9b16e3f9ff074564bf178da319ac14c6021e9217492:8088/proxy/application_1578627484298_0001/" + }, + "state": "success", + "log": [ + "\t tracking URL: http://9b16e3f9ff074564bf178da319ac14c6021e9217492:8088/proxy/application_1578627484298_0001/", + "\t user: trusted-service-user", + "20/01/10 03:38:58 INFO ShutdownHookManager: Shutdown hook called", + "20/01/10 03:38:58 INFO ShutdownHookManager: Deleting directory /tmp/spark-3510c3ec-19c2-4675-8431-9d4c4b2e3cf5", + "20/01/10 03:38:58 INFO ShutdownHookManager: Deleting directory /tmp/spark-925b68f4-72d8-4ac7-b62d-f7005eb5adaf", + "20/01/10 03:38:58 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "20/01/10 03:38:58 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "20/01/10 03:38:58 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nstderr: ", + "\nYARN Diagnostics: " + ] + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/livyApi/versions/2019-11-01-preview/sparkPools/testsparkpool/batches/14", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-171be7fce5663a409c7ce7b7770fc584-d86a83467782c749-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.Spark/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "04acc1d3aeb513cebde4dcd713791dde", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:47:09 GMT", + "Server": [ + "Kestrel", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "x-ms-activity-id": "fa364c2f-4703-465b-8363-423ce7e7f009", + "x-ms-client-request-id": [ + "04acc1d3aeb513cebde4dcd713791dde", + "04acc1d3aeb513cebde4dcd713791dde" + ], + "x-ms-job-cluster": "http://171.5.120.15:8998/", + "x-ms-job-clusterrequested-on": "1/10/2020 3:40:33 AM \u002B00:00", + "x-ms-job-ended-on": "1/10/2020 3:42:05 AM \u002B00:00", + "x-ms-job-internal-id": "14", + "x-ms-job-livysubmission-on": "1/10/2020 3:40:36 AM \u002B00:00", + "x-ms-job-queued-on": "1/10/2020 3:40:36 AM \u002B00:00", + "x-ms-job-result": "Succeeded", + "x-ms-job-scheduled-on": "1/10/2020 3:40:33 AM \u002B00:00", + "x-ms-job-scheduler-state": "Ended", + "x-ms-job-submitted-by-name": "zhezhou@microsoft.com", + "x-ms-job-submitted-on": "1/10/2020 3:40:32 AM \u002B00:00", + "x-ms-job-type": "SparkServiceBatch", + "x-ms-request-id": "6bf9a3fe-d573-4bcb-90ff-35ecf51f2781", + "x-ms-response-time-ms": "15" + }, + "ResponseBody": { + "id": 14, + "appId": "application_1578627484298_0002", + "appInfo": { + "driverLogUrl": "http://9b16e3f9ff074564bf178da319ac14c6013fa834371:8042/node/containerlogs/container_1578627484298_0002_01_000001/trusted-service-user", + "sparkUiUrl": "http://9b16e3f9ff074564bf178da319ac14c6021e9217492:8088/proxy/application_1578627484298_0002/" + }, + "state": "success", + "log": [ + "\t tracking URL: http://9b16e3f9ff074564bf178da319ac14c6021e9217492:8088/proxy/application_1578627484298_0002/", + "\t user: trusted-service-user", + "20/01/10 03:40:45 INFO ShutdownHookManager: Shutdown hook called", + "20/01/10 03:40:45 INFO ShutdownHookManager: Deleting directory /tmp/spark-05372e52-3f31-435b-9a89-f0e59d031147", + "20/01/10 03:40:45 INFO ShutdownHookManager: Deleting directory /tmp/spark-6d758165-8230-4281-b7ba-9b8fef9d6d19", + "20/01/10 03:40:45 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "20/01/10 03:40:45 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "20/01/10 03:40:45 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nstderr: ", + "\nYARN Diagnostics: " + ] + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/livyApi/versions/2019-11-01-preview/sparkPools/testsparkpool/batches/15", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-8774dda43c92fa4aba98206a3c3ded6e-f3982afaecc4284f-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.Spark/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "dde00ccfe27bd986fd118f887c0e0b69", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:47:09 GMT", + "Server": [ + "Kestrel", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "x-ms-activity-id": "adaec257-07bc-4843-bf62-5d3f5b2a7c6a", + "x-ms-client-request-id": [ + "dde00ccfe27bd986fd118f887c0e0b69", + "dde00ccfe27bd986fd118f887c0e0b69" + ], + "x-ms-job-cluster": "http://171.3.240.24:8998/", + "x-ms-job-clusterrequested-on": "1/10/2020 4:25:27 AM \u002B00:00", + "x-ms-job-ended-on": "1/10/2020 4:29:37 AM \u002B00:00", + "x-ms-job-internal-id": "15", + "x-ms-job-livysubmission-on": "1/10/2020 4:27:23 AM \u002B00:00", + "x-ms-job-queued-on": "1/10/2020 4:27:13 AM \u002B00:00", + "x-ms-job-result": "Succeeded", + "x-ms-job-scheduled-on": "1/10/2020 4:25:27 AM \u002B00:00", + "x-ms-job-scheduler-state": "Ended", + "x-ms-job-submitted-by-name": "zhezhou@microsoft.com", + "x-ms-job-submitted-on": "1/10/2020 4:25:25 AM \u002B00:00", + "x-ms-job-type": "SparkServiceBatch", + "x-ms-request-id": "b17137a8-f2e5-426b-8272-ed0b13afdb0a", + "x-ms-response-time-ms": "15" + }, + "ResponseBody": { + "id": 15, + "appId": "application_1578630430582_0001", + "appInfo": { + "driverLogUrl": "http://8e6f1bbb1f0d402ead227bfb3f9541ce029e8073802:8042/node/containerlogs/container_1578630430582_0001_01_000001/trusted-service-user", + "sparkUiUrl": "http://8e6f1bbb1f0d402ead227bfb3f9541ce019a8a47711:8088/proxy/application_1578630430582_0001/" + }, + "state": "success", + "log": [ + "\t tracking URL: http://8e6f1bbb1f0d402ead227bfb3f9541ce019a8a47711:8088/proxy/application_1578630430582_0001/", + "\t user: trusted-service-user", + "20/01/10 04:28:11 INFO ShutdownHookManager: Shutdown hook called", + "20/01/10 04:28:11 INFO ShutdownHookManager: Deleting directory /tmp/spark-e7390b6e-3c89-4d15-8504-dfc0713dbac2", + "20/01/10 04:28:11 INFO ShutdownHookManager: Deleting directory /tmp/spark-1aa9ff81-602d-483e-8523-72db6bf69662", + "20/01/10 04:28:11 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "20/01/10 04:28:11 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "20/01/10 04:28:11 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nstderr: ", + "\nYARN Diagnostics: " + ] + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/livyApi/versions/2019-11-01-preview/sparkPools/testsparkpool/batches/16", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-911471b25007cc4ab09d0a2e903b605d-7a2f084e114c894f-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.Spark/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "89cc7568476c7dd3f3b5f2ac598d0806", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:47:09 GMT", + "Server": [ + "Kestrel", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "x-ms-activity-id": "dd81ee74-296b-4d83-aa79-f8ec90422112", + "x-ms-client-request-id": [ + "89cc7568476c7dd3f3b5f2ac598d0806", + "89cc7568476c7dd3f3b5f2ac598d0806" + ], + "x-ms-job-cluster": "http://171.3.237.13:8998/", + "x-ms-job-clusterrequested-on": "1/13/2020 2:47:07 AM \u002B00:00", + "x-ms-job-ended-on": "1/13/2020 2:50:27 AM \u002B00:00", + "x-ms-job-internal-id": "16", + "x-ms-job-livysubmission-on": "1/13/2020 2:48:36 AM \u002B00:00", + "x-ms-job-queued-on": "1/13/2020 2:48:35 AM \u002B00:00", + "x-ms-job-result": "Succeeded", + "x-ms-job-scheduled-on": "1/13/2020 2:47:06 AM \u002B00:00", + "x-ms-job-scheduler-state": "Ended", + "x-ms-job-submitted-by-name": "zhezhou@microsoft.com", + "x-ms-job-submitted-on": "1/13/2020 2:47:05 AM \u002B00:00", + "x-ms-job-type": "SparkServiceBatch", + "x-ms-request-id": "dc4c0819-d0b5-4927-98c5-508c4a14b506", + "x-ms-response-time-ms": "15" + }, + "ResponseBody": { + "id": 16, + "appId": "application_1578883706606_0001", + "appInfo": { + "driverLogUrl": "http://e3c1df4b4aa94ae6b7e5d19359b699fe041b3e01222:8042/node/containerlogs/container_1578883706606_0001_01_000001/trusted-service-user", + "sparkUiUrl": "http://e3c1df4b4aa94ae6b7e5d19359b699fe0302c276274:8088/proxy/application_1578883706606_0001/" + }, + "state": "success", + "log": [ + "\t tracking URL: http://e3c1df4b4aa94ae6b7e5d19359b699fe0302c276274:8088/proxy/application_1578883706606_0001/", + "\t user: trusted-service-user", + "20/01/13 02:49:38 INFO ShutdownHookManager: Shutdown hook called", + "20/01/13 02:49:38 INFO ShutdownHookManager: Deleting directory /tmp/spark-2c25f086-79bf-4db5-98ef-a50ec241447f", + "20/01/13 02:49:38 INFO ShutdownHookManager: Deleting directory /tmp/spark-6e4d32f6-a1ab-4b78-967e-068b74920ad7", + "20/01/13 02:49:38 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "20/01/13 02:49:38 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "20/01/13 02:49:38 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nstderr: ", + "\nYARN Diagnostics: " + ] + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/livyApi/versions/2019-11-01-preview/sparkPools/testsparkpool/batches/17", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-bdaa44aff76d134e874297c09dd20e73-153bd47d5c1e8947-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.Spark/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "36e47c9e3a3ff10e3bd207a41f4696ae", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:47:09 GMT", + "Server": [ + "Kestrel", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "x-ms-activity-id": "e29403dd-24ea-488d-8268-f164795f18cd", + "x-ms-client-request-id": [ + "36e47c9e3a3ff10e3bd207a41f4696ae", + "36e47c9e3a3ff10e3bd207a41f4696ae" + ], + "x-ms-job-cluster": "http://171.0.6.7:8998/", + "x-ms-job-clusterrequested-on": "1/14/2020 8:03:17 AM \u002B00:00", + "x-ms-job-ended-on": "1/14/2020 8:08:09 AM \u002B00:00", + "x-ms-job-internal-id": "17", + "x-ms-job-livysubmission-on": "1/14/2020 8:05:56 AM \u002B00:00", + "x-ms-job-queued-on": "1/14/2020 8:05:12 AM \u002B00:00", + "x-ms-job-result": "Failed", + "x-ms-job-scheduled-on": "1/14/2020 8:03:17 AM \u002B00:00", + "x-ms-job-scheduler-state": "Ended", + "x-ms-job-submitted-by-name": "zhezhou@microsoft.com", + "x-ms-job-submitted-on": "1/14/2020 8:03:16 AM \u002B00:00", + "x-ms-job-type": "SparkServiceBatch", + "x-ms-request-id": "92bc398b-4007-4fa3-8bf1-47fb9841b64f", + "x-ms-response-time-ms": "17" + }, + "ResponseBody": { + "id": 17, + "appId": "application_1578989125483_0001", + "appInfo": { + "driverLogUrl": "http://1657321302a648dcb31a6629c8d3bc9b040d6388685:8042/node/containerlogs/container_1578989125483_0001_02_000001/trusted-service-user", + "sparkUiUrl": "http://1657321302a648dcb31a6629c8d3bc9b0230e607756:8088/cluster/app/application_1578989125483_0001" + }, + "state": "dead", + "log": [ + "20/01/14 08:07:59 WARN AzureFileSystemThreadPoolExecutor: Disabling threads for Delete operation as thread count 0 is \u003C= 1", + "20/01/14 08:07:59 INFO AzureFileSystemThreadPoolExecutor: Time taken for Delete operation is: 13 ms with threads: 0", + "20/01/14 08:07:59 INFO ShutdownHookManager: Shutdown hook called", + "20/01/14 08:07:59 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "20/01/14 08:07:59 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "20/01/14 08:07:59 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "", + "", + "For more detailed output, check the application tracking page: http://1657321302a648dcb31a6629c8d3bc9b0230e607756:8088/cluster/app/application_1578989125483_0001 Then click on links to logs of each attempt.", + ". Failing the application." + ] + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/livyApi/versions/2019-11-01-preview/sparkPools/testsparkpool/batches/18", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-ee28c55c29d1fa49b8f68c321196239c-e36f109cb796d44f-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.Spark/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "9e6e73d994ad88713863eac6f0da806f", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:47:09 GMT", + "Server": [ + "Kestrel", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "x-ms-activity-id": "9e5bcd2e-f3e2-4010-8a8c-ad8ab4516841", + "x-ms-client-request-id": [ + "9e6e73d994ad88713863eac6f0da806f", + "9e6e73d994ad88713863eac6f0da806f" + ], + "x-ms-job-cluster": "http://171.0.6.7:8998/", + "x-ms-job-clusterrequested-on": "1/14/2020 8:23:01 AM \u002B00:00", + "x-ms-job-ended-on": "1/14/2020 8:25:28 AM \u002B00:00", + "x-ms-job-internal-id": "18", + "x-ms-job-livysubmission-on": "1/14/2020 8:23:04 AM \u002B00:00", + "x-ms-job-queued-on": "1/14/2020 8:23:04 AM \u002B00:00", + "x-ms-job-result": "Succeeded", + "x-ms-job-scheduled-on": "1/14/2020 8:23:01 AM \u002B00:00", + "x-ms-job-scheduler-state": "Ended", + "x-ms-job-submitted-by-name": "zhezhou@microsoft.com", + "x-ms-job-submitted-on": "1/14/2020 8:23:00 AM \u002B00:00", + "x-ms-job-type": "SparkServiceBatch", + "x-ms-request-id": "fd3aa1c4-0d70-4d9e-9705-c9fcd11faa50", + "x-ms-response-time-ms": "14" + }, + "ResponseBody": { + "id": 18, + "appId": "application_1578989125483_0002", + "appInfo": { + "driverLogUrl": "http://1657321302a648dcb31a6629c8d3bc9b012e5f40483:8042/node/containerlogs/container_1578989125483_0002_01_000001/trusted-service-user", + "sparkUiUrl": "http://1657321302a648dcb31a6629c8d3bc9b0230e607756:8088/proxy/application_1578989125483_0002/" + }, + "state": "success", + "log": [ + "\t tracking URL: http://1657321302a648dcb31a6629c8d3bc9b0230e607756:8088/proxy/application_1578989125483_0002/", + "\t user: trusted-service-user", + "20/01/14 08:23:13 INFO ShutdownHookManager: Shutdown hook called", + "20/01/14 08:23:13 INFO ShutdownHookManager: Deleting directory /tmp/spark-07aae8db-d0be-4c05-803a-474c353ffeb4", + "20/01/14 08:23:13 INFO ShutdownHookManager: Deleting directory /tmp/spark-dd484af5-ca45-44d9-adac-609c2a76e34e", + "20/01/14 08:23:13 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "20/01/14 08:23:13 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "20/01/14 08:23:13 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nstderr: ", + "\nYARN Diagnostics: " + ] + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/livyApi/versions/2019-11-01-preview/sparkPools/testsparkpool/batches/19", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-701ca896a46564408c36c0b0de96aa02-2461cca0c0c26144-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.Spark/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "00e98809d5292d2966db4e99402f5dad", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:47:09 GMT", + "Server": [ + "Kestrel", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "x-ms-activity-id": "d086a889-08c9-4d15-ba55-6652d65eceb1", + "x-ms-client-request-id": [ + "00e98809d5292d2966db4e99402f5dad", + "00e98809d5292d2966db4e99402f5dad" + ], + "x-ms-job-cluster": "http://171.0.211.7:8998/", + "x-ms-job-clusterrequested-on": "1/15/2020 1:21:45 AM \u002B00:00", + "x-ms-job-ended-on": "1/15/2020 1:26:15 AM \u002B00:00", + "x-ms-job-internal-id": "19", + "x-ms-job-livysubmission-on": "1/15/2020 1:23:50 AM \u002B00:00", + "x-ms-job-queued-on": "1/15/2020 1:23:37 AM \u002B00:00", + "x-ms-job-result": "Succeeded", + "x-ms-job-scheduled-on": "1/15/2020 1:21:45 AM \u002B00:00", + "x-ms-job-scheduler-state": "Ended", + "x-ms-job-submitted-by-name": "zhezhou@microsoft.com", + "x-ms-job-submitted-on": "1/15/2020 1:21:44 AM \u002B00:00", + "x-ms-job-type": "SparkServiceBatch", + "x-ms-request-id": "1804bb04-6a68-4440-a0fe-32d60ed4fa33", + "x-ms-response-time-ms": "18" + }, + "ResponseBody": { + "id": 19, + "appId": "application_1579051421404_0001", + "appInfo": { + "driverLogUrl": "http://1b69b0a4ed994f7ea95f9d85f63a3083009f3081028:8042/node/containerlogs/container_1579051421404_0001_01_000001/trusted-service-user", + "sparkUiUrl": "http://1b69b0a4ed994f7ea95f9d85f63a308302603012606:8088/proxy/application_1579051421404_0001/" + }, + "state": "success", + "log": [ + "\t tracking URL: http://1b69b0a4ed994f7ea95f9d85f63a308302603012606:8088/proxy/application_1579051421404_0001/", + "\t user: trusted-service-user", + "20/01/15 01:24:14 INFO ShutdownHookManager: Shutdown hook called", + "20/01/15 01:24:14 INFO ShutdownHookManager: Deleting directory /tmp/spark-e9350640-4f8f-4f9d-8b8b-6dff3a6104fa", + "20/01/15 01:24:14 INFO ShutdownHookManager: Deleting directory /tmp/spark-dc37dd45-d38e-4c84-b821-602d8c111e23", + "20/01/15 01:24:14 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "20/01/15 01:24:14 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "20/01/15 01:24:14 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nstderr: ", + "\nYARN Diagnostics: " + ] + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/livyApi/versions/2019-11-01-preview/sparkPools/testsparkpool/batches/20", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-25e64c722102064897f53f821d597cbe-a0aaaa35304d324b-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.Spark/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "e6d3431e691e0a580a5cfddc50480060", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:47:10 GMT", + "Server": [ + "Kestrel", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "x-ms-activity-id": "c6dbfd00-1c32-4593-a1bb-8fa8a326f892", + "x-ms-client-request-id": [ + "e6d3431e691e0a580a5cfddc50480060", + "e6d3431e691e0a580a5cfddc50480060" + ], + "x-ms-job-cluster": "http://171.6.73.35:8998/", + "x-ms-job-clusterrequested-on": "1/16/2020 2:08:58 AM \u002B00:00", + "x-ms-job-ended-on": "1/16/2020 2:12:49 AM \u002B00:00", + "x-ms-job-internal-id": "20", + "x-ms-job-livysubmission-on": "1/16/2020 2:11:09 AM \u002B00:00", + "x-ms-job-queued-on": "1/16/2020 2:11:08 AM \u002B00:00", + "x-ms-job-result": "Succeeded", + "x-ms-job-scheduled-on": "1/16/2020 2:08:57 AM \u002B00:00", + "x-ms-job-scheduler-state": "Ended", + "x-ms-job-submitted-by-name": "zhezhou@microsoft.com", + "x-ms-job-submitted-on": "1/16/2020 2:08:56 AM \u002B00:00", + "x-ms-job-type": "SparkServiceBatch", + "x-ms-request-id": "30ea12e2-cbdf-4461-b1c5-5362933ffffb", + "x-ms-response-time-ms": "16" + }, + "ResponseBody": { + "id": 20, + "appId": "application_1579140649715_0001", + "appInfo": { + "driverLogUrl": "http://c5bf52cc122a4e8b8e42bb633501e6770007eb66248:8042/node/containerlogs/container_1579140649715_0001_01_000001/trusted-service-user", + "sparkUiUrl": "http://c5bf52cc122a4e8b8e42bb633501e67704015827933:8088/proxy/application_1579140649715_0001/" + }, + "state": "success", + "log": [ + "\t tracking URL: http://c5bf52cc122a4e8b8e42bb633501e67704015827933:8088/proxy/application_1579140649715_0001/", + "\t user: trusted-service-user", + "20/01/16 02:11:50 INFO ShutdownHookManager: Shutdown hook called", + "20/01/16 02:11:50 INFO ShutdownHookManager: Deleting directory /tmp/spark-dcd3cb18-f03f-4ac5-967f-51fa07df172f", + "20/01/16 02:11:50 INFO ShutdownHookManager: Deleting directory /tmp/spark-68628a62-1cf0-4f58-bb6b-22fc97b2cc0b", + "20/01/16 02:11:51 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "20/01/16 02:11:51 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "20/01/16 02:11:51 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nstderr: ", + "\nYARN Diagnostics: " + ] + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/livyApi/versions/2019-11-01-preview/sparkPools/testsparkpool/batches/21", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-54a44304034779458813acb0dbdc5f0f-f300261079bb864d-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.Spark/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "969a9752965c03854a4137d146d74809", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:47:10 GMT", + "Server": [ + "Kestrel", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "x-ms-activity-id": "2030bb89-3d37-487e-a7b3-38f236dd2502", + "x-ms-client-request-id": [ + "969a9752965c03854a4137d146d74809", + "969a9752965c03854a4137d146d74809" + ], + "x-ms-job-cluster": "http://171.6.73.35:8998/", + "x-ms-job-clusterrequested-on": "1/16/2020 2:21:05 AM \u002B00:00", + "x-ms-job-ended-on": "1/16/2020 2:22:15 AM \u002B00:00", + "x-ms-job-internal-id": "21", + "x-ms-job-livysubmission-on": "1/16/2020 2:21:08 AM \u002B00:00", + "x-ms-job-queued-on": "1/16/2020 2:21:08 AM \u002B00:00", + "x-ms-job-result": "Succeeded", + "x-ms-job-scheduled-on": "1/16/2020 2:21:05 AM \u002B00:00", + "x-ms-job-scheduler-state": "Ended", + "x-ms-job-submitted-by-name": "zhezhou@microsoft.com", + "x-ms-job-submitted-on": "1/16/2020 2:21:04 AM \u002B00:00", + "x-ms-job-type": "SparkServiceBatch", + "x-ms-request-id": "aafd7c38-7da6-4947-b58d-ba3f991aa745", + "x-ms-response-time-ms": "16" + }, + "ResponseBody": { + "id": 21, + "appId": "application_1579140649715_0002", + "appInfo": { + "driverLogUrl": "http://c5bf52cc122a4e8b8e42bb633501e67702199d05116:8042/node/containerlogs/container_1579140649715_0002_01_000001/trusted-service-user", + "sparkUiUrl": "http://c5bf52cc122a4e8b8e42bb633501e67704015827933:8088/proxy/application_1579140649715_0002/" + }, + "state": "success", + "log": [ + "\t tracking URL: http://c5bf52cc122a4e8b8e42bb633501e67704015827933:8088/proxy/application_1579140649715_0002/", + "\t user: trusted-service-user", + "20/01/16 02:21:17 INFO ShutdownHookManager: Shutdown hook called", + "20/01/16 02:21:17 INFO ShutdownHookManager: Deleting directory /tmp/spark-acb065c5-b5a0-43f5-9bfc-13a0dc232598", + "20/01/16 02:21:17 INFO ShutdownHookManager: Deleting directory /tmp/spark-2f39dc65-0986-4470-ac8c-e41754627e0e", + "20/01/16 02:21:17 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "20/01/16 02:21:17 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "20/01/16 02:21:17 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nstderr: ", + "\nYARN Diagnostics: " + ] + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/livyApi/versions/2019-11-01-preview/sparkPools/testsparkpool/batches/22", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-6b226de150d2784fa3bcdda4262200a7-201a5c52edab6141-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.Spark/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "ada83d0599079f5130dff5cdd84cdd1e", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:47:10 GMT", + "Server": [ + "Kestrel", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "x-ms-activity-id": "0a3f1e5e-8c87-407c-992e-80fa234c1cf3", + "x-ms-client-request-id": [ + "ada83d0599079f5130dff5cdd84cdd1e", + "ada83d0599079f5130dff5cdd84cdd1e" + ], + "x-ms-job-cluster": "http://171.6.73.35:8998/", + "x-ms-job-clusterrequested-on": "1/16/2020 2:23:55 AM \u002B00:00", + "x-ms-job-ended-on": "1/16/2020 2:25:05 AM \u002B00:00", + "x-ms-job-internal-id": "22", + "x-ms-job-livysubmission-on": "1/16/2020 2:23:58 AM \u002B00:00", + "x-ms-job-queued-on": "1/16/2020 2:23:57 AM \u002B00:00", + "x-ms-job-result": "Succeeded", + "x-ms-job-scheduled-on": "1/16/2020 2:23:54 AM \u002B00:00", + "x-ms-job-scheduler-state": "Ended", + "x-ms-job-submitted-by-name": "zhezhou@microsoft.com", + "x-ms-job-submitted-on": "1/16/2020 2:23:53 AM \u002B00:00", + "x-ms-job-type": "SparkServiceBatch", + "x-ms-request-id": "41ea83b3-0641-4338-be20-e97c7da39b56", + "x-ms-response-time-ms": "15" + }, + "ResponseBody": { + "id": 22, + "appId": "application_1579140649715_0003", + "appInfo": { + "driverLogUrl": "http://c5bf52cc122a4e8b8e42bb633501e67702712f69936:8042/node/containerlogs/container_1579140649715_0003_01_000001/trusted-service-user", + "sparkUiUrl": "http://c5bf52cc122a4e8b8e42bb633501e67704015827933:8088/proxy/application_1579140649715_0003/" + }, + "state": "success", + "log": [ + "\t tracking URL: http://c5bf52cc122a4e8b8e42bb633501e67704015827933:8088/proxy/application_1579140649715_0003/", + "\t user: trusted-service-user", + "20/01/16 02:24:06 INFO ShutdownHookManager: Shutdown hook called", + "20/01/16 02:24:06 INFO ShutdownHookManager: Deleting directory /tmp/spark-91ae2c9d-68e6-463f-8777-3cb4943600e8", + "20/01/16 02:24:06 INFO ShutdownHookManager: Deleting directory /tmp/spark-7bb6fe6c-9aed-4d01-a39a-e21b9a04cf8a", + "20/01/16 02:24:06 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "20/01/16 02:24:06 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "20/01/16 02:24:06 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nstderr: ", + "\nYARN Diagnostics: " + ] + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/livyApi/versions/2019-11-01-preview/sparkPools/testsparkpool/batches/23", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-400675d40bffaa42a2810f35c647a2b9-313b8717da0aed41-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.Spark/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "a847eddac7948750becf9bdd3287c433", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:47:10 GMT", + "Server": [ + "Kestrel", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "x-ms-activity-id": "26eb127c-fcf4-4e22-bf9c-f5339273ff74", + "x-ms-client-request-id": [ + "a847eddac7948750becf9bdd3287c433", + "a847eddac7948750becf9bdd3287c433" + ], + "x-ms-job-cluster": "http://171.5.132.28:8998/", + "x-ms-job-clusterrequested-on": "1/16/2020 9:36:47 AM \u002B00:00", + "x-ms-job-ended-on": "1/16/2020 9:42:13 AM \u002B00:00", + "x-ms-job-internal-id": "23", + "x-ms-job-livysubmission-on": "1/16/2020 9:39:38 AM \u002B00:00", + "x-ms-job-queued-on": "1/16/2020 9:39:01 AM \u002B00:00", + "x-ms-job-result": "Succeeded", + "x-ms-job-scheduled-on": "1/16/2020 9:36:47 AM \u002B00:00", + "x-ms-job-scheduler-state": "Ended", + "x-ms-job-submitted-by-name": "ca728363-7297-4e35-a9c3-c6400837883e", + "x-ms-job-submitted-on": "1/16/2020 9:36:46 AM \u002B00:00", + "x-ms-job-type": "SparkServiceBatch", + "x-ms-request-id": "8d1484dd-4b78-4872-baf8-8dd2194af334", + "x-ms-response-time-ms": "14" + }, + "ResponseBody": { + "id": 23, + "appId": "application_1579167542444_0001", + "appInfo": { + "driverLogUrl": "http://dff5fe0bf844496b896e527ae28480c20308c150511:8042/node/containerlogs/container_1579167542444_0001_01_000001/trusted-service-user", + "sparkUiUrl": "http://dff5fe0bf844496b896e527ae28480c20442ee71008:8088/proxy/application_1579167542444_0001/" + }, + "state": "success", + "log": [ + "\t tracking URL: http://dff5fe0bf844496b896e527ae28480c20442ee71008:8088/proxy/application_1579167542444_0001/", + "\t user: trusted-service-user", + "20/01/16 09:40:38 INFO ShutdownHookManager: Shutdown hook called", + "20/01/16 09:40:38 INFO ShutdownHookManager: Deleting directory /tmp/spark-64d62c83-9956-4af6-abce-3d4f6084e2f2", + "20/01/16 09:40:38 INFO ShutdownHookManager: Deleting directory /tmp/spark-8191d5d3-b207-474d-969f-290f74820b3e", + "20/01/16 09:40:38 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "20/01/16 09:40:38 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "20/01/16 09:40:38 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nstderr: ", + "\nYARN Diagnostics: " + ] + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/livyApi/versions/2019-11-01-preview/sparkPools/testsparkpool/batches/24", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-ae3942bc7f2e1647bd6e563de8f73341-adefab5d2447784c-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.Spark/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "12d7f314539fb85945fa667ca0b72bfe", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:47:10 GMT", + "Server": [ + "Kestrel", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "x-ms-activity-id": "c78bdcc2-d365-4db1-8e24-3be304049253", + "x-ms-client-request-id": [ + "12d7f314539fb85945fa667ca0b72bfe", + "12d7f314539fb85945fa667ca0b72bfe" + ], + "x-ms-job-clusterrequested-on": "1/1/0001 12:00:00 AM \u002B00:00", + "x-ms-job-ended-on": "1/16/2020 9:37:11 AM \u002B00:00", + "x-ms-job-internal-id": "24", + "x-ms-job-livysubmission-on": "1/1/0001 12:00:00 AM \u002B00:00", + "x-ms-job-queued-on": "1/1/0001 12:00:00 AM \u002B00:00", + "x-ms-job-result": "Cancelled", + "x-ms-job-scheduled-on": "1/1/0001 12:00:00 AM \u002B00:00", + "x-ms-job-scheduler-state": "Ended", + "x-ms-job-submitted-by-name": "ca728363-7297-4e35-a9c3-c6400837883e", + "x-ms-job-submitted-on": "1/16/2020 9:37:10 AM \u002B00:00", + "x-ms-job-type": "SparkServiceBatch", + "x-ms-request-id": "db21377c-a18e-4431-a5ab-a9ec148078aa", + "x-ms-response-time-ms": "15" + }, + "ResponseBody": { + "id": 24, + "appId": null, + "appInfo": null, + "state": "error", + "log": null + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/livyApi/versions/2019-11-01-preview/sparkPools/testsparkpool/batches/25", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-23abe7d42009884b86f894bd143d5f92-390e6e7adced374c-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.Spark/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "59f618639f903e75ec20ee37fe746da8", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:47:10 GMT", + "Server": [ + "Kestrel", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "x-ms-activity-id": "9400bcee-9d55-485c-92e5-bc880518f672", + "x-ms-client-request-id": [ + "59f618639f903e75ec20ee37fe746da8", + "59f618639f903e75ec20ee37fe746da8" + ], + "x-ms-job-clusterrequested-on": "1/1/0001 12:00:00 AM \u002B00:00", + "x-ms-job-ended-on": "1/16/2020 9:37:54 AM \u002B00:00", + "x-ms-job-internal-id": "25", + "x-ms-job-livysubmission-on": "1/1/0001 12:00:00 AM \u002B00:00", + "x-ms-job-queued-on": "1/1/0001 12:00:00 AM \u002B00:00", + "x-ms-job-result": "Cancelled", + "x-ms-job-scheduled-on": "1/1/0001 12:00:00 AM \u002B00:00", + "x-ms-job-scheduler-state": "Ended", + "x-ms-job-submitted-by-name": "ca728363-7297-4e35-a9c3-c6400837883e", + "x-ms-job-submitted-on": "1/16/2020 9:37:54 AM \u002B00:00", + "x-ms-job-type": "SparkServiceBatch", + "x-ms-request-id": "f9f40cf7-3cac-4ae2-a305-518741a7d0ba", + "x-ms-response-time-ms": "14" + }, + "ResponseBody": { + "id": 25, + "appId": null, + "appInfo": null, + "state": "error", + "log": null + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/livyApi/versions/2019-11-01-preview/sparkPools/testsparkpool/batches/26", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-072d9b1815bd37488760b755a77c9b51-f441f05ad4779b41-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.Spark/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "e4b9c21bcb74877f938e629960d3e606", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:47:10 GMT", + "Server": [ + "Kestrel", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "x-ms-activity-id": "35025b6e-9a67-4945-98dc-44853c2a392d", + "x-ms-client-request-id": [ + "e4b9c21bcb74877f938e629960d3e606", + "e4b9c21bcb74877f938e629960d3e606" + ], + "x-ms-job-cluster": "http://171.3.39.9:8998/", + "x-ms-job-clusterrequested-on": "1/19/2020 6:44:14 AM \u002B00:00", + "x-ms-job-ended-on": "1/19/2020 6:47:34 AM \u002B00:00", + "x-ms-job-internal-id": "26", + "x-ms-job-livysubmission-on": "1/19/2020 6:46:05 AM \u002B00:00", + "x-ms-job-queued-on": "1/19/2020 6:46:03 AM \u002B00:00", + "x-ms-job-result": "Succeeded", + "x-ms-job-scheduled-on": "1/19/2020 6:44:13 AM \u002B00:00", + "x-ms-job-scheduler-state": "Ended", + "x-ms-job-submitted-by-name": "zhezhou@microsoft.com", + "x-ms-job-submitted-on": "1/19/2020 6:44:13 AM \u002B00:00", + "x-ms-job-type": "SparkServiceBatch", + "x-ms-request-id": "2f94d779-1d11-4c23-afb9-79985d675543", + "x-ms-response-time-ms": "16" + }, + "ResponseBody": { + "id": 26, + "appId": "application_1579416350077_0001", + "appInfo": { + "driverLogUrl": "http://35c3cd39703446f7b5879bc0b8805f8c001de530649:8042/node/containerlogs/container_1579416350077_0001_01_000001/trusted-service-user", + "sparkUiUrl": "http://35c3cd39703446f7b5879bc0b8805f8c016c6327596:8088/proxy/application_1579416350077_0001/" + }, + "state": "success", + "log": [ + "\t tracking URL: http://35c3cd39703446f7b5879bc0b8805f8c016c6327596:8088/proxy/application_1579416350077_0001/", + "\t user: trusted-service-user", + "20/01/19 06:46:18 INFO ShutdownHookManager: Shutdown hook called", + "20/01/19 06:46:18 INFO ShutdownHookManager: Deleting directory /tmp/spark-de3d608d-97b0-4ca5-a6c5-b05df4a40e8e", + "20/01/19 06:46:18 INFO ShutdownHookManager: Deleting directory /tmp/spark-ab19f399-5768-4010-a5aa-0257fc7ccc71", + "20/01/19 06:46:18 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "20/01/19 06:46:18 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "20/01/19 06:46:18 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nstderr: ", + "\nYARN Diagnostics: " + ] + } + } + ], + "Variables": { + "AZURE_SYNAPSE_SPARK_POOL_NAME": "testsparkpool", + "AZURE_SYNAPSE_WORKSPACE_URL": "https://testsynapseworkspace.dev.azuresynapse.net", + "RandomSeed": "1829589793" + } +} \ No newline at end of file diff --git a/sdk/synapse/Azure.Analytics.Synapse.Spark/tests/SessionRecords/SparkBatchClientLiveTests/TestGetSparkBatchJobAsync.json b/sdk/synapse/Azure.Analytics.Synapse.Spark/tests/SessionRecords/SparkBatchClientLiveTests/TestGetSparkBatchJobAsync.json new file mode 100644 index 000000000000..9cc39ad0039c --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Spark/tests/SessionRecords/SparkBatchClientLiveTests/TestGetSparkBatchJobAsync.json @@ -0,0 +1,1716 @@ +{ + "Entries": [ + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/livyApi/versions/2019-11-01-preview/sparkPools/testsparkpool/batches", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-5f6c503d077ddc4395451743a4b66ce1-63ca33382f252e4f-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.Spark/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "7240ae92bc92f98808f09324ab76fe76", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:47:11 GMT", + "Server": [ + "Kestrel", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "x-ms-activity-id": "70613720-cbc3-4507-b2ac-1444b5f76b3c", + "x-ms-client-request-id": [ + "7240ae92bc92f98808f09324ab76fe76", + "7240ae92bc92f98808f09324ab76fe76" + ], + "x-ms-request-id": "26798a4d-3bd8-4f69-a093-6640a18d3df4", + "x-ms-response-time-ms": "62" + }, + "ResponseBody": { + "from": 0, + "total": 20, + "sessions": [ + { + "id": 0, + "appId": "application_1576224831757_0002", + "appInfo": { + "driverLogUrl": "http://53e52930712f4bd2a64da26879c4751c0076c436679:8042/node/containerlogs/container_1576224831757_0002_01_000001/trusted-service-user", + "sparkUiUrl": "http://53e52930712f4bd2a64da26879c4751c01223913297:8088/proxy/application_1576224831757_0002/" + }, + "state": "success", + "log": [ + "\t tracking URL: http://53e52930712f4bd2a64da26879c4751c01223913297:8088/proxy/application_1576224831757_0002/", + "\t user: trusted-service-user", + "19/12/13 08:14:22 INFO ShutdownHookManager: Shutdown hook called", + "19/12/13 08:14:22 INFO ShutdownHookManager: Deleting directory /tmp/spark-badf96dc-0837-41ba-9944-05f55277f611", + "19/12/13 08:14:22 INFO ShutdownHookManager: Deleting directory /tmp/spark-04ab468f-e186-458c-91cd-ef6c97f5dff5", + "19/12/13 08:14:22 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "19/12/13 08:14:22 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "19/12/13 08:14:22 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nstderr: ", + "\nYARN Diagnostics: " + ] + }, + { + "id": 1, + "appId": "application_1576224831757_0001", + "appInfo": { + "driverLogUrl": "http://53e52930712f4bd2a64da26879c4751c03817035090:8042/node/containerlogs/container_1576224831757_0001_01_000001/trusted-service-user", + "sparkUiUrl": "http://53e52930712f4bd2a64da26879c4751c01223913297:8088/proxy/application_1576224831757_0001/" + }, + "state": "success", + "log": [ + "\t tracking URL: http://53e52930712f4bd2a64da26879c4751c01223913297:8088/proxy/application_1576224831757_0001/", + "\t user: trusted-service-user", + "19/12/13 08:14:22 INFO ShutdownHookManager: Shutdown hook called", + "19/12/13 08:14:22 INFO ShutdownHookManager: Deleting directory /tmp/spark-080c8c63-d0dd-487d-a757-faf7b5efd9f1", + "19/12/13 08:14:22 INFO ShutdownHookManager: Deleting directory /tmp/spark-aaed5be7-2685-4c28-a43c-8f37b9521d4f", + "19/12/13 08:14:22 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "19/12/13 08:14:22 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "19/12/13 08:14:22 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nstderr: ", + "\nYARN Diagnostics: " + ] + }, + { + "id": 3, + "appId": null, + "appInfo": { + "driverLogUrl": null, + "sparkUiUrl": null + }, + "state": "dead", + "log": [ + "\tat org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:933)", + "\tat org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)", + "19/12/25 03:56:47 INFO ShutdownHookManager: Shutdown hook called", + "19/12/25 03:56:47 INFO ShutdownHookManager: Deleting directory /tmp/spark-3ae6f965-dcbc-4b3e-9c59-d5c0da9d1d66", + "19/12/25 03:56:47 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "19/12/25 03:56:47 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "19/12/25 03:56:47 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nstderr: ", + "\nYARN Diagnostics: ", + "No YARN application is found with tag livy-batch-0-7v8dgkxr in 300 seconds. This may be because 1) spark-submit fail to submit application to YARN; or 2) YARN cluster doesn\u0027t have enough resources to start the application in time. Please check Livy log and YARN log to know the details." + ] + }, + { + "id": 4, + "appId": "application_1577252484917_0001", + "appInfo": { + "driverLogUrl": "http://59cc110db6dc46ac89103137e0c646e100149e16655:8042/node/containerlogs/container_1577252484917_0001_01_000001/trusted-service-user", + "sparkUiUrl": "http://59cc110db6dc46ac89103137e0c646e104164268157:8088/proxy/application_1577252484917_0001/" + }, + "state": "success", + "log": [ + "\t tracking URL: http://59cc110db6dc46ac89103137e0c646e104164268157:8088/proxy/application_1577252484917_0001/", + "\t user: trusted-service-user", + "19/12/25 05:42:14 INFO ShutdownHookManager: Shutdown hook called", + "19/12/25 05:42:14 INFO ShutdownHookManager: Deleting directory /tmp/spark-0c814ed9-49f2-4d82-8e8f-28b2f089f7fd", + "19/12/25 05:42:14 INFO ShutdownHookManager: Deleting directory /tmp/spark-2f0a0fda-0d9d-40b2-a300-795d45a67025", + "19/12/25 05:42:14 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "19/12/25 05:42:14 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "19/12/25 05:42:14 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nstderr: ", + "\nYARN Diagnostics: " + ] + }, + { + "id": 5, + "appId": null, + "appInfo": { + "driverLogUrl": null, + "sparkUiUrl": null + }, + "state": "killed", + "log": [ + "stdout: ", + "\nstderr: ", + "\nYARN Diagnostics: " + ] + }, + { + "id": 12, + "appId": "application_1578623882988_0001", + "appInfo": { + "driverLogUrl": "http://ce76a4b8792e4537a006d10d8954727a0370ec92478:8042/node/containerlogs/container_1578623882988_0001_01_000001/trusted-service-user", + "sparkUiUrl": "http://ce76a4b8792e4537a006d10d8954727a04390958445:8088/proxy/application_1578623882988_0001/" + }, + "state": "success", + "log": [ + "\t tracking URL: http://ce76a4b8792e4537a006d10d8954727a04390958445:8088/proxy/application_1578623882988_0001/", + "\t user: trusted-service-user", + "20/01/10 02:39:19 INFO ShutdownHookManager: Shutdown hook called", + "20/01/10 02:39:19 INFO ShutdownHookManager: Deleting directory /tmp/spark-5ecda28f-e4b9-4a78-8c2d-da3048be2f0e", + "20/01/10 02:39:19 INFO ShutdownHookManager: Deleting directory /tmp/spark-0164a65c-591c-460d-ab19-c67ae8b411d6", + "20/01/10 02:39:19 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "20/01/10 02:39:19 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "20/01/10 02:39:19 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nstderr: ", + "\nYARN Diagnostics: " + ] + }, + { + "id": 13, + "appId": "application_1578627484298_0001", + "appInfo": { + "driverLogUrl": "http://9b16e3f9ff074564bf178da319ac14c60157d104065:8042/node/containerlogs/container_1578627484298_0001_01_000001/trusted-service-user", + "sparkUiUrl": "http://9b16e3f9ff074564bf178da319ac14c6021e9217492:8088/proxy/application_1578627484298_0001/" + }, + "state": "success", + "log": [ + "\t tracking URL: http://9b16e3f9ff074564bf178da319ac14c6021e9217492:8088/proxy/application_1578627484298_0001/", + "\t user: trusted-service-user", + "20/01/10 03:38:58 INFO ShutdownHookManager: Shutdown hook called", + "20/01/10 03:38:58 INFO ShutdownHookManager: Deleting directory /tmp/spark-3510c3ec-19c2-4675-8431-9d4c4b2e3cf5", + "20/01/10 03:38:58 INFO ShutdownHookManager: Deleting directory /tmp/spark-925b68f4-72d8-4ac7-b62d-f7005eb5adaf", + "20/01/10 03:38:58 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "20/01/10 03:38:58 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "20/01/10 03:38:58 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nstderr: ", + "\nYARN Diagnostics: " + ] + }, + { + "id": 14, + "appId": "application_1578627484298_0002", + "appInfo": { + "driverLogUrl": "http://9b16e3f9ff074564bf178da319ac14c6013fa834371:8042/node/containerlogs/container_1578627484298_0002_01_000001/trusted-service-user", + "sparkUiUrl": "http://9b16e3f9ff074564bf178da319ac14c6021e9217492:8088/proxy/application_1578627484298_0002/" + }, + "state": "success", + "log": [ + "\t tracking URL: http://9b16e3f9ff074564bf178da319ac14c6021e9217492:8088/proxy/application_1578627484298_0002/", + "\t user: trusted-service-user", + "20/01/10 03:40:45 INFO ShutdownHookManager: Shutdown hook called", + "20/01/10 03:40:45 INFO ShutdownHookManager: Deleting directory /tmp/spark-05372e52-3f31-435b-9a89-f0e59d031147", + "20/01/10 03:40:45 INFO ShutdownHookManager: Deleting directory /tmp/spark-6d758165-8230-4281-b7ba-9b8fef9d6d19", + "20/01/10 03:40:45 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "20/01/10 03:40:45 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "20/01/10 03:40:45 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nstderr: ", + "\nYARN Diagnostics: " + ] + }, + { + "id": 15, + "appId": "application_1578630430582_0001", + "appInfo": { + "driverLogUrl": "http://8e6f1bbb1f0d402ead227bfb3f9541ce029e8073802:8042/node/containerlogs/container_1578630430582_0001_01_000001/trusted-service-user", + "sparkUiUrl": "http://8e6f1bbb1f0d402ead227bfb3f9541ce019a8a47711:8088/proxy/application_1578630430582_0001/" + }, + "state": "success", + "log": [ + "\t tracking URL: http://8e6f1bbb1f0d402ead227bfb3f9541ce019a8a47711:8088/proxy/application_1578630430582_0001/", + "\t user: trusted-service-user", + "20/01/10 04:28:11 INFO ShutdownHookManager: Shutdown hook called", + "20/01/10 04:28:11 INFO ShutdownHookManager: Deleting directory /tmp/spark-e7390b6e-3c89-4d15-8504-dfc0713dbac2", + "20/01/10 04:28:11 INFO ShutdownHookManager: Deleting directory /tmp/spark-1aa9ff81-602d-483e-8523-72db6bf69662", + "20/01/10 04:28:11 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "20/01/10 04:28:11 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "20/01/10 04:28:11 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nstderr: ", + "\nYARN Diagnostics: " + ] + }, + { + "id": 16, + "appId": "application_1578883706606_0001", + "appInfo": { + "driverLogUrl": "http://e3c1df4b4aa94ae6b7e5d19359b699fe041b3e01222:8042/node/containerlogs/container_1578883706606_0001_01_000001/trusted-service-user", + "sparkUiUrl": "http://e3c1df4b4aa94ae6b7e5d19359b699fe0302c276274:8088/proxy/application_1578883706606_0001/" + }, + "state": "success", + "log": [ + "\t tracking URL: http://e3c1df4b4aa94ae6b7e5d19359b699fe0302c276274:8088/proxy/application_1578883706606_0001/", + "\t user: trusted-service-user", + "20/01/13 02:49:38 INFO ShutdownHookManager: Shutdown hook called", + "20/01/13 02:49:38 INFO ShutdownHookManager: Deleting directory /tmp/spark-2c25f086-79bf-4db5-98ef-a50ec241447f", + "20/01/13 02:49:38 INFO ShutdownHookManager: Deleting directory /tmp/spark-6e4d32f6-a1ab-4b78-967e-068b74920ad7", + "20/01/13 02:49:38 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "20/01/13 02:49:38 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "20/01/13 02:49:38 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nstderr: ", + "\nYARN Diagnostics: " + ] + }, + { + "id": 17, + "appId": "application_1578989125483_0001", + "appInfo": { + "driverLogUrl": "http://1657321302a648dcb31a6629c8d3bc9b040d6388685:8042/node/containerlogs/container_1578989125483_0001_02_000001/trusted-service-user", + "sparkUiUrl": "http://1657321302a648dcb31a6629c8d3bc9b0230e607756:8088/cluster/app/application_1578989125483_0001" + }, + "state": "dead", + "log": [ + "20/01/14 08:07:59 WARN AzureFileSystemThreadPoolExecutor: Disabling threads for Delete operation as thread count 0 is \u003C= 1", + "20/01/14 08:07:59 INFO AzureFileSystemThreadPoolExecutor: Time taken for Delete operation is: 13 ms with threads: 0", + "20/01/14 08:07:59 INFO ShutdownHookManager: Shutdown hook called", + "20/01/14 08:07:59 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "20/01/14 08:07:59 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "20/01/14 08:07:59 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "", + "", + "For more detailed output, check the application tracking page: http://1657321302a648dcb31a6629c8d3bc9b0230e607756:8088/cluster/app/application_1578989125483_0001 Then click on links to logs of each attempt.", + ". Failing the application." + ] + }, + { + "id": 18, + "appId": "application_1578989125483_0002", + "appInfo": { + "driverLogUrl": "http://1657321302a648dcb31a6629c8d3bc9b012e5f40483:8042/node/containerlogs/container_1578989125483_0002_01_000001/trusted-service-user", + "sparkUiUrl": "http://1657321302a648dcb31a6629c8d3bc9b0230e607756:8088/proxy/application_1578989125483_0002/" + }, + "state": "success", + "log": [ + "\t tracking URL: http://1657321302a648dcb31a6629c8d3bc9b0230e607756:8088/proxy/application_1578989125483_0002/", + "\t user: trusted-service-user", + "20/01/14 08:23:13 INFO ShutdownHookManager: Shutdown hook called", + "20/01/14 08:23:13 INFO ShutdownHookManager: Deleting directory /tmp/spark-07aae8db-d0be-4c05-803a-474c353ffeb4", + "20/01/14 08:23:13 INFO ShutdownHookManager: Deleting directory /tmp/spark-dd484af5-ca45-44d9-adac-609c2a76e34e", + "20/01/14 08:23:13 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "20/01/14 08:23:13 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "20/01/14 08:23:13 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nstderr: ", + "\nYARN Diagnostics: " + ] + }, + { + "id": 19, + "appId": "application_1579051421404_0001", + "appInfo": { + "driverLogUrl": "http://1b69b0a4ed994f7ea95f9d85f63a3083009f3081028:8042/node/containerlogs/container_1579051421404_0001_01_000001/trusted-service-user", + "sparkUiUrl": "http://1b69b0a4ed994f7ea95f9d85f63a308302603012606:8088/proxy/application_1579051421404_0001/" + }, + "state": "success", + "log": [ + "\t tracking URL: http://1b69b0a4ed994f7ea95f9d85f63a308302603012606:8088/proxy/application_1579051421404_0001/", + "\t user: trusted-service-user", + "20/01/15 01:24:14 INFO ShutdownHookManager: Shutdown hook called", + "20/01/15 01:24:14 INFO ShutdownHookManager: Deleting directory /tmp/spark-e9350640-4f8f-4f9d-8b8b-6dff3a6104fa", + "20/01/15 01:24:14 INFO ShutdownHookManager: Deleting directory /tmp/spark-dc37dd45-d38e-4c84-b821-602d8c111e23", + "20/01/15 01:24:14 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "20/01/15 01:24:14 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "20/01/15 01:24:14 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nstderr: ", + "\nYARN Diagnostics: " + ] + }, + { + "id": 20, + "appId": "application_1579140649715_0001", + "appInfo": { + "driverLogUrl": "http://c5bf52cc122a4e8b8e42bb633501e6770007eb66248:8042/node/containerlogs/container_1579140649715_0001_01_000001/trusted-service-user", + "sparkUiUrl": "http://c5bf52cc122a4e8b8e42bb633501e67704015827933:8088/proxy/application_1579140649715_0001/" + }, + "state": "success", + "log": [ + "\t tracking URL: http://c5bf52cc122a4e8b8e42bb633501e67704015827933:8088/proxy/application_1579140649715_0001/", + "\t user: trusted-service-user", + "20/01/16 02:11:50 INFO ShutdownHookManager: Shutdown hook called", + "20/01/16 02:11:50 INFO ShutdownHookManager: Deleting directory /tmp/spark-dcd3cb18-f03f-4ac5-967f-51fa07df172f", + "20/01/16 02:11:50 INFO ShutdownHookManager: Deleting directory /tmp/spark-68628a62-1cf0-4f58-bb6b-22fc97b2cc0b", + "20/01/16 02:11:51 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "20/01/16 02:11:51 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "20/01/16 02:11:51 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nstderr: ", + "\nYARN Diagnostics: " + ] + }, + { + "id": 21, + "appId": "application_1579140649715_0002", + "appInfo": { + "driverLogUrl": "http://c5bf52cc122a4e8b8e42bb633501e67702199d05116:8042/node/containerlogs/container_1579140649715_0002_01_000001/trusted-service-user", + "sparkUiUrl": "http://c5bf52cc122a4e8b8e42bb633501e67704015827933:8088/proxy/application_1579140649715_0002/" + }, + "state": "success", + "log": [ + "\t tracking URL: http://c5bf52cc122a4e8b8e42bb633501e67704015827933:8088/proxy/application_1579140649715_0002/", + "\t user: trusted-service-user", + "20/01/16 02:21:17 INFO ShutdownHookManager: Shutdown hook called", + "20/01/16 02:21:17 INFO ShutdownHookManager: Deleting directory /tmp/spark-acb065c5-b5a0-43f5-9bfc-13a0dc232598", + "20/01/16 02:21:17 INFO ShutdownHookManager: Deleting directory /tmp/spark-2f39dc65-0986-4470-ac8c-e41754627e0e", + "20/01/16 02:21:17 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "20/01/16 02:21:17 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "20/01/16 02:21:17 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nstderr: ", + "\nYARN Diagnostics: " + ] + }, + { + "id": 22, + "appId": "application_1579140649715_0003", + "appInfo": { + "driverLogUrl": "http://c5bf52cc122a4e8b8e42bb633501e67702712f69936:8042/node/containerlogs/container_1579140649715_0003_01_000001/trusted-service-user", + "sparkUiUrl": "http://c5bf52cc122a4e8b8e42bb633501e67704015827933:8088/proxy/application_1579140649715_0003/" + }, + "state": "success", + "log": [ + "\t tracking URL: http://c5bf52cc122a4e8b8e42bb633501e67704015827933:8088/proxy/application_1579140649715_0003/", + "\t user: trusted-service-user", + "20/01/16 02:24:06 INFO ShutdownHookManager: Shutdown hook called", + "20/01/16 02:24:06 INFO ShutdownHookManager: Deleting directory /tmp/spark-91ae2c9d-68e6-463f-8777-3cb4943600e8", + "20/01/16 02:24:06 INFO ShutdownHookManager: Deleting directory /tmp/spark-7bb6fe6c-9aed-4d01-a39a-e21b9a04cf8a", + "20/01/16 02:24:06 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "20/01/16 02:24:06 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "20/01/16 02:24:06 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nstderr: ", + "\nYARN Diagnostics: " + ] + }, + { + "id": 23, + "appId": "application_1579167542444_0001", + "appInfo": { + "driverLogUrl": "http://dff5fe0bf844496b896e527ae28480c20308c150511:8042/node/containerlogs/container_1579167542444_0001_01_000001/trusted-service-user", + "sparkUiUrl": "http://dff5fe0bf844496b896e527ae28480c20442ee71008:8088/proxy/application_1579167542444_0001/" + }, + "state": "success", + "log": [ + "\t tracking URL: http://dff5fe0bf844496b896e527ae28480c20442ee71008:8088/proxy/application_1579167542444_0001/", + "\t user: trusted-service-user", + "20/01/16 09:40:38 INFO ShutdownHookManager: Shutdown hook called", + "20/01/16 09:40:38 INFO ShutdownHookManager: Deleting directory /tmp/spark-64d62c83-9956-4af6-abce-3d4f6084e2f2", + "20/01/16 09:40:38 INFO ShutdownHookManager: Deleting directory /tmp/spark-8191d5d3-b207-474d-969f-290f74820b3e", + "20/01/16 09:40:38 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "20/01/16 09:40:38 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "20/01/16 09:40:38 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nstderr: ", + "\nYARN Diagnostics: " + ] + }, + { + "id": 24, + "appId": null, + "appInfo": null, + "state": "error", + "log": null + }, + { + "id": 25, + "appId": null, + "appInfo": null, + "state": "error", + "log": null + }, + { + "id": 26, + "appId": "application_1579416350077_0001", + "appInfo": { + "driverLogUrl": "http://35c3cd39703446f7b5879bc0b8805f8c001de530649:8042/node/containerlogs/container_1579416350077_0001_01_000001/trusted-service-user", + "sparkUiUrl": "http://35c3cd39703446f7b5879bc0b8805f8c016c6327596:8088/proxy/application_1579416350077_0001/" + }, + "state": "success", + "log": [ + "\t tracking URL: http://35c3cd39703446f7b5879bc0b8805f8c016c6327596:8088/proxy/application_1579416350077_0001/", + "\t user: trusted-service-user", + "20/01/19 06:46:18 INFO ShutdownHookManager: Shutdown hook called", + "20/01/19 06:46:18 INFO ShutdownHookManager: Deleting directory /tmp/spark-de3d608d-97b0-4ca5-a6c5-b05df4a40e8e", + "20/01/19 06:46:18 INFO ShutdownHookManager: Deleting directory /tmp/spark-ab19f399-5768-4010-a5aa-0257fc7ccc71", + "20/01/19 06:46:18 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "20/01/19 06:46:18 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "20/01/19 06:46:18 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nstderr: ", + "\nYARN Diagnostics: " + ] + } + ] + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/livyApi/versions/2019-11-01-preview/sparkPools/testsparkpool/batches/0", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-27ca1e5e26164a4083b31823badd1560-25d979dbf7e04c45-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.Spark/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "ff6dea7ac3bdc068e1be241635596be7", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:47:11 GMT", + "Server": [ + "Kestrel", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "x-ms-activity-id": "acbbbf3f-b038-497b-bd2b-def05acd05fa", + "x-ms-client-request-id": [ + "ff6dea7ac3bdc068e1be241635596be7", + "ff6dea7ac3bdc068e1be241635596be7" + ], + "x-ms-job-cluster": "http://171.1.154.21:8998/", + "x-ms-job-clusterrequested-on": "12/13/2019 8:11:39 AM \u002B00:00", + "x-ms-job-ended-on": "12/13/2019 8:15:16 AM \u002B00:00", + "x-ms-job-internal-id": "0", + "x-ms-job-livysubmission-on": "12/13/2019 8:13:59 AM \u002B00:00", + "x-ms-job-queued-on": "12/13/2019 8:13:58 AM \u002B00:00", + "x-ms-job-result": "Succeeded", + "x-ms-job-scheduled-on": "12/13/2019 8:11:39 AM \u002B00:00", + "x-ms-job-scheduler-state": "Ended", + "x-ms-job-submitted-by-name": "ca728363-7297-4e35-a9c3-c6400837883e", + "x-ms-job-submitted-on": "12/13/2019 8:11:38 AM \u002B00:00", + "x-ms-job-type": "SparkServiceBatch", + "x-ms-request-id": "002db304-904d-419a-826f-38c48e10f454", + "x-ms-response-time-ms": "16" + }, + "ResponseBody": { + "id": 0, + "appId": "application_1576224831757_0002", + "appInfo": { + "driverLogUrl": "http://53e52930712f4bd2a64da26879c4751c0076c436679:8042/node/containerlogs/container_1576224831757_0002_01_000001/trusted-service-user", + "sparkUiUrl": "http://53e52930712f4bd2a64da26879c4751c01223913297:8088/proxy/application_1576224831757_0002/" + }, + "state": "success", + "log": [ + "\t tracking URL: http://53e52930712f4bd2a64da26879c4751c01223913297:8088/proxy/application_1576224831757_0002/", + "\t user: trusted-service-user", + "19/12/13 08:14:22 INFO ShutdownHookManager: Shutdown hook called", + "19/12/13 08:14:22 INFO ShutdownHookManager: Deleting directory /tmp/spark-badf96dc-0837-41ba-9944-05f55277f611", + "19/12/13 08:14:22 INFO ShutdownHookManager: Deleting directory /tmp/spark-04ab468f-e186-458c-91cd-ef6c97f5dff5", + "19/12/13 08:14:22 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "19/12/13 08:14:22 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "19/12/13 08:14:22 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nstderr: ", + "\nYARN Diagnostics: " + ] + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/livyApi/versions/2019-11-01-preview/sparkPools/testsparkpool/batches/1", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-09107bd7da7aee4bbeae462f16cd2150-71b9b1deb002524b-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.Spark/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "265d3e6a83edfa1a0db17e03ad38135a", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:47:11 GMT", + "Server": [ + "Kestrel", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "x-ms-activity-id": "ff224f1a-2463-41d3-a8f7-6c3b01231642", + "x-ms-client-request-id": [ + "265d3e6a83edfa1a0db17e03ad38135a", + "265d3e6a83edfa1a0db17e03ad38135a" + ], + "x-ms-job-cluster": "http://171.1.154.21:8998/", + "x-ms-job-clusterrequested-on": "12/13/2019 8:12:13 AM \u002B00:00", + "x-ms-job-ended-on": "12/13/2019 8:15:38 AM \u002B00:00", + "x-ms-job-internal-id": "1", + "x-ms-job-livysubmission-on": "12/13/2019 8:13:59 AM \u002B00:00", + "x-ms-job-queued-on": "12/13/2019 8:13:58 AM \u002B00:00", + "x-ms-job-result": "Succeeded", + "x-ms-job-scheduled-on": "12/13/2019 8:12:12 AM \u002B00:00", + "x-ms-job-scheduler-state": "Ended", + "x-ms-job-submitted-by-name": "ca728363-7297-4e35-a9c3-c6400837883e", + "x-ms-job-submitted-on": "12/13/2019 8:12:11 AM \u002B00:00", + "x-ms-job-type": "SparkServiceBatch", + "x-ms-request-id": "f027a2c7-12e7-44e0-b785-dc99edde7474", + "x-ms-response-time-ms": "15" + }, + "ResponseBody": { + "id": 1, + "appId": "application_1576224831757_0001", + "appInfo": { + "driverLogUrl": "http://53e52930712f4bd2a64da26879c4751c03817035090:8042/node/containerlogs/container_1576224831757_0001_01_000001/trusted-service-user", + "sparkUiUrl": "http://53e52930712f4bd2a64da26879c4751c01223913297:8088/proxy/application_1576224831757_0001/" + }, + "state": "success", + "log": [ + "\t tracking URL: http://53e52930712f4bd2a64da26879c4751c01223913297:8088/proxy/application_1576224831757_0001/", + "\t user: trusted-service-user", + "19/12/13 08:14:22 INFO ShutdownHookManager: Shutdown hook called", + "19/12/13 08:14:22 INFO ShutdownHookManager: Deleting directory /tmp/spark-080c8c63-d0dd-487d-a757-faf7b5efd9f1", + "19/12/13 08:14:22 INFO ShutdownHookManager: Deleting directory /tmp/spark-aaed5be7-2685-4c28-a43c-8f37b9521d4f", + "19/12/13 08:14:22 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "19/12/13 08:14:22 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "19/12/13 08:14:22 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nstderr: ", + "\nYARN Diagnostics: " + ] + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/livyApi/versions/2019-11-01-preview/sparkPools/testsparkpool/batches/3", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-bd58f653002c2f409bf8fc6210ce7be5-7eacd880f2bbec44-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.Spark/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "ecf737e64fd8cfe4467f90d39871c3ae", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:47:11 GMT", + "Server": [ + "Kestrel", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "x-ms-activity-id": "4c9a0629-c3d9-4c21-acf3-fb8cdbd7799c", + "x-ms-client-request-id": [ + "ecf737e64fd8cfe4467f90d39871c3ae", + "ecf737e64fd8cfe4467f90d39871c3ae" + ], + "x-ms-job-cluster": "http://171.1.155.33:8998/", + "x-ms-job-clusterrequested-on": "12/25/2019 3:54:32 AM \u002B00:00", + "x-ms-job-ended-on": "12/25/2019 4:01:30 AM \u002B00:00", + "x-ms-job-internal-id": "3", + "x-ms-job-livysubmission-on": "12/25/2019 3:56:21 AM \u002B00:00", + "x-ms-job-queued-on": "12/25/2019 3:56:20 AM \u002B00:00", + "x-ms-job-result": "Failed", + "x-ms-job-scheduled-on": "12/25/2019 3:54:32 AM \u002B00:00", + "x-ms-job-scheduler-state": "Ended", + "x-ms-job-submitted-by-name": "zhezhou@microsoft.com", + "x-ms-job-submitted-on": "12/25/2019 3:54:31 AM \u002B00:00", + "x-ms-job-type": "SparkServiceBatch", + "x-ms-request-id": "5a2e2d11-74df-42e7-a336-e04d11c088ba", + "x-ms-response-time-ms": "15" + }, + "ResponseBody": { + "id": 3, + "appId": null, + "appInfo": { + "driverLogUrl": null, + "sparkUiUrl": null + }, + "state": "dead", + "log": [ + "\tat org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:933)", + "\tat org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)", + "19/12/25 03:56:47 INFO ShutdownHookManager: Shutdown hook called", + "19/12/25 03:56:47 INFO ShutdownHookManager: Deleting directory /tmp/spark-3ae6f965-dcbc-4b3e-9c59-d5c0da9d1d66", + "19/12/25 03:56:47 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "19/12/25 03:56:47 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "19/12/25 03:56:47 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nstderr: ", + "\nYARN Diagnostics: ", + "No YARN application is found with tag livy-batch-0-7v8dgkxr in 300 seconds. This may be because 1) spark-submit fail to submit application to YARN; or 2) YARN cluster doesn\u0027t have enough resources to start the application in time. Please check Livy log and YARN log to know the details." + ] + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/livyApi/versions/2019-11-01-preview/sparkPools/testsparkpool/batches/4", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-794d4d56128f1e4a9fbd3a8e885ee137-3280fe9617be4b4e-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.Spark/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "6dbaab85d819f789d073f20c446413a9", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:47:11 GMT", + "Server": [ + "Kestrel", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "x-ms-activity-id": "1a2acea3-5c38-4099-9d35-21a7cf7a710b", + "x-ms-client-request-id": [ + "6dbaab85d819f789d073f20c446413a9", + "6dbaab85d819f789d073f20c446413a9" + ], + "x-ms-job-cluster": "http://171.3.43.22:8998/", + "x-ms-job-clusterrequested-on": "12/25/2019 5:39:14 AM \u002B00:00", + "x-ms-job-ended-on": "12/25/2019 5:43:41 AM \u002B00:00", + "x-ms-job-internal-id": "4", + "x-ms-job-livysubmission-on": "12/25/2019 5:41:50 AM \u002B00:00", + "x-ms-job-queued-on": "12/25/2019 5:41:09 AM \u002B00:00", + "x-ms-job-result": "Succeeded", + "x-ms-job-scheduled-on": "12/25/2019 5:39:14 AM \u002B00:00", + "x-ms-job-scheduler-state": "Ended", + "x-ms-job-submitted-by-name": "zhezhou@microsoft.com", + "x-ms-job-submitted-on": "12/25/2019 5:39:13 AM \u002B00:00", + "x-ms-job-type": "SparkServiceBatch", + "x-ms-request-id": "eed4bd50-e8d6-446c-aae1-3a4f0a58b338", + "x-ms-response-time-ms": "16" + }, + "ResponseBody": { + "id": 4, + "appId": "application_1577252484917_0001", + "appInfo": { + "driverLogUrl": "http://59cc110db6dc46ac89103137e0c646e100149e16655:8042/node/containerlogs/container_1577252484917_0001_01_000001/trusted-service-user", + "sparkUiUrl": "http://59cc110db6dc46ac89103137e0c646e104164268157:8088/proxy/application_1577252484917_0001/" + }, + "state": "success", + "log": [ + "\t tracking URL: http://59cc110db6dc46ac89103137e0c646e104164268157:8088/proxy/application_1577252484917_0001/", + "\t user: trusted-service-user", + "19/12/25 05:42:14 INFO ShutdownHookManager: Shutdown hook called", + "19/12/25 05:42:14 INFO ShutdownHookManager: Deleting directory /tmp/spark-0c814ed9-49f2-4d82-8e8f-28b2f089f7fd", + "19/12/25 05:42:14 INFO ShutdownHookManager: Deleting directory /tmp/spark-2f0a0fda-0d9d-40b2-a300-795d45a67025", + "19/12/25 05:42:14 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "19/12/25 05:42:14 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "19/12/25 05:42:14 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nstderr: ", + "\nYARN Diagnostics: " + ] + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/livyApi/versions/2019-11-01-preview/sparkPools/testsparkpool/batches/5", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-47d4ebc81ccbff4193f29fffa3fe4a4a-d76c94aa51ad934a-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.Spark/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "fe2fc9ab7f621b0e598de06df246619b", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:47:11 GMT", + "Server": [ + "Kestrel", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "x-ms-activity-id": "20588c68-8c7c-4071-8625-5c7857d82da9", + "x-ms-client-request-id": [ + "fe2fc9ab7f621b0e598de06df246619b", + "fe2fc9ab7f621b0e598de06df246619b" + ], + "x-ms-job-cluster": "http://171.3.43.22:8998/", + "x-ms-job-clusterrequested-on": "12/25/2019 5:48:35 AM \u002B00:00", + "x-ms-job-ended-on": "12/25/2019 5:48:48 AM \u002B00:00", + "x-ms-job-internal-id": "5", + "x-ms-job-livysubmission-on": "12/25/2019 5:48:37 AM \u002B00:00", + "x-ms-job-queued-on": "12/25/2019 5:48:37 AM \u002B00:00", + "x-ms-job-result": "Cancelled", + "x-ms-job-scheduled-on": "12/25/2019 5:48:34 AM \u002B00:00", + "x-ms-job-scheduler-state": "Ended", + "x-ms-job-submitted-by-name": "zhezhou@microsoft.com", + "x-ms-job-submitted-on": "12/25/2019 5:48:34 AM \u002B00:00", + "x-ms-job-type": "SparkServiceBatch", + "x-ms-request-id": "53262477-f066-41ce-95eb-958ecefbd581", + "x-ms-response-time-ms": "15" + }, + "ResponseBody": { + "id": 5, + "appId": null, + "appInfo": { + "driverLogUrl": null, + "sparkUiUrl": null + }, + "state": "killed", + "log": [ + "stdout: ", + "\nstderr: ", + "\nYARN Diagnostics: " + ] + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/livyApi/versions/2019-11-01-preview/sparkPools/testsparkpool/batches/12", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-93c8bd7e08b69c40bcbbb6a4e420d72f-d781f9780b62da49-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.Spark/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "017ecfeda57e0e41ae001c655cd78be1", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:47:11 GMT", + "Server": [ + "Kestrel", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "x-ms-activity-id": "6342b5c8-8175-42b6-bdcb-a2bb9b059eea", + "x-ms-client-request-id": [ + "017ecfeda57e0e41ae001c655cd78be1", + "017ecfeda57e0e41ae001c655cd78be1" + ], + "x-ms-job-cluster": "http://171.0.6.20:8998/", + "x-ms-job-clusterrequested-on": "1/10/2020 2:36:05 AM \u002B00:00", + "x-ms-job-ended-on": "1/10/2020 2:41:21 AM \u002B00:00", + "x-ms-job-internal-id": "12", + "x-ms-job-livysubmission-on": "1/10/2020 2:38:45 AM \u002B00:00", + "x-ms-job-queued-on": "1/10/2020 2:37:52 AM \u002B00:00", + "x-ms-job-result": "Succeeded", + "x-ms-job-scheduled-on": "1/10/2020 2:36:04 AM \u002B00:00", + "x-ms-job-scheduler-state": "Ended", + "x-ms-job-submitted-by-name": "zhezhou@microsoft.com", + "x-ms-job-submitted-on": "1/10/2020 2:36:03 AM \u002B00:00", + "x-ms-job-type": "SparkServiceBatch", + "x-ms-request-id": "f91c46f0-4e66-431b-b74d-ee1c12e62663", + "x-ms-response-time-ms": "16" + }, + "ResponseBody": { + "id": 12, + "appId": "application_1578623882988_0001", + "appInfo": { + "driverLogUrl": "http://ce76a4b8792e4537a006d10d8954727a0370ec92478:8042/node/containerlogs/container_1578623882988_0001_01_000001/trusted-service-user", + "sparkUiUrl": "http://ce76a4b8792e4537a006d10d8954727a04390958445:8088/proxy/application_1578623882988_0001/" + }, + "state": "success", + "log": [ + "\t tracking URL: http://ce76a4b8792e4537a006d10d8954727a04390958445:8088/proxy/application_1578623882988_0001/", + "\t user: trusted-service-user", + "20/01/10 02:39:19 INFO ShutdownHookManager: Shutdown hook called", + "20/01/10 02:39:19 INFO ShutdownHookManager: Deleting directory /tmp/spark-5ecda28f-e4b9-4a78-8c2d-da3048be2f0e", + "20/01/10 02:39:19 INFO ShutdownHookManager: Deleting directory /tmp/spark-0164a65c-591c-460d-ab19-c67ae8b411d6", + "20/01/10 02:39:19 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "20/01/10 02:39:19 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "20/01/10 02:39:19 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nstderr: ", + "\nYARN Diagnostics: " + ] + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/livyApi/versions/2019-11-01-preview/sparkPools/testsparkpool/batches/13", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-4d215e5cb41da24eb037a23729e64738-2959eb674a5d9a4e-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.Spark/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "cf28e76bc541064c9c9f138bf71b0489", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:47:11 GMT", + "Server": [ + "Kestrel", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "x-ms-activity-id": "b7fc449f-2c7a-4a37-b30f-4d7b9c8091e1", + "x-ms-client-request-id": [ + "cf28e76bc541064c9c9f138bf71b0489", + "cf28e76bc541064c9c9f138bf71b0489" + ], + "x-ms-job-cluster": "http://171.5.120.15:8998/", + "x-ms-job-clusterrequested-on": "1/10/2020 3:35:50 AM \u002B00:00", + "x-ms-job-ended-on": "1/10/2020 3:40:37 AM \u002B00:00", + "x-ms-job-internal-id": "13", + "x-ms-job-livysubmission-on": "1/10/2020 3:38:29 AM \u002B00:00", + "x-ms-job-queued-on": "1/10/2020 3:38:05 AM \u002B00:00", + "x-ms-job-result": "Succeeded", + "x-ms-job-scheduled-on": "1/10/2020 3:35:42 AM \u002B00:00", + "x-ms-job-scheduler-state": "Ended", + "x-ms-job-submitted-by-name": "zhezhou@microsoft.com", + "x-ms-job-submitted-on": "1/10/2020 3:35:41 AM \u002B00:00", + "x-ms-job-type": "SparkServiceBatch", + "x-ms-request-id": "34271399-22fa-4abb-a38c-dd0968fedcee", + "x-ms-response-time-ms": "15" + }, + "ResponseBody": { + "id": 13, + "appId": "application_1578627484298_0001", + "appInfo": { + "driverLogUrl": "http://9b16e3f9ff074564bf178da319ac14c60157d104065:8042/node/containerlogs/container_1578627484298_0001_01_000001/trusted-service-user", + "sparkUiUrl": "http://9b16e3f9ff074564bf178da319ac14c6021e9217492:8088/proxy/application_1578627484298_0001/" + }, + "state": "success", + "log": [ + "\t tracking URL: http://9b16e3f9ff074564bf178da319ac14c6021e9217492:8088/proxy/application_1578627484298_0001/", + "\t user: trusted-service-user", + "20/01/10 03:38:58 INFO ShutdownHookManager: Shutdown hook called", + "20/01/10 03:38:58 INFO ShutdownHookManager: Deleting directory /tmp/spark-3510c3ec-19c2-4675-8431-9d4c4b2e3cf5", + "20/01/10 03:38:58 INFO ShutdownHookManager: Deleting directory /tmp/spark-925b68f4-72d8-4ac7-b62d-f7005eb5adaf", + "20/01/10 03:38:58 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "20/01/10 03:38:58 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "20/01/10 03:38:58 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nstderr: ", + "\nYARN Diagnostics: " + ] + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/livyApi/versions/2019-11-01-preview/sparkPools/testsparkpool/batches/14", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-826bab9303903a4ab651b083cedadf4f-f7bff1482a9af54c-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.Spark/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "741f571111e6052b87214f6262a9be81", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:47:11 GMT", + "Server": [ + "Kestrel", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "x-ms-activity-id": "668a417b-564e-438f-a3ae-b4132d56be09", + "x-ms-client-request-id": [ + "741f571111e6052b87214f6262a9be81", + "741f571111e6052b87214f6262a9be81" + ], + "x-ms-job-cluster": "http://171.5.120.15:8998/", + "x-ms-job-clusterrequested-on": "1/10/2020 3:40:33 AM \u002B00:00", + "x-ms-job-ended-on": "1/10/2020 3:42:05 AM \u002B00:00", + "x-ms-job-internal-id": "14", + "x-ms-job-livysubmission-on": "1/10/2020 3:40:36 AM \u002B00:00", + "x-ms-job-queued-on": "1/10/2020 3:40:36 AM \u002B00:00", + "x-ms-job-result": "Succeeded", + "x-ms-job-scheduled-on": "1/10/2020 3:40:33 AM \u002B00:00", + "x-ms-job-scheduler-state": "Ended", + "x-ms-job-submitted-by-name": "zhezhou@microsoft.com", + "x-ms-job-submitted-on": "1/10/2020 3:40:32 AM \u002B00:00", + "x-ms-job-type": "SparkServiceBatch", + "x-ms-request-id": "c4f47dad-d1ce-4471-8ede-a7a68dd3bd25", + "x-ms-response-time-ms": "15" + }, + "ResponseBody": { + "id": 14, + "appId": "application_1578627484298_0002", + "appInfo": { + "driverLogUrl": "http://9b16e3f9ff074564bf178da319ac14c6013fa834371:8042/node/containerlogs/container_1578627484298_0002_01_000001/trusted-service-user", + "sparkUiUrl": "http://9b16e3f9ff074564bf178da319ac14c6021e9217492:8088/proxy/application_1578627484298_0002/" + }, + "state": "success", + "log": [ + "\t tracking URL: http://9b16e3f9ff074564bf178da319ac14c6021e9217492:8088/proxy/application_1578627484298_0002/", + "\t user: trusted-service-user", + "20/01/10 03:40:45 INFO ShutdownHookManager: Shutdown hook called", + "20/01/10 03:40:45 INFO ShutdownHookManager: Deleting directory /tmp/spark-05372e52-3f31-435b-9a89-f0e59d031147", + "20/01/10 03:40:45 INFO ShutdownHookManager: Deleting directory /tmp/spark-6d758165-8230-4281-b7ba-9b8fef9d6d19", + "20/01/10 03:40:45 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "20/01/10 03:40:45 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "20/01/10 03:40:45 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nstderr: ", + "\nYARN Diagnostics: " + ] + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/livyApi/versions/2019-11-01-preview/sparkPools/testsparkpool/batches/15", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-0f7040916a17744fab4ab2a934926c3e-1cdae459421b6c47-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.Spark/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "0b01fe02911e2759837765de92b51692", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:47:11 GMT", + "Server": [ + "Kestrel", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "x-ms-activity-id": "786b7b60-e06b-4e6d-b0f2-cd866ecb4e3f", + "x-ms-client-request-id": [ + "0b01fe02911e2759837765de92b51692", + "0b01fe02911e2759837765de92b51692" + ], + "x-ms-job-cluster": "http://171.3.240.24:8998/", + "x-ms-job-clusterrequested-on": "1/10/2020 4:25:27 AM \u002B00:00", + "x-ms-job-ended-on": "1/10/2020 4:29:37 AM \u002B00:00", + "x-ms-job-internal-id": "15", + "x-ms-job-livysubmission-on": "1/10/2020 4:27:23 AM \u002B00:00", + "x-ms-job-queued-on": "1/10/2020 4:27:13 AM \u002B00:00", + "x-ms-job-result": "Succeeded", + "x-ms-job-scheduled-on": "1/10/2020 4:25:27 AM \u002B00:00", + "x-ms-job-scheduler-state": "Ended", + "x-ms-job-submitted-by-name": "zhezhou@microsoft.com", + "x-ms-job-submitted-on": "1/10/2020 4:25:25 AM \u002B00:00", + "x-ms-job-type": "SparkServiceBatch", + "x-ms-request-id": "d32dbcf5-f039-46e3-a64b-b2679ef85ca7", + "x-ms-response-time-ms": "15" + }, + "ResponseBody": { + "id": 15, + "appId": "application_1578630430582_0001", + "appInfo": { + "driverLogUrl": "http://8e6f1bbb1f0d402ead227bfb3f9541ce029e8073802:8042/node/containerlogs/container_1578630430582_0001_01_000001/trusted-service-user", + "sparkUiUrl": "http://8e6f1bbb1f0d402ead227bfb3f9541ce019a8a47711:8088/proxy/application_1578630430582_0001/" + }, + "state": "success", + "log": [ + "\t tracking URL: http://8e6f1bbb1f0d402ead227bfb3f9541ce019a8a47711:8088/proxy/application_1578630430582_0001/", + "\t user: trusted-service-user", + "20/01/10 04:28:11 INFO ShutdownHookManager: Shutdown hook called", + "20/01/10 04:28:11 INFO ShutdownHookManager: Deleting directory /tmp/spark-e7390b6e-3c89-4d15-8504-dfc0713dbac2", + "20/01/10 04:28:11 INFO ShutdownHookManager: Deleting directory /tmp/spark-1aa9ff81-602d-483e-8523-72db6bf69662", + "20/01/10 04:28:11 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "20/01/10 04:28:11 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "20/01/10 04:28:11 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nstderr: ", + "\nYARN Diagnostics: " + ] + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/livyApi/versions/2019-11-01-preview/sparkPools/testsparkpool/batches/16", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-50057612bbd62e49bc65bea0bc413125-f577d48a30599f44-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.Spark/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "045492fb16b85afbbb23482075e9a3f3", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:47:12 GMT", + "Server": [ + "Kestrel", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "x-ms-activity-id": "24b636a5-2698-4ba1-bd99-bc66330d117c", + "x-ms-client-request-id": [ + "045492fb16b85afbbb23482075e9a3f3", + "045492fb16b85afbbb23482075e9a3f3" + ], + "x-ms-job-cluster": "http://171.3.237.13:8998/", + "x-ms-job-clusterrequested-on": "1/13/2020 2:47:07 AM \u002B00:00", + "x-ms-job-ended-on": "1/13/2020 2:50:27 AM \u002B00:00", + "x-ms-job-internal-id": "16", + "x-ms-job-livysubmission-on": "1/13/2020 2:48:36 AM \u002B00:00", + "x-ms-job-queued-on": "1/13/2020 2:48:35 AM \u002B00:00", + "x-ms-job-result": "Succeeded", + "x-ms-job-scheduled-on": "1/13/2020 2:47:06 AM \u002B00:00", + "x-ms-job-scheduler-state": "Ended", + "x-ms-job-submitted-by-name": "zhezhou@microsoft.com", + "x-ms-job-submitted-on": "1/13/2020 2:47:05 AM \u002B00:00", + "x-ms-job-type": "SparkServiceBatch", + "x-ms-request-id": "fba462ea-71fa-4a68-8f36-670f56fc1bdf", + "x-ms-response-time-ms": "15" + }, + "ResponseBody": { + "id": 16, + "appId": "application_1578883706606_0001", + "appInfo": { + "driverLogUrl": "http://e3c1df4b4aa94ae6b7e5d19359b699fe041b3e01222:8042/node/containerlogs/container_1578883706606_0001_01_000001/trusted-service-user", + "sparkUiUrl": "http://e3c1df4b4aa94ae6b7e5d19359b699fe0302c276274:8088/proxy/application_1578883706606_0001/" + }, + "state": "success", + "log": [ + "\t tracking URL: http://e3c1df4b4aa94ae6b7e5d19359b699fe0302c276274:8088/proxy/application_1578883706606_0001/", + "\t user: trusted-service-user", + "20/01/13 02:49:38 INFO ShutdownHookManager: Shutdown hook called", + "20/01/13 02:49:38 INFO ShutdownHookManager: Deleting directory /tmp/spark-2c25f086-79bf-4db5-98ef-a50ec241447f", + "20/01/13 02:49:38 INFO ShutdownHookManager: Deleting directory /tmp/spark-6e4d32f6-a1ab-4b78-967e-068b74920ad7", + "20/01/13 02:49:38 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "20/01/13 02:49:38 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "20/01/13 02:49:38 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nstderr: ", + "\nYARN Diagnostics: " + ] + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/livyApi/versions/2019-11-01-preview/sparkPools/testsparkpool/batches/17", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-7a7f7387536b934c9c41815ab44d606f-ea14555a0ea66e42-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.Spark/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "f98991e0f8197f6bfef7f06eab4c72d1", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:47:12 GMT", + "Server": [ + "Kestrel", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "x-ms-activity-id": "d84e86f5-0e49-4db1-b8e4-4cbbec9bf432", + "x-ms-client-request-id": [ + "f98991e0f8197f6bfef7f06eab4c72d1", + "f98991e0f8197f6bfef7f06eab4c72d1" + ], + "x-ms-job-cluster": "http://171.0.6.7:8998/", + "x-ms-job-clusterrequested-on": "1/14/2020 8:03:17 AM \u002B00:00", + "x-ms-job-ended-on": "1/14/2020 8:08:09 AM \u002B00:00", + "x-ms-job-internal-id": "17", + "x-ms-job-livysubmission-on": "1/14/2020 8:05:56 AM \u002B00:00", + "x-ms-job-queued-on": "1/14/2020 8:05:12 AM \u002B00:00", + "x-ms-job-result": "Failed", + "x-ms-job-scheduled-on": "1/14/2020 8:03:17 AM \u002B00:00", + "x-ms-job-scheduler-state": "Ended", + "x-ms-job-submitted-by-name": "zhezhou@microsoft.com", + "x-ms-job-submitted-on": "1/14/2020 8:03:16 AM \u002B00:00", + "x-ms-job-type": "SparkServiceBatch", + "x-ms-request-id": "a4101d6d-96a7-4234-8246-d7c0d4081da2", + "x-ms-response-time-ms": "16" + }, + "ResponseBody": { + "id": 17, + "appId": "application_1578989125483_0001", + "appInfo": { + "driverLogUrl": "http://1657321302a648dcb31a6629c8d3bc9b040d6388685:8042/node/containerlogs/container_1578989125483_0001_02_000001/trusted-service-user", + "sparkUiUrl": "http://1657321302a648dcb31a6629c8d3bc9b0230e607756:8088/cluster/app/application_1578989125483_0001" + }, + "state": "dead", + "log": [ + "20/01/14 08:07:59 WARN AzureFileSystemThreadPoolExecutor: Disabling threads for Delete operation as thread count 0 is \u003C= 1", + "20/01/14 08:07:59 INFO AzureFileSystemThreadPoolExecutor: Time taken for Delete operation is: 13 ms with threads: 0", + "20/01/14 08:07:59 INFO ShutdownHookManager: Shutdown hook called", + "20/01/14 08:07:59 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "20/01/14 08:07:59 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "20/01/14 08:07:59 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "", + "", + "For more detailed output, check the application tracking page: http://1657321302a648dcb31a6629c8d3bc9b0230e607756:8088/cluster/app/application_1578989125483_0001 Then click on links to logs of each attempt.", + ". Failing the application." + ] + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/livyApi/versions/2019-11-01-preview/sparkPools/testsparkpool/batches/18", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-5d3b205312440f4d94498fa003476a2b-28577352ce8e064e-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.Spark/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "d066bd0ab954ebc903a74ffb4938b199", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:47:12 GMT", + "Server": [ + "Kestrel", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "x-ms-activity-id": "42267a93-ac5d-42d1-a331-83a04d54a2dd", + "x-ms-client-request-id": [ + "d066bd0ab954ebc903a74ffb4938b199", + "d066bd0ab954ebc903a74ffb4938b199" + ], + "x-ms-job-cluster": "http://171.0.6.7:8998/", + "x-ms-job-clusterrequested-on": "1/14/2020 8:23:01 AM \u002B00:00", + "x-ms-job-ended-on": "1/14/2020 8:25:28 AM \u002B00:00", + "x-ms-job-internal-id": "18", + "x-ms-job-livysubmission-on": "1/14/2020 8:23:04 AM \u002B00:00", + "x-ms-job-queued-on": "1/14/2020 8:23:04 AM \u002B00:00", + "x-ms-job-result": "Succeeded", + "x-ms-job-scheduled-on": "1/14/2020 8:23:01 AM \u002B00:00", + "x-ms-job-scheduler-state": "Ended", + "x-ms-job-submitted-by-name": "zhezhou@microsoft.com", + "x-ms-job-submitted-on": "1/14/2020 8:23:00 AM \u002B00:00", + "x-ms-job-type": "SparkServiceBatch", + "x-ms-request-id": "ab8330a2-b1e8-49c5-b841-0a904d09f6b3", + "x-ms-response-time-ms": "14" + }, + "ResponseBody": { + "id": 18, + "appId": "application_1578989125483_0002", + "appInfo": { + "driverLogUrl": "http://1657321302a648dcb31a6629c8d3bc9b012e5f40483:8042/node/containerlogs/container_1578989125483_0002_01_000001/trusted-service-user", + "sparkUiUrl": "http://1657321302a648dcb31a6629c8d3bc9b0230e607756:8088/proxy/application_1578989125483_0002/" + }, + "state": "success", + "log": [ + "\t tracking URL: http://1657321302a648dcb31a6629c8d3bc9b0230e607756:8088/proxy/application_1578989125483_0002/", + "\t user: trusted-service-user", + "20/01/14 08:23:13 INFO ShutdownHookManager: Shutdown hook called", + "20/01/14 08:23:13 INFO ShutdownHookManager: Deleting directory /tmp/spark-07aae8db-d0be-4c05-803a-474c353ffeb4", + "20/01/14 08:23:13 INFO ShutdownHookManager: Deleting directory /tmp/spark-dd484af5-ca45-44d9-adac-609c2a76e34e", + "20/01/14 08:23:13 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "20/01/14 08:23:13 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "20/01/14 08:23:13 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nstderr: ", + "\nYARN Diagnostics: " + ] + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/livyApi/versions/2019-11-01-preview/sparkPools/testsparkpool/batches/19", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-0184607571bf2f4194df98368ad17e52-fa86a95fd654234f-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.Spark/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "01fe72d41d2c027927d406c1258cae6f", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:47:12 GMT", + "Server": [ + "Kestrel", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "x-ms-activity-id": "87209d79-c402-46fa-b0b7-5dcb69d38e55", + "x-ms-client-request-id": [ + "01fe72d41d2c027927d406c1258cae6f", + "01fe72d41d2c027927d406c1258cae6f" + ], + "x-ms-job-cluster": "http://171.0.211.7:8998/", + "x-ms-job-clusterrequested-on": "1/15/2020 1:21:45 AM \u002B00:00", + "x-ms-job-ended-on": "1/15/2020 1:26:15 AM \u002B00:00", + "x-ms-job-internal-id": "19", + "x-ms-job-livysubmission-on": "1/15/2020 1:23:50 AM \u002B00:00", + "x-ms-job-queued-on": "1/15/2020 1:23:37 AM \u002B00:00", + "x-ms-job-result": "Succeeded", + "x-ms-job-scheduled-on": "1/15/2020 1:21:45 AM \u002B00:00", + "x-ms-job-scheduler-state": "Ended", + "x-ms-job-submitted-by-name": "zhezhou@microsoft.com", + "x-ms-job-submitted-on": "1/15/2020 1:21:44 AM \u002B00:00", + "x-ms-job-type": "SparkServiceBatch", + "x-ms-request-id": "c8db5cf1-214b-471b-b65d-5edf2e0540db", + "x-ms-response-time-ms": "15" + }, + "ResponseBody": { + "id": 19, + "appId": "application_1579051421404_0001", + "appInfo": { + "driverLogUrl": "http://1b69b0a4ed994f7ea95f9d85f63a3083009f3081028:8042/node/containerlogs/container_1579051421404_0001_01_000001/trusted-service-user", + "sparkUiUrl": "http://1b69b0a4ed994f7ea95f9d85f63a308302603012606:8088/proxy/application_1579051421404_0001/" + }, + "state": "success", + "log": [ + "\t tracking URL: http://1b69b0a4ed994f7ea95f9d85f63a308302603012606:8088/proxy/application_1579051421404_0001/", + "\t user: trusted-service-user", + "20/01/15 01:24:14 INFO ShutdownHookManager: Shutdown hook called", + "20/01/15 01:24:14 INFO ShutdownHookManager: Deleting directory /tmp/spark-e9350640-4f8f-4f9d-8b8b-6dff3a6104fa", + "20/01/15 01:24:14 INFO ShutdownHookManager: Deleting directory /tmp/spark-dc37dd45-d38e-4c84-b821-602d8c111e23", + "20/01/15 01:24:14 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "20/01/15 01:24:14 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "20/01/15 01:24:14 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nstderr: ", + "\nYARN Diagnostics: " + ] + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/livyApi/versions/2019-11-01-preview/sparkPools/testsparkpool/batches/20", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-8efc437bac691c419f2b6549a6357df3-74f100ade3f5c148-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.Spark/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "b81576b0d383269ec89df672a96f35c5", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:47:12 GMT", + "Server": [ + "Kestrel", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "x-ms-activity-id": "7eeb8b84-dfec-4050-a1d2-2202808627b3", + "x-ms-client-request-id": [ + "b81576b0d383269ec89df672a96f35c5", + "b81576b0d383269ec89df672a96f35c5" + ], + "x-ms-job-cluster": "http://171.6.73.35:8998/", + "x-ms-job-clusterrequested-on": "1/16/2020 2:08:58 AM \u002B00:00", + "x-ms-job-ended-on": "1/16/2020 2:12:49 AM \u002B00:00", + "x-ms-job-internal-id": "20", + "x-ms-job-livysubmission-on": "1/16/2020 2:11:09 AM \u002B00:00", + "x-ms-job-queued-on": "1/16/2020 2:11:08 AM \u002B00:00", + "x-ms-job-result": "Succeeded", + "x-ms-job-scheduled-on": "1/16/2020 2:08:57 AM \u002B00:00", + "x-ms-job-scheduler-state": "Ended", + "x-ms-job-submitted-by-name": "zhezhou@microsoft.com", + "x-ms-job-submitted-on": "1/16/2020 2:08:56 AM \u002B00:00", + "x-ms-job-type": "SparkServiceBatch", + "x-ms-request-id": "5d990f27-9f41-4a8d-8652-85cf4c716ff7", + "x-ms-response-time-ms": "14" + }, + "ResponseBody": { + "id": 20, + "appId": "application_1579140649715_0001", + "appInfo": { + "driverLogUrl": "http://c5bf52cc122a4e8b8e42bb633501e6770007eb66248:8042/node/containerlogs/container_1579140649715_0001_01_000001/trusted-service-user", + "sparkUiUrl": "http://c5bf52cc122a4e8b8e42bb633501e67704015827933:8088/proxy/application_1579140649715_0001/" + }, + "state": "success", + "log": [ + "\t tracking URL: http://c5bf52cc122a4e8b8e42bb633501e67704015827933:8088/proxy/application_1579140649715_0001/", + "\t user: trusted-service-user", + "20/01/16 02:11:50 INFO ShutdownHookManager: Shutdown hook called", + "20/01/16 02:11:50 INFO ShutdownHookManager: Deleting directory /tmp/spark-dcd3cb18-f03f-4ac5-967f-51fa07df172f", + "20/01/16 02:11:50 INFO ShutdownHookManager: Deleting directory /tmp/spark-68628a62-1cf0-4f58-bb6b-22fc97b2cc0b", + "20/01/16 02:11:51 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "20/01/16 02:11:51 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "20/01/16 02:11:51 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nstderr: ", + "\nYARN Diagnostics: " + ] + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/livyApi/versions/2019-11-01-preview/sparkPools/testsparkpool/batches/21", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-e84b28f8e6ff194893dd36edb134c96f-7bf20b8d2906ab4f-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.Spark/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "399a5745714deda54363a87fb307c676", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:47:12 GMT", + "Server": [ + "Kestrel", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "x-ms-activity-id": "cb614234-c437-451f-9e57-7165b7b773f7", + "x-ms-client-request-id": [ + "399a5745714deda54363a87fb307c676", + "399a5745714deda54363a87fb307c676" + ], + "x-ms-job-cluster": "http://171.6.73.35:8998/", + "x-ms-job-clusterrequested-on": "1/16/2020 2:21:05 AM \u002B00:00", + "x-ms-job-ended-on": "1/16/2020 2:22:15 AM \u002B00:00", + "x-ms-job-internal-id": "21", + "x-ms-job-livysubmission-on": "1/16/2020 2:21:08 AM \u002B00:00", + "x-ms-job-queued-on": "1/16/2020 2:21:08 AM \u002B00:00", + "x-ms-job-result": "Succeeded", + "x-ms-job-scheduled-on": "1/16/2020 2:21:05 AM \u002B00:00", + "x-ms-job-scheduler-state": "Ended", + "x-ms-job-submitted-by-name": "zhezhou@microsoft.com", + "x-ms-job-submitted-on": "1/16/2020 2:21:04 AM \u002B00:00", + "x-ms-job-type": "SparkServiceBatch", + "x-ms-request-id": "ede96fd4-c43c-4d94-b845-91e9ce4ed8e6", + "x-ms-response-time-ms": "15" + }, + "ResponseBody": { + "id": 21, + "appId": "application_1579140649715_0002", + "appInfo": { + "driverLogUrl": "http://c5bf52cc122a4e8b8e42bb633501e67702199d05116:8042/node/containerlogs/container_1579140649715_0002_01_000001/trusted-service-user", + "sparkUiUrl": "http://c5bf52cc122a4e8b8e42bb633501e67704015827933:8088/proxy/application_1579140649715_0002/" + }, + "state": "success", + "log": [ + "\t tracking URL: http://c5bf52cc122a4e8b8e42bb633501e67704015827933:8088/proxy/application_1579140649715_0002/", + "\t user: trusted-service-user", + "20/01/16 02:21:17 INFO ShutdownHookManager: Shutdown hook called", + "20/01/16 02:21:17 INFO ShutdownHookManager: Deleting directory /tmp/spark-acb065c5-b5a0-43f5-9bfc-13a0dc232598", + "20/01/16 02:21:17 INFO ShutdownHookManager: Deleting directory /tmp/spark-2f39dc65-0986-4470-ac8c-e41754627e0e", + "20/01/16 02:21:17 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "20/01/16 02:21:17 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "20/01/16 02:21:17 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nstderr: ", + "\nYARN Diagnostics: " + ] + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/livyApi/versions/2019-11-01-preview/sparkPools/testsparkpool/batches/22", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-da0964f26dd61b44a2c9235a8537bd8f-6a9f0926f1bca84d-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.Spark/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "d34adff8f8230016d3d8398e260659b7", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:47:12 GMT", + "Server": [ + "Kestrel", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "x-ms-activity-id": "02a46484-1cdb-4465-9ffe-34f360fad4e8", + "x-ms-client-request-id": [ + "d34adff8f8230016d3d8398e260659b7", + "d34adff8f8230016d3d8398e260659b7" + ], + "x-ms-job-cluster": "http://171.6.73.35:8998/", + "x-ms-job-clusterrequested-on": "1/16/2020 2:23:55 AM \u002B00:00", + "x-ms-job-ended-on": "1/16/2020 2:25:05 AM \u002B00:00", + "x-ms-job-internal-id": "22", + "x-ms-job-livysubmission-on": "1/16/2020 2:23:58 AM \u002B00:00", + "x-ms-job-queued-on": "1/16/2020 2:23:57 AM \u002B00:00", + "x-ms-job-result": "Succeeded", + "x-ms-job-scheduled-on": "1/16/2020 2:23:54 AM \u002B00:00", + "x-ms-job-scheduler-state": "Ended", + "x-ms-job-submitted-by-name": "zhezhou@microsoft.com", + "x-ms-job-submitted-on": "1/16/2020 2:23:53 AM \u002B00:00", + "x-ms-job-type": "SparkServiceBatch", + "x-ms-request-id": "6a124f6b-1b39-4731-9267-f22218785441", + "x-ms-response-time-ms": "15" + }, + "ResponseBody": { + "id": 22, + "appId": "application_1579140649715_0003", + "appInfo": { + "driverLogUrl": "http://c5bf52cc122a4e8b8e42bb633501e67702712f69936:8042/node/containerlogs/container_1579140649715_0003_01_000001/trusted-service-user", + "sparkUiUrl": "http://c5bf52cc122a4e8b8e42bb633501e67704015827933:8088/proxy/application_1579140649715_0003/" + }, + "state": "success", + "log": [ + "\t tracking URL: http://c5bf52cc122a4e8b8e42bb633501e67704015827933:8088/proxy/application_1579140649715_0003/", + "\t user: trusted-service-user", + "20/01/16 02:24:06 INFO ShutdownHookManager: Shutdown hook called", + "20/01/16 02:24:06 INFO ShutdownHookManager: Deleting directory /tmp/spark-91ae2c9d-68e6-463f-8777-3cb4943600e8", + "20/01/16 02:24:06 INFO ShutdownHookManager: Deleting directory /tmp/spark-7bb6fe6c-9aed-4d01-a39a-e21b9a04cf8a", + "20/01/16 02:24:06 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "20/01/16 02:24:06 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "20/01/16 02:24:06 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nstderr: ", + "\nYARN Diagnostics: " + ] + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/livyApi/versions/2019-11-01-preview/sparkPools/testsparkpool/batches/23", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-73bacf5422dc8840beed1d7fee414121-4e5494520694a249-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.Spark/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "ce7b419f75f23f21d127741f2a1e73c0", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:47:12 GMT", + "Server": [ + "Kestrel", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "x-ms-activity-id": "2304d690-cfc3-481a-a9be-4af8a5be43b2", + "x-ms-client-request-id": [ + "ce7b419f75f23f21d127741f2a1e73c0", + "ce7b419f75f23f21d127741f2a1e73c0" + ], + "x-ms-job-cluster": "http://171.5.132.28:8998/", + "x-ms-job-clusterrequested-on": "1/16/2020 9:36:47 AM \u002B00:00", + "x-ms-job-ended-on": "1/16/2020 9:42:13 AM \u002B00:00", + "x-ms-job-internal-id": "23", + "x-ms-job-livysubmission-on": "1/16/2020 9:39:38 AM \u002B00:00", + "x-ms-job-queued-on": "1/16/2020 9:39:01 AM \u002B00:00", + "x-ms-job-result": "Succeeded", + "x-ms-job-scheduled-on": "1/16/2020 9:36:47 AM \u002B00:00", + "x-ms-job-scheduler-state": "Ended", + "x-ms-job-submitted-by-name": "ca728363-7297-4e35-a9c3-c6400837883e", + "x-ms-job-submitted-on": "1/16/2020 9:36:46 AM \u002B00:00", + "x-ms-job-type": "SparkServiceBatch", + "x-ms-request-id": "41155f5a-9bbd-4354-ba3f-0358304289fc", + "x-ms-response-time-ms": "15" + }, + "ResponseBody": { + "id": 23, + "appId": "application_1579167542444_0001", + "appInfo": { + "driverLogUrl": "http://dff5fe0bf844496b896e527ae28480c20308c150511:8042/node/containerlogs/container_1579167542444_0001_01_000001/trusted-service-user", + "sparkUiUrl": "http://dff5fe0bf844496b896e527ae28480c20442ee71008:8088/proxy/application_1579167542444_0001/" + }, + "state": "success", + "log": [ + "\t tracking URL: http://dff5fe0bf844496b896e527ae28480c20442ee71008:8088/proxy/application_1579167542444_0001/", + "\t user: trusted-service-user", + "20/01/16 09:40:38 INFO ShutdownHookManager: Shutdown hook called", + "20/01/16 09:40:38 INFO ShutdownHookManager: Deleting directory /tmp/spark-64d62c83-9956-4af6-abce-3d4f6084e2f2", + "20/01/16 09:40:38 INFO ShutdownHookManager: Deleting directory /tmp/spark-8191d5d3-b207-474d-969f-290f74820b3e", + "20/01/16 09:40:38 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "20/01/16 09:40:38 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "20/01/16 09:40:38 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nstderr: ", + "\nYARN Diagnostics: " + ] + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/livyApi/versions/2019-11-01-preview/sparkPools/testsparkpool/batches/24", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-9fc1d07bd5ac6843b5f3a6a6cf360bbd-8e2b21ea2ca73e4f-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.Spark/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "c9797fd762244ca2409965753816c63d", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:47:12 GMT", + "Server": [ + "Kestrel", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "x-ms-activity-id": "b1c2864b-6b6c-4775-bc56-98eede9d6e0c", + "x-ms-client-request-id": [ + "c9797fd762244ca2409965753816c63d", + "c9797fd762244ca2409965753816c63d" + ], + "x-ms-job-clusterrequested-on": "1/1/0001 12:00:00 AM \u002B00:00", + "x-ms-job-ended-on": "1/16/2020 9:37:11 AM \u002B00:00", + "x-ms-job-internal-id": "24", + "x-ms-job-livysubmission-on": "1/1/0001 12:00:00 AM \u002B00:00", + "x-ms-job-queued-on": "1/1/0001 12:00:00 AM \u002B00:00", + "x-ms-job-result": "Cancelled", + "x-ms-job-scheduled-on": "1/1/0001 12:00:00 AM \u002B00:00", + "x-ms-job-scheduler-state": "Ended", + "x-ms-job-submitted-by-name": "ca728363-7297-4e35-a9c3-c6400837883e", + "x-ms-job-submitted-on": "1/16/2020 9:37:10 AM \u002B00:00", + "x-ms-job-type": "SparkServiceBatch", + "x-ms-request-id": "155f2007-03ea-4dee-b8cb-932330d69656", + "x-ms-response-time-ms": "14" + }, + "ResponseBody": { + "id": 24, + "appId": null, + "appInfo": null, + "state": "error", + "log": null + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/livyApi/versions/2019-11-01-preview/sparkPools/testsparkpool/batches/25", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-57adc5ce623a8b4aa8b955e69d94249d-ffdc5cf0cac22c4d-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.Spark/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "71e0f00af78c8384be0b02fb84f6d5b5", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:47:12 GMT", + "Server": [ + "Kestrel", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "x-ms-activity-id": "45fec20d-3ad7-4619-b612-66708abfa6f5", + "x-ms-client-request-id": [ + "71e0f00af78c8384be0b02fb84f6d5b5", + "71e0f00af78c8384be0b02fb84f6d5b5" + ], + "x-ms-job-clusterrequested-on": "1/1/0001 12:00:00 AM \u002B00:00", + "x-ms-job-ended-on": "1/16/2020 9:37:54 AM \u002B00:00", + "x-ms-job-internal-id": "25", + "x-ms-job-livysubmission-on": "1/1/0001 12:00:00 AM \u002B00:00", + "x-ms-job-queued-on": "1/1/0001 12:00:00 AM \u002B00:00", + "x-ms-job-result": "Cancelled", + "x-ms-job-scheduled-on": "1/1/0001 12:00:00 AM \u002B00:00", + "x-ms-job-scheduler-state": "Ended", + "x-ms-job-submitted-by-name": "ca728363-7297-4e35-a9c3-c6400837883e", + "x-ms-job-submitted-on": "1/16/2020 9:37:54 AM \u002B00:00", + "x-ms-job-type": "SparkServiceBatch", + "x-ms-request-id": "d39689e3-4e18-4c5d-b9c4-35c7fd7c01f4", + "x-ms-response-time-ms": "15" + }, + "ResponseBody": { + "id": 25, + "appId": null, + "appInfo": null, + "state": "error", + "log": null + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/livyApi/versions/2019-11-01-preview/sparkPools/testsparkpool/batches/26", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-765105f976ee0b4c8f8f25d6dbf823d3-4f25c79044073d43-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.Spark/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "a7b77865908d3d939f2e8d580fac06ba", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:47:12 GMT", + "Server": [ + "Kestrel", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "x-ms-activity-id": "afb10c25-989a-4410-84cf-35671bcad3ce", + "x-ms-client-request-id": [ + "a7b77865908d3d939f2e8d580fac06ba", + "a7b77865908d3d939f2e8d580fac06ba" + ], + "x-ms-job-cluster": "http://171.3.39.9:8998/", + "x-ms-job-clusterrequested-on": "1/19/2020 6:44:14 AM \u002B00:00", + "x-ms-job-ended-on": "1/19/2020 6:47:34 AM \u002B00:00", + "x-ms-job-internal-id": "26", + "x-ms-job-livysubmission-on": "1/19/2020 6:46:05 AM \u002B00:00", + "x-ms-job-queued-on": "1/19/2020 6:46:03 AM \u002B00:00", + "x-ms-job-result": "Succeeded", + "x-ms-job-scheduled-on": "1/19/2020 6:44:13 AM \u002B00:00", + "x-ms-job-scheduler-state": "Ended", + "x-ms-job-submitted-by-name": "zhezhou@microsoft.com", + "x-ms-job-submitted-on": "1/19/2020 6:44:13 AM \u002B00:00", + "x-ms-job-type": "SparkServiceBatch", + "x-ms-request-id": "4e21364b-83e9-46cb-8b2f-4a595ae4b170", + "x-ms-response-time-ms": "15" + }, + "ResponseBody": { + "id": 26, + "appId": "application_1579416350077_0001", + "appInfo": { + "driverLogUrl": "http://35c3cd39703446f7b5879bc0b8805f8c001de530649:8042/node/containerlogs/container_1579416350077_0001_01_000001/trusted-service-user", + "sparkUiUrl": "http://35c3cd39703446f7b5879bc0b8805f8c016c6327596:8088/proxy/application_1579416350077_0001/" + }, + "state": "success", + "log": [ + "\t tracking URL: http://35c3cd39703446f7b5879bc0b8805f8c016c6327596:8088/proxy/application_1579416350077_0001/", + "\t user: trusted-service-user", + "20/01/19 06:46:18 INFO ShutdownHookManager: Shutdown hook called", + "20/01/19 06:46:18 INFO ShutdownHookManager: Deleting directory /tmp/spark-de3d608d-97b0-4ca5-a6c5-b05df4a40e8e", + "20/01/19 06:46:18 INFO ShutdownHookManager: Deleting directory /tmp/spark-ab19f399-5768-4010-a5aa-0257fc7ccc71", + "20/01/19 06:46:18 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "20/01/19 06:46:18 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "20/01/19 06:46:18 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nstderr: ", + "\nYARN Diagnostics: " + ] + } + } + ], + "Variables": { + "AZURE_SYNAPSE_SPARK_POOL_NAME": "testsparkpool", + "AZURE_SYNAPSE_WORKSPACE_URL": "https://testsynapseworkspace.dev.azuresynapse.net", + "RandomSeed": "2063984456" + } +} \ No newline at end of file diff --git a/sdk/synapse/Azure.Analytics.Synapse.Spark/tests/SessionRecords/SparkSessionClientLiveTests/TestGetSparkSession.json b/sdk/synapse/Azure.Analytics.Synapse.Spark/tests/SessionRecords/SparkSessionClientLiveTests/TestGetSparkSession.json new file mode 100644 index 000000000000..acab5ff041df --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Spark/tests/SessionRecords/SparkSessionClientLiveTests/TestGetSparkSession.json @@ -0,0 +1,1788 @@ +{ + "Entries": [ + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/livyApi/versions/2019-11-01-preview/sparkPools/testsparkpool/sessions", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-5ac364ac85ca0d42bd2e3b868080c90d-89d12a04fd7cf043-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.Spark/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "326f3debae5c4c1818759405169dde77", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:47:36 GMT", + "Server": [ + "Kestrel", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "x-ms-activity-id": "6c4a2071-6fcc-40c4-8ac2-63cc070ec068", + "x-ms-client-request-id": [ + "326f3debae5c4c1818759405169dde77", + "326f3debae5c4c1818759405169dde77" + ], + "x-ms-request-id": "c91f0b40-ace6-4867-acb4-3e6c23834173", + "x-ms-response-time-ms": "157" + }, + "ResponseBody": { + "from": 0, + "total": 20, + "sessions": [ + { + "id": 2, + "appId": "application_1576225874089_0001", + "appInfo": { + "driverLogUrl": "http://008b79baa75e493ba50798a50e751b9d03116310046:8042/node/containerlogs/container_1576225874089_0001_01_000001/trusted-service-user", + "sparkUiUrl": "http://008b79baa75e493ba50798a50e751b9d04071d71770:8088/proxy/application_1576225874089_0001/" + }, + "state": "killed", + "log": [ + "\t final status: UNDEFINED", + "\t tracking URL: http://008b79baa75e493ba50798a50e751b9d04071d71770:8088/proxy/application_1576225874089_0001/", + "\t user: trusted-service-user", + "19/12/13 08:31:59 INFO ShutdownHookManager: Shutdown hook called", + "19/12/13 08:31:59 INFO ShutdownHookManager: Deleting directory /tmp/spark-13f31a03-7633-4467-bf81-3fe3309fb856", + "19/12/13 08:31:59 INFO ShutdownHookManager: Deleting directory /tmp/spark-40fe5680-835f-462d-bcbb-c8fffa1bbe6f", + "19/12/13 08:31:59 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "19/12/13 08:31:59 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "19/12/13 08:31:59 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nYARN Diagnostics: " + ] + }, + { + "id": 6, + "appId": "application_1577261347028_0001", + "appInfo": { + "driverLogUrl": "http://0756e27931b1442da8fded6fb5a384ad039fdf58075:8042/node/containerlogs/container_1577261347028_0001_01_000001/trusted-service-user", + "sparkUiUrl": "http://0756e27931b1442da8fded6fb5a384ad022bdb15619:8088/proxy/application_1577261347028_0001/" + }, + "state": "dead", + "log": [ + "\t final status: UNDEFINED", + "\t tracking URL: http://0756e27931b1442da8fded6fb5a384ad022bdb15619:8088/proxy/application_1577261347028_0001/", + "\t user: trusted-service-user", + "19/12/25 08:09:25 INFO ShutdownHookManager: Shutdown hook called", + "19/12/25 08:09:25 INFO ShutdownHookManager: Deleting directory /tmp/spark-3f94f2c6-cc2f-4497-833b-3c40c96cfb2e", + "19/12/25 08:09:25 INFO ShutdownHookManager: Deleting directory /tmp/spark-4070576f-39e7-4003-b73e-878a2e176454", + "19/12/25 08:09:25 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "19/12/25 08:09:25 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "19/12/25 08:09:25 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nYARN Diagnostics: " + ] + }, + { + "id": 7, + "appId": "application_1577261347028_0002", + "appInfo": { + "driverLogUrl": "http://0756e27931b1442da8fded6fb5a384ad00453758611:8042/node/containerlogs/container_1577261347028_0002_01_000001/trusted-service-user", + "sparkUiUrl": "http://0756e27931b1442da8fded6fb5a384ad022bdb15619:8088/proxy/application_1577261347028_0002/" + }, + "state": "killed", + "log": [ + "\t final status: UNDEFINED", + "\t tracking URL: http://0756e27931b1442da8fded6fb5a384ad022bdb15619:8088/proxy/application_1577261347028_0002/", + "\t user: trusted-service-user", + "19/12/25 08:16:47 INFO ShutdownHookManager: Shutdown hook called", + "19/12/25 08:16:47 INFO ShutdownHookManager: Deleting directory /tmp/spark-5829aff6-088b-4496-afc5-147214d18c51", + "19/12/25 08:16:47 INFO ShutdownHookManager: Deleting directory /tmp/spark-e4f0d452-bbb4-4719-b2d1-fe34dc28d4f9", + "19/12/25 08:16:47 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "19/12/25 08:16:47 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "19/12/25 08:16:47 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nYARN Diagnostics: " + ] + }, + { + "id": 8, + "appId": "application_1577261347028_0003", + "appInfo": { + "driverLogUrl": "http://0756e27931b1442da8fded6fb5a384ad032f0488094:8042/node/containerlogs/container_1577261347028_0003_01_000001/trusted-service-user", + "sparkUiUrl": "http://0756e27931b1442da8fded6fb5a384ad022bdb15619:8088/proxy/application_1577261347028_0003/" + }, + "state": "error", + "log": [ + "\t final status: UNDEFINED", + "\t tracking URL: http://0756e27931b1442da8fded6fb5a384ad022bdb15619:8088/proxy/application_1577261347028_0003/", + "\t user: trusted-service-user", + "19/12/25 08:29:49 INFO ShutdownHookManager: Shutdown hook called", + "19/12/25 08:29:49 INFO ShutdownHookManager: Deleting directory /tmp/spark-de484530-d317-4435-8145-c82ade1aebdb", + "19/12/25 08:29:49 INFO ShutdownHookManager: Deleting directory /tmp/spark-2d468982-7533-4d5a-a601-73d568abc9b1", + "19/12/25 08:29:49 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "19/12/25 08:29:49 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "19/12/25 08:29:49 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nYARN Diagnostics: " + ] + }, + { + "id": 9, + "appId": "application_1577261347028_0004", + "appInfo": { + "driverLogUrl": "http://0756e27931b1442da8fded6fb5a384ad017a7497707:8042/node/containerlogs/container_1577261347028_0004_01_000001/trusted-service-user", + "sparkUiUrl": "http://0756e27931b1442da8fded6fb5a384ad022bdb15619:8088/proxy/application_1577261347028_0004/" + }, + "state": "killed", + "log": [ + "\t final status: UNDEFINED", + "\t tracking URL: http://0756e27931b1442da8fded6fb5a384ad022bdb15619:8088/proxy/application_1577261347028_0004/", + "\t user: trusted-service-user", + "19/12/25 09:11:39 INFO ShutdownHookManager: Shutdown hook called", + "19/12/25 09:11:39 INFO ShutdownHookManager: Deleting directory /tmp/spark-298699c6-1a19-43f4-b0e7-77ff38765146", + "19/12/25 09:11:39 INFO ShutdownHookManager: Deleting directory /tmp/spark-bdf130b2-b3c9-4ff0-9205-d8e9bbc6489d", + "19/12/25 09:11:39 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "19/12/25 09:11:39 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "19/12/25 09:11:39 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nYARN Diagnostics: " + ] + }, + { + "id": 10, + "appId": "application_1577261347028_0005", + "appInfo": { + "driverLogUrl": "http://0756e27931b1442da8fded6fb5a384ad017a7497707:8042/node/containerlogs/container_1577261347028_0005_01_000001/trusted-service-user", + "sparkUiUrl": "http://0756e27931b1442da8fded6fb5a384ad022bdb15619:8088/proxy/application_1577261347028_0005/" + }, + "state": "error", + "log": [ + "\t final status: UNDEFINED", + "\t tracking URL: http://0756e27931b1442da8fded6fb5a384ad022bdb15619:8088/proxy/application_1577261347028_0005/", + "\t user: trusted-service-user", + "19/12/25 10:06:26 INFO ShutdownHookManager: Shutdown hook called", + "19/12/25 10:06:26 INFO ShutdownHookManager: Deleting directory /tmp/spark-56d5b827-6412-4628-a521-a8caa8ad5c3e", + "19/12/25 10:06:26 INFO ShutdownHookManager: Deleting directory /tmp/spark-df53ebea-f06c-486a-a903-db2f7806843d", + "19/12/25 10:06:27 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "19/12/25 10:06:27 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "19/12/25 10:06:27 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nYARN Diagnostics: " + ] + }, + { + "id": 11, + "appId": "application_1577261347028_0006", + "appInfo": { + "driverLogUrl": "http://0756e27931b1442da8fded6fb5a384ad0358bf44418:8042/node/containerlogs/container_1577261347028_0006_01_000001/trusted-service-user", + "sparkUiUrl": "http://0756e27931b1442da8fded6fb5a384ad022bdb15619:8088/proxy/application_1577261347028_0006/" + }, + "state": "error", + "log": [ + "\t final status: UNDEFINED", + "\t tracking URL: http://0756e27931b1442da8fded6fb5a384ad022bdb15619:8088/proxy/application_1577261347028_0006/", + "\t user: trusted-service-user", + "19/12/25 10:07:05 INFO ShutdownHookManager: Shutdown hook called", + "19/12/25 10:07:05 INFO ShutdownHookManager: Deleting directory /tmp/spark-57dae334-2360-4782-9ed5-4dace6dc8e1f", + "19/12/25 10:07:05 INFO ShutdownHookManager: Deleting directory /tmp/spark-c5c5be5d-c63d-4cac-8d7a-dea35ce2278f", + "19/12/25 10:07:05 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "19/12/25 10:07:05 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "19/12/25 10:07:05 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nYARN Diagnostics: " + ] + }, + { + "id": 34, + "appId": "application_1582083768945_0003", + "appInfo": { + "driverLogUrl": "http://3024a670da1f4cc38f1f3560864f4d8604113d45195:8042/node/containerlogs/container_1582083768945_0003_01_000001/trusted-service-user", + "sparkUiUrl": "http://3024a670da1f4cc38f1f3560864f4d8601071373522:8088/proxy/application_1582083768945_0003/" + }, + "state": "error", + "log": [ + "\t final status: UNDEFINED", + "\t tracking URL: http://3024a670da1f4cc38f1f3560864f4d8601071373522:8088/proxy/application_1582083768945_0003/", + "\t user: trusted-service-user", + "20/02/19 03:54:36 INFO ShutdownHookManager: Shutdown hook called", + "20/02/19 03:54:36 INFO ShutdownHookManager: Deleting directory /tmp/spark-82194c9f-17d1-4b83-a6df-112f812edfda", + "20/02/19 03:54:36 INFO ShutdownHookManager: Deleting directory /tmp/spark-e92ea88c-8603-4ae7-84ca-b40198ebae2e", + "20/02/19 03:54:36 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "20/02/19 03:54:36 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "20/02/19 03:54:36 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nYARN Diagnostics: " + ] + }, + { + "id": 43, + "appId": "application_1582721346528_0001", + "appInfo": { + "driverLogUrl": "http://e32f1ba891454e2c8934108fad734b37004bf001189:8042/node/containerlogs/container_1582721346528_0001_01_000001/trusted-service-user", + "sparkUiUrl": "http://e32f1ba891454e2c8934108fad734b37001df758198:8088/proxy/application_1582721346528_0001/" + }, + "state": "error", + "log": [ + "\t final status: UNDEFINED", + "\t tracking URL: http://e32f1ba891454e2c8934108fad734b37001df758198:8088/proxy/application_1582721346528_0001/", + "\t user: trusted-service-user", + "20/02/26 12:49:18 INFO ShutdownHookManager: Shutdown hook called", + "20/02/26 12:49:18 INFO ShutdownHookManager: Deleting directory /tmp/spark-582cc476-8e5a-40a3-a62f-a243142b1482", + "20/02/26 12:49:18 INFO ShutdownHookManager: Deleting directory /tmp/spark-772512fd-dcfa-4642-ad14-786d4adaf96b", + "20/02/26 12:49:18 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "20/02/26 12:49:18 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "20/02/26 12:49:18 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nYARN Diagnostics: " + ] + }, + { + "id": 44, + "appId": "application_1582721346528_0002", + "appInfo": { + "driverLogUrl": "http://e32f1ba891454e2c8934108fad734b37004bf001189:8042/node/containerlogs/container_1582721346528_0002_01_000001/trusted-service-user", + "sparkUiUrl": "http://e32f1ba891454e2c8934108fad734b37001df758198:8088/proxy/application_1582721346528_0002/" + }, + "state": "error", + "log": [ + "\t final status: UNDEFINED", + "\t tracking URL: http://e32f1ba891454e2c8934108fad734b37001df758198:8088/proxy/application_1582721346528_0002/", + "\t user: trusted-service-user", + "20/02/26 13:00:50 INFO ShutdownHookManager: Shutdown hook called", + "20/02/26 13:00:50 INFO ShutdownHookManager: Deleting directory /tmp/spark-9965e88e-6be2-4ca3-934a-42ea892b3bc0", + "20/02/26 13:00:50 INFO ShutdownHookManager: Deleting directory /tmp/spark-032cd2e4-f7a8-4ed6-9990-6ee26b79c56c", + "20/02/26 13:00:50 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "20/02/26 13:00:50 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "20/02/26 13:00:50 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nYARN Diagnostics: " + ] + }, + { + "id": 45, + "appId": "application_1582721346528_0003", + "appInfo": { + "driverLogUrl": "http://e32f1ba891454e2c8934108fad734b37004bf001189:8042/node/containerlogs/container_1582721346528_0003_01_000001/trusted-service-user", + "sparkUiUrl": "http://e32f1ba891454e2c8934108fad734b37001df758198:8088/proxy/application_1582721346528_0003/" + }, + "state": "error", + "log": [ + "\t final status: UNDEFINED", + "\t tracking URL: http://e32f1ba891454e2c8934108fad734b37001df758198:8088/proxy/application_1582721346528_0003/", + "\t user: trusted-service-user", + "20/02/26 13:24:19 INFO ShutdownHookManager: Shutdown hook called", + "20/02/26 13:24:19 INFO ShutdownHookManager: Deleting directory /tmp/spark-ef65ba0c-16bb-4f15-89c3-574fd62060c5", + "20/02/26 13:24:19 INFO ShutdownHookManager: Deleting directory /tmp/spark-12b9d723-511b-4148-bb90-2f9713afdf4c", + "20/02/26 13:24:19 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "20/02/26 13:24:19 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "20/02/26 13:24:19 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nYARN Diagnostics: " + ] + }, + { + "id": 46, + "appId": "application_1582721346528_0004", + "appInfo": { + "driverLogUrl": "http://e32f1ba891454e2c8934108fad734b37004bf001189:8042/node/containerlogs/container_1582721346528_0004_01_000001/trusted-service-user", + "sparkUiUrl": "http://e32f1ba891454e2c8934108fad734b37001df758198:8088/proxy/application_1582721346528_0004/" + }, + "state": "error", + "log": [ + "\t final status: UNDEFINED", + "\t tracking URL: http://e32f1ba891454e2c8934108fad734b37001df758198:8088/proxy/application_1582721346528_0004/", + "\t user: trusted-service-user", + "20/02/26 13:32:27 INFO ShutdownHookManager: Shutdown hook called", + "20/02/26 13:32:27 INFO ShutdownHookManager: Deleting directory /tmp/spark-4e0480e3-2240-4f3d-a55e-7cefa30cf7dd", + "20/02/26 13:32:27 INFO ShutdownHookManager: Deleting directory /tmp/spark-aef49187-6e10-4c1c-876d-efe62cbb67f8", + "20/02/26 13:32:27 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "20/02/26 13:32:27 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "20/02/26 13:32:27 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nYARN Diagnostics: " + ] + }, + { + "id": 47, + "appId": "application_1582721346528_0005", + "appInfo": { + "driverLogUrl": "http://e32f1ba891454e2c8934108fad734b37000b9a60506:8042/node/containerlogs/container_1582721346528_0005_01_000001/trusted-service-user", + "sparkUiUrl": "http://e32f1ba891454e2c8934108fad734b37001df758198:8088/proxy/application_1582721346528_0005/" + }, + "state": "error", + "log": [ + "\t final status: UNDEFINED", + "\t tracking URL: http://e32f1ba891454e2c8934108fad734b37001df758198:8088/proxy/application_1582721346528_0005/", + "\t user: trusted-service-user", + "20/02/26 13:35:50 INFO ShutdownHookManager: Shutdown hook called", + "20/02/26 13:35:50 INFO ShutdownHookManager: Deleting directory /tmp/spark-9ced194a-7983-4496-8693-b7da925d645f", + "20/02/26 13:35:50 INFO ShutdownHookManager: Deleting directory /tmp/spark-c6a899cd-049d-4aee-8ad4-5a588e466800", + "20/02/26 13:35:50 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "20/02/26 13:35:50 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "20/02/26 13:35:50 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nYARN Diagnostics: " + ] + }, + { + "id": 48, + "appId": "application_1582721346528_0006", + "appInfo": { + "driverLogUrl": "http://e32f1ba891454e2c8934108fad734b37003c1491642:8042/node/containerlogs/container_1582721346528_0006_01_000001/trusted-service-user", + "sparkUiUrl": "http://e32f1ba891454e2c8934108fad734b37001df758198:8088/proxy/application_1582721346528_0006/" + }, + "state": "error", + "log": [ + "\t final status: UNDEFINED", + "\t tracking URL: http://e32f1ba891454e2c8934108fad734b37001df758198:8088/proxy/application_1582721346528_0006/", + "\t user: trusted-service-user", + "20/02/26 13:38:50 INFO ShutdownHookManager: Shutdown hook called", + "20/02/26 13:38:50 INFO ShutdownHookManager: Deleting directory /tmp/spark-0433623f-ef0c-493b-93a9-9588507f53a4", + "20/02/26 13:38:50 INFO ShutdownHookManager: Deleting directory /tmp/spark-0dbc3f4d-e5af-43b3-9585-0ea51ff02b6e", + "20/02/26 13:38:50 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "20/02/26 13:38:50 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "20/02/26 13:38:50 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nYARN Diagnostics: " + ] + }, + { + "id": 49, + "appId": "application_1582770999899_0001", + "appInfo": { + "driverLogUrl": "http://b50c2ae5022b43d0a9a8b293074617ef00417f90807:8042/node/containerlogs/container_1582770999899_0001_01_000001/trusted-service-user", + "sparkUiUrl": "http://b50c2ae5022b43d0a9a8b293074617ef000a6688148:8088/proxy/application_1582770999899_0001/" + }, + "state": "killed", + "log": [ + "\t final status: UNDEFINED", + "\t tracking URL: http://b50c2ae5022b43d0a9a8b293074617ef000a6688148:8088/proxy/application_1582770999899_0001/", + "\t user: trusted-service-user", + "20/02/27 02:36:51 INFO ShutdownHookManager: Shutdown hook called", + "20/02/27 02:36:51 INFO ShutdownHookManager: Deleting directory /tmp/spark-b1ace93c-cd17-4893-b509-511dac50cb32", + "20/02/27 02:36:51 INFO ShutdownHookManager: Deleting directory /tmp/spark-fdc5c58b-8359-481a-a6a7-7fa64112672a", + "20/02/27 02:36:51 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "20/02/27 02:36:51 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "20/02/27 02:36:51 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nYARN Diagnostics: " + ] + }, + { + "id": 50, + "appId": "application_1582770999899_0002", + "appInfo": { + "driverLogUrl": "http://b50c2ae5022b43d0a9a8b293074617ef00417f90807:8042/node/containerlogs/container_1582770999899_0002_01_000001/trusted-service-user", + "sparkUiUrl": "http://b50c2ae5022b43d0a9a8b293074617ef000a6688148:8088/proxy/application_1582770999899_0002/" + }, + "state": "error", + "log": [ + "\t final status: UNDEFINED", + "\t tracking URL: http://b50c2ae5022b43d0a9a8b293074617ef000a6688148:8088/proxy/application_1582770999899_0002/", + "\t user: trusted-service-user", + "20/02/27 02:43:32 INFO ShutdownHookManager: Shutdown hook called", + "20/02/27 02:43:32 INFO ShutdownHookManager: Deleting directory /tmp/spark-f86b4a4c-dcec-49f7-a18a-ab89e59feb2f", + "20/02/27 02:43:32 INFO ShutdownHookManager: Deleting directory /tmp/spark-f1eb01ba-c9e7-4b04-907e-8a452dd61b6f", + "20/02/27 02:43:32 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "20/02/27 02:43:32 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "20/02/27 02:43:32 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nYARN Diagnostics: " + ] + }, + { + "id": 51, + "appId": "application_1582770999899_0003", + "appInfo": { + "driverLogUrl": "http://b50c2ae5022b43d0a9a8b293074617ef001b6d10128:8042/node/containerlogs/container_1582770999899_0003_01_000001/trusted-service-user", + "sparkUiUrl": "http://b50c2ae5022b43d0a9a8b293074617ef000a6688148:8088/proxy/application_1582770999899_0003/" + }, + "state": "error", + "log": [ + "\t final status: UNDEFINED", + "\t tracking URL: http://b50c2ae5022b43d0a9a8b293074617ef000a6688148:8088/proxy/application_1582770999899_0003/", + "\t user: trusted-service-user", + "20/02/27 02:54:55 INFO ShutdownHookManager: Shutdown hook called", + "20/02/27 02:54:55 INFO ShutdownHookManager: Deleting directory /tmp/spark-97f232e3-86d7-4324-92aa-2741a6220350", + "20/02/27 02:54:55 INFO ShutdownHookManager: Deleting directory /tmp/spark-7e75314e-ef8d-4d94-9e9e-b2202080c05d", + "20/02/27 02:54:55 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "20/02/27 02:54:55 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "20/02/27 02:54:55 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nYARN Diagnostics: " + ] + }, + { + "id": 52, + "appId": "application_1582770999899_0004", + "appInfo": { + "driverLogUrl": "http://b50c2ae5022b43d0a9a8b293074617ef000a6688148:8042/node/containerlogs/container_1582770999899_0004_01_000001/trusted-service-user", + "sparkUiUrl": "http://b50c2ae5022b43d0a9a8b293074617ef000a6688148:8088/proxy/application_1582770999899_0004/" + }, + "state": "dead", + "log": [ + "\t final status: UNDEFINED", + "\t tracking URL: http://b50c2ae5022b43d0a9a8b293074617ef000a6688148:8088/proxy/application_1582770999899_0004/", + "\t user: trusted-service-user", + "20/02/27 03:06:18 INFO ShutdownHookManager: Shutdown hook called", + "20/02/27 03:06:18 INFO ShutdownHookManager: Deleting directory /tmp/spark-be8f21d0-dbb3-4c77-ae12-a0b65961ed74", + "20/02/27 03:06:18 INFO ShutdownHookManager: Deleting directory /tmp/spark-5d5a6b27-8aba-4d48-ab7a-b652ee820922", + "20/02/27 03:06:18 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "20/02/27 03:06:18 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "20/02/27 03:06:18 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nYARN Diagnostics: " + ] + }, + { + "id": 53, + "appId": "application_1582770999899_0005", + "appInfo": { + "driverLogUrl": "http://b50c2ae5022b43d0a9a8b293074617ef00417f90807:8042/node/containerlogs/container_1582770999899_0005_01_000001/trusted-service-user", + "sparkUiUrl": "http://b50c2ae5022b43d0a9a8b293074617ef000a6688148:8088/proxy/application_1582770999899_0005/" + }, + "state": "error", + "log": [ + "\t final status: UNDEFINED", + "\t tracking URL: http://b50c2ae5022b43d0a9a8b293074617ef000a6688148:8088/proxy/application_1582770999899_0005/", + "\t user: trusted-service-user", + "20/02/27 03:13:51 INFO ShutdownHookManager: Shutdown hook called", + "20/02/27 03:13:51 INFO ShutdownHookManager: Deleting directory /tmp/spark-874f6de2-32c5-40f3-b96e-bf965a970868", + "20/02/27 03:13:51 INFO ShutdownHookManager: Deleting directory /tmp/spark-a7726951-3c1c-4f91-9480-e554126696ce", + "20/02/27 03:13:51 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "20/02/27 03:13:51 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "20/02/27 03:13:51 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nYARN Diagnostics: " + ] + }, + { + "id": 54, + "appId": "application_1582770999899_0006", + "appInfo": { + "driverLogUrl": "http://b50c2ae5022b43d0a9a8b293074617ef001b6d10128:8042/node/containerlogs/container_1582770999899_0006_01_000001/trusted-service-user", + "sparkUiUrl": "http://b50c2ae5022b43d0a9a8b293074617ef000a6688148:8088/proxy/application_1582770999899_0006/" + }, + "state": "error", + "log": [ + "\t final status: UNDEFINED", + "\t tracking URL: http://b50c2ae5022b43d0a9a8b293074617ef000a6688148:8088/proxy/application_1582770999899_0006/", + "\t user: trusted-service-user", + "20/02/27 03:39:05 INFO ShutdownHookManager: Shutdown hook called", + "20/02/27 03:39:05 INFO ShutdownHookManager: Deleting directory /tmp/spark-2e61a99f-1f01-45b8-a8db-324cc4453ab0", + "20/02/27 03:39:05 INFO ShutdownHookManager: Deleting directory /tmp/spark-68cf840b-3e84-4d7d-89cf-f17f5cb6b80e", + "20/02/27 03:39:05 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "20/02/27 03:39:05 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "20/02/27 03:39:05 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nYARN Diagnostics: " + ] + } + ] + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/livyApi/versions/2019-11-01-preview/sparkPools/testsparkpool/sessions/2", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-66e5744c43e3de4cb860e315562bf665-4964c827bf94b945-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.Spark/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "a00344a6a3dde3db9dad66e10a64c64f", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:47:36 GMT", + "Server": [ + "Kestrel", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "x-ms-activity-id": "fc83dc8d-2903-4c19-b78f-5479144a97ae", + "x-ms-client-request-id": [ + "a00344a6a3dde3db9dad66e10a64c64f", + "a00344a6a3dde3db9dad66e10a64c64f" + ], + "x-ms-job-cluster": "http://171.1.155.13:8998/", + "x-ms-job-clusterrequested-on": "12/13/2019 8:29:10 AM \u002B00:00", + "x-ms-job-ended-on": "12/13/2019 9:12:57 AM \u002B00:00", + "x-ms-job-internal-id": "2", + "x-ms-job-livysubmission-on": "12/13/2019 8:31:43 AM \u002B00:00", + "x-ms-job-queued-on": "12/13/2019 8:31:00 AM \u002B00:00", + "x-ms-job-result": "Cancelled", + "x-ms-job-scheduled-on": "12/13/2019 8:29:10 AM \u002B00:00", + "x-ms-job-scheduler-state": "Ended", + "x-ms-job-submitted-by-name": "zhezhou@microsoft.com", + "x-ms-job-submitted-on": "12/13/2019 8:29:09 AM \u002B00:00", + "x-ms-job-type": "SparkServiceSession", + "x-ms-request-id": "80098280-426c-4e26-b127-7efeadf89ac4", + "x-ms-response-time-ms": "15" + }, + "ResponseBody": { + "id": 2, + "appId": "application_1576225874089_0001", + "appInfo": { + "driverLogUrl": "http://008b79baa75e493ba50798a50e751b9d03116310046:8042/node/containerlogs/container_1576225874089_0001_01_000001/trusted-service-user", + "sparkUiUrl": "http://008b79baa75e493ba50798a50e751b9d04071d71770:8088/proxy/application_1576225874089_0001/" + }, + "state": "killed", + "log": [ + "\t final status: UNDEFINED", + "\t tracking URL: http://008b79baa75e493ba50798a50e751b9d04071d71770:8088/proxy/application_1576225874089_0001/", + "\t user: trusted-service-user", + "19/12/13 08:31:59 INFO ShutdownHookManager: Shutdown hook called", + "19/12/13 08:31:59 INFO ShutdownHookManager: Deleting directory /tmp/spark-13f31a03-7633-4467-bf81-3fe3309fb856", + "19/12/13 08:31:59 INFO ShutdownHookManager: Deleting directory /tmp/spark-40fe5680-835f-462d-bcbb-c8fffa1bbe6f", + "19/12/13 08:31:59 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "19/12/13 08:31:59 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "19/12/13 08:31:59 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nYARN Diagnostics: " + ] + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/livyApi/versions/2019-11-01-preview/sparkPools/testsparkpool/sessions/6", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-fda925d465317b40a68a3bd84f897f53-586d8c89d2e8a242-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.Spark/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "c2301be2b8fecc27097d85a82e1e41a7", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:47:36 GMT", + "Server": [ + "Kestrel", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "x-ms-activity-id": "125f24df-a29c-4ec6-be04-4f23158bdc3b", + "x-ms-client-request-id": [ + "c2301be2b8fecc27097d85a82e1e41a7", + "c2301be2b8fecc27097d85a82e1e41a7" + ], + "x-ms-job-cluster": "http://171.4.176.47:8998/", + "x-ms-job-clusterrequested-on": "12/25/2019 8:07:26 AM \u002B00:00", + "x-ms-job-ended-on": "12/25/2019 8:40:15 AM \u002B00:00", + "x-ms-job-internal-id": "6", + "x-ms-job-livysubmission-on": "12/25/2019 8:09:18 AM \u002B00:00", + "x-ms-job-queued-on": "12/25/2019 8:09:17 AM \u002B00:00", + "x-ms-job-result": "Failed", + "x-ms-job-scheduled-on": "12/25/2019 8:07:26 AM \u002B00:00", + "x-ms-job-scheduler-state": "Ended", + "x-ms-job-submitted-by-name": "zhezhou@microsoft.com", + "x-ms-job-submitted-on": "12/25/2019 8:07:25 AM \u002B00:00", + "x-ms-job-type": "SparkServiceSession", + "x-ms-request-id": "d07e5e22-91cc-494b-a71b-9376c9cbf402", + "x-ms-response-time-ms": "16" + }, + "ResponseBody": { + "id": 6, + "appId": "application_1577261347028_0001", + "appInfo": { + "driverLogUrl": "http://0756e27931b1442da8fded6fb5a384ad039fdf58075:8042/node/containerlogs/container_1577261347028_0001_01_000001/trusted-service-user", + "sparkUiUrl": "http://0756e27931b1442da8fded6fb5a384ad022bdb15619:8088/proxy/application_1577261347028_0001/" + }, + "state": "dead", + "log": [ + "\t final status: UNDEFINED", + "\t tracking URL: http://0756e27931b1442da8fded6fb5a384ad022bdb15619:8088/proxy/application_1577261347028_0001/", + "\t user: trusted-service-user", + "19/12/25 08:09:25 INFO ShutdownHookManager: Shutdown hook called", + "19/12/25 08:09:25 INFO ShutdownHookManager: Deleting directory /tmp/spark-3f94f2c6-cc2f-4497-833b-3c40c96cfb2e", + "19/12/25 08:09:25 INFO ShutdownHookManager: Deleting directory /tmp/spark-4070576f-39e7-4003-b73e-878a2e176454", + "19/12/25 08:09:25 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "19/12/25 08:09:25 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "19/12/25 08:09:25 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nYARN Diagnostics: " + ] + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/livyApi/versions/2019-11-01-preview/sparkPools/testsparkpool/sessions/7", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-1f084a8e7594164dad5a95c3dd54ee23-1b2b4d2c81bc4941-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.Spark/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "f818e905426f4767628c95af483742b3", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:47:36 GMT", + "Server": [ + "Kestrel", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "x-ms-activity-id": "8716671d-313b-4a01-bb97-e8253cf2e487", + "x-ms-client-request-id": [ + "f818e905426f4767628c95af483742b3", + "f818e905426f4767628c95af483742b3" + ], + "x-ms-job-cluster": "http://171.4.176.47:8998/", + "x-ms-job-clusterrequested-on": "12/25/2019 8:16:41 AM \u002B00:00", + "x-ms-job-ended-on": "12/25/2019 8:49:30 AM \u002B00:00", + "x-ms-job-internal-id": "7", + "x-ms-job-livysubmission-on": "12/25/2019 8:16:43 AM \u002B00:00", + "x-ms-job-queued-on": "12/25/2019 8:16:43 AM \u002B00:00", + "x-ms-job-result": "Cancelled", + "x-ms-job-scheduled-on": "12/25/2019 8:16:40 AM \u002B00:00", + "x-ms-job-scheduler-state": "Ended", + "x-ms-job-submitted-by-name": "zhezhou@microsoft.com", + "x-ms-job-submitted-on": "12/25/2019 8:16:39 AM \u002B00:00", + "x-ms-job-type": "SparkServiceSession", + "x-ms-request-id": "5e52163e-96f3-45bf-8138-d39328669bb5", + "x-ms-response-time-ms": "14" + }, + "ResponseBody": { + "id": 7, + "appId": "application_1577261347028_0002", + "appInfo": { + "driverLogUrl": "http://0756e27931b1442da8fded6fb5a384ad00453758611:8042/node/containerlogs/container_1577261347028_0002_01_000001/trusted-service-user", + "sparkUiUrl": "http://0756e27931b1442da8fded6fb5a384ad022bdb15619:8088/proxy/application_1577261347028_0002/" + }, + "state": "killed", + "log": [ + "\t final status: UNDEFINED", + "\t tracking URL: http://0756e27931b1442da8fded6fb5a384ad022bdb15619:8088/proxy/application_1577261347028_0002/", + "\t user: trusted-service-user", + "19/12/25 08:16:47 INFO ShutdownHookManager: Shutdown hook called", + "19/12/25 08:16:47 INFO ShutdownHookManager: Deleting directory /tmp/spark-5829aff6-088b-4496-afc5-147214d18c51", + "19/12/25 08:16:47 INFO ShutdownHookManager: Deleting directory /tmp/spark-e4f0d452-bbb4-4719-b2d1-fe34dc28d4f9", + "19/12/25 08:16:47 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "19/12/25 08:16:47 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "19/12/25 08:16:47 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nYARN Diagnostics: " + ] + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/livyApi/versions/2019-11-01-preview/sparkPools/testsparkpool/sessions/8", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-d1d935a199f58049b7081d5c033164e6-3cd0112a7cc1cf4b-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.Spark/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "fa2344ae1c6ced791c3797601e33b47f", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:47:37 GMT", + "Server": [ + "Kestrel", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "x-ms-activity-id": "2d0e4c2a-7dba-44e4-b48f-40a3045be7f1", + "x-ms-client-request-id": [ + "fa2344ae1c6ced791c3797601e33b47f", + "fa2344ae1c6ced791c3797601e33b47f" + ], + "x-ms-job-cluster": "http://171.4.176.47:8998/", + "x-ms-job-clusterrequested-on": "12/25/2019 8:29:42 AM \u002B00:00", + "x-ms-job-ended-on": "12/25/2019 9:09:15 AM \u002B00:00", + "x-ms-job-internal-id": "8", + "x-ms-job-livysubmission-on": "12/25/2019 8:29:45 AM \u002B00:00", + "x-ms-job-queued-on": "12/25/2019 8:29:44 AM \u002B00:00", + "x-ms-job-result": "Failed", + "x-ms-job-scheduled-on": "12/25/2019 8:29:42 AM \u002B00:00", + "x-ms-job-scheduler-state": "Ended", + "x-ms-job-submitted-by-name": "zhezhou@microsoft.com", + "x-ms-job-submitted-on": "12/25/2019 8:29:41 AM \u002B00:00", + "x-ms-job-type": "SparkServiceSession", + "x-ms-request-id": "d4a1f272-427b-455c-acea-9d52a47dda34", + "x-ms-response-time-ms": "37" + }, + "ResponseBody": { + "id": 8, + "appId": "application_1577261347028_0003", + "appInfo": { + "driverLogUrl": "http://0756e27931b1442da8fded6fb5a384ad032f0488094:8042/node/containerlogs/container_1577261347028_0003_01_000001/trusted-service-user", + "sparkUiUrl": "http://0756e27931b1442da8fded6fb5a384ad022bdb15619:8088/proxy/application_1577261347028_0003/" + }, + "state": "error", + "log": [ + "\t final status: UNDEFINED", + "\t tracking URL: http://0756e27931b1442da8fded6fb5a384ad022bdb15619:8088/proxy/application_1577261347028_0003/", + "\t user: trusted-service-user", + "19/12/25 08:29:49 INFO ShutdownHookManager: Shutdown hook called", + "19/12/25 08:29:49 INFO ShutdownHookManager: Deleting directory /tmp/spark-de484530-d317-4435-8145-c82ade1aebdb", + "19/12/25 08:29:49 INFO ShutdownHookManager: Deleting directory /tmp/spark-2d468982-7533-4d5a-a601-73d568abc9b1", + "19/12/25 08:29:49 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "19/12/25 08:29:49 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "19/12/25 08:29:49 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nYARN Diagnostics: " + ] + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/livyApi/versions/2019-11-01-preview/sparkPools/testsparkpool/sessions/9", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-6e0d2ad89eadf0448c47c2fffd30c01a-096a239b3596dc45-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.Spark/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "20dcbf6bce4c9fdfb4e86072237883d2", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:47:37 GMT", + "Server": [ + "Kestrel", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "x-ms-activity-id": "896b7a25-cfba-4c3a-b06c-1d5e96cf6e1a", + "x-ms-client-request-id": [ + "20dcbf6bce4c9fdfb4e86072237883d2", + "20dcbf6bce4c9fdfb4e86072237883d2" + ], + "x-ms-job-cluster": "http://171.4.176.47:8998/", + "x-ms-job-clusterrequested-on": "12/25/2019 9:11:32 AM \u002B00:00", + "x-ms-job-ended-on": "12/25/2019 10:05:23 AM \u002B00:00", + "x-ms-job-internal-id": "9", + "x-ms-job-livysubmission-on": "12/25/2019 9:11:35 AM \u002B00:00", + "x-ms-job-queued-on": "12/25/2019 9:11:35 AM \u002B00:00", + "x-ms-job-result": "Cancelled", + "x-ms-job-scheduled-on": "12/25/2019 9:11:31 AM \u002B00:00", + "x-ms-job-scheduler-state": "Ended", + "x-ms-job-submitted-by-name": "zhezhou@microsoft.com", + "x-ms-job-submitted-on": "12/25/2019 9:11:30 AM \u002B00:00", + "x-ms-job-type": "SparkServiceSession", + "x-ms-request-id": "a5daae11-3fe9-4013-a0db-3bc02addf0da", + "x-ms-response-time-ms": "29" + }, + "ResponseBody": { + "id": 9, + "appId": "application_1577261347028_0004", + "appInfo": { + "driverLogUrl": "http://0756e27931b1442da8fded6fb5a384ad017a7497707:8042/node/containerlogs/container_1577261347028_0004_01_000001/trusted-service-user", + "sparkUiUrl": "http://0756e27931b1442da8fded6fb5a384ad022bdb15619:8088/proxy/application_1577261347028_0004/" + }, + "state": "killed", + "log": [ + "\t final status: UNDEFINED", + "\t tracking URL: http://0756e27931b1442da8fded6fb5a384ad022bdb15619:8088/proxy/application_1577261347028_0004/", + "\t user: trusted-service-user", + "19/12/25 09:11:39 INFO ShutdownHookManager: Shutdown hook called", + "19/12/25 09:11:39 INFO ShutdownHookManager: Deleting directory /tmp/spark-298699c6-1a19-43f4-b0e7-77ff38765146", + "19/12/25 09:11:39 INFO ShutdownHookManager: Deleting directory /tmp/spark-bdf130b2-b3c9-4ff0-9205-d8e9bbc6489d", + "19/12/25 09:11:39 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "19/12/25 09:11:39 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "19/12/25 09:11:39 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nYARN Diagnostics: " + ] + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/livyApi/versions/2019-11-01-preview/sparkPools/testsparkpool/sessions/10", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-a81c7b580d987140bc850518ac4e25d7-8b8b8ca55ab7c24d-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.Spark/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "eafad13a46fbe83a702adb38ab07282e", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:47:37 GMT", + "Server": [ + "Kestrel", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "x-ms-activity-id": "852a83dc-23c5-4133-8b01-8eadfb6979c2", + "x-ms-client-request-id": [ + "eafad13a46fbe83a702adb38ab07282e", + "eafad13a46fbe83a702adb38ab07282e" + ], + "x-ms-job-cluster": "http://171.4.176.47:8998/", + "x-ms-job-clusterrequested-on": "12/25/2019 10:06:20 AM \u002B00:00", + "x-ms-job-ended-on": "12/25/2019 10:37:15 AM \u002B00:00", + "x-ms-job-internal-id": "10", + "x-ms-job-livysubmission-on": "12/25/2019 10:06:22 AM \u002B00:00", + "x-ms-job-queued-on": "12/25/2019 10:06:22 AM \u002B00:00", + "x-ms-job-result": "Failed", + "x-ms-job-scheduled-on": "12/25/2019 10:06:20 AM \u002B00:00", + "x-ms-job-scheduler-state": "Ended", + "x-ms-job-submitted-by-name": "zhezhou@microsoft.com", + "x-ms-job-submitted-on": "12/25/2019 10:06:18 AM \u002B00:00", + "x-ms-job-type": "SparkServiceSession", + "x-ms-request-id": "4d430ca2-6e8d-452a-9956-45c58baafd65", + "x-ms-response-time-ms": "44" + }, + "ResponseBody": { + "id": 10, + "appId": "application_1577261347028_0005", + "appInfo": { + "driverLogUrl": "http://0756e27931b1442da8fded6fb5a384ad017a7497707:8042/node/containerlogs/container_1577261347028_0005_01_000001/trusted-service-user", + "sparkUiUrl": "http://0756e27931b1442da8fded6fb5a384ad022bdb15619:8088/proxy/application_1577261347028_0005/" + }, + "state": "error", + "log": [ + "\t final status: UNDEFINED", + "\t tracking URL: http://0756e27931b1442da8fded6fb5a384ad022bdb15619:8088/proxy/application_1577261347028_0005/", + "\t user: trusted-service-user", + "19/12/25 10:06:26 INFO ShutdownHookManager: Shutdown hook called", + "19/12/25 10:06:26 INFO ShutdownHookManager: Deleting directory /tmp/spark-56d5b827-6412-4628-a521-a8caa8ad5c3e", + "19/12/25 10:06:26 INFO ShutdownHookManager: Deleting directory /tmp/spark-df53ebea-f06c-486a-a903-db2f7806843d", + "19/12/25 10:06:27 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "19/12/25 10:06:27 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "19/12/25 10:06:27 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nYARN Diagnostics: " + ] + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/livyApi/versions/2019-11-01-preview/sparkPools/testsparkpool/sessions/11", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-35965f7e5cdf7145888e1631cf529770-4efe945b39d9544f-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.Spark/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "894315d7215bdf6765834683bb07caa3", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:47:37 GMT", + "Server": [ + "Kestrel", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "x-ms-activity-id": "89c6a0b5-dade-45a1-8cc3-0b676353321a", + "x-ms-client-request-id": [ + "894315d7215bdf6765834683bb07caa3", + "894315d7215bdf6765834683bb07caa3" + ], + "x-ms-job-cluster": "http://171.4.176.47:8998/", + "x-ms-job-clusterrequested-on": "12/25/2019 10:06:58 AM \u002B00:00", + "x-ms-job-ended-on": "12/25/2019 11:10:19 AM \u002B00:00", + "x-ms-job-internal-id": "11", + "x-ms-job-livysubmission-on": "12/25/2019 10:07:01 AM \u002B00:00", + "x-ms-job-queued-on": "12/25/2019 10:07:01 AM \u002B00:00", + "x-ms-job-result": "Failed", + "x-ms-job-scheduled-on": "12/25/2019 10:06:58 AM \u002B00:00", + "x-ms-job-scheduler-state": "Ended", + "x-ms-job-submitted-by-name": "zhezhou@microsoft.com", + "x-ms-job-submitted-on": "12/25/2019 10:06:57 AM \u002B00:00", + "x-ms-job-type": "SparkServiceSession", + "x-ms-request-id": "0c971ff1-4f61-4c0b-9b51-fec5056c683b", + "x-ms-response-time-ms": "29" + }, + "ResponseBody": { + "id": 11, + "appId": "application_1577261347028_0006", + "appInfo": { + "driverLogUrl": "http://0756e27931b1442da8fded6fb5a384ad0358bf44418:8042/node/containerlogs/container_1577261347028_0006_01_000001/trusted-service-user", + "sparkUiUrl": "http://0756e27931b1442da8fded6fb5a384ad022bdb15619:8088/proxy/application_1577261347028_0006/" + }, + "state": "error", + "log": [ + "\t final status: UNDEFINED", + "\t tracking URL: http://0756e27931b1442da8fded6fb5a384ad022bdb15619:8088/proxy/application_1577261347028_0006/", + "\t user: trusted-service-user", + "19/12/25 10:07:05 INFO ShutdownHookManager: Shutdown hook called", + "19/12/25 10:07:05 INFO ShutdownHookManager: Deleting directory /tmp/spark-57dae334-2360-4782-9ed5-4dace6dc8e1f", + "19/12/25 10:07:05 INFO ShutdownHookManager: Deleting directory /tmp/spark-c5c5be5d-c63d-4cac-8d7a-dea35ce2278f", + "19/12/25 10:07:05 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "19/12/25 10:07:05 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "19/12/25 10:07:05 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nYARN Diagnostics: " + ] + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/livyApi/versions/2019-11-01-preview/sparkPools/testsparkpool/sessions/34", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-4185f1a11758824b9f648e07b750a976-56821004b2a9564c-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.Spark/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "4d25c5b3ca39248384f3b021f3a7f4ac", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:47:37 GMT", + "Server": [ + "Kestrel", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "x-ms-activity-id": "108d5e03-9591-4fcf-99fd-137b029f4999", + "x-ms-client-request-id": [ + "4d25c5b3ca39248384f3b021f3a7f4ac", + "4d25c5b3ca39248384f3b021f3a7f4ac" + ], + "x-ms-job-cluster": "http://171.1.144.19:8998/", + "x-ms-job-clusterrequested-on": "2/19/2020 3:54:29 AM \u002B00:00", + "x-ms-job-ended-on": "2/19/2020 4:20:51 AM \u002B00:00", + "x-ms-job-internal-id": "34", + "x-ms-job-livysubmission-on": "2/19/2020 3:54:33 AM \u002B00:00", + "x-ms-job-queued-on": "2/19/2020 3:54:32 AM \u002B00:00", + "x-ms-job-result": "Failed", + "x-ms-job-scheduled-on": "2/19/2020 3:54:29 AM \u002B00:00", + "x-ms-job-scheduler-state": "Ended", + "x-ms-job-submitted-by-name": "zhezhou@microsoft.com", + "x-ms-job-submitted-on": "2/19/2020 3:54:27 AM \u002B00:00", + "x-ms-job-type": "SparkServiceSession", + "x-ms-request-id": "7e0063d4-a852-4a63-bc78-10a6518ea7fe", + "x-ms-response-time-ms": "43" + }, + "ResponseBody": { + "id": 34, + "appId": "application_1582083768945_0003", + "appInfo": { + "driverLogUrl": "http://3024a670da1f4cc38f1f3560864f4d8604113d45195:8042/node/containerlogs/container_1582083768945_0003_01_000001/trusted-service-user", + "sparkUiUrl": "http://3024a670da1f4cc38f1f3560864f4d8601071373522:8088/proxy/application_1582083768945_0003/" + }, + "state": "error", + "log": [ + "\t final status: UNDEFINED", + "\t tracking URL: http://3024a670da1f4cc38f1f3560864f4d8601071373522:8088/proxy/application_1582083768945_0003/", + "\t user: trusted-service-user", + "20/02/19 03:54:36 INFO ShutdownHookManager: Shutdown hook called", + "20/02/19 03:54:36 INFO ShutdownHookManager: Deleting directory /tmp/spark-82194c9f-17d1-4b83-a6df-112f812edfda", + "20/02/19 03:54:36 INFO ShutdownHookManager: Deleting directory /tmp/spark-e92ea88c-8603-4ae7-84ca-b40198ebae2e", + "20/02/19 03:54:36 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "20/02/19 03:54:36 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "20/02/19 03:54:36 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nYARN Diagnostics: " + ] + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/livyApi/versions/2019-11-01-preview/sparkPools/testsparkpool/sessions/43", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-c3389cf9b9ea704980e4ebd672a282fd-0fe47df511e74f49-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.Spark/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "0d9a31c0fa341977691a847700b62d69", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:47:37 GMT", + "Server": [ + "Kestrel", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "x-ms-activity-id": "c0ea48ee-ccb2-49d0-bafd-6c2a18b743cc", + "x-ms-client-request-id": [ + "0d9a31c0fa341977691a847700b62d69", + "0d9a31c0fa341977691a847700b62d69" + ], + "x-ms-job-cluster": "http://171.4.176.20:8998/", + "x-ms-job-clusterrequested-on": "2/26/2020 12:47:32 PM \u002B00:00", + "x-ms-job-ended-on": "2/26/2020 1:00:10 PM \u002B00:00", + "x-ms-job-internal-id": "43", + "x-ms-job-livysubmission-on": "2/26/2020 12:49:11 PM \u002B00:00", + "x-ms-job-queued-on": "2/26/2020 12:49:04 PM \u002B00:00", + "x-ms-job-result": "Failed", + "x-ms-job-scheduled-on": "2/26/2020 12:47:32 PM \u002B00:00", + "x-ms-job-scheduler-state": "Ended", + "x-ms-job-submitted-by-name": "zhezhou@microsoft.com", + "x-ms-job-submitted-on": "2/26/2020 12:47:31 PM \u002B00:00", + "x-ms-job-type": "SparkServiceSession", + "x-ms-request-id": "1440f765-668e-4f21-b5aa-475afd83919c", + "x-ms-response-time-ms": "43" + }, + "ResponseBody": { + "id": 43, + "appId": "application_1582721346528_0001", + "appInfo": { + "driverLogUrl": "http://e32f1ba891454e2c8934108fad734b37004bf001189:8042/node/containerlogs/container_1582721346528_0001_01_000001/trusted-service-user", + "sparkUiUrl": "http://e32f1ba891454e2c8934108fad734b37001df758198:8088/proxy/application_1582721346528_0001/" + }, + "state": "error", + "log": [ + "\t final status: UNDEFINED", + "\t tracking URL: http://e32f1ba891454e2c8934108fad734b37001df758198:8088/proxy/application_1582721346528_0001/", + "\t user: trusted-service-user", + "20/02/26 12:49:18 INFO ShutdownHookManager: Shutdown hook called", + "20/02/26 12:49:18 INFO ShutdownHookManager: Deleting directory /tmp/spark-582cc476-8e5a-40a3-a62f-a243142b1482", + "20/02/26 12:49:18 INFO ShutdownHookManager: Deleting directory /tmp/spark-772512fd-dcfa-4642-ad14-786d4adaf96b", + "20/02/26 12:49:18 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "20/02/26 12:49:18 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "20/02/26 12:49:18 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nYARN Diagnostics: " + ] + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/livyApi/versions/2019-11-01-preview/sparkPools/testsparkpool/sessions/44", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-5cf1399be078874dbd53ac7b47e27337-5e6a727a25d3ed41-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.Spark/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "e6843760dbe20df5911e04677146ecbe", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:47:37 GMT", + "Server": [ + "Kestrel", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "x-ms-activity-id": "8fa582b6-01f1-4701-a66f-2244f4996f33", + "x-ms-client-request-id": [ + "e6843760dbe20df5911e04677146ecbe", + "e6843760dbe20df5911e04677146ecbe" + ], + "x-ms-job-cluster": "http://171.4.176.20:8998/", + "x-ms-job-clusterrequested-on": "2/26/2020 1:00:36 PM \u002B00:00", + "x-ms-job-ended-on": "2/26/2020 1:11:09 PM \u002B00:00", + "x-ms-job-internal-id": "44", + "x-ms-job-livysubmission-on": "2/26/2020 1:00:46 PM \u002B00:00", + "x-ms-job-queued-on": "2/26/2020 1:00:44 PM \u002B00:00", + "x-ms-job-result": "Failed", + "x-ms-job-scheduled-on": "2/26/2020 1:00:35 PM \u002B00:00", + "x-ms-job-scheduler-state": "Ended", + "x-ms-job-submitted-by-name": "zhezhou@microsoft.com", + "x-ms-job-submitted-on": "2/26/2020 1:00:34 PM \u002B00:00", + "x-ms-job-type": "SparkServiceSession", + "x-ms-request-id": "bdf5442d-89a6-4e7a-8458-9d058471f661", + "x-ms-response-time-ms": "29" + }, + "ResponseBody": { + "id": 44, + "appId": "application_1582721346528_0002", + "appInfo": { + "driverLogUrl": "http://e32f1ba891454e2c8934108fad734b37004bf001189:8042/node/containerlogs/container_1582721346528_0002_01_000001/trusted-service-user", + "sparkUiUrl": "http://e32f1ba891454e2c8934108fad734b37001df758198:8088/proxy/application_1582721346528_0002/" + }, + "state": "error", + "log": [ + "\t final status: UNDEFINED", + "\t tracking URL: http://e32f1ba891454e2c8934108fad734b37001df758198:8088/proxy/application_1582721346528_0002/", + "\t user: trusted-service-user", + "20/02/26 13:00:50 INFO ShutdownHookManager: Shutdown hook called", + "20/02/26 13:00:50 INFO ShutdownHookManager: Deleting directory /tmp/spark-9965e88e-6be2-4ca3-934a-42ea892b3bc0", + "20/02/26 13:00:50 INFO ShutdownHookManager: Deleting directory /tmp/spark-032cd2e4-f7a8-4ed6-9990-6ee26b79c56c", + "20/02/26 13:00:50 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "20/02/26 13:00:50 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "20/02/26 13:00:50 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nYARN Diagnostics: " + ] + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/livyApi/versions/2019-11-01-preview/sparkPools/testsparkpool/sessions/45", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-8a809f7b13e60c4996fc864ac76ca4b3-99d5e0e76bafa642-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.Spark/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "89c3998fbd6cb86f4e0be31f450c24cd", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:47:37 GMT", + "Server": [ + "Kestrel", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "x-ms-activity-id": "655a50a9-98f5-47e5-bf95-07e92e026318", + "x-ms-client-request-id": [ + "89c3998fbd6cb86f4e0be31f450c24cd", + "89c3998fbd6cb86f4e0be31f450c24cd" + ], + "x-ms-job-cluster": "http://171.4.176.20:8998/", + "x-ms-job-clusterrequested-on": "2/26/2020 1:24:12 PM \u002B00:00", + "x-ms-job-ended-on": "2/26/2020 1:41:10 PM \u002B00:00", + "x-ms-job-internal-id": "45", + "x-ms-job-livysubmission-on": "2/26/2020 1:24:14 PM \u002B00:00", + "x-ms-job-queued-on": "2/26/2020 1:24:14 PM \u002B00:00", + "x-ms-job-result": "Failed", + "x-ms-job-scheduled-on": "2/26/2020 1:24:11 PM \u002B00:00", + "x-ms-job-scheduler-state": "Ended", + "x-ms-job-submitted-by-name": "zhezhou@microsoft.com", + "x-ms-job-submitted-on": "2/26/2020 1:24:11 PM \u002B00:00", + "x-ms-job-type": "SparkServiceSession", + "x-ms-request-id": "c2dc1735-f42f-4f44-afe9-c44ef70b7268", + "x-ms-response-time-ms": "29" + }, + "ResponseBody": { + "id": 45, + "appId": "application_1582721346528_0003", + "appInfo": { + "driverLogUrl": "http://e32f1ba891454e2c8934108fad734b37004bf001189:8042/node/containerlogs/container_1582721346528_0003_01_000001/trusted-service-user", + "sparkUiUrl": "http://e32f1ba891454e2c8934108fad734b37001df758198:8088/proxy/application_1582721346528_0003/" + }, + "state": "error", + "log": [ + "\t final status: UNDEFINED", + "\t tracking URL: http://e32f1ba891454e2c8934108fad734b37001df758198:8088/proxy/application_1582721346528_0003/", + "\t user: trusted-service-user", + "20/02/26 13:24:19 INFO ShutdownHookManager: Shutdown hook called", + "20/02/26 13:24:19 INFO ShutdownHookManager: Deleting directory /tmp/spark-ef65ba0c-16bb-4f15-89c3-574fd62060c5", + "20/02/26 13:24:19 INFO ShutdownHookManager: Deleting directory /tmp/spark-12b9d723-511b-4148-bb90-2f9713afdf4c", + "20/02/26 13:24:19 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "20/02/26 13:24:19 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "20/02/26 13:24:19 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nYARN Diagnostics: " + ] + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/livyApi/versions/2019-11-01-preview/sparkPools/testsparkpool/sessions/46", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-679854f7ba783c4c896e9483f2d0d762-14104d0a368ead41-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.Spark/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "bbc046c60d22e4ca3c8d7b16f50fa823", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:47:37 GMT", + "Server": [ + "Kestrel", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "x-ms-activity-id": "ae5f8f5a-6b0e-4310-af04-8d745f4c9ca4", + "x-ms-client-request-id": [ + "bbc046c60d22e4ca3c8d7b16f50fa823", + "bbc046c60d22e4ca3c8d7b16f50fa823" + ], + "x-ms-job-cluster": "http://171.4.176.20:8998/", + "x-ms-job-clusterrequested-on": "2/26/2020 1:32:19 PM \u002B00:00", + "x-ms-job-ended-on": "2/26/2020 1:43:09 PM \u002B00:00", + "x-ms-job-internal-id": "46", + "x-ms-job-livysubmission-on": "2/26/2020 1:32:22 PM \u002B00:00", + "x-ms-job-queued-on": "2/26/2020 1:32:22 PM \u002B00:00", + "x-ms-job-result": "Failed", + "x-ms-job-scheduled-on": "2/26/2020 1:32:19 PM \u002B00:00", + "x-ms-job-scheduler-state": "Ended", + "x-ms-job-submitted-by-name": "zhezhou@microsoft.com", + "x-ms-job-submitted-on": "2/26/2020 1:32:18 PM \u002B00:00", + "x-ms-job-type": "SparkServiceSession", + "x-ms-request-id": "e24aca72-42ab-4049-b0f4-f28654e82760", + "x-ms-response-time-ms": "42" + }, + "ResponseBody": { + "id": 46, + "appId": "application_1582721346528_0004", + "appInfo": { + "driverLogUrl": "http://e32f1ba891454e2c8934108fad734b37004bf001189:8042/node/containerlogs/container_1582721346528_0004_01_000001/trusted-service-user", + "sparkUiUrl": "http://e32f1ba891454e2c8934108fad734b37001df758198:8088/proxy/application_1582721346528_0004/" + }, + "state": "error", + "log": [ + "\t final status: UNDEFINED", + "\t tracking URL: http://e32f1ba891454e2c8934108fad734b37001df758198:8088/proxy/application_1582721346528_0004/", + "\t user: trusted-service-user", + "20/02/26 13:32:27 INFO ShutdownHookManager: Shutdown hook called", + "20/02/26 13:32:27 INFO ShutdownHookManager: Deleting directory /tmp/spark-4e0480e3-2240-4f3d-a55e-7cefa30cf7dd", + "20/02/26 13:32:27 INFO ShutdownHookManager: Deleting directory /tmp/spark-aef49187-6e10-4c1c-876d-efe62cbb67f8", + "20/02/26 13:32:27 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "20/02/26 13:32:27 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "20/02/26 13:32:27 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nYARN Diagnostics: " + ] + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/livyApi/versions/2019-11-01-preview/sparkPools/testsparkpool/sessions/47", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-60547617efbd64489c6336ef6d3c8fab-4fbd20bae0729d41-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.Spark/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "66e8c62da3f2a2fcc8cc97d6f8d6c785", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:47:38 GMT", + "Server": [ + "Kestrel", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "x-ms-activity-id": "5558b7f6-c43c-4e25-b2fe-3682334b3048", + "x-ms-client-request-id": [ + "66e8c62da3f2a2fcc8cc97d6f8d6c785", + "66e8c62da3f2a2fcc8cc97d6f8d6c785" + ], + "x-ms-job-cluster": "http://171.4.176.20:8998/", + "x-ms-job-clusterrequested-on": "2/26/2020 1:35:43 PM \u002B00:00", + "x-ms-job-ended-on": "2/26/2020 1:46:09 PM \u002B00:00", + "x-ms-job-internal-id": "47", + "x-ms-job-livysubmission-on": "2/26/2020 1:35:47 PM \u002B00:00", + "x-ms-job-queued-on": "2/26/2020 1:35:46 PM \u002B00:00", + "x-ms-job-result": "Failed", + "x-ms-job-scheduled-on": "2/26/2020 1:35:43 PM \u002B00:00", + "x-ms-job-scheduler-state": "Ended", + "x-ms-job-submitted-by-name": "zhezhou@microsoft.com", + "x-ms-job-submitted-on": "2/26/2020 1:35:42 PM \u002B00:00", + "x-ms-job-type": "SparkServiceSession", + "x-ms-request-id": "6f72325f-4452-4858-80c6-670595f30058", + "x-ms-response-time-ms": "28" + }, + "ResponseBody": { + "id": 47, + "appId": "application_1582721346528_0005", + "appInfo": { + "driverLogUrl": "http://e32f1ba891454e2c8934108fad734b37000b9a60506:8042/node/containerlogs/container_1582721346528_0005_01_000001/trusted-service-user", + "sparkUiUrl": "http://e32f1ba891454e2c8934108fad734b37001df758198:8088/proxy/application_1582721346528_0005/" + }, + "state": "error", + "log": [ + "\t final status: UNDEFINED", + "\t tracking URL: http://e32f1ba891454e2c8934108fad734b37001df758198:8088/proxy/application_1582721346528_0005/", + "\t user: trusted-service-user", + "20/02/26 13:35:50 INFO ShutdownHookManager: Shutdown hook called", + "20/02/26 13:35:50 INFO ShutdownHookManager: Deleting directory /tmp/spark-9ced194a-7983-4496-8693-b7da925d645f", + "20/02/26 13:35:50 INFO ShutdownHookManager: Deleting directory /tmp/spark-c6a899cd-049d-4aee-8ad4-5a588e466800", + "20/02/26 13:35:50 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "20/02/26 13:35:50 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "20/02/26 13:35:50 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nYARN Diagnostics: " + ] + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/livyApi/versions/2019-11-01-preview/sparkPools/testsparkpool/sessions/48", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-24e23d0a4571d34497618fa09d2a4e7f-f2ae49c5fca80845-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.Spark/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "2aa136fa3185819bcfdf4dde4158c33e", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:47:38 GMT", + "Server": [ + "Kestrel", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "x-ms-activity-id": "c930adf1-e895-49b4-bbef-67adaa39f1d3", + "x-ms-client-request-id": [ + "2aa136fa3185819bcfdf4dde4158c33e", + "2aa136fa3185819bcfdf4dde4158c33e" + ], + "x-ms-job-cluster": "http://171.4.176.20:8998/", + "x-ms-job-clusterrequested-on": "2/26/2020 1:38:43 PM \u002B00:00", + "x-ms-job-ended-on": "2/26/2020 1:54:09 PM \u002B00:00", + "x-ms-job-internal-id": "48", + "x-ms-job-livysubmission-on": "2/26/2020 1:38:46 PM \u002B00:00", + "x-ms-job-queued-on": "2/26/2020 1:38:46 PM \u002B00:00", + "x-ms-job-result": "Failed", + "x-ms-job-scheduled-on": "2/26/2020 1:38:43 PM \u002B00:00", + "x-ms-job-scheduler-state": "Ended", + "x-ms-job-submitted-by-name": "zhezhou@microsoft.com", + "x-ms-job-submitted-on": "2/26/2020 1:38:42 PM \u002B00:00", + "x-ms-job-type": "SparkServiceSession", + "x-ms-request-id": "8ca771da-cd82-4e38-97ef-686b0f003be4", + "x-ms-response-time-ms": "29" + }, + "ResponseBody": { + "id": 48, + "appId": "application_1582721346528_0006", + "appInfo": { + "driverLogUrl": "http://e32f1ba891454e2c8934108fad734b37003c1491642:8042/node/containerlogs/container_1582721346528_0006_01_000001/trusted-service-user", + "sparkUiUrl": "http://e32f1ba891454e2c8934108fad734b37001df758198:8088/proxy/application_1582721346528_0006/" + }, + "state": "error", + "log": [ + "\t final status: UNDEFINED", + "\t tracking URL: http://e32f1ba891454e2c8934108fad734b37001df758198:8088/proxy/application_1582721346528_0006/", + "\t user: trusted-service-user", + "20/02/26 13:38:50 INFO ShutdownHookManager: Shutdown hook called", + "20/02/26 13:38:50 INFO ShutdownHookManager: Deleting directory /tmp/spark-0433623f-ef0c-493b-93a9-9588507f53a4", + "20/02/26 13:38:50 INFO ShutdownHookManager: Deleting directory /tmp/spark-0dbc3f4d-e5af-43b3-9585-0ea51ff02b6e", + "20/02/26 13:38:50 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "20/02/26 13:38:50 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "20/02/26 13:38:50 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nYARN Diagnostics: " + ] + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/livyApi/versions/2019-11-01-preview/sparkPools/testsparkpool/sessions/49", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-82e6c91f3edb9c4ea730948ca056aaa9-26355ada23f22f43-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.Spark/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "7ff1c063bd2322db4a1ef25675f3ec65", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:47:38 GMT", + "Server": [ + "Kestrel", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "x-ms-activity-id": "f495530d-48a9-4312-98fe-a8d9d44d2197", + "x-ms-client-request-id": [ + "7ff1c063bd2322db4a1ef25675f3ec65", + "7ff1c063bd2322db4a1ef25675f3ec65" + ], + "x-ms-job-cluster": "http://171.0.202.6:8998/", + "x-ms-job-clusterrequested-on": "2/27/2020 2:35:25 AM \u002B00:00", + "x-ms-job-ended-on": "2/27/2020 3:09:06 AM \u002B00:00", + "x-ms-job-internal-id": "49", + "x-ms-job-livysubmission-on": "2/27/2020 2:36:44 AM \u002B00:00", + "x-ms-job-queued-on": "2/27/2020 2:36:36 AM \u002B00:00", + "x-ms-job-result": "Cancelled", + "x-ms-job-scheduled-on": "2/27/2020 2:35:25 AM \u002B00:00", + "x-ms-job-scheduler-state": "Ended", + "x-ms-job-submitted-by-name": "zhezhou@microsoft.com", + "x-ms-job-submitted-on": "2/27/2020 2:35:24 AM \u002B00:00", + "x-ms-job-type": "SparkServiceSession", + "x-ms-request-id": "ffffe2d2-631f-4a70-ae4e-0fbe3cdaee53", + "x-ms-response-time-ms": "15" + }, + "ResponseBody": { + "id": 49, + "appId": "application_1582770999899_0001", + "appInfo": { + "driverLogUrl": "http://b50c2ae5022b43d0a9a8b293074617ef00417f90807:8042/node/containerlogs/container_1582770999899_0001_01_000001/trusted-service-user", + "sparkUiUrl": "http://b50c2ae5022b43d0a9a8b293074617ef000a6688148:8088/proxy/application_1582770999899_0001/" + }, + "state": "killed", + "log": [ + "\t final status: UNDEFINED", + "\t tracking URL: http://b50c2ae5022b43d0a9a8b293074617ef000a6688148:8088/proxy/application_1582770999899_0001/", + "\t user: trusted-service-user", + "20/02/27 02:36:51 INFO ShutdownHookManager: Shutdown hook called", + "20/02/27 02:36:51 INFO ShutdownHookManager: Deleting directory /tmp/spark-b1ace93c-cd17-4893-b509-511dac50cb32", + "20/02/27 02:36:51 INFO ShutdownHookManager: Deleting directory /tmp/spark-fdc5c58b-8359-481a-a6a7-7fa64112672a", + "20/02/27 02:36:51 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "20/02/27 02:36:51 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "20/02/27 02:36:51 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nYARN Diagnostics: " + ] + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/livyApi/versions/2019-11-01-preview/sparkPools/testsparkpool/sessions/50", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-d25c2df3302add43ba0786102dfd71d4-9ba538f768cc934b-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.Spark/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "be1bf5c67e6dfc9d2a679613551e606f", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:47:38 GMT", + "Server": [ + "Kestrel", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "x-ms-activity-id": "a25ec87a-d433-4caf-b349-1d89f7d45f7b", + "x-ms-client-request-id": [ + "be1bf5c67e6dfc9d2a679613551e606f", + "be1bf5c67e6dfc9d2a679613551e606f" + ], + "x-ms-job-cluster": "http://171.0.202.6:8998/", + "x-ms-job-clusterrequested-on": "2/27/2020 2:43:26 AM \u002B00:00", + "x-ms-job-ended-on": "2/27/2020 2:58:43 AM \u002B00:00", + "x-ms-job-internal-id": "50", + "x-ms-job-livysubmission-on": "2/27/2020 2:43:29 AM \u002B00:00", + "x-ms-job-queued-on": "2/27/2020 2:43:29 AM \u002B00:00", + "x-ms-job-result": "Failed", + "x-ms-job-scheduled-on": "2/27/2020 2:43:25 AM \u002B00:00", + "x-ms-job-scheduler-state": "Ended", + "x-ms-job-submitted-by-name": "zhezhou@microsoft.com", + "x-ms-job-submitted-on": "2/27/2020 2:43:25 AM \u002B00:00", + "x-ms-job-type": "SparkServiceSession", + "x-ms-request-id": "5d93a9bb-7d58-4b18-92e5-d9162247a934", + "x-ms-response-time-ms": "43" + }, + "ResponseBody": { + "id": 50, + "appId": "application_1582770999899_0002", + "appInfo": { + "driverLogUrl": "http://b50c2ae5022b43d0a9a8b293074617ef00417f90807:8042/node/containerlogs/container_1582770999899_0002_01_000001/trusted-service-user", + "sparkUiUrl": "http://b50c2ae5022b43d0a9a8b293074617ef000a6688148:8088/proxy/application_1582770999899_0002/" + }, + "state": "error", + "log": [ + "\t final status: UNDEFINED", + "\t tracking URL: http://b50c2ae5022b43d0a9a8b293074617ef000a6688148:8088/proxy/application_1582770999899_0002/", + "\t user: trusted-service-user", + "20/02/27 02:43:32 INFO ShutdownHookManager: Shutdown hook called", + "20/02/27 02:43:32 INFO ShutdownHookManager: Deleting directory /tmp/spark-f86b4a4c-dcec-49f7-a18a-ab89e59feb2f", + "20/02/27 02:43:32 INFO ShutdownHookManager: Deleting directory /tmp/spark-f1eb01ba-c9e7-4b04-907e-8a452dd61b6f", + "20/02/27 02:43:32 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "20/02/27 02:43:32 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "20/02/27 02:43:32 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nYARN Diagnostics: " + ] + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/livyApi/versions/2019-11-01-preview/sparkPools/testsparkpool/sessions/51", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-430a54b4f418f5458a5f6701722d5fda-f5fa69a51e951b4d-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.Spark/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "3773580847e53c625b7fe0673e450bdc", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:47:38 GMT", + "Server": [ + "Kestrel", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "x-ms-activity-id": "387fe288-cef4-4664-bf15-84bcce80ff69", + "x-ms-client-request-id": [ + "3773580847e53c625b7fe0673e450bdc", + "3773580847e53c625b7fe0673e450bdc" + ], + "x-ms-job-cluster": "http://171.0.202.6:8998/", + "x-ms-job-clusterrequested-on": "2/27/2020 2:54:48 AM \u002B00:00", + "x-ms-job-ended-on": "2/27/2020 3:10:43 AM \u002B00:00", + "x-ms-job-internal-id": "51", + "x-ms-job-livysubmission-on": "2/27/2020 2:54:52 AM \u002B00:00", + "x-ms-job-queued-on": "2/27/2020 2:54:51 AM \u002B00:00", + "x-ms-job-result": "Failed", + "x-ms-job-scheduled-on": "2/27/2020 2:54:48 AM \u002B00:00", + "x-ms-job-scheduler-state": "Ended", + "x-ms-job-submitted-by-name": "zhezhou@microsoft.com", + "x-ms-job-submitted-on": "2/27/2020 2:54:47 AM \u002B00:00", + "x-ms-job-type": "SparkServiceSession", + "x-ms-request-id": "6587bd8f-8260-4cc0-b72f-d420c4d0fea8", + "x-ms-response-time-ms": "28" + }, + "ResponseBody": { + "id": 51, + "appId": "application_1582770999899_0003", + "appInfo": { + "driverLogUrl": "http://b50c2ae5022b43d0a9a8b293074617ef001b6d10128:8042/node/containerlogs/container_1582770999899_0003_01_000001/trusted-service-user", + "sparkUiUrl": "http://b50c2ae5022b43d0a9a8b293074617ef000a6688148:8088/proxy/application_1582770999899_0003/" + }, + "state": "error", + "log": [ + "\t final status: UNDEFINED", + "\t tracking URL: http://b50c2ae5022b43d0a9a8b293074617ef000a6688148:8088/proxy/application_1582770999899_0003/", + "\t user: trusted-service-user", + "20/02/27 02:54:55 INFO ShutdownHookManager: Shutdown hook called", + "20/02/27 02:54:55 INFO ShutdownHookManager: Deleting directory /tmp/spark-97f232e3-86d7-4324-92aa-2741a6220350", + "20/02/27 02:54:55 INFO ShutdownHookManager: Deleting directory /tmp/spark-7e75314e-ef8d-4d94-9e9e-b2202080c05d", + "20/02/27 02:54:55 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "20/02/27 02:54:55 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "20/02/27 02:54:55 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nYARN Diagnostics: " + ] + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/livyApi/versions/2019-11-01-preview/sparkPools/testsparkpool/sessions/52", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-31ae6834a7bbee4f8ba36fbee9fac5bb-5b1407b160c05247-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.Spark/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "4c18e7f2043de5d122f454bc26c7cc2c", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:47:38 GMT", + "Server": [ + "Kestrel", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "x-ms-activity-id": "f14d29a4-2ce5-4e03-88a7-c0947cc8b480", + "x-ms-client-request-id": [ + "4c18e7f2043de5d122f454bc26c7cc2c", + "4c18e7f2043de5d122f454bc26c7cc2c" + ], + "x-ms-job-cluster": "http://171.0.202.6:8998/", + "x-ms-job-clusterrequested-on": "2/27/2020 3:06:06 AM \u002B00:00", + "x-ms-job-ended-on": "2/27/2020 3:21:43 AM \u002B00:00", + "x-ms-job-internal-id": "52", + "x-ms-job-livysubmission-on": "2/27/2020 3:06:14 AM \u002B00:00", + "x-ms-job-queued-on": "2/27/2020 3:06:13 AM \u002B00:00", + "x-ms-job-result": "Failed", + "x-ms-job-scheduled-on": "2/27/2020 3:06:06 AM \u002B00:00", + "x-ms-job-scheduler-state": "Ended", + "x-ms-job-submitted-by-name": "zhezhou@microsoft.com", + "x-ms-job-submitted-on": "2/27/2020 3:06:04 AM \u002B00:00", + "x-ms-job-type": "SparkServiceSession", + "x-ms-request-id": "65077b56-47e4-469f-91ef-d97ce5cdcb23", + "x-ms-response-time-ms": "16" + }, + "ResponseBody": { + "id": 52, + "appId": "application_1582770999899_0004", + "appInfo": { + "driverLogUrl": "http://b50c2ae5022b43d0a9a8b293074617ef000a6688148:8042/node/containerlogs/container_1582770999899_0004_01_000001/trusted-service-user", + "sparkUiUrl": "http://b50c2ae5022b43d0a9a8b293074617ef000a6688148:8088/proxy/application_1582770999899_0004/" + }, + "state": "dead", + "log": [ + "\t final status: UNDEFINED", + "\t tracking URL: http://b50c2ae5022b43d0a9a8b293074617ef000a6688148:8088/proxy/application_1582770999899_0004/", + "\t user: trusted-service-user", + "20/02/27 03:06:18 INFO ShutdownHookManager: Shutdown hook called", + "20/02/27 03:06:18 INFO ShutdownHookManager: Deleting directory /tmp/spark-be8f21d0-dbb3-4c77-ae12-a0b65961ed74", + "20/02/27 03:06:18 INFO ShutdownHookManager: Deleting directory /tmp/spark-5d5a6b27-8aba-4d48-ab7a-b652ee820922", + "20/02/27 03:06:18 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "20/02/27 03:06:18 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "20/02/27 03:06:18 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nYARN Diagnostics: " + ] + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/livyApi/versions/2019-11-01-preview/sparkPools/testsparkpool/sessions/53", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-563e5efac7ed5a48a35dbc22413da30b-9d815c09aa534f4f-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.Spark/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "1c4d83bdb4807e8093de63ee9d36bee5", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:47:38 GMT", + "Server": [ + "Kestrel", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "x-ms-activity-id": "dc4f7803-477c-44ac-9158-d69d940ef419", + "x-ms-client-request-id": [ + "1c4d83bdb4807e8093de63ee9d36bee5", + "1c4d83bdb4807e8093de63ee9d36bee5" + ], + "x-ms-job-cluster": "http://171.0.202.6:8998/", + "x-ms-job-clusterrequested-on": "2/27/2020 3:13:44 AM \u002B00:00", + "x-ms-job-ended-on": "2/27/2020 3:29:43 AM \u002B00:00", + "x-ms-job-internal-id": "53", + "x-ms-job-livysubmission-on": "2/27/2020 3:13:47 AM \u002B00:00", + "x-ms-job-queued-on": "2/27/2020 3:13:47 AM \u002B00:00", + "x-ms-job-result": "Failed", + "x-ms-job-scheduled-on": "2/27/2020 3:13:43 AM \u002B00:00", + "x-ms-job-scheduler-state": "Ended", + "x-ms-job-submitted-by-name": "zhezhou@microsoft.com", + "x-ms-job-submitted-on": "2/27/2020 3:13:42 AM \u002B00:00", + "x-ms-job-type": "SparkServiceSession", + "x-ms-request-id": "a0785832-cdbd-4819-9b00-53660e71c4cf", + "x-ms-response-time-ms": "42" + }, + "ResponseBody": { + "id": 53, + "appId": "application_1582770999899_0005", + "appInfo": { + "driverLogUrl": "http://b50c2ae5022b43d0a9a8b293074617ef00417f90807:8042/node/containerlogs/container_1582770999899_0005_01_000001/trusted-service-user", + "sparkUiUrl": "http://b50c2ae5022b43d0a9a8b293074617ef000a6688148:8088/proxy/application_1582770999899_0005/" + }, + "state": "error", + "log": [ + "\t final status: UNDEFINED", + "\t tracking URL: http://b50c2ae5022b43d0a9a8b293074617ef000a6688148:8088/proxy/application_1582770999899_0005/", + "\t user: trusted-service-user", + "20/02/27 03:13:51 INFO ShutdownHookManager: Shutdown hook called", + "20/02/27 03:13:51 INFO ShutdownHookManager: Deleting directory /tmp/spark-874f6de2-32c5-40f3-b96e-bf965a970868", + "20/02/27 03:13:51 INFO ShutdownHookManager: Deleting directory /tmp/spark-a7726951-3c1c-4f91-9480-e554126696ce", + "20/02/27 03:13:51 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "20/02/27 03:13:51 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "20/02/27 03:13:51 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nYARN Diagnostics: " + ] + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/livyApi/versions/2019-11-01-preview/sparkPools/testsparkpool/sessions/54", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-bec5b393d51ab145bcf449a94f4f26ee-eee3a398bcacf841-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.Spark/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "6d21ba5b14050432878d15f0f2a51594", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:47:38 GMT", + "Server": [ + "Kestrel", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "x-ms-activity-id": "99d47b2c-3654-49e2-886f-a2bbfad9cb6d", + "x-ms-client-request-id": [ + "6d21ba5b14050432878d15f0f2a51594", + "6d21ba5b14050432878d15f0f2a51594" + ], + "x-ms-job-cluster": "http://171.0.202.6:8998/", + "x-ms-job-clusterrequested-on": "2/27/2020 3:38:58 AM \u002B00:00", + "x-ms-job-ended-on": "2/27/2020 3:54:43 AM \u002B00:00", + "x-ms-job-internal-id": "54", + "x-ms-job-livysubmission-on": "2/27/2020 3:39:02 AM \u002B00:00", + "x-ms-job-queued-on": "2/27/2020 3:39:01 AM \u002B00:00", + "x-ms-job-result": "Failed", + "x-ms-job-scheduled-on": "2/27/2020 3:38:58 AM \u002B00:00", + "x-ms-job-scheduler-state": "Ended", + "x-ms-job-submitted-by-name": "zhezhou@microsoft.com", + "x-ms-job-submitted-on": "2/27/2020 3:38:56 AM \u002B00:00", + "x-ms-job-type": "SparkServiceSession", + "x-ms-request-id": "a7814dbf-885e-40b1-ba71-8536f054ee34", + "x-ms-response-time-ms": "28" + }, + "ResponseBody": { + "id": 54, + "appId": "application_1582770999899_0006", + "appInfo": { + "driverLogUrl": "http://b50c2ae5022b43d0a9a8b293074617ef001b6d10128:8042/node/containerlogs/container_1582770999899_0006_01_000001/trusted-service-user", + "sparkUiUrl": "http://b50c2ae5022b43d0a9a8b293074617ef000a6688148:8088/proxy/application_1582770999899_0006/" + }, + "state": "error", + "log": [ + "\t final status: UNDEFINED", + "\t tracking URL: http://b50c2ae5022b43d0a9a8b293074617ef000a6688148:8088/proxy/application_1582770999899_0006/", + "\t user: trusted-service-user", + "20/02/27 03:39:05 INFO ShutdownHookManager: Shutdown hook called", + "20/02/27 03:39:05 INFO ShutdownHookManager: Deleting directory /tmp/spark-2e61a99f-1f01-45b8-a8db-324cc4453ab0", + "20/02/27 03:39:05 INFO ShutdownHookManager: Deleting directory /tmp/spark-68cf840b-3e84-4d7d-89cf-f17f5cb6b80e", + "20/02/27 03:39:05 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "20/02/27 03:39:05 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "20/02/27 03:39:05 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nYARN Diagnostics: " + ] + } + } + ], + "Variables": { + "AZURE_SYNAPSE_SPARK_POOL_NAME": "testsparkpool", + "AZURE_SYNAPSE_WORKSPACE_URL": "https://testsynapseworkspace.dev.azuresynapse.net", + "RandomSeed": "1867952465" + } +} \ No newline at end of file diff --git a/sdk/synapse/Azure.Analytics.Synapse.Spark/tests/SessionRecords/SparkSessionClientLiveTests/TestGetSparkSessionAsync.json b/sdk/synapse/Azure.Analytics.Synapse.Spark/tests/SessionRecords/SparkSessionClientLiveTests/TestGetSparkSessionAsync.json new file mode 100644 index 000000000000..e560fa281b9a --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Spark/tests/SessionRecords/SparkSessionClientLiveTests/TestGetSparkSessionAsync.json @@ -0,0 +1,1788 @@ +{ + "Entries": [ + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/livyApi/versions/2019-11-01-preview/sparkPools/testsparkpool/sessions", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-f14a6f95ee39fa469196c652363a02b0-3cfc266513535943-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.Spark/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "bbd241b8e2683b7fdabbf2fbfd6e3e06", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:47:39 GMT", + "Server": [ + "Kestrel", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "x-ms-activity-id": "b56e062d-5d1d-41a3-adc1-9a457d5f1771", + "x-ms-client-request-id": [ + "bbd241b8e2683b7fdabbf2fbfd6e3e06", + "bbd241b8e2683b7fdabbf2fbfd6e3e06" + ], + "x-ms-request-id": "247a852a-ae0d-4fc3-9b4c-892411a5682b", + "x-ms-response-time-ms": "55" + }, + "ResponseBody": { + "from": 0, + "total": 20, + "sessions": [ + { + "id": 2, + "appId": "application_1576225874089_0001", + "appInfo": { + "driverLogUrl": "http://008b79baa75e493ba50798a50e751b9d03116310046:8042/node/containerlogs/container_1576225874089_0001_01_000001/trusted-service-user", + "sparkUiUrl": "http://008b79baa75e493ba50798a50e751b9d04071d71770:8088/proxy/application_1576225874089_0001/" + }, + "state": "killed", + "log": [ + "\t final status: UNDEFINED", + "\t tracking URL: http://008b79baa75e493ba50798a50e751b9d04071d71770:8088/proxy/application_1576225874089_0001/", + "\t user: trusted-service-user", + "19/12/13 08:31:59 INFO ShutdownHookManager: Shutdown hook called", + "19/12/13 08:31:59 INFO ShutdownHookManager: Deleting directory /tmp/spark-13f31a03-7633-4467-bf81-3fe3309fb856", + "19/12/13 08:31:59 INFO ShutdownHookManager: Deleting directory /tmp/spark-40fe5680-835f-462d-bcbb-c8fffa1bbe6f", + "19/12/13 08:31:59 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "19/12/13 08:31:59 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "19/12/13 08:31:59 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nYARN Diagnostics: " + ] + }, + { + "id": 6, + "appId": "application_1577261347028_0001", + "appInfo": { + "driverLogUrl": "http://0756e27931b1442da8fded6fb5a384ad039fdf58075:8042/node/containerlogs/container_1577261347028_0001_01_000001/trusted-service-user", + "sparkUiUrl": "http://0756e27931b1442da8fded6fb5a384ad022bdb15619:8088/proxy/application_1577261347028_0001/" + }, + "state": "dead", + "log": [ + "\t final status: UNDEFINED", + "\t tracking URL: http://0756e27931b1442da8fded6fb5a384ad022bdb15619:8088/proxy/application_1577261347028_0001/", + "\t user: trusted-service-user", + "19/12/25 08:09:25 INFO ShutdownHookManager: Shutdown hook called", + "19/12/25 08:09:25 INFO ShutdownHookManager: Deleting directory /tmp/spark-3f94f2c6-cc2f-4497-833b-3c40c96cfb2e", + "19/12/25 08:09:25 INFO ShutdownHookManager: Deleting directory /tmp/spark-4070576f-39e7-4003-b73e-878a2e176454", + "19/12/25 08:09:25 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "19/12/25 08:09:25 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "19/12/25 08:09:25 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nYARN Diagnostics: " + ] + }, + { + "id": 7, + "appId": "application_1577261347028_0002", + "appInfo": { + "driverLogUrl": "http://0756e27931b1442da8fded6fb5a384ad00453758611:8042/node/containerlogs/container_1577261347028_0002_01_000001/trusted-service-user", + "sparkUiUrl": "http://0756e27931b1442da8fded6fb5a384ad022bdb15619:8088/proxy/application_1577261347028_0002/" + }, + "state": "killed", + "log": [ + "\t final status: UNDEFINED", + "\t tracking URL: http://0756e27931b1442da8fded6fb5a384ad022bdb15619:8088/proxy/application_1577261347028_0002/", + "\t user: trusted-service-user", + "19/12/25 08:16:47 INFO ShutdownHookManager: Shutdown hook called", + "19/12/25 08:16:47 INFO ShutdownHookManager: Deleting directory /tmp/spark-5829aff6-088b-4496-afc5-147214d18c51", + "19/12/25 08:16:47 INFO ShutdownHookManager: Deleting directory /tmp/spark-e4f0d452-bbb4-4719-b2d1-fe34dc28d4f9", + "19/12/25 08:16:47 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "19/12/25 08:16:47 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "19/12/25 08:16:47 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nYARN Diagnostics: " + ] + }, + { + "id": 8, + "appId": "application_1577261347028_0003", + "appInfo": { + "driverLogUrl": "http://0756e27931b1442da8fded6fb5a384ad032f0488094:8042/node/containerlogs/container_1577261347028_0003_01_000001/trusted-service-user", + "sparkUiUrl": "http://0756e27931b1442da8fded6fb5a384ad022bdb15619:8088/proxy/application_1577261347028_0003/" + }, + "state": "error", + "log": [ + "\t final status: UNDEFINED", + "\t tracking URL: http://0756e27931b1442da8fded6fb5a384ad022bdb15619:8088/proxy/application_1577261347028_0003/", + "\t user: trusted-service-user", + "19/12/25 08:29:49 INFO ShutdownHookManager: Shutdown hook called", + "19/12/25 08:29:49 INFO ShutdownHookManager: Deleting directory /tmp/spark-de484530-d317-4435-8145-c82ade1aebdb", + "19/12/25 08:29:49 INFO ShutdownHookManager: Deleting directory /tmp/spark-2d468982-7533-4d5a-a601-73d568abc9b1", + "19/12/25 08:29:49 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "19/12/25 08:29:49 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "19/12/25 08:29:49 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nYARN Diagnostics: " + ] + }, + { + "id": 9, + "appId": "application_1577261347028_0004", + "appInfo": { + "driverLogUrl": "http://0756e27931b1442da8fded6fb5a384ad017a7497707:8042/node/containerlogs/container_1577261347028_0004_01_000001/trusted-service-user", + "sparkUiUrl": "http://0756e27931b1442da8fded6fb5a384ad022bdb15619:8088/proxy/application_1577261347028_0004/" + }, + "state": "killed", + "log": [ + "\t final status: UNDEFINED", + "\t tracking URL: http://0756e27931b1442da8fded6fb5a384ad022bdb15619:8088/proxy/application_1577261347028_0004/", + "\t user: trusted-service-user", + "19/12/25 09:11:39 INFO ShutdownHookManager: Shutdown hook called", + "19/12/25 09:11:39 INFO ShutdownHookManager: Deleting directory /tmp/spark-298699c6-1a19-43f4-b0e7-77ff38765146", + "19/12/25 09:11:39 INFO ShutdownHookManager: Deleting directory /tmp/spark-bdf130b2-b3c9-4ff0-9205-d8e9bbc6489d", + "19/12/25 09:11:39 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "19/12/25 09:11:39 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "19/12/25 09:11:39 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nYARN Diagnostics: " + ] + }, + { + "id": 10, + "appId": "application_1577261347028_0005", + "appInfo": { + "driverLogUrl": "http://0756e27931b1442da8fded6fb5a384ad017a7497707:8042/node/containerlogs/container_1577261347028_0005_01_000001/trusted-service-user", + "sparkUiUrl": "http://0756e27931b1442da8fded6fb5a384ad022bdb15619:8088/proxy/application_1577261347028_0005/" + }, + "state": "error", + "log": [ + "\t final status: UNDEFINED", + "\t tracking URL: http://0756e27931b1442da8fded6fb5a384ad022bdb15619:8088/proxy/application_1577261347028_0005/", + "\t user: trusted-service-user", + "19/12/25 10:06:26 INFO ShutdownHookManager: Shutdown hook called", + "19/12/25 10:06:26 INFO ShutdownHookManager: Deleting directory /tmp/spark-56d5b827-6412-4628-a521-a8caa8ad5c3e", + "19/12/25 10:06:26 INFO ShutdownHookManager: Deleting directory /tmp/spark-df53ebea-f06c-486a-a903-db2f7806843d", + "19/12/25 10:06:27 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "19/12/25 10:06:27 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "19/12/25 10:06:27 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nYARN Diagnostics: " + ] + }, + { + "id": 11, + "appId": "application_1577261347028_0006", + "appInfo": { + "driverLogUrl": "http://0756e27931b1442da8fded6fb5a384ad0358bf44418:8042/node/containerlogs/container_1577261347028_0006_01_000001/trusted-service-user", + "sparkUiUrl": "http://0756e27931b1442da8fded6fb5a384ad022bdb15619:8088/proxy/application_1577261347028_0006/" + }, + "state": "error", + "log": [ + "\t final status: UNDEFINED", + "\t tracking URL: http://0756e27931b1442da8fded6fb5a384ad022bdb15619:8088/proxy/application_1577261347028_0006/", + "\t user: trusted-service-user", + "19/12/25 10:07:05 INFO ShutdownHookManager: Shutdown hook called", + "19/12/25 10:07:05 INFO ShutdownHookManager: Deleting directory /tmp/spark-57dae334-2360-4782-9ed5-4dace6dc8e1f", + "19/12/25 10:07:05 INFO ShutdownHookManager: Deleting directory /tmp/spark-c5c5be5d-c63d-4cac-8d7a-dea35ce2278f", + "19/12/25 10:07:05 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "19/12/25 10:07:05 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "19/12/25 10:07:05 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nYARN Diagnostics: " + ] + }, + { + "id": 34, + "appId": "application_1582083768945_0003", + "appInfo": { + "driverLogUrl": "http://3024a670da1f4cc38f1f3560864f4d8604113d45195:8042/node/containerlogs/container_1582083768945_0003_01_000001/trusted-service-user", + "sparkUiUrl": "http://3024a670da1f4cc38f1f3560864f4d8601071373522:8088/proxy/application_1582083768945_0003/" + }, + "state": "error", + "log": [ + "\t final status: UNDEFINED", + "\t tracking URL: http://3024a670da1f4cc38f1f3560864f4d8601071373522:8088/proxy/application_1582083768945_0003/", + "\t user: trusted-service-user", + "20/02/19 03:54:36 INFO ShutdownHookManager: Shutdown hook called", + "20/02/19 03:54:36 INFO ShutdownHookManager: Deleting directory /tmp/spark-82194c9f-17d1-4b83-a6df-112f812edfda", + "20/02/19 03:54:36 INFO ShutdownHookManager: Deleting directory /tmp/spark-e92ea88c-8603-4ae7-84ca-b40198ebae2e", + "20/02/19 03:54:36 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "20/02/19 03:54:36 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "20/02/19 03:54:36 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nYARN Diagnostics: " + ] + }, + { + "id": 43, + "appId": "application_1582721346528_0001", + "appInfo": { + "driverLogUrl": "http://e32f1ba891454e2c8934108fad734b37004bf001189:8042/node/containerlogs/container_1582721346528_0001_01_000001/trusted-service-user", + "sparkUiUrl": "http://e32f1ba891454e2c8934108fad734b37001df758198:8088/proxy/application_1582721346528_0001/" + }, + "state": "error", + "log": [ + "\t final status: UNDEFINED", + "\t tracking URL: http://e32f1ba891454e2c8934108fad734b37001df758198:8088/proxy/application_1582721346528_0001/", + "\t user: trusted-service-user", + "20/02/26 12:49:18 INFO ShutdownHookManager: Shutdown hook called", + "20/02/26 12:49:18 INFO ShutdownHookManager: Deleting directory /tmp/spark-582cc476-8e5a-40a3-a62f-a243142b1482", + "20/02/26 12:49:18 INFO ShutdownHookManager: Deleting directory /tmp/spark-772512fd-dcfa-4642-ad14-786d4adaf96b", + "20/02/26 12:49:18 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "20/02/26 12:49:18 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "20/02/26 12:49:18 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nYARN Diagnostics: " + ] + }, + { + "id": 44, + "appId": "application_1582721346528_0002", + "appInfo": { + "driverLogUrl": "http://e32f1ba891454e2c8934108fad734b37004bf001189:8042/node/containerlogs/container_1582721346528_0002_01_000001/trusted-service-user", + "sparkUiUrl": "http://e32f1ba891454e2c8934108fad734b37001df758198:8088/proxy/application_1582721346528_0002/" + }, + "state": "error", + "log": [ + "\t final status: UNDEFINED", + "\t tracking URL: http://e32f1ba891454e2c8934108fad734b37001df758198:8088/proxy/application_1582721346528_0002/", + "\t user: trusted-service-user", + "20/02/26 13:00:50 INFO ShutdownHookManager: Shutdown hook called", + "20/02/26 13:00:50 INFO ShutdownHookManager: Deleting directory /tmp/spark-9965e88e-6be2-4ca3-934a-42ea892b3bc0", + "20/02/26 13:00:50 INFO ShutdownHookManager: Deleting directory /tmp/spark-032cd2e4-f7a8-4ed6-9990-6ee26b79c56c", + "20/02/26 13:00:50 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "20/02/26 13:00:50 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "20/02/26 13:00:50 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nYARN Diagnostics: " + ] + }, + { + "id": 45, + "appId": "application_1582721346528_0003", + "appInfo": { + "driverLogUrl": "http://e32f1ba891454e2c8934108fad734b37004bf001189:8042/node/containerlogs/container_1582721346528_0003_01_000001/trusted-service-user", + "sparkUiUrl": "http://e32f1ba891454e2c8934108fad734b37001df758198:8088/proxy/application_1582721346528_0003/" + }, + "state": "error", + "log": [ + "\t final status: UNDEFINED", + "\t tracking URL: http://e32f1ba891454e2c8934108fad734b37001df758198:8088/proxy/application_1582721346528_0003/", + "\t user: trusted-service-user", + "20/02/26 13:24:19 INFO ShutdownHookManager: Shutdown hook called", + "20/02/26 13:24:19 INFO ShutdownHookManager: Deleting directory /tmp/spark-ef65ba0c-16bb-4f15-89c3-574fd62060c5", + "20/02/26 13:24:19 INFO ShutdownHookManager: Deleting directory /tmp/spark-12b9d723-511b-4148-bb90-2f9713afdf4c", + "20/02/26 13:24:19 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "20/02/26 13:24:19 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "20/02/26 13:24:19 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nYARN Diagnostics: " + ] + }, + { + "id": 46, + "appId": "application_1582721346528_0004", + "appInfo": { + "driverLogUrl": "http://e32f1ba891454e2c8934108fad734b37004bf001189:8042/node/containerlogs/container_1582721346528_0004_01_000001/trusted-service-user", + "sparkUiUrl": "http://e32f1ba891454e2c8934108fad734b37001df758198:8088/proxy/application_1582721346528_0004/" + }, + "state": "error", + "log": [ + "\t final status: UNDEFINED", + "\t tracking URL: http://e32f1ba891454e2c8934108fad734b37001df758198:8088/proxy/application_1582721346528_0004/", + "\t user: trusted-service-user", + "20/02/26 13:32:27 INFO ShutdownHookManager: Shutdown hook called", + "20/02/26 13:32:27 INFO ShutdownHookManager: Deleting directory /tmp/spark-4e0480e3-2240-4f3d-a55e-7cefa30cf7dd", + "20/02/26 13:32:27 INFO ShutdownHookManager: Deleting directory /tmp/spark-aef49187-6e10-4c1c-876d-efe62cbb67f8", + "20/02/26 13:32:27 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "20/02/26 13:32:27 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "20/02/26 13:32:27 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nYARN Diagnostics: " + ] + }, + { + "id": 47, + "appId": "application_1582721346528_0005", + "appInfo": { + "driverLogUrl": "http://e32f1ba891454e2c8934108fad734b37000b9a60506:8042/node/containerlogs/container_1582721346528_0005_01_000001/trusted-service-user", + "sparkUiUrl": "http://e32f1ba891454e2c8934108fad734b37001df758198:8088/proxy/application_1582721346528_0005/" + }, + "state": "error", + "log": [ + "\t final status: UNDEFINED", + "\t tracking URL: http://e32f1ba891454e2c8934108fad734b37001df758198:8088/proxy/application_1582721346528_0005/", + "\t user: trusted-service-user", + "20/02/26 13:35:50 INFO ShutdownHookManager: Shutdown hook called", + "20/02/26 13:35:50 INFO ShutdownHookManager: Deleting directory /tmp/spark-9ced194a-7983-4496-8693-b7da925d645f", + "20/02/26 13:35:50 INFO ShutdownHookManager: Deleting directory /tmp/spark-c6a899cd-049d-4aee-8ad4-5a588e466800", + "20/02/26 13:35:50 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "20/02/26 13:35:50 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "20/02/26 13:35:50 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nYARN Diagnostics: " + ] + }, + { + "id": 48, + "appId": "application_1582721346528_0006", + "appInfo": { + "driverLogUrl": "http://e32f1ba891454e2c8934108fad734b37003c1491642:8042/node/containerlogs/container_1582721346528_0006_01_000001/trusted-service-user", + "sparkUiUrl": "http://e32f1ba891454e2c8934108fad734b37001df758198:8088/proxy/application_1582721346528_0006/" + }, + "state": "error", + "log": [ + "\t final status: UNDEFINED", + "\t tracking URL: http://e32f1ba891454e2c8934108fad734b37001df758198:8088/proxy/application_1582721346528_0006/", + "\t user: trusted-service-user", + "20/02/26 13:38:50 INFO ShutdownHookManager: Shutdown hook called", + "20/02/26 13:38:50 INFO ShutdownHookManager: Deleting directory /tmp/spark-0433623f-ef0c-493b-93a9-9588507f53a4", + "20/02/26 13:38:50 INFO ShutdownHookManager: Deleting directory /tmp/spark-0dbc3f4d-e5af-43b3-9585-0ea51ff02b6e", + "20/02/26 13:38:50 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "20/02/26 13:38:50 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "20/02/26 13:38:50 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nYARN Diagnostics: " + ] + }, + { + "id": 49, + "appId": "application_1582770999899_0001", + "appInfo": { + "driverLogUrl": "http://b50c2ae5022b43d0a9a8b293074617ef00417f90807:8042/node/containerlogs/container_1582770999899_0001_01_000001/trusted-service-user", + "sparkUiUrl": "http://b50c2ae5022b43d0a9a8b293074617ef000a6688148:8088/proxy/application_1582770999899_0001/" + }, + "state": "killed", + "log": [ + "\t final status: UNDEFINED", + "\t tracking URL: http://b50c2ae5022b43d0a9a8b293074617ef000a6688148:8088/proxy/application_1582770999899_0001/", + "\t user: trusted-service-user", + "20/02/27 02:36:51 INFO ShutdownHookManager: Shutdown hook called", + "20/02/27 02:36:51 INFO ShutdownHookManager: Deleting directory /tmp/spark-b1ace93c-cd17-4893-b509-511dac50cb32", + "20/02/27 02:36:51 INFO ShutdownHookManager: Deleting directory /tmp/spark-fdc5c58b-8359-481a-a6a7-7fa64112672a", + "20/02/27 02:36:51 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "20/02/27 02:36:51 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "20/02/27 02:36:51 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nYARN Diagnostics: " + ] + }, + { + "id": 50, + "appId": "application_1582770999899_0002", + "appInfo": { + "driverLogUrl": "http://b50c2ae5022b43d0a9a8b293074617ef00417f90807:8042/node/containerlogs/container_1582770999899_0002_01_000001/trusted-service-user", + "sparkUiUrl": "http://b50c2ae5022b43d0a9a8b293074617ef000a6688148:8088/proxy/application_1582770999899_0002/" + }, + "state": "error", + "log": [ + "\t final status: UNDEFINED", + "\t tracking URL: http://b50c2ae5022b43d0a9a8b293074617ef000a6688148:8088/proxy/application_1582770999899_0002/", + "\t user: trusted-service-user", + "20/02/27 02:43:32 INFO ShutdownHookManager: Shutdown hook called", + "20/02/27 02:43:32 INFO ShutdownHookManager: Deleting directory /tmp/spark-f86b4a4c-dcec-49f7-a18a-ab89e59feb2f", + "20/02/27 02:43:32 INFO ShutdownHookManager: Deleting directory /tmp/spark-f1eb01ba-c9e7-4b04-907e-8a452dd61b6f", + "20/02/27 02:43:32 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "20/02/27 02:43:32 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "20/02/27 02:43:32 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nYARN Diagnostics: " + ] + }, + { + "id": 51, + "appId": "application_1582770999899_0003", + "appInfo": { + "driverLogUrl": "http://b50c2ae5022b43d0a9a8b293074617ef001b6d10128:8042/node/containerlogs/container_1582770999899_0003_01_000001/trusted-service-user", + "sparkUiUrl": "http://b50c2ae5022b43d0a9a8b293074617ef000a6688148:8088/proxy/application_1582770999899_0003/" + }, + "state": "error", + "log": [ + "\t final status: UNDEFINED", + "\t tracking URL: http://b50c2ae5022b43d0a9a8b293074617ef000a6688148:8088/proxy/application_1582770999899_0003/", + "\t user: trusted-service-user", + "20/02/27 02:54:55 INFO ShutdownHookManager: Shutdown hook called", + "20/02/27 02:54:55 INFO ShutdownHookManager: Deleting directory /tmp/spark-97f232e3-86d7-4324-92aa-2741a6220350", + "20/02/27 02:54:55 INFO ShutdownHookManager: Deleting directory /tmp/spark-7e75314e-ef8d-4d94-9e9e-b2202080c05d", + "20/02/27 02:54:55 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "20/02/27 02:54:55 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "20/02/27 02:54:55 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nYARN Diagnostics: " + ] + }, + { + "id": 52, + "appId": "application_1582770999899_0004", + "appInfo": { + "driverLogUrl": "http://b50c2ae5022b43d0a9a8b293074617ef000a6688148:8042/node/containerlogs/container_1582770999899_0004_01_000001/trusted-service-user", + "sparkUiUrl": "http://b50c2ae5022b43d0a9a8b293074617ef000a6688148:8088/proxy/application_1582770999899_0004/" + }, + "state": "dead", + "log": [ + "\t final status: UNDEFINED", + "\t tracking URL: http://b50c2ae5022b43d0a9a8b293074617ef000a6688148:8088/proxy/application_1582770999899_0004/", + "\t user: trusted-service-user", + "20/02/27 03:06:18 INFO ShutdownHookManager: Shutdown hook called", + "20/02/27 03:06:18 INFO ShutdownHookManager: Deleting directory /tmp/spark-be8f21d0-dbb3-4c77-ae12-a0b65961ed74", + "20/02/27 03:06:18 INFO ShutdownHookManager: Deleting directory /tmp/spark-5d5a6b27-8aba-4d48-ab7a-b652ee820922", + "20/02/27 03:06:18 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "20/02/27 03:06:18 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "20/02/27 03:06:18 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nYARN Diagnostics: " + ] + }, + { + "id": 53, + "appId": "application_1582770999899_0005", + "appInfo": { + "driverLogUrl": "http://b50c2ae5022b43d0a9a8b293074617ef00417f90807:8042/node/containerlogs/container_1582770999899_0005_01_000001/trusted-service-user", + "sparkUiUrl": "http://b50c2ae5022b43d0a9a8b293074617ef000a6688148:8088/proxy/application_1582770999899_0005/" + }, + "state": "error", + "log": [ + "\t final status: UNDEFINED", + "\t tracking URL: http://b50c2ae5022b43d0a9a8b293074617ef000a6688148:8088/proxy/application_1582770999899_0005/", + "\t user: trusted-service-user", + "20/02/27 03:13:51 INFO ShutdownHookManager: Shutdown hook called", + "20/02/27 03:13:51 INFO ShutdownHookManager: Deleting directory /tmp/spark-874f6de2-32c5-40f3-b96e-bf965a970868", + "20/02/27 03:13:51 INFO ShutdownHookManager: Deleting directory /tmp/spark-a7726951-3c1c-4f91-9480-e554126696ce", + "20/02/27 03:13:51 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "20/02/27 03:13:51 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "20/02/27 03:13:51 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nYARN Diagnostics: " + ] + }, + { + "id": 54, + "appId": "application_1582770999899_0006", + "appInfo": { + "driverLogUrl": "http://b50c2ae5022b43d0a9a8b293074617ef001b6d10128:8042/node/containerlogs/container_1582770999899_0006_01_000001/trusted-service-user", + "sparkUiUrl": "http://b50c2ae5022b43d0a9a8b293074617ef000a6688148:8088/proxy/application_1582770999899_0006/" + }, + "state": "error", + "log": [ + "\t final status: UNDEFINED", + "\t tracking URL: http://b50c2ae5022b43d0a9a8b293074617ef000a6688148:8088/proxy/application_1582770999899_0006/", + "\t user: trusted-service-user", + "20/02/27 03:39:05 INFO ShutdownHookManager: Shutdown hook called", + "20/02/27 03:39:05 INFO ShutdownHookManager: Deleting directory /tmp/spark-2e61a99f-1f01-45b8-a8db-324cc4453ab0", + "20/02/27 03:39:05 INFO ShutdownHookManager: Deleting directory /tmp/spark-68cf840b-3e84-4d7d-89cf-f17f5cb6b80e", + "20/02/27 03:39:05 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "20/02/27 03:39:05 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "20/02/27 03:39:05 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nYARN Diagnostics: " + ] + } + ] + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/livyApi/versions/2019-11-01-preview/sparkPools/testsparkpool/sessions/2", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-9bdd5f9ee8f25f4c8300e5bbb6b3c68b-ba1975f00f5fbf40-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.Spark/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "260f1fd56d816115e3a0cb338aa4a696", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:47:39 GMT", + "Server": [ + "Kestrel", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "x-ms-activity-id": "3eda6ed4-78c2-4309-b1f4-f2d5a3dcef75", + "x-ms-client-request-id": [ + "260f1fd56d816115e3a0cb338aa4a696", + "260f1fd56d816115e3a0cb338aa4a696" + ], + "x-ms-job-cluster": "http://171.1.155.13:8998/", + "x-ms-job-clusterrequested-on": "12/13/2019 8:29:10 AM \u002B00:00", + "x-ms-job-ended-on": "12/13/2019 9:12:57 AM \u002B00:00", + "x-ms-job-internal-id": "2", + "x-ms-job-livysubmission-on": "12/13/2019 8:31:43 AM \u002B00:00", + "x-ms-job-queued-on": "12/13/2019 8:31:00 AM \u002B00:00", + "x-ms-job-result": "Cancelled", + "x-ms-job-scheduled-on": "12/13/2019 8:29:10 AM \u002B00:00", + "x-ms-job-scheduler-state": "Ended", + "x-ms-job-submitted-by-name": "zhezhou@microsoft.com", + "x-ms-job-submitted-on": "12/13/2019 8:29:09 AM \u002B00:00", + "x-ms-job-type": "SparkServiceSession", + "x-ms-request-id": "a8fe3c79-4733-4b40-ad95-8c9fef0deb52", + "x-ms-response-time-ms": "16" + }, + "ResponseBody": { + "id": 2, + "appId": "application_1576225874089_0001", + "appInfo": { + "driverLogUrl": "http://008b79baa75e493ba50798a50e751b9d03116310046:8042/node/containerlogs/container_1576225874089_0001_01_000001/trusted-service-user", + "sparkUiUrl": "http://008b79baa75e493ba50798a50e751b9d04071d71770:8088/proxy/application_1576225874089_0001/" + }, + "state": "killed", + "log": [ + "\t final status: UNDEFINED", + "\t tracking URL: http://008b79baa75e493ba50798a50e751b9d04071d71770:8088/proxy/application_1576225874089_0001/", + "\t user: trusted-service-user", + "19/12/13 08:31:59 INFO ShutdownHookManager: Shutdown hook called", + "19/12/13 08:31:59 INFO ShutdownHookManager: Deleting directory /tmp/spark-13f31a03-7633-4467-bf81-3fe3309fb856", + "19/12/13 08:31:59 INFO ShutdownHookManager: Deleting directory /tmp/spark-40fe5680-835f-462d-bcbb-c8fffa1bbe6f", + "19/12/13 08:31:59 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "19/12/13 08:31:59 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "19/12/13 08:31:59 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nYARN Diagnostics: " + ] + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/livyApi/versions/2019-11-01-preview/sparkPools/testsparkpool/sessions/6", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-e6068c5ed65dca4a882cf4f4e9d49a8e-b517a03122d4994b-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.Spark/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "5acf011e4ad7f676d28d58c6633f49f2", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:47:39 GMT", + "Server": [ + "Kestrel", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "x-ms-activity-id": "e8505e78-26b3-46b0-8768-a5be1d320bed", + "x-ms-client-request-id": [ + "5acf011e4ad7f676d28d58c6633f49f2", + "5acf011e4ad7f676d28d58c6633f49f2" + ], + "x-ms-job-cluster": "http://171.4.176.47:8998/", + "x-ms-job-clusterrequested-on": "12/25/2019 8:07:26 AM \u002B00:00", + "x-ms-job-ended-on": "12/25/2019 8:40:15 AM \u002B00:00", + "x-ms-job-internal-id": "6", + "x-ms-job-livysubmission-on": "12/25/2019 8:09:18 AM \u002B00:00", + "x-ms-job-queued-on": "12/25/2019 8:09:17 AM \u002B00:00", + "x-ms-job-result": "Failed", + "x-ms-job-scheduled-on": "12/25/2019 8:07:26 AM \u002B00:00", + "x-ms-job-scheduler-state": "Ended", + "x-ms-job-submitted-by-name": "zhezhou@microsoft.com", + "x-ms-job-submitted-on": "12/25/2019 8:07:25 AM \u002B00:00", + "x-ms-job-type": "SparkServiceSession", + "x-ms-request-id": "f6ba7ec7-2a5b-4c69-a0a1-e5056adc42e8", + "x-ms-response-time-ms": "14" + }, + "ResponseBody": { + "id": 6, + "appId": "application_1577261347028_0001", + "appInfo": { + "driverLogUrl": "http://0756e27931b1442da8fded6fb5a384ad039fdf58075:8042/node/containerlogs/container_1577261347028_0001_01_000001/trusted-service-user", + "sparkUiUrl": "http://0756e27931b1442da8fded6fb5a384ad022bdb15619:8088/proxy/application_1577261347028_0001/" + }, + "state": "dead", + "log": [ + "\t final status: UNDEFINED", + "\t tracking URL: http://0756e27931b1442da8fded6fb5a384ad022bdb15619:8088/proxy/application_1577261347028_0001/", + "\t user: trusted-service-user", + "19/12/25 08:09:25 INFO ShutdownHookManager: Shutdown hook called", + "19/12/25 08:09:25 INFO ShutdownHookManager: Deleting directory /tmp/spark-3f94f2c6-cc2f-4497-833b-3c40c96cfb2e", + "19/12/25 08:09:25 INFO ShutdownHookManager: Deleting directory /tmp/spark-4070576f-39e7-4003-b73e-878a2e176454", + "19/12/25 08:09:25 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "19/12/25 08:09:25 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "19/12/25 08:09:25 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nYARN Diagnostics: " + ] + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/livyApi/versions/2019-11-01-preview/sparkPools/testsparkpool/sessions/7", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-2bdef3aa78e56f45862c099ed4d26f80-9002dce0974d3e47-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.Spark/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "d7e01a4efaa04a362c70d7c8174bb036", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:47:39 GMT", + "Server": [ + "Kestrel", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "x-ms-activity-id": "1dab8725-2554-4c8b-ad36-68114650a6f1", + "x-ms-client-request-id": [ + "d7e01a4efaa04a362c70d7c8174bb036", + "d7e01a4efaa04a362c70d7c8174bb036" + ], + "x-ms-job-cluster": "http://171.4.176.47:8998/", + "x-ms-job-clusterrequested-on": "12/25/2019 8:16:41 AM \u002B00:00", + "x-ms-job-ended-on": "12/25/2019 8:49:30 AM \u002B00:00", + "x-ms-job-internal-id": "7", + "x-ms-job-livysubmission-on": "12/25/2019 8:16:43 AM \u002B00:00", + "x-ms-job-queued-on": "12/25/2019 8:16:43 AM \u002B00:00", + "x-ms-job-result": "Cancelled", + "x-ms-job-scheduled-on": "12/25/2019 8:16:40 AM \u002B00:00", + "x-ms-job-scheduler-state": "Ended", + "x-ms-job-submitted-by-name": "zhezhou@microsoft.com", + "x-ms-job-submitted-on": "12/25/2019 8:16:39 AM \u002B00:00", + "x-ms-job-type": "SparkServiceSession", + "x-ms-request-id": "46bb1a92-63c7-47ef-9c75-5d6487ae0f32", + "x-ms-response-time-ms": "15" + }, + "ResponseBody": { + "id": 7, + "appId": "application_1577261347028_0002", + "appInfo": { + "driverLogUrl": "http://0756e27931b1442da8fded6fb5a384ad00453758611:8042/node/containerlogs/container_1577261347028_0002_01_000001/trusted-service-user", + "sparkUiUrl": "http://0756e27931b1442da8fded6fb5a384ad022bdb15619:8088/proxy/application_1577261347028_0002/" + }, + "state": "killed", + "log": [ + "\t final status: UNDEFINED", + "\t tracking URL: http://0756e27931b1442da8fded6fb5a384ad022bdb15619:8088/proxy/application_1577261347028_0002/", + "\t user: trusted-service-user", + "19/12/25 08:16:47 INFO ShutdownHookManager: Shutdown hook called", + "19/12/25 08:16:47 INFO ShutdownHookManager: Deleting directory /tmp/spark-5829aff6-088b-4496-afc5-147214d18c51", + "19/12/25 08:16:47 INFO ShutdownHookManager: Deleting directory /tmp/spark-e4f0d452-bbb4-4719-b2d1-fe34dc28d4f9", + "19/12/25 08:16:47 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "19/12/25 08:16:47 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "19/12/25 08:16:47 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nYARN Diagnostics: " + ] + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/livyApi/versions/2019-11-01-preview/sparkPools/testsparkpool/sessions/8", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-bfecfa745467cf4f821ee2ffd2a46531-144b4b9827a2074e-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.Spark/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "fcdd5c15e39f8a2fa91953f3154ffea4", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:47:39 GMT", + "Server": [ + "Kestrel", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "x-ms-activity-id": "c6fa6d8c-a9a1-4c92-95ca-96cf2d20e494", + "x-ms-client-request-id": [ + "fcdd5c15e39f8a2fa91953f3154ffea4", + "fcdd5c15e39f8a2fa91953f3154ffea4" + ], + "x-ms-job-cluster": "http://171.4.176.47:8998/", + "x-ms-job-clusterrequested-on": "12/25/2019 8:29:42 AM \u002B00:00", + "x-ms-job-ended-on": "12/25/2019 9:09:15 AM \u002B00:00", + "x-ms-job-internal-id": "8", + "x-ms-job-livysubmission-on": "12/25/2019 8:29:45 AM \u002B00:00", + "x-ms-job-queued-on": "12/25/2019 8:29:44 AM \u002B00:00", + "x-ms-job-result": "Failed", + "x-ms-job-scheduled-on": "12/25/2019 8:29:42 AM \u002B00:00", + "x-ms-job-scheduler-state": "Ended", + "x-ms-job-submitted-by-name": "zhezhou@microsoft.com", + "x-ms-job-submitted-on": "12/25/2019 8:29:41 AM \u002B00:00", + "x-ms-job-type": "SparkServiceSession", + "x-ms-request-id": "1583ef73-fa38-4478-bca8-861c22c769be", + "x-ms-response-time-ms": "37" + }, + "ResponseBody": { + "id": 8, + "appId": "application_1577261347028_0003", + "appInfo": { + "driverLogUrl": "http://0756e27931b1442da8fded6fb5a384ad032f0488094:8042/node/containerlogs/container_1577261347028_0003_01_000001/trusted-service-user", + "sparkUiUrl": "http://0756e27931b1442da8fded6fb5a384ad022bdb15619:8088/proxy/application_1577261347028_0003/" + }, + "state": "error", + "log": [ + "\t final status: UNDEFINED", + "\t tracking URL: http://0756e27931b1442da8fded6fb5a384ad022bdb15619:8088/proxy/application_1577261347028_0003/", + "\t user: trusted-service-user", + "19/12/25 08:29:49 INFO ShutdownHookManager: Shutdown hook called", + "19/12/25 08:29:49 INFO ShutdownHookManager: Deleting directory /tmp/spark-de484530-d317-4435-8145-c82ade1aebdb", + "19/12/25 08:29:49 INFO ShutdownHookManager: Deleting directory /tmp/spark-2d468982-7533-4d5a-a601-73d568abc9b1", + "19/12/25 08:29:49 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "19/12/25 08:29:49 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "19/12/25 08:29:49 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nYARN Diagnostics: " + ] + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/livyApi/versions/2019-11-01-preview/sparkPools/testsparkpool/sessions/9", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-1bfddbec4bef5346aa24ecd5f96ee66c-2d9bd510daa23f4b-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.Spark/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "70e4d856cec423f5cb842d6672aede87", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:47:39 GMT", + "Server": [ + "Kestrel", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "x-ms-activity-id": "1c97df94-73bb-4ad4-91f4-098540b49f99", + "x-ms-client-request-id": [ + "70e4d856cec423f5cb842d6672aede87", + "70e4d856cec423f5cb842d6672aede87" + ], + "x-ms-job-cluster": "http://171.4.176.47:8998/", + "x-ms-job-clusterrequested-on": "12/25/2019 9:11:32 AM \u002B00:00", + "x-ms-job-ended-on": "12/25/2019 10:05:23 AM \u002B00:00", + "x-ms-job-internal-id": "9", + "x-ms-job-livysubmission-on": "12/25/2019 9:11:35 AM \u002B00:00", + "x-ms-job-queued-on": "12/25/2019 9:11:35 AM \u002B00:00", + "x-ms-job-result": "Cancelled", + "x-ms-job-scheduled-on": "12/25/2019 9:11:31 AM \u002B00:00", + "x-ms-job-scheduler-state": "Ended", + "x-ms-job-submitted-by-name": "zhezhou@microsoft.com", + "x-ms-job-submitted-on": "12/25/2019 9:11:30 AM \u002B00:00", + "x-ms-job-type": "SparkServiceSession", + "x-ms-request-id": "7cdb4e3f-c7d9-4e5e-b5e5-05967484920c", + "x-ms-response-time-ms": "15" + }, + "ResponseBody": { + "id": 9, + "appId": "application_1577261347028_0004", + "appInfo": { + "driverLogUrl": "http://0756e27931b1442da8fded6fb5a384ad017a7497707:8042/node/containerlogs/container_1577261347028_0004_01_000001/trusted-service-user", + "sparkUiUrl": "http://0756e27931b1442da8fded6fb5a384ad022bdb15619:8088/proxy/application_1577261347028_0004/" + }, + "state": "killed", + "log": [ + "\t final status: UNDEFINED", + "\t tracking URL: http://0756e27931b1442da8fded6fb5a384ad022bdb15619:8088/proxy/application_1577261347028_0004/", + "\t user: trusted-service-user", + "19/12/25 09:11:39 INFO ShutdownHookManager: Shutdown hook called", + "19/12/25 09:11:39 INFO ShutdownHookManager: Deleting directory /tmp/spark-298699c6-1a19-43f4-b0e7-77ff38765146", + "19/12/25 09:11:39 INFO ShutdownHookManager: Deleting directory /tmp/spark-bdf130b2-b3c9-4ff0-9205-d8e9bbc6489d", + "19/12/25 09:11:39 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "19/12/25 09:11:39 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "19/12/25 09:11:39 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nYARN Diagnostics: " + ] + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/livyApi/versions/2019-11-01-preview/sparkPools/testsparkpool/sessions/10", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-09f19d49da0cb34889df1ff774c5029d-c2163ad93328a54c-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.Spark/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "06b022dd4d626a53ea552e86a74235dd", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:47:39 GMT", + "Server": [ + "Kestrel", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "x-ms-activity-id": "850d9e98-9305-4ada-911c-28f23166498b", + "x-ms-client-request-id": [ + "06b022dd4d626a53ea552e86a74235dd", + "06b022dd4d626a53ea552e86a74235dd" + ], + "x-ms-job-cluster": "http://171.4.176.47:8998/", + "x-ms-job-clusterrequested-on": "12/25/2019 10:06:20 AM \u002B00:00", + "x-ms-job-ended-on": "12/25/2019 10:37:15 AM \u002B00:00", + "x-ms-job-internal-id": "10", + "x-ms-job-livysubmission-on": "12/25/2019 10:06:22 AM \u002B00:00", + "x-ms-job-queued-on": "12/25/2019 10:06:22 AM \u002B00:00", + "x-ms-job-result": "Failed", + "x-ms-job-scheduled-on": "12/25/2019 10:06:20 AM \u002B00:00", + "x-ms-job-scheduler-state": "Ended", + "x-ms-job-submitted-by-name": "zhezhou@microsoft.com", + "x-ms-job-submitted-on": "12/25/2019 10:06:18 AM \u002B00:00", + "x-ms-job-type": "SparkServiceSession", + "x-ms-request-id": "ea205d31-b71f-482c-826a-e6ccffbe2da2", + "x-ms-response-time-ms": "43" + }, + "ResponseBody": { + "id": 10, + "appId": "application_1577261347028_0005", + "appInfo": { + "driverLogUrl": "http://0756e27931b1442da8fded6fb5a384ad017a7497707:8042/node/containerlogs/container_1577261347028_0005_01_000001/trusted-service-user", + "sparkUiUrl": "http://0756e27931b1442da8fded6fb5a384ad022bdb15619:8088/proxy/application_1577261347028_0005/" + }, + "state": "error", + "log": [ + "\t final status: UNDEFINED", + "\t tracking URL: http://0756e27931b1442da8fded6fb5a384ad022bdb15619:8088/proxy/application_1577261347028_0005/", + "\t user: trusted-service-user", + "19/12/25 10:06:26 INFO ShutdownHookManager: Shutdown hook called", + "19/12/25 10:06:26 INFO ShutdownHookManager: Deleting directory /tmp/spark-56d5b827-6412-4628-a521-a8caa8ad5c3e", + "19/12/25 10:06:26 INFO ShutdownHookManager: Deleting directory /tmp/spark-df53ebea-f06c-486a-a903-db2f7806843d", + "19/12/25 10:06:27 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "19/12/25 10:06:27 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "19/12/25 10:06:27 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nYARN Diagnostics: " + ] + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/livyApi/versions/2019-11-01-preview/sparkPools/testsparkpool/sessions/11", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-aa0c527b642c504183b18e7304a1d87c-5da14de8bccba547-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.Spark/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "3f7133724066477166b9301bb6c818fb", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:47:39 GMT", + "Server": [ + "Kestrel", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "x-ms-activity-id": "08f1f27e-261c-410f-a829-102e70bb8f6f", + "x-ms-client-request-id": [ + "3f7133724066477166b9301bb6c818fb", + "3f7133724066477166b9301bb6c818fb" + ], + "x-ms-job-cluster": "http://171.4.176.47:8998/", + "x-ms-job-clusterrequested-on": "12/25/2019 10:06:58 AM \u002B00:00", + "x-ms-job-ended-on": "12/25/2019 11:10:19 AM \u002B00:00", + "x-ms-job-internal-id": "11", + "x-ms-job-livysubmission-on": "12/25/2019 10:07:01 AM \u002B00:00", + "x-ms-job-queued-on": "12/25/2019 10:07:01 AM \u002B00:00", + "x-ms-job-result": "Failed", + "x-ms-job-scheduled-on": "12/25/2019 10:06:58 AM \u002B00:00", + "x-ms-job-scheduler-state": "Ended", + "x-ms-job-submitted-by-name": "zhezhou@microsoft.com", + "x-ms-job-submitted-on": "12/25/2019 10:06:57 AM \u002B00:00", + "x-ms-job-type": "SparkServiceSession", + "x-ms-request-id": "ed75d322-b18e-438a-ba84-bf6ee951a75b", + "x-ms-response-time-ms": "29" + }, + "ResponseBody": { + "id": 11, + "appId": "application_1577261347028_0006", + "appInfo": { + "driverLogUrl": "http://0756e27931b1442da8fded6fb5a384ad0358bf44418:8042/node/containerlogs/container_1577261347028_0006_01_000001/trusted-service-user", + "sparkUiUrl": "http://0756e27931b1442da8fded6fb5a384ad022bdb15619:8088/proxy/application_1577261347028_0006/" + }, + "state": "error", + "log": [ + "\t final status: UNDEFINED", + "\t tracking URL: http://0756e27931b1442da8fded6fb5a384ad022bdb15619:8088/proxy/application_1577261347028_0006/", + "\t user: trusted-service-user", + "19/12/25 10:07:05 INFO ShutdownHookManager: Shutdown hook called", + "19/12/25 10:07:05 INFO ShutdownHookManager: Deleting directory /tmp/spark-57dae334-2360-4782-9ed5-4dace6dc8e1f", + "19/12/25 10:07:05 INFO ShutdownHookManager: Deleting directory /tmp/spark-c5c5be5d-c63d-4cac-8d7a-dea35ce2278f", + "19/12/25 10:07:05 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "19/12/25 10:07:05 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "19/12/25 10:07:05 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nYARN Diagnostics: " + ] + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/livyApi/versions/2019-11-01-preview/sparkPools/testsparkpool/sessions/34", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-f8f03085abd0294d80b0b9dee194a722-17c26fa3521c934b-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.Spark/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "f216cb3bf79e0841847a856ea06f7c88", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:47:39 GMT", + "Server": [ + "Kestrel", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "x-ms-activity-id": "c88d1145-435f-4f6c-9990-953f9fe2544f", + "x-ms-client-request-id": [ + "f216cb3bf79e0841847a856ea06f7c88", + "f216cb3bf79e0841847a856ea06f7c88" + ], + "x-ms-job-cluster": "http://171.1.144.19:8998/", + "x-ms-job-clusterrequested-on": "2/19/2020 3:54:29 AM \u002B00:00", + "x-ms-job-ended-on": "2/19/2020 4:20:51 AM \u002B00:00", + "x-ms-job-internal-id": "34", + "x-ms-job-livysubmission-on": "2/19/2020 3:54:33 AM \u002B00:00", + "x-ms-job-queued-on": "2/19/2020 3:54:32 AM \u002B00:00", + "x-ms-job-result": "Failed", + "x-ms-job-scheduled-on": "2/19/2020 3:54:29 AM \u002B00:00", + "x-ms-job-scheduler-state": "Ended", + "x-ms-job-submitted-by-name": "zhezhou@microsoft.com", + "x-ms-job-submitted-on": "2/19/2020 3:54:27 AM \u002B00:00", + "x-ms-job-type": "SparkServiceSession", + "x-ms-request-id": "446acf75-e2eb-4cc1-8258-e2e27376c436", + "x-ms-response-time-ms": "44" + }, + "ResponseBody": { + "id": 34, + "appId": "application_1582083768945_0003", + "appInfo": { + "driverLogUrl": "http://3024a670da1f4cc38f1f3560864f4d8604113d45195:8042/node/containerlogs/container_1582083768945_0003_01_000001/trusted-service-user", + "sparkUiUrl": "http://3024a670da1f4cc38f1f3560864f4d8601071373522:8088/proxy/application_1582083768945_0003/" + }, + "state": "error", + "log": [ + "\t final status: UNDEFINED", + "\t tracking URL: http://3024a670da1f4cc38f1f3560864f4d8601071373522:8088/proxy/application_1582083768945_0003/", + "\t user: trusted-service-user", + "20/02/19 03:54:36 INFO ShutdownHookManager: Shutdown hook called", + "20/02/19 03:54:36 INFO ShutdownHookManager: Deleting directory /tmp/spark-82194c9f-17d1-4b83-a6df-112f812edfda", + "20/02/19 03:54:36 INFO ShutdownHookManager: Deleting directory /tmp/spark-e92ea88c-8603-4ae7-84ca-b40198ebae2e", + "20/02/19 03:54:36 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "20/02/19 03:54:36 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "20/02/19 03:54:36 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nYARN Diagnostics: " + ] + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/livyApi/versions/2019-11-01-preview/sparkPools/testsparkpool/sessions/43", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-7df818309eec294baeabf7a58af8c47b-868eff8fd3d39a47-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.Spark/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "3ff4504e9f3c9c20b0699fa91c37b421", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:47:40 GMT", + "Server": [ + "Kestrel", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "x-ms-activity-id": "3cbe3ef8-7de1-4013-87d3-3b3fe63227a1", + "x-ms-client-request-id": [ + "3ff4504e9f3c9c20b0699fa91c37b421", + "3ff4504e9f3c9c20b0699fa91c37b421" + ], + "x-ms-job-cluster": "http://171.4.176.20:8998/", + "x-ms-job-clusterrequested-on": "2/26/2020 12:47:32 PM \u002B00:00", + "x-ms-job-ended-on": "2/26/2020 1:00:10 PM \u002B00:00", + "x-ms-job-internal-id": "43", + "x-ms-job-livysubmission-on": "2/26/2020 12:49:11 PM \u002B00:00", + "x-ms-job-queued-on": "2/26/2020 12:49:04 PM \u002B00:00", + "x-ms-job-result": "Failed", + "x-ms-job-scheduled-on": "2/26/2020 12:47:32 PM \u002B00:00", + "x-ms-job-scheduler-state": "Ended", + "x-ms-job-submitted-by-name": "zhezhou@microsoft.com", + "x-ms-job-submitted-on": "2/26/2020 12:47:31 PM \u002B00:00", + "x-ms-job-type": "SparkServiceSession", + "x-ms-request-id": "bd838351-715e-4bdd-b890-654254acaf5d", + "x-ms-response-time-ms": "26" + }, + "ResponseBody": { + "id": 43, + "appId": "application_1582721346528_0001", + "appInfo": { + "driverLogUrl": "http://e32f1ba891454e2c8934108fad734b37004bf001189:8042/node/containerlogs/container_1582721346528_0001_01_000001/trusted-service-user", + "sparkUiUrl": "http://e32f1ba891454e2c8934108fad734b37001df758198:8088/proxy/application_1582721346528_0001/" + }, + "state": "error", + "log": [ + "\t final status: UNDEFINED", + "\t tracking URL: http://e32f1ba891454e2c8934108fad734b37001df758198:8088/proxy/application_1582721346528_0001/", + "\t user: trusted-service-user", + "20/02/26 12:49:18 INFO ShutdownHookManager: Shutdown hook called", + "20/02/26 12:49:18 INFO ShutdownHookManager: Deleting directory /tmp/spark-582cc476-8e5a-40a3-a62f-a243142b1482", + "20/02/26 12:49:18 INFO ShutdownHookManager: Deleting directory /tmp/spark-772512fd-dcfa-4642-ad14-786d4adaf96b", + "20/02/26 12:49:18 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "20/02/26 12:49:18 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "20/02/26 12:49:18 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nYARN Diagnostics: " + ] + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/livyApi/versions/2019-11-01-preview/sparkPools/testsparkpool/sessions/44", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-589020f2eef4274b9a368f52204b9ec5-a0972e61f76a7f47-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.Spark/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "db4b323d432b7a3ff169baecba03a6f7", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:47:40 GMT", + "Server": [ + "Kestrel", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "x-ms-activity-id": "4c240e8c-8e6d-4197-9ab2-c5a82b38f12c", + "x-ms-client-request-id": [ + "db4b323d432b7a3ff169baecba03a6f7", + "db4b323d432b7a3ff169baecba03a6f7" + ], + "x-ms-job-cluster": "http://171.4.176.20:8998/", + "x-ms-job-clusterrequested-on": "2/26/2020 1:00:36 PM \u002B00:00", + "x-ms-job-ended-on": "2/26/2020 1:11:09 PM \u002B00:00", + "x-ms-job-internal-id": "44", + "x-ms-job-livysubmission-on": "2/26/2020 1:00:46 PM \u002B00:00", + "x-ms-job-queued-on": "2/26/2020 1:00:44 PM \u002B00:00", + "x-ms-job-result": "Failed", + "x-ms-job-scheduled-on": "2/26/2020 1:00:35 PM \u002B00:00", + "x-ms-job-scheduler-state": "Ended", + "x-ms-job-submitted-by-name": "zhezhou@microsoft.com", + "x-ms-job-submitted-on": "2/26/2020 1:00:34 PM \u002B00:00", + "x-ms-job-type": "SparkServiceSession", + "x-ms-request-id": "07c5690a-4edd-4d2c-9fbe-fa4f20c2997e", + "x-ms-response-time-ms": "27" + }, + "ResponseBody": { + "id": 44, + "appId": "application_1582721346528_0002", + "appInfo": { + "driverLogUrl": "http://e32f1ba891454e2c8934108fad734b37004bf001189:8042/node/containerlogs/container_1582721346528_0002_01_000001/trusted-service-user", + "sparkUiUrl": "http://e32f1ba891454e2c8934108fad734b37001df758198:8088/proxy/application_1582721346528_0002/" + }, + "state": "error", + "log": [ + "\t final status: UNDEFINED", + "\t tracking URL: http://e32f1ba891454e2c8934108fad734b37001df758198:8088/proxy/application_1582721346528_0002/", + "\t user: trusted-service-user", + "20/02/26 13:00:50 INFO ShutdownHookManager: Shutdown hook called", + "20/02/26 13:00:50 INFO ShutdownHookManager: Deleting directory /tmp/spark-9965e88e-6be2-4ca3-934a-42ea892b3bc0", + "20/02/26 13:00:50 INFO ShutdownHookManager: Deleting directory /tmp/spark-032cd2e4-f7a8-4ed6-9990-6ee26b79c56c", + "20/02/26 13:00:50 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "20/02/26 13:00:50 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "20/02/26 13:00:50 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nYARN Diagnostics: " + ] + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/livyApi/versions/2019-11-01-preview/sparkPools/testsparkpool/sessions/45", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-28296f72cd3be748be00c473e4a6f726-6cad76287e48924e-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.Spark/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "65cda73dd8d49cbfab7942355898eb4d", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:47:40 GMT", + "Server": [ + "Kestrel", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "x-ms-activity-id": "551deaac-0889-4f32-afeb-c2caff2e1c24", + "x-ms-client-request-id": [ + "65cda73dd8d49cbfab7942355898eb4d", + "65cda73dd8d49cbfab7942355898eb4d" + ], + "x-ms-job-cluster": "http://171.4.176.20:8998/", + "x-ms-job-clusterrequested-on": "2/26/2020 1:24:12 PM \u002B00:00", + "x-ms-job-ended-on": "2/26/2020 1:41:10 PM \u002B00:00", + "x-ms-job-internal-id": "45", + "x-ms-job-livysubmission-on": "2/26/2020 1:24:14 PM \u002B00:00", + "x-ms-job-queued-on": "2/26/2020 1:24:14 PM \u002B00:00", + "x-ms-job-result": "Failed", + "x-ms-job-scheduled-on": "2/26/2020 1:24:11 PM \u002B00:00", + "x-ms-job-scheduler-state": "Ended", + "x-ms-job-submitted-by-name": "zhezhou@microsoft.com", + "x-ms-job-submitted-on": "2/26/2020 1:24:11 PM \u002B00:00", + "x-ms-job-type": "SparkServiceSession", + "x-ms-request-id": "3d869b51-a902-4f88-8376-dacb97cd4b30", + "x-ms-response-time-ms": "33" + }, + "ResponseBody": { + "id": 45, + "appId": "application_1582721346528_0003", + "appInfo": { + "driverLogUrl": "http://e32f1ba891454e2c8934108fad734b37004bf001189:8042/node/containerlogs/container_1582721346528_0003_01_000001/trusted-service-user", + "sparkUiUrl": "http://e32f1ba891454e2c8934108fad734b37001df758198:8088/proxy/application_1582721346528_0003/" + }, + "state": "error", + "log": [ + "\t final status: UNDEFINED", + "\t tracking URL: http://e32f1ba891454e2c8934108fad734b37001df758198:8088/proxy/application_1582721346528_0003/", + "\t user: trusted-service-user", + "20/02/26 13:24:19 INFO ShutdownHookManager: Shutdown hook called", + "20/02/26 13:24:19 INFO ShutdownHookManager: Deleting directory /tmp/spark-ef65ba0c-16bb-4f15-89c3-574fd62060c5", + "20/02/26 13:24:19 INFO ShutdownHookManager: Deleting directory /tmp/spark-12b9d723-511b-4148-bb90-2f9713afdf4c", + "20/02/26 13:24:19 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "20/02/26 13:24:19 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "20/02/26 13:24:19 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nYARN Diagnostics: " + ] + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/livyApi/versions/2019-11-01-preview/sparkPools/testsparkpool/sessions/46", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-fbd893bfaa79234b8a48a75b5497a182-7e0e1f4fcb2edf4a-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.Spark/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "6e3164c5a0240b5d11794dd2e433e2ad", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:47:40 GMT", + "Server": [ + "Kestrel", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "x-ms-activity-id": "14fdc666-7f11-4ea7-a012-3829f73447d6", + "x-ms-client-request-id": [ + "6e3164c5a0240b5d11794dd2e433e2ad", + "6e3164c5a0240b5d11794dd2e433e2ad" + ], + "x-ms-job-cluster": "http://171.4.176.20:8998/", + "x-ms-job-clusterrequested-on": "2/26/2020 1:32:19 PM \u002B00:00", + "x-ms-job-ended-on": "2/26/2020 1:43:09 PM \u002B00:00", + "x-ms-job-internal-id": "46", + "x-ms-job-livysubmission-on": "2/26/2020 1:32:22 PM \u002B00:00", + "x-ms-job-queued-on": "2/26/2020 1:32:22 PM \u002B00:00", + "x-ms-job-result": "Failed", + "x-ms-job-scheduled-on": "2/26/2020 1:32:19 PM \u002B00:00", + "x-ms-job-scheduler-state": "Ended", + "x-ms-job-submitted-by-name": "zhezhou@microsoft.com", + "x-ms-job-submitted-on": "2/26/2020 1:32:18 PM \u002B00:00", + "x-ms-job-type": "SparkServiceSession", + "x-ms-request-id": "5e036b1e-023e-45a7-8779-076082a87acb", + "x-ms-response-time-ms": "44" + }, + "ResponseBody": { + "id": 46, + "appId": "application_1582721346528_0004", + "appInfo": { + "driverLogUrl": "http://e32f1ba891454e2c8934108fad734b37004bf001189:8042/node/containerlogs/container_1582721346528_0004_01_000001/trusted-service-user", + "sparkUiUrl": "http://e32f1ba891454e2c8934108fad734b37001df758198:8088/proxy/application_1582721346528_0004/" + }, + "state": "error", + "log": [ + "\t final status: UNDEFINED", + "\t tracking URL: http://e32f1ba891454e2c8934108fad734b37001df758198:8088/proxy/application_1582721346528_0004/", + "\t user: trusted-service-user", + "20/02/26 13:32:27 INFO ShutdownHookManager: Shutdown hook called", + "20/02/26 13:32:27 INFO ShutdownHookManager: Deleting directory /tmp/spark-4e0480e3-2240-4f3d-a55e-7cefa30cf7dd", + "20/02/26 13:32:27 INFO ShutdownHookManager: Deleting directory /tmp/spark-aef49187-6e10-4c1c-876d-efe62cbb67f8", + "20/02/26 13:32:27 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "20/02/26 13:32:27 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "20/02/26 13:32:27 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nYARN Diagnostics: " + ] + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/livyApi/versions/2019-11-01-preview/sparkPools/testsparkpool/sessions/47", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-98005656998aba469749f5f055d46163-d742567e93d62546-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.Spark/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "746ba8c24e6a644c72ae30b1000a2258", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:47:40 GMT", + "Server": [ + "Kestrel", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "x-ms-activity-id": "067fb48f-36b4-4d4c-ba6b-1c3d7ca683c5", + "x-ms-client-request-id": [ + "746ba8c24e6a644c72ae30b1000a2258", + "746ba8c24e6a644c72ae30b1000a2258" + ], + "x-ms-job-cluster": "http://171.4.176.20:8998/", + "x-ms-job-clusterrequested-on": "2/26/2020 1:35:43 PM \u002B00:00", + "x-ms-job-ended-on": "2/26/2020 1:46:09 PM \u002B00:00", + "x-ms-job-internal-id": "47", + "x-ms-job-livysubmission-on": "2/26/2020 1:35:47 PM \u002B00:00", + "x-ms-job-queued-on": "2/26/2020 1:35:46 PM \u002B00:00", + "x-ms-job-result": "Failed", + "x-ms-job-scheduled-on": "2/26/2020 1:35:43 PM \u002B00:00", + "x-ms-job-scheduler-state": "Ended", + "x-ms-job-submitted-by-name": "zhezhou@microsoft.com", + "x-ms-job-submitted-on": "2/26/2020 1:35:42 PM \u002B00:00", + "x-ms-job-type": "SparkServiceSession", + "x-ms-request-id": "4d2eb5ed-8879-410d-9df4-54e3ee81a49b", + "x-ms-response-time-ms": "28" + }, + "ResponseBody": { + "id": 47, + "appId": "application_1582721346528_0005", + "appInfo": { + "driverLogUrl": "http://e32f1ba891454e2c8934108fad734b37000b9a60506:8042/node/containerlogs/container_1582721346528_0005_01_000001/trusted-service-user", + "sparkUiUrl": "http://e32f1ba891454e2c8934108fad734b37001df758198:8088/proxy/application_1582721346528_0005/" + }, + "state": "error", + "log": [ + "\t final status: UNDEFINED", + "\t tracking URL: http://e32f1ba891454e2c8934108fad734b37001df758198:8088/proxy/application_1582721346528_0005/", + "\t user: trusted-service-user", + "20/02/26 13:35:50 INFO ShutdownHookManager: Shutdown hook called", + "20/02/26 13:35:50 INFO ShutdownHookManager: Deleting directory /tmp/spark-9ced194a-7983-4496-8693-b7da925d645f", + "20/02/26 13:35:50 INFO ShutdownHookManager: Deleting directory /tmp/spark-c6a899cd-049d-4aee-8ad4-5a588e466800", + "20/02/26 13:35:50 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "20/02/26 13:35:50 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "20/02/26 13:35:50 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nYARN Diagnostics: " + ] + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/livyApi/versions/2019-11-01-preview/sparkPools/testsparkpool/sessions/48", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-9dd30cb9ae43c64ab529fbbd45bbcf98-191b1799806e4041-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.Spark/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "56276d7d38d19dd34ac1545b8becb777", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:47:40 GMT", + "Server": [ + "Kestrel", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "x-ms-activity-id": "52bc5526-dc7b-497a-9ab3-d1852c106197", + "x-ms-client-request-id": [ + "56276d7d38d19dd34ac1545b8becb777", + "56276d7d38d19dd34ac1545b8becb777" + ], + "x-ms-job-cluster": "http://171.4.176.20:8998/", + "x-ms-job-clusterrequested-on": "2/26/2020 1:38:43 PM \u002B00:00", + "x-ms-job-ended-on": "2/26/2020 1:54:09 PM \u002B00:00", + "x-ms-job-internal-id": "48", + "x-ms-job-livysubmission-on": "2/26/2020 1:38:46 PM \u002B00:00", + "x-ms-job-queued-on": "2/26/2020 1:38:46 PM \u002B00:00", + "x-ms-job-result": "Failed", + "x-ms-job-scheduled-on": "2/26/2020 1:38:43 PM \u002B00:00", + "x-ms-job-scheduler-state": "Ended", + "x-ms-job-submitted-by-name": "zhezhou@microsoft.com", + "x-ms-job-submitted-on": "2/26/2020 1:38:42 PM \u002B00:00", + "x-ms-job-type": "SparkServiceSession", + "x-ms-request-id": "128cac81-9d39-448f-8c52-560a1aade0b9", + "x-ms-response-time-ms": "34" + }, + "ResponseBody": { + "id": 48, + "appId": "application_1582721346528_0006", + "appInfo": { + "driverLogUrl": "http://e32f1ba891454e2c8934108fad734b37003c1491642:8042/node/containerlogs/container_1582721346528_0006_01_000001/trusted-service-user", + "sparkUiUrl": "http://e32f1ba891454e2c8934108fad734b37001df758198:8088/proxy/application_1582721346528_0006/" + }, + "state": "error", + "log": [ + "\t final status: UNDEFINED", + "\t tracking URL: http://e32f1ba891454e2c8934108fad734b37001df758198:8088/proxy/application_1582721346528_0006/", + "\t user: trusted-service-user", + "20/02/26 13:38:50 INFO ShutdownHookManager: Shutdown hook called", + "20/02/26 13:38:50 INFO ShutdownHookManager: Deleting directory /tmp/spark-0433623f-ef0c-493b-93a9-9588507f53a4", + "20/02/26 13:38:50 INFO ShutdownHookManager: Deleting directory /tmp/spark-0dbc3f4d-e5af-43b3-9585-0ea51ff02b6e", + "20/02/26 13:38:50 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "20/02/26 13:38:50 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "20/02/26 13:38:50 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nYARN Diagnostics: " + ] + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/livyApi/versions/2019-11-01-preview/sparkPools/testsparkpool/sessions/49", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-cdd4ab4a8587d848a53f9543948b2247-6d21570153b7ae43-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.Spark/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "af729597772d76e217ccfb7570ab0a07", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:47:40 GMT", + "Server": [ + "Kestrel", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "x-ms-activity-id": "87ac31aa-408b-4ca5-b2ef-30deb13f48d3", + "x-ms-client-request-id": [ + "af729597772d76e217ccfb7570ab0a07", + "af729597772d76e217ccfb7570ab0a07" + ], + "x-ms-job-cluster": "http://171.0.202.6:8998/", + "x-ms-job-clusterrequested-on": "2/27/2020 2:35:25 AM \u002B00:00", + "x-ms-job-ended-on": "2/27/2020 3:09:06 AM \u002B00:00", + "x-ms-job-internal-id": "49", + "x-ms-job-livysubmission-on": "2/27/2020 2:36:44 AM \u002B00:00", + "x-ms-job-queued-on": "2/27/2020 2:36:36 AM \u002B00:00", + "x-ms-job-result": "Cancelled", + "x-ms-job-scheduled-on": "2/27/2020 2:35:25 AM \u002B00:00", + "x-ms-job-scheduler-state": "Ended", + "x-ms-job-submitted-by-name": "zhezhou@microsoft.com", + "x-ms-job-submitted-on": "2/27/2020 2:35:24 AM \u002B00:00", + "x-ms-job-type": "SparkServiceSession", + "x-ms-request-id": "710a651d-a8d9-443b-98b4-efdd06bc12f9", + "x-ms-response-time-ms": "14" + }, + "ResponseBody": { + "id": 49, + "appId": "application_1582770999899_0001", + "appInfo": { + "driverLogUrl": "http://b50c2ae5022b43d0a9a8b293074617ef00417f90807:8042/node/containerlogs/container_1582770999899_0001_01_000001/trusted-service-user", + "sparkUiUrl": "http://b50c2ae5022b43d0a9a8b293074617ef000a6688148:8088/proxy/application_1582770999899_0001/" + }, + "state": "killed", + "log": [ + "\t final status: UNDEFINED", + "\t tracking URL: http://b50c2ae5022b43d0a9a8b293074617ef000a6688148:8088/proxy/application_1582770999899_0001/", + "\t user: trusted-service-user", + "20/02/27 02:36:51 INFO ShutdownHookManager: Shutdown hook called", + "20/02/27 02:36:51 INFO ShutdownHookManager: Deleting directory /tmp/spark-b1ace93c-cd17-4893-b509-511dac50cb32", + "20/02/27 02:36:51 INFO ShutdownHookManager: Deleting directory /tmp/spark-fdc5c58b-8359-481a-a6a7-7fa64112672a", + "20/02/27 02:36:51 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "20/02/27 02:36:51 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "20/02/27 02:36:51 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nYARN Diagnostics: " + ] + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/livyApi/versions/2019-11-01-preview/sparkPools/testsparkpool/sessions/50", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-7c80e983a599c043aab689cb7e042882-513fad9b1e7a7f42-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.Spark/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "7755f4578c0c89dbd4ce2aa8faf1d985", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:47:40 GMT", + "Server": [ + "Kestrel", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "x-ms-activity-id": "e687d482-bce3-4ff2-9d8b-05dcdc22e242", + "x-ms-client-request-id": [ + "7755f4578c0c89dbd4ce2aa8faf1d985", + "7755f4578c0c89dbd4ce2aa8faf1d985" + ], + "x-ms-job-cluster": "http://171.0.202.6:8998/", + "x-ms-job-clusterrequested-on": "2/27/2020 2:43:26 AM \u002B00:00", + "x-ms-job-ended-on": "2/27/2020 2:58:43 AM \u002B00:00", + "x-ms-job-internal-id": "50", + "x-ms-job-livysubmission-on": "2/27/2020 2:43:29 AM \u002B00:00", + "x-ms-job-queued-on": "2/27/2020 2:43:29 AM \u002B00:00", + "x-ms-job-result": "Failed", + "x-ms-job-scheduled-on": "2/27/2020 2:43:25 AM \u002B00:00", + "x-ms-job-scheduler-state": "Ended", + "x-ms-job-submitted-by-name": "zhezhou@microsoft.com", + "x-ms-job-submitted-on": "2/27/2020 2:43:25 AM \u002B00:00", + "x-ms-job-type": "SparkServiceSession", + "x-ms-request-id": "b465d487-ab49-4d7b-97b5-4f66c84779f1", + "x-ms-response-time-ms": "32" + }, + "ResponseBody": { + "id": 50, + "appId": "application_1582770999899_0002", + "appInfo": { + "driverLogUrl": "http://b50c2ae5022b43d0a9a8b293074617ef00417f90807:8042/node/containerlogs/container_1582770999899_0002_01_000001/trusted-service-user", + "sparkUiUrl": "http://b50c2ae5022b43d0a9a8b293074617ef000a6688148:8088/proxy/application_1582770999899_0002/" + }, + "state": "error", + "log": [ + "\t final status: UNDEFINED", + "\t tracking URL: http://b50c2ae5022b43d0a9a8b293074617ef000a6688148:8088/proxy/application_1582770999899_0002/", + "\t user: trusted-service-user", + "20/02/27 02:43:32 INFO ShutdownHookManager: Shutdown hook called", + "20/02/27 02:43:32 INFO ShutdownHookManager: Deleting directory /tmp/spark-f86b4a4c-dcec-49f7-a18a-ab89e59feb2f", + "20/02/27 02:43:32 INFO ShutdownHookManager: Deleting directory /tmp/spark-f1eb01ba-c9e7-4b04-907e-8a452dd61b6f", + "20/02/27 02:43:32 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "20/02/27 02:43:32 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "20/02/27 02:43:32 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nYARN Diagnostics: " + ] + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/livyApi/versions/2019-11-01-preview/sparkPools/testsparkpool/sessions/51", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-b5b6308dda4aca45a8488b7c2b865f3c-069edc513ce1fd4f-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.Spark/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "6b1ab8f77297062b8ab03f053d5d2d9e", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:47:40 GMT", + "Server": [ + "Kestrel", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "x-ms-activity-id": "5ed73338-3c4d-4d73-ba35-e5ed15e69850", + "x-ms-client-request-id": [ + "6b1ab8f77297062b8ab03f053d5d2d9e", + "6b1ab8f77297062b8ab03f053d5d2d9e" + ], + "x-ms-job-cluster": "http://171.0.202.6:8998/", + "x-ms-job-clusterrequested-on": "2/27/2020 2:54:48 AM \u002B00:00", + "x-ms-job-ended-on": "2/27/2020 3:10:43 AM \u002B00:00", + "x-ms-job-internal-id": "51", + "x-ms-job-livysubmission-on": "2/27/2020 2:54:52 AM \u002B00:00", + "x-ms-job-queued-on": "2/27/2020 2:54:51 AM \u002B00:00", + "x-ms-job-result": "Failed", + "x-ms-job-scheduled-on": "2/27/2020 2:54:48 AM \u002B00:00", + "x-ms-job-scheduler-state": "Ended", + "x-ms-job-submitted-by-name": "zhezhou@microsoft.com", + "x-ms-job-submitted-on": "2/27/2020 2:54:47 AM \u002B00:00", + "x-ms-job-type": "SparkServiceSession", + "x-ms-request-id": "a26562bf-e2e1-46f8-9522-8c03b7b1df66", + "x-ms-response-time-ms": "28" + }, + "ResponseBody": { + "id": 51, + "appId": "application_1582770999899_0003", + "appInfo": { + "driverLogUrl": "http://b50c2ae5022b43d0a9a8b293074617ef001b6d10128:8042/node/containerlogs/container_1582770999899_0003_01_000001/trusted-service-user", + "sparkUiUrl": "http://b50c2ae5022b43d0a9a8b293074617ef000a6688148:8088/proxy/application_1582770999899_0003/" + }, + "state": "error", + "log": [ + "\t final status: UNDEFINED", + "\t tracking URL: http://b50c2ae5022b43d0a9a8b293074617ef000a6688148:8088/proxy/application_1582770999899_0003/", + "\t user: trusted-service-user", + "20/02/27 02:54:55 INFO ShutdownHookManager: Shutdown hook called", + "20/02/27 02:54:55 INFO ShutdownHookManager: Deleting directory /tmp/spark-97f232e3-86d7-4324-92aa-2741a6220350", + "20/02/27 02:54:55 INFO ShutdownHookManager: Deleting directory /tmp/spark-7e75314e-ef8d-4d94-9e9e-b2202080c05d", + "20/02/27 02:54:55 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "20/02/27 02:54:55 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "20/02/27 02:54:55 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nYARN Diagnostics: " + ] + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/livyApi/versions/2019-11-01-preview/sparkPools/testsparkpool/sessions/52", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-6f257205e994a645bd9703bff7ab2777-0e7ffc3345372247-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.Spark/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "97034db73f970a6bbae8da5e4c397c25", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:47:40 GMT", + "Server": [ + "Kestrel", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "x-ms-activity-id": "9c6eec57-5760-4660-a802-61dd06d75f59", + "x-ms-client-request-id": [ + "97034db73f970a6bbae8da5e4c397c25", + "97034db73f970a6bbae8da5e4c397c25" + ], + "x-ms-job-cluster": "http://171.0.202.6:8998/", + "x-ms-job-clusterrequested-on": "2/27/2020 3:06:06 AM \u002B00:00", + "x-ms-job-ended-on": "2/27/2020 3:21:43 AM \u002B00:00", + "x-ms-job-internal-id": "52", + "x-ms-job-livysubmission-on": "2/27/2020 3:06:14 AM \u002B00:00", + "x-ms-job-queued-on": "2/27/2020 3:06:13 AM \u002B00:00", + "x-ms-job-result": "Failed", + "x-ms-job-scheduled-on": "2/27/2020 3:06:06 AM \u002B00:00", + "x-ms-job-scheduler-state": "Ended", + "x-ms-job-submitted-by-name": "zhezhou@microsoft.com", + "x-ms-job-submitted-on": "2/27/2020 3:06:04 AM \u002B00:00", + "x-ms-job-type": "SparkServiceSession", + "x-ms-request-id": "0a1caecb-a7fa-4411-bcb2-07a1a2a4d6dd", + "x-ms-response-time-ms": "14" + }, + "ResponseBody": { + "id": 52, + "appId": "application_1582770999899_0004", + "appInfo": { + "driverLogUrl": "http://b50c2ae5022b43d0a9a8b293074617ef000a6688148:8042/node/containerlogs/container_1582770999899_0004_01_000001/trusted-service-user", + "sparkUiUrl": "http://b50c2ae5022b43d0a9a8b293074617ef000a6688148:8088/proxy/application_1582770999899_0004/" + }, + "state": "dead", + "log": [ + "\t final status: UNDEFINED", + "\t tracking URL: http://b50c2ae5022b43d0a9a8b293074617ef000a6688148:8088/proxy/application_1582770999899_0004/", + "\t user: trusted-service-user", + "20/02/27 03:06:18 INFO ShutdownHookManager: Shutdown hook called", + "20/02/27 03:06:18 INFO ShutdownHookManager: Deleting directory /tmp/spark-be8f21d0-dbb3-4c77-ae12-a0b65961ed74", + "20/02/27 03:06:18 INFO ShutdownHookManager: Deleting directory /tmp/spark-5d5a6b27-8aba-4d48-ab7a-b652ee820922", + "20/02/27 03:06:18 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "20/02/27 03:06:18 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "20/02/27 03:06:18 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nYARN Diagnostics: " + ] + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/livyApi/versions/2019-11-01-preview/sparkPools/testsparkpool/sessions/53", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-5b65ab2effde4a4d9adbeaa2f1799eb7-18edca348bb5e647-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.Spark/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "b77d75f39f91e46fc84fec5b4dd54c76", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:47:42 GMT", + "Server": [ + "Kestrel", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "x-ms-activity-id": "b256e54d-e054-4c07-adef-dc370bb29e7a", + "x-ms-client-request-id": [ + "b77d75f39f91e46fc84fec5b4dd54c76", + "b77d75f39f91e46fc84fec5b4dd54c76" + ], + "x-ms-job-cluster": "http://171.0.202.6:8998/", + "x-ms-job-clusterrequested-on": "2/27/2020 3:13:44 AM \u002B00:00", + "x-ms-job-ended-on": "2/27/2020 3:29:43 AM \u002B00:00", + "x-ms-job-internal-id": "53", + "x-ms-job-livysubmission-on": "2/27/2020 3:13:47 AM \u002B00:00", + "x-ms-job-queued-on": "2/27/2020 3:13:47 AM \u002B00:00", + "x-ms-job-result": "Failed", + "x-ms-job-scheduled-on": "2/27/2020 3:13:43 AM \u002B00:00", + "x-ms-job-scheduler-state": "Ended", + "x-ms-job-submitted-by-name": "zhezhou@microsoft.com", + "x-ms-job-submitted-on": "2/27/2020 3:13:42 AM \u002B00:00", + "x-ms-job-type": "SparkServiceSession", + "x-ms-request-id": "5e14023d-8af3-4375-9ae8-b7865cfbac14", + "x-ms-response-time-ms": "27" + }, + "ResponseBody": { + "id": 53, + "appId": "application_1582770999899_0005", + "appInfo": { + "driverLogUrl": "http://b50c2ae5022b43d0a9a8b293074617ef00417f90807:8042/node/containerlogs/container_1582770999899_0005_01_000001/trusted-service-user", + "sparkUiUrl": "http://b50c2ae5022b43d0a9a8b293074617ef000a6688148:8088/proxy/application_1582770999899_0005/" + }, + "state": "error", + "log": [ + "\t final status: UNDEFINED", + "\t tracking URL: http://b50c2ae5022b43d0a9a8b293074617ef000a6688148:8088/proxy/application_1582770999899_0005/", + "\t user: trusted-service-user", + "20/02/27 03:13:51 INFO ShutdownHookManager: Shutdown hook called", + "20/02/27 03:13:51 INFO ShutdownHookManager: Deleting directory /tmp/spark-874f6de2-32c5-40f3-b96e-bf965a970868", + "20/02/27 03:13:51 INFO ShutdownHookManager: Deleting directory /tmp/spark-a7726951-3c1c-4f91-9480-e554126696ce", + "20/02/27 03:13:51 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "20/02/27 03:13:51 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "20/02/27 03:13:51 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nYARN Diagnostics: " + ] + } + }, + { + "RequestUri": "https://testsynapseworkspace.dev.azuresynapse.net/livyApi/versions/2019-11-01-preview/sparkPools/testsparkpool/sessions/54", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-fb241b0915f5cc40a5d2e5b2af5bcdf1-516b94420769c541-00", + "User-Agent": [ + "azsdk-net-Analytics.Synapse.Spark/1.0.0-dev.20200525.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.17763 )" + ], + "x-ms-client-request-id": "acf18ba142eeb7ee4d0fb1af97cdb951", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 May 2020 09:47:42 GMT", + "Server": [ + "Kestrel", + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "x-ms-activity-id": "276f9581-e23b-49d8-87f6-3bc2536f9001", + "x-ms-client-request-id": [ + "acf18ba142eeb7ee4d0fb1af97cdb951", + "acf18ba142eeb7ee4d0fb1af97cdb951" + ], + "x-ms-job-cluster": "http://171.0.202.6:8998/", + "x-ms-job-clusterrequested-on": "2/27/2020 3:38:58 AM \u002B00:00", + "x-ms-job-ended-on": "2/27/2020 3:54:43 AM \u002B00:00", + "x-ms-job-internal-id": "54", + "x-ms-job-livysubmission-on": "2/27/2020 3:39:02 AM \u002B00:00", + "x-ms-job-queued-on": "2/27/2020 3:39:01 AM \u002B00:00", + "x-ms-job-result": "Failed", + "x-ms-job-scheduled-on": "2/27/2020 3:38:58 AM \u002B00:00", + "x-ms-job-scheduler-state": "Ended", + "x-ms-job-submitted-by-name": "zhezhou@microsoft.com", + "x-ms-job-submitted-on": "2/27/2020 3:38:56 AM \u002B00:00", + "x-ms-job-type": "SparkServiceSession", + "x-ms-request-id": "fcdba4d4-0233-4cc0-a1fc-fd748f109fec", + "x-ms-response-time-ms": "34" + }, + "ResponseBody": { + "id": 54, + "appId": "application_1582770999899_0006", + "appInfo": { + "driverLogUrl": "http://b50c2ae5022b43d0a9a8b293074617ef001b6d10128:8042/node/containerlogs/container_1582770999899_0006_01_000001/trusted-service-user", + "sparkUiUrl": "http://b50c2ae5022b43d0a9a8b293074617ef000a6688148:8088/proxy/application_1582770999899_0006/" + }, + "state": "error", + "log": [ + "\t final status: UNDEFINED", + "\t tracking URL: http://b50c2ae5022b43d0a9a8b293074617ef000a6688148:8088/proxy/application_1582770999899_0006/", + "\t user: trusted-service-user", + "20/02/27 03:39:05 INFO ShutdownHookManager: Shutdown hook called", + "20/02/27 03:39:05 INFO ShutdownHookManager: Deleting directory /tmp/spark-2e61a99f-1f01-45b8-a8db-324cc4453ab0", + "20/02/27 03:39:05 INFO ShutdownHookManager: Deleting directory /tmp/spark-68cf840b-3e84-4d7d-89cf-f17f5cb6b80e", + "20/02/27 03:39:05 INFO MetricsSystemImpl: Stopping azure-file-system metrics system...", + "20/02/27 03:39:05 INFO MetricsSystemImpl: azure-file-system metrics system stopped.", + "20/02/27 03:39:05 INFO MetricsSystemImpl: azure-file-system metrics system shutdown complete.", + "\nYARN Diagnostics: " + ] + } + } + ], + "Variables": { + "AZURE_SYNAPSE_SPARK_POOL_NAME": "testsparkpool", + "AZURE_SYNAPSE_WORKSPACE_URL": "https://testsynapseworkspace.dev.azuresynapse.net", + "RandomSeed": "1817300816" + } +} \ No newline at end of file diff --git a/sdk/synapse/Azure.Analytics.Synapse.Spark/tests/SparkBatchClientLiveTests.cs b/sdk/synapse/Azure.Analytics.Synapse.Spark/tests/SparkBatchClientLiveTests.cs new file mode 100644 index 000000000000..4d730aa16696 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Spark/tests/SparkBatchClientLiveTests.cs @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure.Analytics.Synapse.Spark.Models; +using NUnit.Framework; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace Azure.Analytics.Synapse.Spark.Tests +{ + /// + /// The suite of tests for the class. + /// + /// + /// These tests have a dependency on live Azure services and may incur costs for the associated + /// Azure subscription. + /// + public class SparkBatchClientLiveTests : SparkClientTestBase + { + /// + /// Initializes a new instance of the class. + /// + /// A flag used by the Azure Core Test Framework to differentiate between tests for asynchronous and synchronous methods. + public SparkBatchClientLiveTests(bool isAsync) : base(isAsync) + { + } + + /// + /// Verifies that the is able to connect to the + /// Azure Synapse Analytics service and perform operations. + /// + [Test] + [Ignore("This test case cannot pass due to backend limitations for service principals.")] + public async Task TestSparkBatchJob() + { + // Submit the Spark job + SparkBatchJobOptions createParams = this.CreateSparkJobRequestParameters(); + SparkBatchJob jobCreateResponse = (await SparkBatchClient.CreateSparkBatchJobAsync(createParams)).Value; + + // Poll the Spark job until it finishes + SparkBatchJob getJobResponse = await this.PollSparkBatchJobSubmissionAsync(jobCreateResponse); + + // Verify the Spark batch job completes successfully + Assert.True("success".Equals(getJobResponse.State, StringComparison.OrdinalIgnoreCase) && getJobResponse.Result == SparkBatchJobResultType.Succeeded, + string.Format( + "Job: {0} did not return success. Current job state: {1}. Actual result: {2}. Error (if any): {3}", + getJobResponse.Id, + getJobResponse.State, + getJobResponse.Result, + string.Join(", ", getJobResponse.Errors ?? new List()) + ) + ); + + // Get the list of Spark batch jobs and check that the submitted job exists + List listJobResponse = await this.ListSparkBatchJobsAsync(); + Assert.NotNull(listJobResponse); + Assert.IsTrue(listJobResponse.Any(job => job.Id == getJobResponse.Id)); + } + + [Test] + public async Task TestGetSparkBatchJob() + { + SparkBatchJobCollection sparkJobs = (await SparkBatchClient.GetSparkBatchJobsAsync()).Value; + foreach (SparkBatchJob expectedSparkJob in sparkJobs.Sessions) + { + SparkBatchJob actualSparkJob = await SparkBatchClient.GetSparkBatchJobAsync(expectedSparkJob.Id); + ValidateSparkBatchJob(expectedSparkJob, actualSparkJob); + } + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Spark/tests/SparkClientTestBase.cs b/sdk/synapse/Azure.Analytics.Synapse.Spark/tests/SparkClientTestBase.cs new file mode 100644 index 000000000000..9b7df4160a42 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Spark/tests/SparkClientTestBase.cs @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure.Analytics.Synapse.Spark.Models; +using Azure.Analytics.Synapse.Tests; +using Azure.Core.TestFramework; +using NUnit.Framework; +using System; +using System.IO; + +namespace Azure.Analytics.Synapse.Spark.Tests +{ + [NonParallelizable] + public abstract class SparkClientTestBase : RecordedTestBase + { + public SparkBatchClient SparkBatchClient { get; set; } + + public SparkSessionClient SparkSessionClient { get; set; } + + protected SparkClientTestBase(bool isAsync) : base(isAsync) + { +#if DEBUG + SaveDebugRecordingsOnFailure = true; +#endif + } + + public override void StartTestRecording() + { + base.StartTestRecording(); + + SparkBatchClient = CreateSparkBatchClient(); + SparkSessionClient = CreateSparkSessionClient(); + } + + public override void StopTestRecording() + { + Recording.RewriteSessionRecords(GetSessionFilePath()); + Recording.ClearTextReplacementRules(); + base.StopTestRecording(); + } + + private string GetSessionFilePath(string name = null) + { + TestContext.TestAdapter testAdapter = TestContext.CurrentContext.Test; + + name ??= testAdapter.Name; + + string className = testAdapter.ClassName.Substring(testAdapter.ClassName.LastIndexOf('.') + 1); + string fileName = name + (IsAsync ? "Async" : string.Empty) + ".json"; + return Path.Combine(TestContext.CurrentContext.TestDirectory, "SessionRecords", className, fileName); + } + + internal SparkBatchClient CreateSparkBatchClient(TestRecording recording = null) + { + recording ??= Recording; + return InstrumentClient(new SparkBatchClient( + new Uri(TestEnvironment.WorkspaceUrl), + TestEnvironment.SparkPoolName, + TestEnvironment.Credential, + recording.InstrumentClientOptions(new SparkClientOptions()))); + } + + internal SparkSessionClient CreateSparkSessionClient(TestRecording recording = null) + { + recording ??= Recording; + return InstrumentClient(new SparkSessionClient( + new Uri(TestEnvironment.WorkspaceUrl), + TestEnvironment.SparkPoolName, + TestEnvironment.Credential, + recording.InstrumentClientOptions(new SparkClientOptions()))); + } + + internal void ValidateSparkBatchJob(SparkBatchJob expectedSparkJob, SparkBatchJob actualSparkJob) + { + Assert.AreEqual(expectedSparkJob.Name, actualSparkJob.Name); + Assert.AreEqual(expectedSparkJob.Id, actualSparkJob.Id); + Assert.AreEqual(expectedSparkJob.AppId, actualSparkJob.AppId); + Assert.AreEqual(expectedSparkJob.SubmitterId, actualSparkJob.SubmitterId); + Assert.AreEqual(expectedSparkJob.ArtifactId, actualSparkJob.ArtifactId); + } + + internal void ValidateSparkSession(SparkSession expectedSparkSession, SparkSession actualSparkSession) + { + Assert.AreEqual(expectedSparkSession.Name, actualSparkSession.Name); + Assert.AreEqual(expectedSparkSession.Id, actualSparkSession.Id); + Assert.AreEqual(expectedSparkSession.AppId, actualSparkSession.AppId); + Assert.AreEqual(expectedSparkSession.SubmitterId, actualSparkSession.SubmitterId); + Assert.AreEqual(expectedSparkSession.ArtifactId, actualSparkSession.ArtifactId); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Spark/tests/SparkSessionClientLiveTests.cs b/sdk/synapse/Azure.Analytics.Synapse.Spark/tests/SparkSessionClientLiveTests.cs new file mode 100644 index 000000000000..922d97cd615d --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Spark/tests/SparkSessionClientLiveTests.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure.Analytics.Synapse.Spark.Models; +using NUnit.Framework; +using NUnit.Framework.Internal; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text.Json; +using System.Threading.Tasks; + +namespace Azure.Analytics.Synapse.Spark.Tests +{ + /// + /// The suite of tests for the class. + /// + /// + /// These tests have a dependency on live Azure services and may incur costs for the associated + /// Azure subscription. + /// + public class SparkSessionClientLiveTests : SparkClientTestBase + { + /// + /// Initializes a new instance of the class. + /// + /// A flag used by the Azure Core Test Framework to differentiate between tests for asynchronous and synchronous methods. + public SparkSessionClientLiveTests(bool isAsync) : base(isAsync) + { + } + + /// + /// Verifies that the is able to connect to the + /// Azure Synapse Analytics service and perform operations. + /// + [Test] + [Ignore("This test case cannot pass due to backend limitations for service principals.")] + public async Task TestSparkSessionJob() + { + // Start the Spark session + SparkSessionOptions createParams = this.CreateSparkSessionRequestParameters(); + SparkSession sessionCreateResponse = (await SparkSessionClient.CreateSparkSessionAsync(createParams)).Value; + + // Poll the spark session initialization until it is successful. + SparkSession getSessionResponse = await this.PollSparkSessionAsync(sessionCreateResponse); + + // Verify the Spark session completes successfully + Assert.True("idle".Equals(getSessionResponse.State, StringComparison.OrdinalIgnoreCase) && getSessionResponse.Result == SparkSessionResultType.Succeeded, + string.Format( + "Session: {0} did not return success. Current job state: {1}. Actual result: {2}. Error (if any): {3}", + getSessionResponse.Id, + getSessionResponse.State, + getSessionResponse.Result, + string.Join(", ", getSessionResponse.Errors ?? new List()) + ) + ); + + // Execute Spark statement in the session + SparkStatement createStatementResponse = (await SparkSessionClient.CreateSparkStatementAsync( + getSessionResponse.Id, + new SparkStatementOptions + { + Kind = SparkStatementLanguageType.Spark, + Code = @"print(""Hello world\n"")" + })).Value; + + SparkStatement getStatementResponse = await this.PollSparkSessionStatementAsync( + getSessionResponse.Id, + createStatementResponse); + + Assert.NotNull(getSessionResponse); + + // Verify the Spark statement completes successfully + Assert.True("ok".Equals(getStatementResponse.State, StringComparison.OrdinalIgnoreCase), + string.Format( + "Spark statement: {0} did not return success. Current job state: {1}. Error (if any): {2}", + getStatementResponse.Id, + getStatementResponse.State, + getStatementResponse.Output.ErrorValue) + ); + + // Verify the output + Dictionary outputData = JsonSerializer.Deserialize>(getStatementResponse.Output.Data as string); + Assert.Equals("Hello world", outputData["text/plain"]); + + // Get the list of Spark statements and check that the executed statement exists + Response listStatementResponse = await SparkSessionClient.GetSparkStatementsAsync(sessionCreateResponse.Id); + + Assert.NotNull(listStatementResponse.Value); + Assert.IsTrue(listStatementResponse.Value.Statements.Any(stmt => stmt.Id == createStatementResponse.Id)); + + // Get the list of Spark session and check that the created session exists + List listSessionResponse = await this.ListSparkSessionsAsync(); + + Assert.NotNull(listSessionResponse); + Assert.IsTrue(listSessionResponse.Any(session => session.Id == sessionCreateResponse.Id)); + } + + [Test] + public async Task TestGetSparkSession() + { + SparkSessionCollection sparkSessions = (await SparkSessionClient.GetSparkSessionsAsync()).Value; + foreach (SparkSession expectedSparkSession in sparkSessions.Sessions) + { + SparkSession actualSparkSession = await SparkSessionClient.GetSparkSessionAsync(expectedSparkSession.Id); + ValidateSparkSession(expectedSparkSession, actualSparkSession); + } + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Spark/tests/SparkTestUtilities.cs b/sdk/synapse/Azure.Analytics.Synapse.Spark/tests/SparkTestUtilities.cs new file mode 100644 index 000000000000..961fd1105d6b --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Spark/tests/SparkTestUtilities.cs @@ -0,0 +1,185 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.Threading.Tasks; +using Azure.Analytics.Synapse.Spark.Models; +using Azure.Analytics.Synapse.Tests; + +namespace Azure.Analytics.Synapse.Spark.Tests +{ + internal static class SparkTestUtilities + { + /// + /// Create parameters for Spark batch tests. + /// + /// + /// + internal static SparkBatchJobOptions CreateSparkJobRequestParameters(this SparkClientTestBase test) + { + string name = test.Recording.GenerateName("dontnetbatch"); + string file = string.Format("abfss://{0}@{1}.dfs.core.windows.net/samples/java/wordcount/wordcount.jar", test.TestEnvironment.StorageFileSystemName, test.TestEnvironment.StorageAccountName); + return new SparkBatchJobOptions(name, file) + { + ClassName = "WordCount", + Arguments = new List + { + string.Format("abfss://{0}@{1}.dfs.core.windows.net/samples/java/wordcount/shakespeare.txt", test.TestEnvironment.StorageFileSystemName, test.TestEnvironment.StorageAccountName), + string.Format("abfss://{0}@{1}.dfs.core.windows.net/samples/java/wordcount/result/", test.TestEnvironment.StorageFileSystemName, test.TestEnvironment.StorageAccountName), + }, + DriverMemory = "28g", + DriverCores = 4, + ExecutorMemory = "28g", + ExecutorCores = 4, + ExecutorCount = 2 + }; + } + + /// + /// Create parameters for Spark session tests. + /// + /// + /// + internal static SparkSessionOptions CreateSparkSessionRequestParameters(this SparkClientTestBase test) + { + string name = test.Recording.GenerateName("dotnetsession"); + return new SparkSessionOptions(name) + { + DriverMemory = "28g", + DriverCores = 4, + ExecutorMemory = "28g", + ExecutorCores = 4, + ExecutorCount = 2 + }; + } + + /// + /// Wait for the specified number of milliseconds unless we are in mock playback mode. + /// + /// The number of milliseconds to wait. + internal static void Wait(this SparkClientTestBase test, int milliseconds) + { + test.Recording.Wait(TimeSpan.FromMilliseconds(milliseconds)); + } + + internal static bool IsJobRunning(string livyState, IList livyStates, bool isFinalState = true) + { + return isFinalState ? !livyStates.Contains(livyState) : livyStates.Contains(livyState); + } + + internal static async Task> ListSparkBatchJobsAsync(this SparkClientTestBase test, bool detailed = true) + { + List batches = new List(); + int from = 0; + int currentPageSize; + int pageSize = 20; + do + { + SparkBatchJobCollection page = (await test.SparkBatchClient.GetSparkBatchJobsAsync(detailed: detailed, from: from, size: pageSize)).Value; + currentPageSize = page.Total; + from += currentPageSize; + batches.AddRange(page.Sessions); + } while (currentPageSize == pageSize); + return batches; + } + + internal static async Task PollSparkBatchJobSubmissionAsync(this SparkClientTestBase test, SparkBatchJob batch) + { + return await test.PollAsync( + batch, + b => b.State, + b => test.SparkBatchClient.GetSparkBatchJobAsync(b.Id), + new List + { + "error", + "dead", + "success", + "killed" + }); + } + + internal static async Task> ListSparkSessionsAsync(this SparkClientTestBase test, bool detailed = true) + { + List sessions = new List(); + int from = 0; + int currentPageSize; + int pageSize = 20; + do + { + SparkSessionCollection page = (await test.SparkSessionClient.GetSparkSessionsAsync(detailed: detailed, from: from, size: pageSize)).Value; + currentPageSize = page.Total; + from += currentPageSize; + sessions.AddRange(page.Sessions); + } while (currentPageSize == pageSize); + + return sessions; + } + + internal static async Task PollSparkSessionAsync(this SparkClientTestBase test, SparkSession session) + { + return await test.PollAsync( + session, + s => s.State, + s => test.SparkSessionClient.GetSparkSessionAsync(s.Id), + new List + { + "idle", + "error", + "dead", + "success", + "killed" + }); + } + + internal static async Task PollSparkSessionStatementAsync(this SparkClientTestBase test, int sessionId, SparkStatement statement) + { + return await test.PollAsync( + statement, + s => s.State, + s => test.SparkSessionClient.GetSparkStatementAsync(sessionId, s.Id), + new List + { + "starting", + "waiting", + "running", + "cancelling" + }, + isFinalState:false); + } + + private static async Task PollAsync( + this SparkClientTestBase test, + T job, + Func getLivyState, + Func>> refresh, + IList livyReadyStates, + bool isFinalState = true, + int pollingInMilliseconds = default, + int timeoutInMilliseconds = default, + Action writeLog = null) + { + int timeWaitedInMilliSeconds = 0; + if (pollingInMilliseconds == default) + { + pollingInMilliseconds = 5000; + } + + while (IsJobRunning(getLivyState(job), livyReadyStates, isFinalState)) + { + if (timeoutInMilliseconds > 0 && timeWaitedInMilliSeconds >= timeoutInMilliseconds) + { + throw new TimeoutException(); + } + + writeLog?.Invoke(job); + test.Wait(pollingInMilliseconds); + timeWaitedInMilliSeconds += pollingInMilliseconds; + + job = await refresh(job); + } + + return job; + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Spark/tests/samples/Sample1_SubmitSparkJob.cs b/sdk/synapse/Azure.Analytics.Synapse.Spark/tests/samples/Sample1_SubmitSparkJob.cs new file mode 100644 index 000000000000..e376823c4b82 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Spark/tests/samples/Sample1_SubmitSparkJob.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.Diagnostics; +using Azure.Analytics.Synapse.Spark; +using Azure.Analytics.Synapse.Spark.Models; +using Azure.Identity; +using NUnit.Framework; + +namespace Azure.Analytics.Synapse.Samples +{ + /// + /// This sample demonstrates how to submit Spark job in Azure Synapse Analytics using synchronous methods of . + /// + public partial class SubmitSparkJob + { + [Test] + public void SubmitSparkJobSync() + { + // Environment variable with the Synapse workspace endpoint. + string workspaceUrl = TestEnvironment.WorkspaceUrl; + + // Environment variable with the Synapse Spark pool name. + string sparkPoolName = TestEnvironment.SparkPoolName; + + // Environment variable with the ADLS Gen2 storage account associated with the Synapse workspace. + string storageAccount = TestEnvironment.StorageAccountName; + + // Environment variable with the file system of ADLS Gen2 storage account associated with the Synapse workspace. + string fileSystem = TestEnvironment.StorageFileSystemName; + + #region Snippet:SparkBatchSample1SparkBatchClient + SparkBatchClient client = new SparkBatchClient(new Uri(workspaceUrl), sparkPoolName, new DefaultAzureCredential()); + #endregion + + #region Snippet:SparkBatchSample1SubmitSparkJob + string name = $"batch-{Guid.NewGuid()}"; + string file = string.Format("abfss://{0}@{1}.dfs.core.windows.net/samples/java/wordcount/wordcount.jar", fileSystem, storageAccount); + SparkBatchJobOptions request = new SparkBatchJobOptions(name, file) + { + ClassName = "WordCount", + Arguments = new List + { + string.Format("abfss://{0}@{1}.dfs.core.windows.net/samples/java/wordcount/shakespeare.txt", fileSystem, storageAccount), + string.Format("abfss://{0}@{1}.dfs.core.windows.net/samples/java/wordcount/result/", fileSystem, storageAccount), + }, + DriverMemory = "28g", + DriverCores = 4, + ExecutorMemory = "28g", + ExecutorCores = 4, + ExecutorCount = 2 + }; + + SparkBatchJob jobCreated = client.CreateSparkBatchJob(request); + #endregion + + #region Snippet:SparkBatchSample1GetSparkJob + SparkBatchJob job = client.GetSparkBatchJob(jobCreated.Id); + Debug.WriteLine($"Job is returned with name {job.Name} and state {job.State}"); + #endregion + + #region Snippet:SparkBatchSample1CancelSparkJob + Response operation = client.CancelSparkBatchJob(jobCreated.Id); + #endregion + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Spark/tests/samples/Sample2_ExecuteSparkStatement.cs b/sdk/synapse/Azure.Analytics.Synapse.Spark/tests/samples/Sample2_ExecuteSparkStatement.cs new file mode 100644 index 000000000000..83a893eeb2c4 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Spark/tests/samples/Sample2_ExecuteSparkStatement.cs @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Diagnostics; +using Azure.Analytics.Synapse.Spark; +using Azure.Analytics.Synapse.Spark.Models; +using Azure.Identity; +using NUnit.Framework; + +namespace Azure.Analytics.Synapse.Samples +{ + /// + /// This sample demonstrates how to submit Spark job in Azure Synapse Analytics using synchronous methods of . + /// + public partial class ExecuteSparkStatement + { + [Test] + public void ExecuteSparkStatementSync() + { + // Environment variable with the Synapse workspace endpoint. + string workspaceUrl = TestEnvironment.WorkspaceUrl; + + // Environment variable with the Synapse Spark pool name. + string sparkPoolName = TestEnvironment.SparkPoolName; + + #region Snippet:SparkSessionSample1SparkSessionClient + SparkSessionClient client = new SparkSessionClient(new Uri(workspaceUrl), sparkPoolName, new DefaultAzureCredential()); + #endregion + + #region Snippet:SparkSessionSample1StartSparkSession + SparkSessionOptions request = new SparkSessionOptions(name: $"session-{Guid.NewGuid()}") + { + DriverMemory = "28g", + DriverCores = 4, + ExecutorMemory = "28g", + ExecutorCores = 4, + ExecutorCount = 2 + }; + + SparkSession sessionCreated = client.CreateSparkSession(request); + #endregion + + #region Snippet:SparkSessionSample1GetSparkSession + SparkSession session = client.GetSparkSession(sessionCreated.Id); + Debug.WriteLine($"Session is returned with name {session.Name} and state {session.State}"); + #endregion + + #region Snippet:SparkSessionSample1ExecuteSparkStatement + SparkStatementOptions sparkStatementRequest = new SparkStatementOptions + { + Kind = SparkStatementLanguageType.Spark, + Code = @"print(""Hello world\n"")" + }; + SparkStatement statementCreated = client.CreateSparkStatement(sessionCreated.Id, sparkStatementRequest); + #endregion + + #region Snippet:SparkSessionSample1GetSparkStatement + SparkStatement statement = client.GetSparkStatement(sessionCreated.Id, statementCreated.Id); + Debug.WriteLine($"Statement is returned with id {statement.Id} and state {statement.State}"); + #endregion + + #region Snippet:SparkSessionSample1CancelSparkStatement + SparkStatementCancellationResult cancellationResult = client.CancelSparkStatement(sessionCreated.Id, statementCreated.Id); + Debug.WriteLine($"Statement is cancelled with message {cancellationResult.Msg}"); + #endregion + + #region Snippet:SparkSessionSample1StopSparkSession + Response operation = client.CancelSparkSession(sessionCreated.Id); + #endregion + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Spark/tests/samples/SampleSnippets.cs b/sdk/synapse/Azure.Analytics.Synapse.Spark/tests/samples/SampleSnippets.cs new file mode 100644 index 000000000000..150ce9c0412b --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Spark/tests/samples/SampleSnippets.cs @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using Azure.Analytics.Synapse.Spark.Models; +using Azure.Analytics.Synapse.Samples; +using Azure.Identity; +using NUnit.Framework; +using System.Collections.Generic; + +namespace Azure.Analytics.Synapse.Spark.Samples +{ + public partial class Snippets : SampleFixture + { + private SparkBatchClient batchClient; + + [OneTimeSetUp] + public void CreateClient() + { + // Environment variable with the Synapse workspace endpoint. + string workspaceUrl = TestEnvironment.WorkspaceUrl; + + // Environment variable with the Synapse Spark pool name. + string sparkPoolName = TestEnvironment.SparkPoolName; + + #region Snippet:CreateBatchClient + // Create a new access Spark batch client using the default credential from Azure.Identity using environment variables previously set, + // including AZURE_CLIENT_ID, AZURE_CLIENT_SECRET, and AZURE_TENANT_ID. + SparkBatchClient client = new SparkBatchClient(endpoint: new Uri(workspaceUrl), sparkPoolName: sparkPoolName, credential: new DefaultAzureCredential()); + #endregion + + this.batchClient = client; + } + + [Test] + public void CreateSparkBatchJob() + { + // Environment variable with the storage account associated with the Synapse workspace endpoint. + string storageAccount = TestEnvironment.StorageAccountName; + + // Environment variable with the file system of the storage account. + string fileSystem = TestEnvironment.StorageFileSystemName; + + #region Snippet:CreateBatchJob + string name = $"batchSample"; + string file = string.Format("abfss://{0}@{1}.dfs.core.windows.net/samples/java/wordcount/wordcount.jar", fileSystem, storageAccount); + SparkBatchJobOptions options = new SparkBatchJobOptions(name: name, file: file) + { + ClassName = "WordCount", + Arguments = new List + { + string.Format("abfss://{0}@{1}.dfs.core.windows.net/samples/java/wordcount/shakespeare.txt", fileSystem, storageAccount), + string.Format("abfss://{0}@{1}.dfs.core.windows.net/samples/java/wordcount/result/", fileSystem, storageAccount), + }, + DriverMemory = "28g", + DriverCores = 4, + ExecutorMemory = "28g", + ExecutorCores = 4, + ExecutorCount = 2 + }; + + SparkBatchJob jobCreated = batchClient.CreateSparkBatchJob(options); + #endregion + } + + [Test] + public void ListSparkBatchJobs() + { + #region Snippet:ListSparkBatchJobs + Response jobs = batchClient.GetSparkBatchJobs(); + foreach (SparkBatchJob job in jobs.Value.Sessions) + { + Console.WriteLine(job.Name); + } + #endregion + } + + [Test] + public void CancelSparkBatchJob() + { + int jobId = 0; + + #region Snippet:DeleteSparkBatchJob + Response operation = batchClient.CancelSparkBatchJob(jobId); + #endregion + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.sln b/sdk/synapse/Azure.Analytics.Synapse.sln new file mode 100644 index 000000000000..a0dd8e13365d --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.sln @@ -0,0 +1,75 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.29920.165 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.Analytics.Synapse.Spark", "Azure.Analytics.Synapse.Spark\src\Azure.Analytics.Synapse.Spark.csproj", "{9BB62C96-1BDC-4D50-9FA6-A899B5184454}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.Analytics.Synapse.Spark.Tests", "Azure.Analytics.Synapse.Spark\tests\Azure.Analytics.Synapse.Spark.Tests.csproj", "{FAF772FD-0EA7-4643-BE44-5AF5971F50E6}" +EndProject +Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Azure.Analytics.Synapse.Shared", "Azure.Analytics.Synapse.Shared\src\Azure.Analytics.Synapse.Shared.shproj", "{6742C536-BD25-45D9-9296-E43F03BA888D}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.Analytics.Synapse.AccessControl", "Azure.Analytics.Synapse.AccessControl\src\Azure.Analytics.Synapse.AccessControl.csproj", "{E6060B85-1465-498E-8C3A-595C322D4C0E}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.Analytics.Synapse.Artifacts", "Azure.Analytics.Synapse.Artifacts\src\Azure.Analytics.Synapse.Artifacts.csproj", "{5E1BFD9E-D39F-4EA3-8FDF-800085147BBE}" +EndProject +Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Azure.Analytics.Synapse.Shared.Tests", "Azure.Analytics.Synapse.Shared\tests\Azure.Analytics.Synapse.Shared.Tests.shproj", "{1AFA2644-A1D9-419F-B87D-9B519B673F24}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.Analytics.Synapse.AccessControl.Tests", "Azure.Analytics.Synapse.AccessControl\tests\Azure.Analytics.Synapse.AccessControl.Tests.csproj", "{9F1E97DA-6F10-4CCC-A0FE-EE7663C02514}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.Analytics.Synapse.Artifacts.Tests", "Azure.Analytics.Synapse.Artifacts\tests\Azure.Analytics.Synapse.Artifacts.Tests.csproj", "{E07E4070-92D6-41E6-8360-F277A5682C48}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.Core.TestFramework", "..\core\Azure.Core.TestFramework\src\Azure.Core.TestFramework.csproj", "{5F3EE47C-1F9F-427D-A6A8-60F032753BDE}" +EndProject +Global + GlobalSection(SharedMSBuildProjectFiles) = preSolution + Azure.Analytics.Synapse.Shared\tests\Azure.Analytics.Synapse.Shared.Tests.projitems*{1afa2644-a1d9-419f-b87d-9b519b673f24}*SharedItemsImports = 13 + Azure.Analytics.Synapse.Shared\src\Azure.Analytics.Synapse.Shared.projitems*{5e1bfd9e-d39f-4ea3-8fdf-800085147bbe}*SharedItemsImports = 5 + Azure.Analytics.Synapse.Shared\src\Azure.Analytics.Synapse.Shared.projitems*{6742c536-bd25-45d9-9296-e43f03ba888d}*SharedItemsImports = 13 + Azure.Analytics.Synapse.Shared\src\Azure.Analytics.Synapse.Shared.projitems*{9bb62c96-1bdc-4d50-9fa6-a899b5184454}*SharedItemsImports = 5 + Azure.Analytics.Synapse.Shared\tests\Azure.Analytics.Synapse.Shared.Tests.projitems*{9f1e97da-6f10-4ccc-a0fe-ee7663c02514}*SharedItemsImports = 5 + Azure.Analytics.Synapse.Shared\tests\Azure.Analytics.Synapse.Shared.Tests.projitems*{e07e4070-92d6-41e6-8360-f277a5682c48}*SharedItemsImports = 5 + Azure.Analytics.Synapse.Shared\src\Azure.Analytics.Synapse.Shared.projitems*{e6060b85-1465-498e-8c3a-595c322d4c0e}*SharedItemsImports = 5 + Azure.Analytics.Synapse.Shared\tests\Azure.Analytics.Synapse.Shared.Tests.projitems*{faf772fd-0ea7-4643-be44-5af5971f50e6}*SharedItemsImports = 5 + EndGlobalSection + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {9BB62C96-1BDC-4D50-9FA6-A899B5184454}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9BB62C96-1BDC-4D50-9FA6-A899B5184454}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9BB62C96-1BDC-4D50-9FA6-A899B5184454}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9BB62C96-1BDC-4D50-9FA6-A899B5184454}.Release|Any CPU.Build.0 = Release|Any CPU + {FAF772FD-0EA7-4643-BE44-5AF5971F50E6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FAF772FD-0EA7-4643-BE44-5AF5971F50E6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FAF772FD-0EA7-4643-BE44-5AF5971F50E6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FAF772FD-0EA7-4643-BE44-5AF5971F50E6}.Release|Any CPU.Build.0 = Release|Any CPU + {E6060B85-1465-498E-8C3A-595C322D4C0E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E6060B85-1465-498E-8C3A-595C322D4C0E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E6060B85-1465-498E-8C3A-595C322D4C0E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E6060B85-1465-498E-8C3A-595C322D4C0E}.Release|Any CPU.Build.0 = Release|Any CPU + {5E1BFD9E-D39F-4EA3-8FDF-800085147BBE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5E1BFD9E-D39F-4EA3-8FDF-800085147BBE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5E1BFD9E-D39F-4EA3-8FDF-800085147BBE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5E1BFD9E-D39F-4EA3-8FDF-800085147BBE}.Release|Any CPU.Build.0 = Release|Any CPU + {9F1E97DA-6F10-4CCC-A0FE-EE7663C02514}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9F1E97DA-6F10-4CCC-A0FE-EE7663C02514}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9F1E97DA-6F10-4CCC-A0FE-EE7663C02514}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9F1E97DA-6F10-4CCC-A0FE-EE7663C02514}.Release|Any CPU.Build.0 = Release|Any CPU + {E07E4070-92D6-41E6-8360-F277A5682C48}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E07E4070-92D6-41E6-8360-F277A5682C48}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E07E4070-92D6-41E6-8360-F277A5682C48}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E07E4070-92D6-41E6-8360-F277A5682C48}.Release|Any CPU.Build.0 = Release|Any CPU + {5F3EE47C-1F9F-427D-A6A8-60F032753BDE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5F3EE47C-1F9F-427D-A6A8-60F032753BDE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5F3EE47C-1F9F-427D-A6A8-60F032753BDE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5F3EE47C-1F9F-427D-A6A8-60F032753BDE}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {A97F4B90-2591-4689-B1F8-5F21FE6D6CAE} + EndGlobalSection +EndGlobal diff --git a/sdk/synapse/ci.yml b/sdk/synapse/ci.yml index 2cd2fadfe0dc..2230aea3ac95 100644 --- a/sdk/synapse/ci.yml +++ b/sdk/synapse/ci.yml @@ -39,5 +39,9 @@ stages: ServiceDirectory: synapse ArtifactName: packages Artifacts: - - name: Microsoft.Azure.Synapse - safeName: MicrosoftAzureSynapse \ No newline at end of file + - name: Azure.Analytics.Synapse.Spark + safeName: AzureAnalyticsSynapseSpark + - name: Azure.Analytics.Synapse.AccessControl + safeName: AzureAnalyticsSynapseAccessControl + - name: Azure.Analytics.Synapse.Artifacts + safeName: AzureAnalyticsSynapseArtifacts \ No newline at end of file