diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/CodeContainersOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/CodeContainersOperations.cs deleted file mode 100644 index b6c615fad0c8a..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/CodeContainersOperations.cs +++ /dev/null @@ -1,265 +0,0 @@ -// 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; -using Azure.ResourceManager.MachineLearningServices.Models; - -namespace Azure.ResourceManager.MachineLearningServices -{ - /// The CodeContainers service client. - public partial class CodeContainersOperations - { - private readonly ClientDiagnostics _clientDiagnostics; - private readonly HttpPipeline _pipeline; - internal CodeContainersRestOperations RestClient { get; } - - /// Initializes a new instance of CodeContainersOperations for mocking. - protected CodeContainersOperations() - { - } - - /// Initializes a new instance of CodeContainersOperations. - /// The handler for diagnostic messaging in the client. - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// Azure subscription identifier. - /// server parameter. - /// Api Version. - internal CodeContainersOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2020-09-01-preview") - { - RestClient = new CodeContainersRestOperations(clientDiagnostics, pipeline, subscriptionId, endpoint, apiVersion); - _clientDiagnostics = clientDiagnostics; - _pipeline = pipeline; - } - - /// Create or update container. - /// Container name. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Container entity to create or update. - /// The cancellation token to use. - public virtual async Task> CreateOrUpdateAsync(string name, string resourceGroupName, string workspaceName, CodeContainerResource body = null, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("CodeContainersOperations.CreateOrUpdate"); - scope.Start(); - try - { - return await RestClient.CreateOrUpdateAsync(name, resourceGroupName, workspaceName, body, cancellationToken).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Create or update container. - /// Container name. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Container entity to create or update. - /// The cancellation token to use. - public virtual Response CreateOrUpdate(string name, string resourceGroupName, string workspaceName, CodeContainerResource body = null, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("CodeContainersOperations.CreateOrUpdate"); - scope.Start(); - try - { - return RestClient.CreateOrUpdate(name, resourceGroupName, workspaceName, body, cancellationToken); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Get container. - /// Container name. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - public virtual async Task> GetAsync(string name, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("CodeContainersOperations.Get"); - scope.Start(); - try - { - return await RestClient.GetAsync(name, resourceGroupName, workspaceName, cancellationToken).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Get container. - /// Container name. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - public virtual Response Get(string name, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("CodeContainersOperations.Get"); - scope.Start(); - try - { - return RestClient.Get(name, resourceGroupName, workspaceName, cancellationToken); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Delete container. - /// Container name. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - public virtual async Task DeleteAsync(string name, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("CodeContainersOperations.Delete"); - scope.Start(); - try - { - return await RestClient.DeleteAsync(name, resourceGroupName, workspaceName, cancellationToken).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Delete container. - /// Container name. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - public virtual Response Delete(string name, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("CodeContainersOperations.Delete"); - scope.Start(); - try - { - return RestClient.Delete(name, resourceGroupName, workspaceName, cancellationToken); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// List containers. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Continuation token for pagination. - /// The cancellation token to use. - /// or is null. - public virtual AsyncPageable ListAsync(string resourceGroupName, string workspaceName, string skiptoken = null, CancellationToken cancellationToken = default) - { - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - async Task> FirstPageFunc(int? pageSizeHint) - { - using var scope = _clientDiagnostics.CreateScope("CodeContainersOperations.List"); - scope.Start(); - try - { - var response = await RestClient.ListAsync(resourceGroupName, workspaceName, skiptoken, 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("CodeContainersOperations.List"); - scope.Start(); - try - { - var response = await RestClient.ListNextPageAsync(nextLink, resourceGroupName, workspaceName, skiptoken, 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 containers. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Continuation token for pagination. - /// The cancellation token to use. - /// or is null. - public virtual Pageable List(string resourceGroupName, string workspaceName, string skiptoken = null, CancellationToken cancellationToken = default) - { - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - Page FirstPageFunc(int? pageSizeHint) - { - using var scope = _clientDiagnostics.CreateScope("CodeContainersOperations.List"); - scope.Start(); - try - { - var response = RestClient.List(resourceGroupName, workspaceName, skiptoken, 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("CodeContainersOperations.List"); - scope.Start(); - try - { - var response = RestClient.ListNextPage(nextLink, resourceGroupName, workspaceName, skiptoken, 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/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/CodeContainersRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/CodeContainersRestOperations.cs deleted file mode 100644 index 1a60eb58e45de..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/CodeContainersRestOperations.cs +++ /dev/null @@ -1,520 +0,0 @@ -// 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.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager.MachineLearningServices.Models; - -namespace Azure.ResourceManager.MachineLearningServices -{ - internal partial class CodeContainersRestOperations - { - private string subscriptionId; - private Uri endpoint; - private string apiVersion; - private ClientDiagnostics _clientDiagnostics; - private HttpPipeline _pipeline; - - /// Initializes a new instance of CodeContainersRestOperations. - /// The handler for diagnostic messaging in the client. - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// Azure subscription identifier. - /// server parameter. - /// Api Version. - /// or is null. - public CodeContainersRestOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2020-09-01-preview") - { - if (subscriptionId == null) - { - throw new ArgumentNullException(nameof(subscriptionId)); - } - endpoint ??= new Uri("https://management.azure.com"); - if (apiVersion == null) - { - throw new ArgumentNullException(nameof(apiVersion)); - } - - this.subscriptionId = subscriptionId; - this.endpoint = endpoint; - this.apiVersion = apiVersion; - _clientDiagnostics = clientDiagnostics; - _pipeline = pipeline; - } - - internal HttpMessage CreateCreateOrUpdateRequest(string name, string resourceGroupName, string workspaceName, CodeContainerResource body) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Put; - var uri = new RawRequestUriBuilder(); - uri.Reset(endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/codes/", false); - uri.AppendPath(name, true); - uri.AppendQuery("api-version", apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - if (body != null) - { - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(body); - request.Content = content; - } - return message; - } - - /// Create or update container. - /// Container name. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Container entity to create or update. - /// The cancellation token to use. - /// , , or is null. - public async Task> CreateOrUpdateAsync(string name, string resourceGroupName, string workspaceName, CodeContainerResource body = null, CancellationToken cancellationToken = default) - { - if (name == null) - { - throw new ArgumentNullException(nameof(name)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateCreateOrUpdateRequest(name, resourceGroupName, workspaceName, body); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 201: - { - CodeContainerResource value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = CodeContainerResource.DeserializeCodeContainerResource(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); - } - } - - /// Create or update container. - /// Container name. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Container entity to create or update. - /// The cancellation token to use. - /// , , or is null. - public Response CreateOrUpdate(string name, string resourceGroupName, string workspaceName, CodeContainerResource body = null, CancellationToken cancellationToken = default) - { - if (name == null) - { - throw new ArgumentNullException(nameof(name)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateCreateOrUpdateRequest(name, resourceGroupName, workspaceName, body); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 201: - { - CodeContainerResource value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = CodeContainerResource.DeserializeCodeContainerResource(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw _clientDiagnostics.CreateRequestFailedException(message.Response); - } - } - - internal HttpMessage CreateGetRequest(string name, string resourceGroupName, string workspaceName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/codes/", false); - uri.AppendPath(name, true); - uri.AppendQuery("api-version", apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - /// Get container. - /// Container name. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - /// , , or is null. - public async Task> GetAsync(string name, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - if (name == null) - { - throw new ArgumentNullException(nameof(name)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateGetRequest(name, resourceGroupName, workspaceName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - CodeContainerResource value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = CodeContainerResource.DeserializeCodeContainerResource(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); - } - } - - /// Get container. - /// Container name. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - /// , , or is null. - public Response Get(string name, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - if (name == null) - { - throw new ArgumentNullException(nameof(name)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateGetRequest(name, resourceGroupName, workspaceName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - CodeContainerResource value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = CodeContainerResource.DeserializeCodeContainerResource(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw _clientDiagnostics.CreateRequestFailedException(message.Response); - } - } - - internal HttpMessage CreateDeleteRequest(string name, string resourceGroupName, string workspaceName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Delete; - var uri = new RawRequestUriBuilder(); - uri.Reset(endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/codes/", false); - uri.AppendPath(name, true); - uri.AppendQuery("api-version", apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - /// Delete container. - /// Container name. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - /// , , or is null. - public async Task DeleteAsync(string name, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - if (name == null) - { - throw new ArgumentNullException(nameof(name)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateDeleteRequest(name, resourceGroupName, workspaceName); - 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 container. - /// Container name. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - /// , , or is null. - public Response Delete(string name, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - if (name == null) - { - throw new ArgumentNullException(nameof(name)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateDeleteRequest(name, resourceGroupName, workspaceName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 204: - return message.Response; - default: - throw _clientDiagnostics.CreateRequestFailedException(message.Response); - } - } - - internal HttpMessage CreateListRequest(string resourceGroupName, string workspaceName, string skiptoken) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/codes", false); - uri.AppendQuery("api-version", apiVersion, true); - if (skiptoken != null) - { - uri.AppendQuery("$skiptoken", skiptoken, true); - } - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - /// List containers. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Continuation token for pagination. - /// The cancellation token to use. - /// or is null. - public async Task> ListAsync(string resourceGroupName, string workspaceName, string skiptoken = null, CancellationToken cancellationToken = default) - { - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateListRequest(resourceGroupName, workspaceName, skiptoken); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - CodeContainerResourceArmPaginatedResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = CodeContainerResourceArmPaginatedResult.DeserializeCodeContainerResourceArmPaginatedResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); - } - } - - /// List containers. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Continuation token for pagination. - /// The cancellation token to use. - /// or is null. - public Response List(string resourceGroupName, string workspaceName, string skiptoken = null, CancellationToken cancellationToken = default) - { - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateListRequest(resourceGroupName, workspaceName, skiptoken); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - CodeContainerResourceArmPaginatedResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = CodeContainerResourceArmPaginatedResult.DeserializeCodeContainerResourceArmPaginatedResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw _clientDiagnostics.CreateRequestFailedException(message.Response); - } - } - - internal HttpMessage CreateListNextPageRequest(string nextLink, string resourceGroupName, string workspaceName, string skiptoken) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(endpoint); - uri.AppendRawNextLink(nextLink, false); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - /// List containers. - /// The URL to the next page of results. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Continuation token for pagination. - /// The cancellation token to use. - /// , , or is null. - public async Task> ListNextPageAsync(string nextLink, string resourceGroupName, string workspaceName, string skiptoken = null, CancellationToken cancellationToken = default) - { - if (nextLink == null) - { - throw new ArgumentNullException(nameof(nextLink)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateListNextPageRequest(nextLink, resourceGroupName, workspaceName, skiptoken); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - CodeContainerResourceArmPaginatedResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = CodeContainerResourceArmPaginatedResult.DeserializeCodeContainerResourceArmPaginatedResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); - } - } - - /// List containers. - /// The URL to the next page of results. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Continuation token for pagination. - /// The cancellation token to use. - /// , , or is null. - public Response ListNextPage(string nextLink, string resourceGroupName, string workspaceName, string skiptoken = null, CancellationToken cancellationToken = default) - { - if (nextLink == null) - { - throw new ArgumentNullException(nameof(nextLink)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateListNextPageRequest(nextLink, resourceGroupName, workspaceName, skiptoken); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - CodeContainerResourceArmPaginatedResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = CodeContainerResourceArmPaginatedResult.DeserializeCodeContainerResourceArmPaginatedResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw _clientDiagnostics.CreateRequestFailedException(message.Response); - } - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/CodeVersionsOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/CodeVersionsOperations.cs deleted file mode 100644 index 6341a3a2eb29e..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/CodeVersionsOperations.cs +++ /dev/null @@ -1,281 +0,0 @@ -// 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; -using Azure.ResourceManager.MachineLearningServices.Models; - -namespace Azure.ResourceManager.MachineLearningServices -{ - /// The CodeVersions service client. - public partial class CodeVersionsOperations - { - private readonly ClientDiagnostics _clientDiagnostics; - private readonly HttpPipeline _pipeline; - internal CodeVersionsRestOperations RestClient { get; } - - /// Initializes a new instance of CodeVersionsOperations for mocking. - protected CodeVersionsOperations() - { - } - - /// Initializes a new instance of CodeVersionsOperations. - /// The handler for diagnostic messaging in the client. - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// Azure subscription identifier. - /// server parameter. - /// Api Version. - internal CodeVersionsOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2020-09-01-preview") - { - RestClient = new CodeVersionsRestOperations(clientDiagnostics, pipeline, subscriptionId, endpoint, apiVersion); - _clientDiagnostics = clientDiagnostics; - _pipeline = pipeline; - } - - /// Create or update version. - /// Container name. - /// Version identifier. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Version entity to create or update. - /// The cancellation token to use. - public virtual async Task> CreateOrUpdateAsync(string name, string version, string resourceGroupName, string workspaceName, CodeVersionResource body = null, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("CodeVersionsOperations.CreateOrUpdate"); - scope.Start(); - try - { - return await RestClient.CreateOrUpdateAsync(name, version, resourceGroupName, workspaceName, body, cancellationToken).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Create or update version. - /// Container name. - /// Version identifier. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Version entity to create or update. - /// The cancellation token to use. - public virtual Response CreateOrUpdate(string name, string version, string resourceGroupName, string workspaceName, CodeVersionResource body = null, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("CodeVersionsOperations.CreateOrUpdate"); - scope.Start(); - try - { - return RestClient.CreateOrUpdate(name, version, resourceGroupName, workspaceName, body, cancellationToken); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Get version. - /// Container name. - /// Version identifier. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - public virtual async Task> GetAsync(string name, string version, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("CodeVersionsOperations.Get"); - scope.Start(); - try - { - return await RestClient.GetAsync(name, version, resourceGroupName, workspaceName, cancellationToken).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Get version. - /// Container name. - /// Version identifier. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - public virtual Response Get(string name, string version, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("CodeVersionsOperations.Get"); - scope.Start(); - try - { - return RestClient.Get(name, version, resourceGroupName, workspaceName, cancellationToken); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Delete version. - /// Container name. - /// Version identifier. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - public virtual async Task DeleteAsync(string name, string version, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("CodeVersionsOperations.Delete"); - scope.Start(); - try - { - return await RestClient.DeleteAsync(name, version, resourceGroupName, workspaceName, cancellationToken).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Delete version. - /// Container name. - /// Version identifier. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - public virtual Response Delete(string name, string version, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("CodeVersionsOperations.Delete"); - scope.Start(); - try - { - return RestClient.Delete(name, version, resourceGroupName, workspaceName, cancellationToken); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// List versions. - /// Container name. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Continuation token for pagination. - /// The cancellation token to use. - /// , , or is null. - public virtual AsyncPageable ListAsync(string name, string resourceGroupName, string workspaceName, string skiptoken = null, CancellationToken cancellationToken = default) - { - if (name == null) - { - throw new ArgumentNullException(nameof(name)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - async Task> FirstPageFunc(int? pageSizeHint) - { - using var scope = _clientDiagnostics.CreateScope("CodeVersionsOperations.List"); - scope.Start(); - try - { - var response = await RestClient.ListAsync(name, resourceGroupName, workspaceName, skiptoken, 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("CodeVersionsOperations.List"); - scope.Start(); - try - { - var response = await RestClient.ListNextPageAsync(nextLink, name, resourceGroupName, workspaceName, skiptoken, 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 versions. - /// Container name. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Continuation token for pagination. - /// The cancellation token to use. - /// , , or is null. - public virtual Pageable List(string name, string resourceGroupName, string workspaceName, string skiptoken = null, CancellationToken cancellationToken = default) - { - if (name == null) - { - throw new ArgumentNullException(nameof(name)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - Page FirstPageFunc(int? pageSizeHint) - { - using var scope = _clientDiagnostics.CreateScope("CodeVersionsOperations.List"); - scope.Start(); - try - { - var response = RestClient.List(name, resourceGroupName, workspaceName, skiptoken, 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("CodeVersionsOperations.List"); - scope.Start(); - try - { - var response = RestClient.ListNextPage(nextLink, name, resourceGroupName, workspaceName, skiptoken, 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/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/CodeVersionsRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/CodeVersionsRestOperations.cs deleted file mode 100644 index 625f76955ad78..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/CodeVersionsRestOperations.cs +++ /dev/null @@ -1,578 +0,0 @@ -// 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.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager.MachineLearningServices.Models; - -namespace Azure.ResourceManager.MachineLearningServices -{ - internal partial class CodeVersionsRestOperations - { - private string subscriptionId; - private Uri endpoint; - private string apiVersion; - private ClientDiagnostics _clientDiagnostics; - private HttpPipeline _pipeline; - - /// Initializes a new instance of CodeVersionsRestOperations. - /// The handler for diagnostic messaging in the client. - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// Azure subscription identifier. - /// server parameter. - /// Api Version. - /// or is null. - public CodeVersionsRestOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2020-09-01-preview") - { - if (subscriptionId == null) - { - throw new ArgumentNullException(nameof(subscriptionId)); - } - endpoint ??= new Uri("https://management.azure.com"); - if (apiVersion == null) - { - throw new ArgumentNullException(nameof(apiVersion)); - } - - this.subscriptionId = subscriptionId; - this.endpoint = endpoint; - this.apiVersion = apiVersion; - _clientDiagnostics = clientDiagnostics; - _pipeline = pipeline; - } - - internal HttpMessage CreateCreateOrUpdateRequest(string name, string version, string resourceGroupName, string workspaceName, CodeVersionResource body) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Put; - var uri = new RawRequestUriBuilder(); - uri.Reset(endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/codes/", false); - uri.AppendPath(name, true); - uri.AppendPath("/versions/", false); - uri.AppendPath(version, true); - uri.AppendQuery("api-version", apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - if (body != null) - { - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(body); - request.Content = content; - } - return message; - } - - /// Create or update version. - /// Container name. - /// Version identifier. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Version entity to create or update. - /// The cancellation token to use. - /// , , , or is null. - public async Task> CreateOrUpdateAsync(string name, string version, string resourceGroupName, string workspaceName, CodeVersionResource body = null, CancellationToken cancellationToken = default) - { - if (name == null) - { - throw new ArgumentNullException(nameof(name)); - } - if (version == null) - { - throw new ArgumentNullException(nameof(version)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateCreateOrUpdateRequest(name, version, resourceGroupName, workspaceName, body); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 201: - { - CodeVersionResource value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = CodeVersionResource.DeserializeCodeVersionResource(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); - } - } - - /// Create or update version. - /// Container name. - /// Version identifier. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Version entity to create or update. - /// The cancellation token to use. - /// , , , or is null. - public Response CreateOrUpdate(string name, string version, string resourceGroupName, string workspaceName, CodeVersionResource body = null, CancellationToken cancellationToken = default) - { - if (name == null) - { - throw new ArgumentNullException(nameof(name)); - } - if (version == null) - { - throw new ArgumentNullException(nameof(version)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateCreateOrUpdateRequest(name, version, resourceGroupName, workspaceName, body); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 201: - { - CodeVersionResource value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = CodeVersionResource.DeserializeCodeVersionResource(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw _clientDiagnostics.CreateRequestFailedException(message.Response); - } - } - - internal HttpMessage CreateGetRequest(string name, string version, string resourceGroupName, string workspaceName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/codes/", false); - uri.AppendPath(name, true); - uri.AppendPath("/versions/", false); - uri.AppendPath(version, true); - uri.AppendQuery("api-version", apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - /// Get version. - /// Container name. - /// Version identifier. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - /// , , , or is null. - public async Task> GetAsync(string name, string version, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - if (name == null) - { - throw new ArgumentNullException(nameof(name)); - } - if (version == null) - { - throw new ArgumentNullException(nameof(version)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateGetRequest(name, version, resourceGroupName, workspaceName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - CodeVersionResource value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = CodeVersionResource.DeserializeCodeVersionResource(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); - } - } - - /// Get version. - /// Container name. - /// Version identifier. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - /// , , , or is null. - public Response Get(string name, string version, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - if (name == null) - { - throw new ArgumentNullException(nameof(name)); - } - if (version == null) - { - throw new ArgumentNullException(nameof(version)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateGetRequest(name, version, resourceGroupName, workspaceName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - CodeVersionResource value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = CodeVersionResource.DeserializeCodeVersionResource(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw _clientDiagnostics.CreateRequestFailedException(message.Response); - } - } - - internal HttpMessage CreateDeleteRequest(string name, string version, string resourceGroupName, string workspaceName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Delete; - var uri = new RawRequestUriBuilder(); - uri.Reset(endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/codes/", false); - uri.AppendPath(name, true); - uri.AppendPath("/versions/", false); - uri.AppendPath(version, true); - uri.AppendQuery("api-version", apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - /// Delete version. - /// Container name. - /// Version identifier. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - /// , , , or is null. - public async Task DeleteAsync(string name, string version, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - if (name == null) - { - throw new ArgumentNullException(nameof(name)); - } - if (version == null) - { - throw new ArgumentNullException(nameof(version)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateDeleteRequest(name, version, resourceGroupName, workspaceName); - 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 version. - /// Container name. - /// Version identifier. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - /// , , , or is null. - public Response Delete(string name, string version, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - if (name == null) - { - throw new ArgumentNullException(nameof(name)); - } - if (version == null) - { - throw new ArgumentNullException(nameof(version)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateDeleteRequest(name, version, resourceGroupName, workspaceName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 204: - return message.Response; - default: - throw _clientDiagnostics.CreateRequestFailedException(message.Response); - } - } - - internal HttpMessage CreateListRequest(string name, string resourceGroupName, string workspaceName, string skiptoken) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/codes/", false); - uri.AppendPath(name, true); - uri.AppendPath("/versions", false); - uri.AppendQuery("api-version", apiVersion, true); - if (skiptoken != null) - { - uri.AppendQuery("$skiptoken", skiptoken, true); - } - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - /// List versions. - /// Container name. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Continuation token for pagination. - /// The cancellation token to use. - /// , , or is null. - public async Task> ListAsync(string name, string resourceGroupName, string workspaceName, string skiptoken = null, CancellationToken cancellationToken = default) - { - if (name == null) - { - throw new ArgumentNullException(nameof(name)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateListRequest(name, resourceGroupName, workspaceName, skiptoken); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - CodeVersionResourceArmPaginatedResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = CodeVersionResourceArmPaginatedResult.DeserializeCodeVersionResourceArmPaginatedResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); - } - } - - /// List versions. - /// Container name. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Continuation token for pagination. - /// The cancellation token to use. - /// , , or is null. - public Response List(string name, string resourceGroupName, string workspaceName, string skiptoken = null, CancellationToken cancellationToken = default) - { - if (name == null) - { - throw new ArgumentNullException(nameof(name)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateListRequest(name, resourceGroupName, workspaceName, skiptoken); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - CodeVersionResourceArmPaginatedResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = CodeVersionResourceArmPaginatedResult.DeserializeCodeVersionResourceArmPaginatedResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw _clientDiagnostics.CreateRequestFailedException(message.Response); - } - } - - internal HttpMessage CreateListNextPageRequest(string nextLink, string name, string resourceGroupName, string workspaceName, string skiptoken) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(endpoint); - uri.AppendRawNextLink(nextLink, false); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - /// List versions. - /// The URL to the next page of results. - /// Container name. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Continuation token for pagination. - /// The cancellation token to use. - /// , , , or is null. - public async Task> ListNextPageAsync(string nextLink, string name, string resourceGroupName, string workspaceName, string skiptoken = null, CancellationToken cancellationToken = default) - { - if (nextLink == null) - { - throw new ArgumentNullException(nameof(nextLink)); - } - if (name == null) - { - throw new ArgumentNullException(nameof(name)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateListNextPageRequest(nextLink, name, resourceGroupName, workspaceName, skiptoken); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - CodeVersionResourceArmPaginatedResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = CodeVersionResourceArmPaginatedResult.DeserializeCodeVersionResourceArmPaginatedResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); - } - } - - /// List versions. - /// The URL to the next page of results. - /// Container name. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Continuation token for pagination. - /// The cancellation token to use. - /// , , , or is null. - public Response ListNextPage(string nextLink, string name, string resourceGroupName, string workspaceName, string skiptoken = null, CancellationToken cancellationToken = default) - { - if (nextLink == null) - { - throw new ArgumentNullException(nameof(nextLink)); - } - if (name == null) - { - throw new ArgumentNullException(nameof(name)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateListNextPageRequest(nextLink, name, resourceGroupName, workspaceName, skiptoken); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - CodeVersionResourceArmPaginatedResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = CodeVersionResourceArmPaginatedResult.DeserializeCodeVersionResourceArmPaginatedResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw _clientDiagnostics.CreateRequestFailedException(message.Response); - } - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/MachineLearningComputeCreateOrUpdateHeaders.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/ComputeCreateOrUpdateHeaders.cs similarity index 78% rename from sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/MachineLearningComputeCreateOrUpdateHeaders.cs rename to sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/ComputeCreateOrUpdateHeaders.cs index cfbc8056b9c67..b25b76e5524ed 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/MachineLearningComputeCreateOrUpdateHeaders.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/ComputeCreateOrUpdateHeaders.cs @@ -10,10 +10,10 @@ namespace Azure.ResourceManager.MachineLearningServices { - internal partial class MachineLearningComputeCreateOrUpdateHeaders + internal partial class ComputeCreateOrUpdateHeaders { private readonly Response _response; - public MachineLearningComputeCreateOrUpdateHeaders(Response response) + public ComputeCreateOrUpdateHeaders(Response response) { _response = response; } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/MachineLearningComputeCreateOrUpdateOperation.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/ComputeCreateOrUpdateOperation.cs similarity index 83% rename from sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/MachineLearningComputeCreateOrUpdateOperation.cs rename to sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/ComputeCreateOrUpdateOperation.cs index 0287ac30fddad..7bdfbfa5be5b4 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/MachineLearningComputeCreateOrUpdateOperation.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/ComputeCreateOrUpdateOperation.cs @@ -17,18 +17,18 @@ namespace Azure.ResourceManager.MachineLearningServices { /// Creates or updates compute. This call will overwrite a compute if it exists. This is a nonrecoverable operation. If your intent is to create a new compute, do a GET first to verify that it does not exist yet. - public partial class MachineLearningComputeCreateOrUpdateOperation : Operation, IOperationSource + public partial class ComputeCreateOrUpdateOperation : Operation, IOperationSource { private readonly ArmOperationHelpers _operation; - /// Initializes a new instance of MachineLearningComputeCreateOrUpdateOperation for mocking. - protected MachineLearningComputeCreateOrUpdateOperation() + /// Initializes a new instance of ComputeCreateOrUpdateOperation for mocking. + protected ComputeCreateOrUpdateOperation() { } - internal MachineLearningComputeCreateOrUpdateOperation(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Request request, Response response) + internal ComputeCreateOrUpdateOperation(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Request request, Response response) { - _operation = new ArmOperationHelpers(this, clientDiagnostics, pipeline, request, response, OperationFinalStateVia.Location, "MachineLearningComputeCreateOrUpdateOperation"); + _operation = new ArmOperationHelpers(this, clientDiagnostics, pipeline, request, response, OperationFinalStateVia.Location, "ComputeCreateOrUpdateOperation"); } /// public override string Id => _operation.Id; diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/MachineLearningComputeDeleteHeaders.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/ComputeDeleteHeaders.cs similarity index 84% rename from sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/MachineLearningComputeDeleteHeaders.cs rename to sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/ComputeDeleteHeaders.cs index dbbeae529358c..898cfa9955f34 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/MachineLearningComputeDeleteHeaders.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/ComputeDeleteHeaders.cs @@ -10,10 +10,10 @@ namespace Azure.ResourceManager.MachineLearningServices { - internal partial class MachineLearningComputeDeleteHeaders + internal partial class ComputeDeleteHeaders { private readonly Response _response; - public MachineLearningComputeDeleteHeaders(Response response) + public ComputeDeleteHeaders(Response response) { _response = response; } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/MachineLearningComputeDeleteOperation.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/ComputeDeleteOperation.cs similarity index 82% rename from sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/MachineLearningComputeDeleteOperation.cs rename to sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/ComputeDeleteOperation.cs index ddec2d35ab8e2..c6ad67e332f80 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/MachineLearningComputeDeleteOperation.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/ComputeDeleteOperation.cs @@ -15,18 +15,18 @@ namespace Azure.ResourceManager.MachineLearningServices { /// Deletes specified Machine Learning compute. - public partial class MachineLearningComputeDeleteOperation : Operation, IOperationSource + public partial class ComputeDeleteOperation : Operation, IOperationSource { private readonly ArmOperationHelpers _operation; - /// Initializes a new instance of MachineLearningComputeDeleteOperation for mocking. - protected MachineLearningComputeDeleteOperation() + /// Initializes a new instance of ComputeDeleteOperation for mocking. + protected ComputeDeleteOperation() { } - internal MachineLearningComputeDeleteOperation(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Request request, Response response) + internal ComputeDeleteOperation(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Request request, Response response) { - _operation = new ArmOperationHelpers(this, clientDiagnostics, pipeline, request, response, OperationFinalStateVia.Location, "MachineLearningComputeDeleteOperation"); + _operation = new ArmOperationHelpers(this, clientDiagnostics, pipeline, request, response, OperationFinalStateVia.Location, "ComputeDeleteOperation"); } /// public override string Id => _operation.Id; diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/MachineLearningComputeOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/ComputeOperations.cs similarity index 54% rename from sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/MachineLearningComputeOperations.cs rename to sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/ComputeOperations.cs index 93b2565798131..54be8ef55616c 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/MachineLearningComputeOperations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/ComputeOperations.cs @@ -15,39 +15,39 @@ namespace Azure.ResourceManager.MachineLearningServices { - /// The MachineLearningCompute service client. - public partial class MachineLearningComputeOperations + /// The Compute service client. + public partial class ComputeOperations { private readonly ClientDiagnostics _clientDiagnostics; private readonly HttpPipeline _pipeline; - internal MachineLearningComputeRestOperations RestClient { get; } + internal ComputeRestOperations RestClient { get; } - /// Initializes a new instance of MachineLearningComputeOperations for mocking. - protected MachineLearningComputeOperations() + /// Initializes a new instance of ComputeOperations for mocking. + protected ComputeOperations() { } - /// Initializes a new instance of MachineLearningComputeOperations. + /// Initializes a new instance of ComputeOperations. /// The handler for diagnostic messaging in the client. /// The HTTP pipeline for sending and receiving REST requests and responses. - /// Azure subscription identifier. + /// The ID of the target subscription. /// server parameter. /// Api Version. - internal MachineLearningComputeOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2020-09-01-preview") + internal ComputeOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2021-07-01") { - RestClient = new MachineLearningComputeRestOperations(clientDiagnostics, pipeline, subscriptionId, endpoint, apiVersion); + RestClient = new ComputeRestOperations(clientDiagnostics, pipeline, subscriptionId, endpoint, apiVersion); _clientDiagnostics = clientDiagnostics; _pipeline = pipeline; } /// Gets compute definition by its name. Any secrets (storage keys, service credentials, etc) are not returned - use 'keys' nested resource to get them. - /// Name of the resource group in which workspace is located. + /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. /// Name of the Azure Machine Learning compute. /// The cancellation token to use. public virtual async Task> GetAsync(string resourceGroupName, string workspaceName, string computeName, CancellationToken cancellationToken = default) { - using var scope = _clientDiagnostics.CreateScope("MachineLearningComputeOperations.Get"); + using var scope = _clientDiagnostics.CreateScope("ComputeOperations.Get"); scope.Start(); try { @@ -61,13 +61,13 @@ public virtual async Task> GetAsync(string resourceGro } /// Gets compute definition by its name. Any secrets (storage keys, service credentials, etc) are not returned - use 'keys' nested resource to get them. - /// Name of the resource group in which workspace is located. + /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. /// Name of the Azure Machine Learning compute. /// The cancellation token to use. public virtual Response Get(string resourceGroupName, string workspaceName, string computeName, CancellationToken cancellationToken = default) { - using var scope = _clientDiagnostics.CreateScope("MachineLearningComputeOperations.Get"); + using var scope = _clientDiagnostics.CreateScope("ComputeOperations.Get"); scope.Start(); try { @@ -80,54 +80,14 @@ public virtual Response Get(string resourceGroupName, string wo } } - /// Get the details (e.g IP address, port etc) of all the compute nodes in the compute. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Name of the Azure Machine Learning compute. - /// The cancellation token to use. - public virtual async Task> ListNodesAsync(string resourceGroupName, string workspaceName, string computeName, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("MachineLearningComputeOperations.ListNodes"); - scope.Start(); - try - { - return await RestClient.ListNodesAsync(resourceGroupName, workspaceName, computeName, cancellationToken).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Get the details (e.g IP address, port etc) of all the compute nodes in the compute. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Name of the Azure Machine Learning compute. - /// The cancellation token to use. - public virtual Response ListNodes(string resourceGroupName, string workspaceName, string computeName, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("MachineLearningComputeOperations.ListNodes"); - scope.Start(); - try - { - return RestClient.ListNodes(resourceGroupName, workspaceName, computeName, cancellationToken); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - /// Gets secrets related to Machine Learning compute (storage keys, service credentials, etc). - /// Name of the resource group in which workspace is located. + /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. /// Name of the Azure Machine Learning compute. /// The cancellation token to use. public virtual async Task> ListKeysAsync(string resourceGroupName, string workspaceName, string computeName, CancellationToken cancellationToken = default) { - using var scope = _clientDiagnostics.CreateScope("MachineLearningComputeOperations.ListKeys"); + using var scope = _clientDiagnostics.CreateScope("ComputeOperations.ListKeys"); scope.Start(); try { @@ -141,13 +101,13 @@ public virtual async Task> ListKeysAsync(string resourc } /// Gets secrets related to Machine Learning compute (storage keys, service credentials, etc). - /// Name of the resource group in which workspace is located. + /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. /// Name of the Azure Machine Learning compute. /// The cancellation token to use. public virtual Response ListKeys(string resourceGroupName, string workspaceName, string computeName, CancellationToken cancellationToken = default) { - using var scope = _clientDiagnostics.CreateScope("MachineLearningComputeOperations.ListKeys"); + using var scope = _clientDiagnostics.CreateScope("ComputeOperations.ListKeys"); scope.Start(); try { @@ -160,133 +120,113 @@ public virtual Response ListKeys(string resourceGroupName, strin } } - /// Posts a start action to a compute instance. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Name of the Azure Machine Learning compute. - /// The cancellation token to use. - public virtual async Task StartAsync(string resourceGroupName, string workspaceName, string computeName, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("MachineLearningComputeOperations.Start"); - scope.Start(); - try - { - return await RestClient.StartAsync(resourceGroupName, workspaceName, computeName, cancellationToken).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Posts a start action to a compute instance. - /// Name of the resource group in which workspace is located. + /// Gets computes in specified workspace. + /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. - /// Name of the Azure Machine Learning compute. + /// Continuation token for pagination. /// The cancellation token to use. - public virtual Response Start(string resourceGroupName, string workspaceName, string computeName, CancellationToken cancellationToken = default) + /// or is null. + public virtual AsyncPageable ListAsync(string resourceGroupName, string workspaceName, string skip = null, CancellationToken cancellationToken = default) { - using var scope = _clientDiagnostics.CreateScope("MachineLearningComputeOperations.Start"); - scope.Start(); - try + if (resourceGroupName == null) { - return RestClient.Start(resourceGroupName, workspaceName, computeName, cancellationToken); + throw new ArgumentNullException(nameof(resourceGroupName)); } - catch (Exception e) + if (workspaceName == null) { - scope.Failed(e); - throw; + throw new ArgumentNullException(nameof(workspaceName)); } - } - /// Posts a stop action to a compute instance. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Name of the Azure Machine Learning compute. - /// The cancellation token to use. - public virtual async Task StopAsync(string resourceGroupName, string workspaceName, string computeName, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("MachineLearningComputeOperations.Stop"); - scope.Start(); - try + async Task> FirstPageFunc(int? pageSizeHint) { - return await RestClient.StopAsync(resourceGroupName, workspaceName, computeName, cancellationToken).ConfigureAwait(false); + using var scope = _clientDiagnostics.CreateScope("ComputeOperations.List"); + scope.Start(); + try + { + var response = await RestClient.ListAsync(resourceGroupName, workspaceName, skip, cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } } - catch (Exception e) + async Task> NextPageFunc(string nextLink, int? pageSizeHint) { - scope.Failed(e); - throw; + using var scope = _clientDiagnostics.CreateScope("ComputeOperations.List"); + scope.Start(); + try + { + var response = await RestClient.ListNextPageAsync(nextLink, resourceGroupName, workspaceName, skip, 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); } - /// Posts a stop action to a compute instance. - /// Name of the resource group in which workspace is located. + /// Gets computes in specified workspace. + /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. - /// Name of the Azure Machine Learning compute. + /// Continuation token for pagination. /// The cancellation token to use. - public virtual Response Stop(string resourceGroupName, string workspaceName, string computeName, CancellationToken cancellationToken = default) + /// or is null. + public virtual Pageable List(string resourceGroupName, string workspaceName, string skip = null, CancellationToken cancellationToken = default) { - using var scope = _clientDiagnostics.CreateScope("MachineLearningComputeOperations.Stop"); - scope.Start(); - try + if (resourceGroupName == null) { - return RestClient.Stop(resourceGroupName, workspaceName, computeName, cancellationToken); + throw new ArgumentNullException(nameof(resourceGroupName)); } - catch (Exception e) + if (workspaceName == null) { - scope.Failed(e); - throw; + throw new ArgumentNullException(nameof(workspaceName)); } - } - /// Posts a restart action to a compute instance. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Name of the Azure Machine Learning compute. - /// The cancellation token to use. - public virtual async Task RestartAsync(string resourceGroupName, string workspaceName, string computeName, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("MachineLearningComputeOperations.Restart"); - scope.Start(); - try + Page FirstPageFunc(int? pageSizeHint) { - return await RestClient.RestartAsync(resourceGroupName, workspaceName, computeName, cancellationToken).ConfigureAwait(false); + using var scope = _clientDiagnostics.CreateScope("ComputeOperations.List"); + scope.Start(); + try + { + var response = RestClient.List(resourceGroupName, workspaceName, skip, cancellationToken); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } } - catch (Exception e) + Page NextPageFunc(string nextLink, int? pageSizeHint) { - scope.Failed(e); - throw; + using var scope = _clientDiagnostics.CreateScope("ComputeOperations.List"); + scope.Start(); + try + { + var response = RestClient.ListNextPage(nextLink, resourceGroupName, workspaceName, skip, cancellationToken); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } } + return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); } - /// Posts a restart action to a compute instance. - /// Name of the resource group in which workspace is located. + /// Get the details (e.g IP address, port etc) of all the compute nodes in the compute. + /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. /// Name of the Azure Machine Learning compute. /// The cancellation token to use. - public virtual Response Restart(string resourceGroupName, string workspaceName, string computeName, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("MachineLearningComputeOperations.Restart"); - scope.Start(); - try - { - return RestClient.Restart(resourceGroupName, workspaceName, computeName, cancellationToken); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Gets computes in specified workspace. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Continuation token for pagination. - /// The cancellation token to use. - /// or is null. - public virtual AsyncPageable ListByWorkspaceAsync(string resourceGroupName, string workspaceName, string skiptoken = null, CancellationToken cancellationToken = default) + /// , , or is null. + public virtual AsyncPageable ListNodesAsync(string resourceGroupName, string workspaceName, string computeName, CancellationToken cancellationToken = default) { if (resourceGroupName == null) { @@ -296,15 +236,19 @@ public virtual AsyncPageable ListByWorkspaceAsync(string resour { throw new ArgumentNullException(nameof(workspaceName)); } + if (computeName == null) + { + throw new ArgumentNullException(nameof(computeName)); + } - async Task> FirstPageFunc(int? pageSizeHint) + async Task> FirstPageFunc(int? pageSizeHint) { - using var scope = _clientDiagnostics.CreateScope("MachineLearningComputeOperations.ListByWorkspace"); + using var scope = _clientDiagnostics.CreateScope("ComputeOperations.ListNodes"); scope.Start(); try { - var response = await RestClient.ListByWorkspaceAsync(resourceGroupName, workspaceName, skiptoken, cancellationToken).ConfigureAwait(false); - return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + var response = await RestClient.ListNodesAsync(resourceGroupName, workspaceName, computeName, cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Nodes, response.Value.NextLink, response.GetRawResponse()); } catch (Exception e) { @@ -312,14 +256,14 @@ async Task> FirstPageFunc(int? pageSizeHint) throw; } } - async Task> NextPageFunc(string nextLink, int? pageSizeHint) + async Task> NextPageFunc(string nextLink, int? pageSizeHint) { - using var scope = _clientDiagnostics.CreateScope("MachineLearningComputeOperations.ListByWorkspace"); + using var scope = _clientDiagnostics.CreateScope("ComputeOperations.ListNodes"); scope.Start(); try { - var response = await RestClient.ListByWorkspaceNextPageAsync(nextLink, resourceGroupName, workspaceName, skiptoken, cancellationToken).ConfigureAwait(false); - return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + var response = await RestClient.ListNodesNextPageAsync(nextLink, resourceGroupName, workspaceName, computeName, cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Nodes, response.Value.NextLink, response.GetRawResponse()); } catch (Exception e) { @@ -330,13 +274,13 @@ async Task> NextPageFunc(string nextLink, int? pageSizeHin return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); } - /// Gets computes in specified workspace. - /// Name of the resource group in which workspace is located. + /// Get the details (e.g IP address, port etc) of all the compute nodes in the compute. + /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. - /// Continuation token for pagination. + /// Name of the Azure Machine Learning compute. /// The cancellation token to use. - /// or is null. - public virtual Pageable ListByWorkspace(string resourceGroupName, string workspaceName, string skiptoken = null, CancellationToken cancellationToken = default) + /// , , or is null. + public virtual Pageable ListNodes(string resourceGroupName, string workspaceName, string computeName, CancellationToken cancellationToken = default) { if (resourceGroupName == null) { @@ -346,15 +290,19 @@ public virtual Pageable ListByWorkspace(string resourceGroupNam { throw new ArgumentNullException(nameof(workspaceName)); } + if (computeName == null) + { + throw new ArgumentNullException(nameof(computeName)); + } - Page FirstPageFunc(int? pageSizeHint) + Page FirstPageFunc(int? pageSizeHint) { - using var scope = _clientDiagnostics.CreateScope("MachineLearningComputeOperations.ListByWorkspace"); + using var scope = _clientDiagnostics.CreateScope("ComputeOperations.ListNodes"); scope.Start(); try { - var response = RestClient.ListByWorkspace(resourceGroupName, workspaceName, skiptoken, cancellationToken); - return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + var response = RestClient.ListNodes(resourceGroupName, workspaceName, computeName, cancellationToken); + return Page.FromValues(response.Value.Nodes, response.Value.NextLink, response.GetRawResponse()); } catch (Exception e) { @@ -362,14 +310,14 @@ Page FirstPageFunc(int? pageSizeHint) throw; } } - Page NextPageFunc(string nextLink, int? pageSizeHint) + Page NextPageFunc(string nextLink, int? pageSizeHint) { - using var scope = _clientDiagnostics.CreateScope("MachineLearningComputeOperations.ListByWorkspace"); + using var scope = _clientDiagnostics.CreateScope("ComputeOperations.ListNodes"); scope.Start(); try { - var response = RestClient.ListByWorkspaceNextPage(nextLink, resourceGroupName, workspaceName, skiptoken, cancellationToken); - return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + var response = RestClient.ListNodesNextPage(nextLink, resourceGroupName, workspaceName, computeName, cancellationToken); + return Page.FromValues(response.Value.Nodes, response.Value.NextLink, response.GetRawResponse()); } catch (Exception e) { @@ -381,13 +329,13 @@ Page NextPageFunc(string nextLink, int? pageSizeHint) } /// Creates or updates compute. This call will overwrite a compute if it exists. This is a nonrecoverable operation. If your intent is to create a new compute, do a GET first to verify that it does not exist yet. - /// Name of the resource group in which workspace is located. + /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. /// Name of the Azure Machine Learning compute. /// Payload with Machine Learning compute definition. /// The cancellation token to use. /// , , , or is null. - public virtual async Task StartCreateOrUpdateAsync(string resourceGroupName, string workspaceName, string computeName, ComputeResource parameters, CancellationToken cancellationToken = default) + public virtual async Task StartCreateOrUpdateAsync(string resourceGroupName, string workspaceName, string computeName, ComputeResource parameters, CancellationToken cancellationToken = default) { if (resourceGroupName == null) { @@ -406,12 +354,12 @@ public virtual async Task StartCr throw new ArgumentNullException(nameof(parameters)); } - using var scope = _clientDiagnostics.CreateScope("MachineLearningComputeOperations.StartCreateOrUpdate"); + using var scope = _clientDiagnostics.CreateScope("ComputeOperations.StartCreateOrUpdate"); scope.Start(); try { var originalResponse = await RestClient.CreateOrUpdateAsync(resourceGroupName, workspaceName, computeName, parameters, cancellationToken).ConfigureAwait(false); - return new MachineLearningComputeCreateOrUpdateOperation(_clientDiagnostics, _pipeline, RestClient.CreateCreateOrUpdateRequest(resourceGroupName, workspaceName, computeName, parameters).Request, originalResponse); + return new ComputeCreateOrUpdateOperation(_clientDiagnostics, _pipeline, RestClient.CreateCreateOrUpdateRequest(resourceGroupName, workspaceName, computeName, parameters).Request, originalResponse); } catch (Exception e) { @@ -421,13 +369,13 @@ public virtual async Task StartCr } /// Creates or updates compute. This call will overwrite a compute if it exists. This is a nonrecoverable operation. If your intent is to create a new compute, do a GET first to verify that it does not exist yet. - /// Name of the resource group in which workspace is located. + /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. /// Name of the Azure Machine Learning compute. /// Payload with Machine Learning compute definition. /// The cancellation token to use. /// , , , or is null. - public virtual MachineLearningComputeCreateOrUpdateOperation StartCreateOrUpdate(string resourceGroupName, string workspaceName, string computeName, ComputeResource parameters, CancellationToken cancellationToken = default) + public virtual ComputeCreateOrUpdateOperation StartCreateOrUpdate(string resourceGroupName, string workspaceName, string computeName, ComputeResource parameters, CancellationToken cancellationToken = default) { if (resourceGroupName == null) { @@ -446,12 +394,12 @@ public virtual MachineLearningComputeCreateOrUpdateOperation StartCreateOrUpdate throw new ArgumentNullException(nameof(parameters)); } - using var scope = _clientDiagnostics.CreateScope("MachineLearningComputeOperations.StartCreateOrUpdate"); + using var scope = _clientDiagnostics.CreateScope("ComputeOperations.StartCreateOrUpdate"); scope.Start(); try { var originalResponse = RestClient.CreateOrUpdate(resourceGroupName, workspaceName, computeName, parameters, cancellationToken); - return new MachineLearningComputeCreateOrUpdateOperation(_clientDiagnostics, _pipeline, RestClient.CreateCreateOrUpdateRequest(resourceGroupName, workspaceName, computeName, parameters).Request, originalResponse); + return new ComputeCreateOrUpdateOperation(_clientDiagnostics, _pipeline, RestClient.CreateCreateOrUpdateRequest(resourceGroupName, workspaceName, computeName, parameters).Request, originalResponse); } catch (Exception e) { @@ -461,13 +409,13 @@ public virtual MachineLearningComputeCreateOrUpdateOperation StartCreateOrUpdate } /// Updates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable operation. - /// Name of the resource group in which workspace is located. + /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. /// Name of the Azure Machine Learning compute. /// Additional parameters for cluster update. /// The cancellation token to use. /// , , , or is null. - public virtual async Task StartUpdateAsync(string resourceGroupName, string workspaceName, string computeName, ClusterUpdateParameters parameters, CancellationToken cancellationToken = default) + public virtual async Task StartUpdateAsync(string resourceGroupName, string workspaceName, string computeName, ClusterUpdateParameters parameters, CancellationToken cancellationToken = default) { if (resourceGroupName == null) { @@ -486,12 +434,12 @@ public virtual async Task StartUpdateAsyn throw new ArgumentNullException(nameof(parameters)); } - using var scope = _clientDiagnostics.CreateScope("MachineLearningComputeOperations.StartUpdate"); + using var scope = _clientDiagnostics.CreateScope("ComputeOperations.StartUpdate"); scope.Start(); try { var originalResponse = await RestClient.UpdateAsync(resourceGroupName, workspaceName, computeName, parameters, cancellationToken).ConfigureAwait(false); - return new MachineLearningComputeUpdateOperation(_clientDiagnostics, _pipeline, RestClient.CreateUpdateRequest(resourceGroupName, workspaceName, computeName, parameters).Request, originalResponse); + return new ComputeUpdateOperation(_clientDiagnostics, _pipeline, RestClient.CreateUpdateRequest(resourceGroupName, workspaceName, computeName, parameters).Request, originalResponse); } catch (Exception e) { @@ -501,13 +449,13 @@ public virtual async Task StartUpdateAsyn } /// Updates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable operation. - /// Name of the resource group in which workspace is located. + /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. /// Name of the Azure Machine Learning compute. /// Additional parameters for cluster update. /// The cancellation token to use. /// , , , or is null. - public virtual MachineLearningComputeUpdateOperation StartUpdate(string resourceGroupName, string workspaceName, string computeName, ClusterUpdateParameters parameters, CancellationToken cancellationToken = default) + public virtual ComputeUpdateOperation StartUpdate(string resourceGroupName, string workspaceName, string computeName, ClusterUpdateParameters parameters, CancellationToken cancellationToken = default) { if (resourceGroupName == null) { @@ -526,12 +474,12 @@ public virtual MachineLearningComputeUpdateOperation StartUpdate(string resource throw new ArgumentNullException(nameof(parameters)); } - using var scope = _clientDiagnostics.CreateScope("MachineLearningComputeOperations.StartUpdate"); + using var scope = _clientDiagnostics.CreateScope("ComputeOperations.StartUpdate"); scope.Start(); try { var originalResponse = RestClient.Update(resourceGroupName, workspaceName, computeName, parameters, cancellationToken); - return new MachineLearningComputeUpdateOperation(_clientDiagnostics, _pipeline, RestClient.CreateUpdateRequest(resourceGroupName, workspaceName, computeName, parameters).Request, originalResponse); + return new ComputeUpdateOperation(_clientDiagnostics, _pipeline, RestClient.CreateUpdateRequest(resourceGroupName, workspaceName, computeName, parameters).Request, originalResponse); } catch (Exception e) { @@ -541,13 +489,13 @@ public virtual MachineLearningComputeUpdateOperation StartUpdate(string resource } /// Deletes specified Machine Learning compute. - /// Name of the resource group in which workspace is located. + /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. /// Name of the Azure Machine Learning compute. /// Delete the underlying compute if 'Delete', or detach the underlying compute from workspace if 'Detach'. /// The cancellation token to use. /// , , or is null. - public virtual async Task StartDeleteAsync(string resourceGroupName, string workspaceName, string computeName, UnderlyingResourceAction underlyingResourceAction, CancellationToken cancellationToken = default) + public virtual async Task StartDeleteAsync(string resourceGroupName, string workspaceName, string computeName, UnderlyingResourceAction underlyingResourceAction, CancellationToken cancellationToken = default) { if (resourceGroupName == null) { @@ -562,12 +510,12 @@ public virtual async Task StartDeleteAsyn throw new ArgumentNullException(nameof(computeName)); } - using var scope = _clientDiagnostics.CreateScope("MachineLearningComputeOperations.StartDelete"); + using var scope = _clientDiagnostics.CreateScope("ComputeOperations.StartDelete"); scope.Start(); try { var originalResponse = await RestClient.DeleteAsync(resourceGroupName, workspaceName, computeName, underlyingResourceAction, cancellationToken).ConfigureAwait(false); - return new MachineLearningComputeDeleteOperation(_clientDiagnostics, _pipeline, RestClient.CreateDeleteRequest(resourceGroupName, workspaceName, computeName, underlyingResourceAction).Request, originalResponse); + return new ComputeDeleteOperation(_clientDiagnostics, _pipeline, RestClient.CreateDeleteRequest(resourceGroupName, workspaceName, computeName, underlyingResourceAction).Request, originalResponse); } catch (Exception e) { @@ -577,13 +525,13 @@ public virtual async Task StartDeleteAsyn } /// Deletes specified Machine Learning compute. - /// Name of the resource group in which workspace is located. + /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. /// Name of the Azure Machine Learning compute. /// Delete the underlying compute if 'Delete', or detach the underlying compute from workspace if 'Detach'. /// The cancellation token to use. /// , , or is null. - public virtual MachineLearningComputeDeleteOperation StartDelete(string resourceGroupName, string workspaceName, string computeName, UnderlyingResourceAction underlyingResourceAction, CancellationToken cancellationToken = default) + public virtual ComputeDeleteOperation StartDelete(string resourceGroupName, string workspaceName, string computeName, UnderlyingResourceAction underlyingResourceAction, CancellationToken cancellationToken = default) { if (resourceGroupName == null) { @@ -598,12 +546,222 @@ public virtual MachineLearningComputeDeleteOperation StartDelete(string resource throw new ArgumentNullException(nameof(computeName)); } - using var scope = _clientDiagnostics.CreateScope("MachineLearningComputeOperations.StartDelete"); + using var scope = _clientDiagnostics.CreateScope("ComputeOperations.StartDelete"); scope.Start(); try { var originalResponse = RestClient.Delete(resourceGroupName, workspaceName, computeName, underlyingResourceAction, cancellationToken); - return new MachineLearningComputeDeleteOperation(_clientDiagnostics, _pipeline, RestClient.CreateDeleteRequest(resourceGroupName, workspaceName, computeName, underlyingResourceAction).Request, originalResponse); + return new ComputeDeleteOperation(_clientDiagnostics, _pipeline, RestClient.CreateDeleteRequest(resourceGroupName, workspaceName, computeName, underlyingResourceAction).Request, originalResponse); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Posts a start action to a compute instance. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// Name of the Azure Machine Learning compute. + /// The cancellation token to use. + /// , , or is null. + public virtual async Task StartStartAsync(string resourceGroupName, string workspaceName, string computeName, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + if (computeName == null) + { + throw new ArgumentNullException(nameof(computeName)); + } + + using var scope = _clientDiagnostics.CreateScope("ComputeOperations.StartStart"); + scope.Start(); + try + { + var originalResponse = await RestClient.StartAsync(resourceGroupName, workspaceName, computeName, cancellationToken).ConfigureAwait(false); + return new ComputeStartOperation(_clientDiagnostics, _pipeline, RestClient.CreateStartRequest(resourceGroupName, workspaceName, computeName).Request, originalResponse); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Posts a start action to a compute instance. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// Name of the Azure Machine Learning compute. + /// The cancellation token to use. + /// , , or is null. + public virtual ComputeStartOperation StartStart(string resourceGroupName, string workspaceName, string computeName, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + if (computeName == null) + { + throw new ArgumentNullException(nameof(computeName)); + } + + using var scope = _clientDiagnostics.CreateScope("ComputeOperations.StartStart"); + scope.Start(); + try + { + var originalResponse = RestClient.Start(resourceGroupName, workspaceName, computeName, cancellationToken); + return new ComputeStartOperation(_clientDiagnostics, _pipeline, RestClient.CreateStartRequest(resourceGroupName, workspaceName, computeName).Request, originalResponse); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Posts a stop action to a compute instance. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// Name of the Azure Machine Learning compute. + /// The cancellation token to use. + /// , , or is null. + public virtual async Task StartStopAsync(string resourceGroupName, string workspaceName, string computeName, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + if (computeName == null) + { + throw new ArgumentNullException(nameof(computeName)); + } + + using var scope = _clientDiagnostics.CreateScope("ComputeOperations.StartStop"); + scope.Start(); + try + { + var originalResponse = await RestClient.StopAsync(resourceGroupName, workspaceName, computeName, cancellationToken).ConfigureAwait(false); + return new ComputeStopOperation(_clientDiagnostics, _pipeline, RestClient.CreateStopRequest(resourceGroupName, workspaceName, computeName).Request, originalResponse); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Posts a stop action to a compute instance. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// Name of the Azure Machine Learning compute. + /// The cancellation token to use. + /// , , or is null. + public virtual ComputeStopOperation StartStop(string resourceGroupName, string workspaceName, string computeName, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + if (computeName == null) + { + throw new ArgumentNullException(nameof(computeName)); + } + + using var scope = _clientDiagnostics.CreateScope("ComputeOperations.StartStop"); + scope.Start(); + try + { + var originalResponse = RestClient.Stop(resourceGroupName, workspaceName, computeName, cancellationToken); + return new ComputeStopOperation(_clientDiagnostics, _pipeline, RestClient.CreateStopRequest(resourceGroupName, workspaceName, computeName).Request, originalResponse); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Posts a restart action to a compute instance. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// Name of the Azure Machine Learning compute. + /// The cancellation token to use. + /// , , or is null. + public virtual async Task StartRestartAsync(string resourceGroupName, string workspaceName, string computeName, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + if (computeName == null) + { + throw new ArgumentNullException(nameof(computeName)); + } + + using var scope = _clientDiagnostics.CreateScope("ComputeOperations.StartRestart"); + scope.Start(); + try + { + var originalResponse = await RestClient.RestartAsync(resourceGroupName, workspaceName, computeName, cancellationToken).ConfigureAwait(false); + return new ComputeRestartOperation(_clientDiagnostics, _pipeline, RestClient.CreateRestartRequest(resourceGroupName, workspaceName, computeName).Request, originalResponse); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Posts a restart action to a compute instance. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// Name of the Azure Machine Learning compute. + /// The cancellation token to use. + /// , , or is null. + public virtual ComputeRestartOperation StartRestart(string resourceGroupName, string workspaceName, string computeName, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + if (computeName == null) + { + throw new ArgumentNullException(nameof(computeName)); + } + + using var scope = _clientDiagnostics.CreateScope("ComputeOperations.StartRestart"); + scope.Start(); + try + { + var originalResponse = RestClient.Restart(resourceGroupName, workspaceName, computeName, cancellationToken); + return new ComputeRestartOperation(_clientDiagnostics, _pipeline, RestClient.CreateRestartRequest(resourceGroupName, workspaceName, computeName).Request, originalResponse); } catch (Exception e) { diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/MachineLearningComputeRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/ComputeRestOperations.cs similarity index 82% rename from sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/MachineLearningComputeRestOperations.cs rename to sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/ComputeRestOperations.cs index 746f7610a82a9..49333e91649ec 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/MachineLearningComputeRestOperations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/ComputeRestOperations.cs @@ -16,7 +16,7 @@ namespace Azure.ResourceManager.MachineLearningServices { - internal partial class MachineLearningComputeRestOperations + internal partial class ComputeRestOperations { private string subscriptionId; private Uri endpoint; @@ -24,14 +24,14 @@ internal partial class MachineLearningComputeRestOperations private ClientDiagnostics _clientDiagnostics; private HttpPipeline _pipeline; - /// Initializes a new instance of MachineLearningComputeRestOperations. + /// Initializes a new instance of ComputeRestOperations. /// The handler for diagnostic messaging in the client. /// The HTTP pipeline for sending and receiving REST requests and responses. - /// Azure subscription identifier. + /// The ID of the target subscription. /// server parameter. /// Api Version. /// or is null. - public MachineLearningComputeRestOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2020-09-01-preview") + public ComputeRestOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2021-07-01") { if (subscriptionId == null) { @@ -50,7 +50,7 @@ public MachineLearningComputeRestOperations(ClientDiagnostics clientDiagnostics, _pipeline = pipeline; } - internal HttpMessage CreateListByWorkspaceRequest(string resourceGroupName, string workspaceName, string skiptoken) + internal HttpMessage CreateListRequest(string resourceGroupName, string workspaceName, string skip) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -65,9 +65,9 @@ internal HttpMessage CreateListByWorkspaceRequest(string resourceGroupName, stri uri.AppendPath(workspaceName, true); uri.AppendPath("/computes", false); uri.AppendQuery("api-version", apiVersion, true); - if (skiptoken != null) + if (skip != null) { - uri.AppendQuery("$skiptoken", skiptoken, true); + uri.AppendQuery("$skip", skip, true); } request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -75,12 +75,12 @@ internal HttpMessage CreateListByWorkspaceRequest(string resourceGroupName, stri } /// Gets computes in specified workspace. - /// Name of the resource group in which workspace is located. + /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. - /// Continuation token for pagination. + /// Continuation token for pagination. /// The cancellation token to use. /// or is null. - public async Task> ListByWorkspaceAsync(string resourceGroupName, string workspaceName, string skiptoken = null, CancellationToken cancellationToken = default) + public async Task> ListAsync(string resourceGroupName, string workspaceName, string skip = null, CancellationToken cancellationToken = default) { if (resourceGroupName == null) { @@ -91,7 +91,7 @@ public async Task> ListByWorkspaceAsync( throw new ArgumentNullException(nameof(workspaceName)); } - using var message = CreateListByWorkspaceRequest(resourceGroupName, workspaceName, skiptoken); + using var message = CreateListRequest(resourceGroupName, workspaceName, skip); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -108,12 +108,12 @@ public async Task> ListByWorkspaceAsync( } /// Gets computes in specified workspace. - /// Name of the resource group in which workspace is located. + /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. - /// Continuation token for pagination. + /// Continuation token for pagination. /// The cancellation token to use. /// or is null. - public Response ListByWorkspace(string resourceGroupName, string workspaceName, string skiptoken = null, CancellationToken cancellationToken = default) + public Response List(string resourceGroupName, string workspaceName, string skip = null, CancellationToken cancellationToken = default) { if (resourceGroupName == null) { @@ -124,7 +124,7 @@ public Response ListByWorkspace(string resourceGr throw new ArgumentNullException(nameof(workspaceName)); } - using var message = CreateListByWorkspaceRequest(resourceGroupName, workspaceName, skiptoken); + using var message = CreateListRequest(resourceGroupName, workspaceName, skip); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -162,7 +162,7 @@ internal HttpMessage CreateGetRequest(string resourceGroupName, string workspace } /// Gets compute definition by its name. Any secrets (storage keys, service credentials, etc) are not returned - use 'keys' nested resource to get them. - /// Name of the resource group in which workspace is located. + /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. /// Name of the Azure Machine Learning compute. /// The cancellation token to use. @@ -199,7 +199,7 @@ public async Task> GetAsync(string resourceGroupName, } /// Gets compute definition by its name. Any secrets (storage keys, service credentials, etc) are not returned - use 'keys' nested resource to get them. - /// Name of the resource group in which workspace is located. + /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. /// Name of the Azure Machine Learning compute. /// The cancellation token to use. @@ -261,13 +261,13 @@ internal HttpMessage CreateCreateOrUpdateRequest(string resourceGroupName, strin } /// Creates or updates compute. This call will overwrite a compute if it exists. This is a nonrecoverable operation. If your intent is to create a new compute, do a GET first to verify that it does not exist yet. - /// Name of the resource group in which workspace is located. + /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. /// Name of the Azure Machine Learning compute. /// Payload with Machine Learning compute definition. /// The cancellation token to use. /// , , , or is null. - public async Task> CreateOrUpdateAsync(string resourceGroupName, string workspaceName, string computeName, ComputeResource parameters, CancellationToken cancellationToken = default) + public async Task> CreateOrUpdateAsync(string resourceGroupName, string workspaceName, string computeName, ComputeResource parameters, CancellationToken cancellationToken = default) { if (resourceGroupName == null) { @@ -288,7 +288,7 @@ public async Task Creates or updates compute. This call will overwrite a compute if it exists. This is a nonrecoverable operation. If your intent is to create a new compute, do a GET first to verify that it does not exist yet. - /// Name of the resource group in which workspace is located. + /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. /// Name of the Azure Machine Learning compute. /// Payload with Machine Learning compute definition. /// The cancellation token to use. /// , , , or is null. - public ResponseWithHeaders CreateOrUpdate(string resourceGroupName, string workspaceName, string computeName, ComputeResource parameters, CancellationToken cancellationToken = default) + public ResponseWithHeaders CreateOrUpdate(string resourceGroupName, string workspaceName, string computeName, ComputeResource parameters, CancellationToken cancellationToken = default) { if (resourceGroupName == null) { @@ -327,7 +327,7 @@ public ResponseWithHeaders CreateOr using var message = CreateCreateOrUpdateRequest(resourceGroupName, workspaceName, computeName, parameters); _pipeline.Send(message, cancellationToken); - var headers = new MachineLearningComputeCreateOrUpdateHeaders(message.Response); + var headers = new ComputeCreateOrUpdateHeaders(message.Response); switch (message.Response.Status) { case 200: @@ -364,7 +364,7 @@ internal HttpMessage CreateUpdateRequest(string resourceGroupName, string worksp } /// Updates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable operation. - /// Name of the resource group in which workspace is located. + /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. /// Name of the Azure Machine Learning compute. /// Additional parameters for cluster update. @@ -401,7 +401,7 @@ public async Task UpdateAsync(string resourceGroupName, string workspa } /// Updates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable operation. - /// Name of the resource group in which workspace is located. + /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. /// Name of the Azure Machine Learning compute. /// Additional parameters for cluster update. @@ -460,13 +460,13 @@ internal HttpMessage CreateDeleteRequest(string resourceGroupName, string worksp } /// Deletes specified Machine Learning compute. - /// Name of the resource group in which workspace is located. + /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. /// Name of the Azure Machine Learning compute. /// Delete the underlying compute if 'Delete', or detach the underlying compute from workspace if 'Detach'. /// The cancellation token to use. /// , , or is null. - public async Task> DeleteAsync(string resourceGroupName, string workspaceName, string computeName, UnderlyingResourceAction underlyingResourceAction, CancellationToken cancellationToken = default) + public async Task> DeleteAsync(string resourceGroupName, string workspaceName, string computeName, UnderlyingResourceAction underlyingResourceAction, CancellationToken cancellationToken = default) { if (resourceGroupName == null) { @@ -483,7 +483,7 @@ public async Task> Dele using var message = CreateDeleteRequest(resourceGroupName, workspaceName, computeName, underlyingResourceAction); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - var headers = new MachineLearningComputeDeleteHeaders(message.Response); + var headers = new ComputeDeleteHeaders(message.Response); switch (message.Response.Status) { case 200: @@ -495,13 +495,13 @@ public async Task> Dele } /// Deletes specified Machine Learning compute. - /// Name of the resource group in which workspace is located. + /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. /// Name of the Azure Machine Learning compute. /// Delete the underlying compute if 'Delete', or detach the underlying compute from workspace if 'Detach'. /// The cancellation token to use. /// , , or is null. - public ResponseWithHeaders Delete(string resourceGroupName, string workspaceName, string computeName, UnderlyingResourceAction underlyingResourceAction, CancellationToken cancellationToken = default) + public ResponseWithHeaders Delete(string resourceGroupName, string workspaceName, string computeName, UnderlyingResourceAction underlyingResourceAction, CancellationToken cancellationToken = default) { if (resourceGroupName == null) { @@ -518,7 +518,7 @@ public ResponseWithHeaders Delete(string re using var message = CreateDeleteRequest(resourceGroupName, workspaceName, computeName, underlyingResourceAction); _pipeline.Send(message, cancellationToken); - var headers = new MachineLearningComputeDeleteHeaders(message.Response); + var headers = new ComputeDeleteHeaders(message.Response); switch (message.Response.Status) { case 200: @@ -552,7 +552,7 @@ internal HttpMessage CreateListNodesRequest(string resourceGroupName, string wor } /// Get the details (e.g IP address, port etc) of all the compute nodes in the compute. - /// Name of the resource group in which workspace is located. + /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. /// Name of the Azure Machine Learning compute. /// The cancellation token to use. @@ -589,7 +589,7 @@ public async Task> ListNodesAsync(string re } /// Get the details (e.g IP address, port etc) of all the compute nodes in the compute. - /// Name of the resource group in which workspace is located. + /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. /// Name of the Azure Machine Learning compute. /// The cancellation token to use. @@ -648,7 +648,7 @@ internal HttpMessage CreateListKeysRequest(string resourceGroupName, string work } /// Gets secrets related to Machine Learning compute (storage keys, service credentials, etc). - /// Name of the resource group in which workspace is located. + /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. /// Name of the Azure Machine Learning compute. /// The cancellation token to use. @@ -685,7 +685,7 @@ public async Task> ListKeysAsync(string resourceGroupNa } /// Gets secrets related to Machine Learning compute (storage keys, service credentials, etc). - /// Name of the resource group in which workspace is located. + /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. /// Name of the Azure Machine Learning compute. /// The cancellation token to use. @@ -744,7 +744,7 @@ internal HttpMessage CreateStartRequest(string resourceGroupName, string workspa } /// Posts a start action to a compute instance. - /// Name of the resource group in which workspace is located. + /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. /// Name of the Azure Machine Learning compute. /// The cancellation token to use. @@ -768,7 +768,7 @@ public async Task StartAsync(string resourceGroupName, string workspac 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); @@ -776,7 +776,7 @@ public async Task StartAsync(string resourceGroupName, string workspac } /// Posts a start action to a compute instance. - /// Name of the resource group in which workspace is located. + /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. /// Name of the Azure Machine Learning compute. /// The cancellation token to use. @@ -800,7 +800,7 @@ public Response Start(string resourceGroupName, string workspaceName, string com _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { - case 200: + case 202: return message.Response; default: throw _clientDiagnostics.CreateRequestFailedException(message.Response); @@ -830,7 +830,7 @@ internal HttpMessage CreateStopRequest(string resourceGroupName, string workspac } /// Posts a stop action to a compute instance. - /// Name of the resource group in which workspace is located. + /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. /// Name of the Azure Machine Learning compute. /// The cancellation token to use. @@ -854,7 +854,7 @@ public async Task StopAsync(string resourceGroupName, string workspace 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); @@ -862,7 +862,7 @@ public async Task StopAsync(string resourceGroupName, string workspace } /// Posts a stop action to a compute instance. - /// Name of the resource group in which workspace is located. + /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. /// Name of the Azure Machine Learning compute. /// The cancellation token to use. @@ -886,7 +886,7 @@ public Response Stop(string resourceGroupName, string workspaceName, string comp _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { - case 200: + case 202: return message.Response; default: throw _clientDiagnostics.CreateRequestFailedException(message.Response); @@ -916,7 +916,7 @@ internal HttpMessage CreateRestartRequest(string resourceGroupName, string works } /// Posts a restart action to a compute instance. - /// Name of the resource group in which workspace is located. + /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. /// Name of the Azure Machine Learning compute. /// The cancellation token to use. @@ -940,7 +940,7 @@ public async Task RestartAsync(string resourceGroupName, string worksp 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); @@ -948,7 +948,7 @@ public async Task RestartAsync(string resourceGroupName, string worksp } /// Posts a restart action to a compute instance. - /// Name of the resource group in which workspace is located. + /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. /// Name of the Azure Machine Learning compute. /// The cancellation token to use. @@ -972,14 +972,14 @@ public Response Restart(string resourceGroupName, string workspaceName, string c _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { - case 200: + case 202: return message.Response; default: throw _clientDiagnostics.CreateRequestFailedException(message.Response); } } - internal HttpMessage CreateListByWorkspaceNextPageRequest(string nextLink, string resourceGroupName, string workspaceName, string skiptoken) + internal HttpMessage CreateListNextPageRequest(string nextLink, string resourceGroupName, string workspaceName, string skip) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -994,12 +994,12 @@ internal HttpMessage CreateListByWorkspaceNextPageRequest(string nextLink, strin /// Gets computes in specified workspace. /// The URL to the next page of results. - /// Name of the resource group in which workspace is located. + /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. - /// Continuation token for pagination. + /// Continuation token for pagination. /// The cancellation token to use. /// , , or is null. - public async Task> ListByWorkspaceNextPageAsync(string nextLink, string resourceGroupName, string workspaceName, string skiptoken = null, CancellationToken cancellationToken = default) + public async Task> ListNextPageAsync(string nextLink, string resourceGroupName, string workspaceName, string skip = null, CancellationToken cancellationToken = default) { if (nextLink == null) { @@ -1014,7 +1014,7 @@ public async Task> ListByWorkspaceNextPa throw new ArgumentNullException(nameof(workspaceName)); } - using var message = CreateListByWorkspaceNextPageRequest(nextLink, resourceGroupName, workspaceName, skiptoken); + using var message = CreateListNextPageRequest(nextLink, resourceGroupName, workspaceName, skip); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -1032,12 +1032,12 @@ public async Task> ListByWorkspaceNextPa /// Gets computes in specified workspace. /// The URL to the next page of results. - /// Name of the resource group in which workspace is located. + /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. - /// Continuation token for pagination. + /// Continuation token for pagination. /// The cancellation token to use. /// , , or is null. - public Response ListByWorkspaceNextPage(string nextLink, string resourceGroupName, string workspaceName, string skiptoken = null, CancellationToken cancellationToken = default) + public Response ListNextPage(string nextLink, string resourceGroupName, string workspaceName, string skip = null, CancellationToken cancellationToken = default) { if (nextLink == null) { @@ -1052,7 +1052,7 @@ public Response ListByWorkspaceNextPage(string ne throw new ArgumentNullException(nameof(workspaceName)); } - using var message = CreateListByWorkspaceNextPageRequest(nextLink, resourceGroupName, workspaceName, skiptoken); + using var message = CreateListNextPageRequest(nextLink, resourceGroupName, workspaceName, skip); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -1067,5 +1067,102 @@ public Response ListByWorkspaceNextPage(string ne throw _clientDiagnostics.CreateRequestFailedException(message.Response); } } + + internal HttpMessage CreateListNodesNextPageRequest(string nextLink, string resourceGroupName, string workspaceName, string computeName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// Get the details (e.g IP address, port etc) of all the compute nodes in the compute. + /// The URL to the next page of results. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// Name of the Azure Machine Learning compute. + /// The cancellation token to use. + /// , , , or is null. + public async Task> ListNodesNextPageAsync(string nextLink, string resourceGroupName, string workspaceName, string computeName, CancellationToken cancellationToken = default) + { + if (nextLink == null) + { + throw new ArgumentNullException(nameof(nextLink)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + if (computeName == null) + { + throw new ArgumentNullException(nameof(computeName)); + } + + using var message = CreateListNodesNextPageRequest(nextLink, resourceGroupName, workspaceName, computeName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + AmlComputeNodesInformation value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = AmlComputeNodesInformation.DeserializeAmlComputeNodesInformation(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Get the details (e.g IP address, port etc) of all the compute nodes in the compute. + /// The URL to the next page of results. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// Name of the Azure Machine Learning compute. + /// The cancellation token to use. + /// , , , or is null. + public Response ListNodesNextPage(string nextLink, string resourceGroupName, string workspaceName, string computeName, CancellationToken cancellationToken = default) + { + if (nextLink == null) + { + throw new ArgumentNullException(nameof(nextLink)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + if (computeName == null) + { + throw new ArgumentNullException(nameof(computeName)); + } + + using var message = CreateListNodesNextPageRequest(nextLink, resourceGroupName, workspaceName, computeName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + AmlComputeNodesInformation value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = AmlComputeNodesInformation.DeserializeAmlComputeNodesInformation(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/ComputeRestartOperation.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/ComputeRestartOperation.cs new file mode 100644 index 0000000000000..2e626cf05e542 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/ComputeRestartOperation.cs @@ -0,0 +1,68 @@ +// 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.ResourceManager.MachineLearningServices +{ + /// Posts a restart action to a compute instance. + public partial class ComputeRestartOperation : Operation, IOperationSource + { + private readonly ArmOperationHelpers _operation; + + /// Initializes a new instance of ComputeRestartOperation for mocking. + protected ComputeRestartOperation() + { + } + + internal ComputeRestartOperation(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Request request, Response response) + { + _operation = new ArmOperationHelpers(this, clientDiagnostics, pipeline, request, response, OperationFinalStateVia.Location, "ComputeRestartOperation"); + } + /// + 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/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/ComputeStartOperation.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/ComputeStartOperation.cs new file mode 100644 index 0000000000000..f51ffb5b039e0 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/ComputeStartOperation.cs @@ -0,0 +1,68 @@ +// 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.ResourceManager.MachineLearningServices +{ + /// Posts a start action to a compute instance. + public partial class ComputeStartOperation : Operation, IOperationSource + { + private readonly ArmOperationHelpers _operation; + + /// Initializes a new instance of ComputeStartOperation for mocking. + protected ComputeStartOperation() + { + } + + internal ComputeStartOperation(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Request request, Response response) + { + _operation = new ArmOperationHelpers(this, clientDiagnostics, pipeline, request, response, OperationFinalStateVia.Location, "ComputeStartOperation"); + } + /// + 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/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/ComputeStopOperation.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/ComputeStopOperation.cs new file mode 100644 index 0000000000000..9ee4910e6cb33 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/ComputeStopOperation.cs @@ -0,0 +1,68 @@ +// 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.ResourceManager.MachineLearningServices +{ + /// Posts a stop action to a compute instance. + public partial class ComputeStopOperation : Operation, IOperationSource + { + private readonly ArmOperationHelpers _operation; + + /// Initializes a new instance of ComputeStopOperation for mocking. + protected ComputeStopOperation() + { + } + + internal ComputeStopOperation(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Request request, Response response) + { + _operation = new ArmOperationHelpers(this, clientDiagnostics, pipeline, request, response, OperationFinalStateVia.Location, "ComputeStopOperation"); + } + /// + 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/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/MachineLearningComputeUpdateOperation.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/ComputeUpdateOperation.cs similarity index 84% rename from sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/MachineLearningComputeUpdateOperation.cs rename to sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/ComputeUpdateOperation.cs index 5244479fe8362..3bd1cf16a22c7 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/MachineLearningComputeUpdateOperation.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/ComputeUpdateOperation.cs @@ -17,18 +17,18 @@ namespace Azure.ResourceManager.MachineLearningServices { /// Updates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable operation. - public partial class MachineLearningComputeUpdateOperation : Operation, IOperationSource + public partial class ComputeUpdateOperation : Operation, IOperationSource { private readonly ArmOperationHelpers _operation; - /// Initializes a new instance of MachineLearningComputeUpdateOperation for mocking. - protected MachineLearningComputeUpdateOperation() + /// Initializes a new instance of ComputeUpdateOperation for mocking. + protected ComputeUpdateOperation() { } - internal MachineLearningComputeUpdateOperation(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Request request, Response response) + internal ComputeUpdateOperation(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Request request, Response response) { - _operation = new ArmOperationHelpers(this, clientDiagnostics, pipeline, request, response, OperationFinalStateVia.Location, "MachineLearningComputeUpdateOperation"); + _operation = new ArmOperationHelpers(this, clientDiagnostics, pipeline, request, response, OperationFinalStateVia.Location, "ComputeUpdateOperation"); } /// public override string Id => _operation.Id; diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/DataContainersOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/DataContainersOperations.cs deleted file mode 100644 index 91a96752adcab..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/DataContainersOperations.cs +++ /dev/null @@ -1,265 +0,0 @@ -// 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; -using Azure.ResourceManager.MachineLearningServices.Models; - -namespace Azure.ResourceManager.MachineLearningServices -{ - /// The DataContainers service client. - public partial class DataContainersOperations - { - private readonly ClientDiagnostics _clientDiagnostics; - private readonly HttpPipeline _pipeline; - internal DataContainersRestOperations RestClient { get; } - - /// Initializes a new instance of DataContainersOperations for mocking. - protected DataContainersOperations() - { - } - - /// Initializes a new instance of DataContainersOperations. - /// The handler for diagnostic messaging in the client. - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// Azure subscription identifier. - /// server parameter. - /// Api Version. - internal DataContainersOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2020-09-01-preview") - { - RestClient = new DataContainersRestOperations(clientDiagnostics, pipeline, subscriptionId, endpoint, apiVersion); - _clientDiagnostics = clientDiagnostics; - _pipeline = pipeline; - } - - /// Create or update container. - /// Container name. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Container entity to create or update. - /// The cancellation token to use. - public virtual async Task> CreateOrUpdateAsync(string name, string resourceGroupName, string workspaceName, DataContainerResource body = null, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("DataContainersOperations.CreateOrUpdate"); - scope.Start(); - try - { - return await RestClient.CreateOrUpdateAsync(name, resourceGroupName, workspaceName, body, cancellationToken).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Create or update container. - /// Container name. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Container entity to create or update. - /// The cancellation token to use. - public virtual Response CreateOrUpdate(string name, string resourceGroupName, string workspaceName, DataContainerResource body = null, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("DataContainersOperations.CreateOrUpdate"); - scope.Start(); - try - { - return RestClient.CreateOrUpdate(name, resourceGroupName, workspaceName, body, cancellationToken); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Get container. - /// Container name. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - public virtual async Task> GetAsync(string name, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("DataContainersOperations.Get"); - scope.Start(); - try - { - return await RestClient.GetAsync(name, resourceGroupName, workspaceName, cancellationToken).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Get container. - /// Container name. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - public virtual Response Get(string name, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("DataContainersOperations.Get"); - scope.Start(); - try - { - return RestClient.Get(name, resourceGroupName, workspaceName, cancellationToken); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Delete container. - /// Container name. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - public virtual async Task DeleteAsync(string name, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("DataContainersOperations.Delete"); - scope.Start(); - try - { - return await RestClient.DeleteAsync(name, resourceGroupName, workspaceName, cancellationToken).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Delete container. - /// Container name. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - public virtual Response Delete(string name, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("DataContainersOperations.Delete"); - scope.Start(); - try - { - return RestClient.Delete(name, resourceGroupName, workspaceName, cancellationToken); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// List containers. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Continuation token for pagination. - /// The cancellation token to use. - /// or is null. - public virtual AsyncPageable ListAsync(string resourceGroupName, string workspaceName, string skiptoken = null, CancellationToken cancellationToken = default) - { - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - async Task> FirstPageFunc(int? pageSizeHint) - { - using var scope = _clientDiagnostics.CreateScope("DataContainersOperations.List"); - scope.Start(); - try - { - var response = await RestClient.ListAsync(resourceGroupName, workspaceName, skiptoken, 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("DataContainersOperations.List"); - scope.Start(); - try - { - var response = await RestClient.ListNextPageAsync(nextLink, resourceGroupName, workspaceName, skiptoken, 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 containers. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Continuation token for pagination. - /// The cancellation token to use. - /// or is null. - public virtual Pageable List(string resourceGroupName, string workspaceName, string skiptoken = null, CancellationToken cancellationToken = default) - { - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - Page FirstPageFunc(int? pageSizeHint) - { - using var scope = _clientDiagnostics.CreateScope("DataContainersOperations.List"); - scope.Start(); - try - { - var response = RestClient.List(resourceGroupName, workspaceName, skiptoken, 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("DataContainersOperations.List"); - scope.Start(); - try - { - var response = RestClient.ListNextPage(nextLink, resourceGroupName, workspaceName, skiptoken, 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/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/DataContainersRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/DataContainersRestOperations.cs deleted file mode 100644 index a11622e7ab52c..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/DataContainersRestOperations.cs +++ /dev/null @@ -1,520 +0,0 @@ -// 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.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager.MachineLearningServices.Models; - -namespace Azure.ResourceManager.MachineLearningServices -{ - internal partial class DataContainersRestOperations - { - private string subscriptionId; - private Uri endpoint; - private string apiVersion; - private ClientDiagnostics _clientDiagnostics; - private HttpPipeline _pipeline; - - /// Initializes a new instance of DataContainersRestOperations. - /// The handler for diagnostic messaging in the client. - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// Azure subscription identifier. - /// server parameter. - /// Api Version. - /// or is null. - public DataContainersRestOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2020-09-01-preview") - { - if (subscriptionId == null) - { - throw new ArgumentNullException(nameof(subscriptionId)); - } - endpoint ??= new Uri("https://management.azure.com"); - if (apiVersion == null) - { - throw new ArgumentNullException(nameof(apiVersion)); - } - - this.subscriptionId = subscriptionId; - this.endpoint = endpoint; - this.apiVersion = apiVersion; - _clientDiagnostics = clientDiagnostics; - _pipeline = pipeline; - } - - internal HttpMessage CreateCreateOrUpdateRequest(string name, string resourceGroupName, string workspaceName, DataContainerResource body) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Put; - var uri = new RawRequestUriBuilder(); - uri.Reset(endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/data/", false); - uri.AppendPath(name, true); - uri.AppendQuery("api-version", apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - if (body != null) - { - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(body); - request.Content = content; - } - return message; - } - - /// Create or update container. - /// Container name. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Container entity to create or update. - /// The cancellation token to use. - /// , , or is null. - public async Task> CreateOrUpdateAsync(string name, string resourceGroupName, string workspaceName, DataContainerResource body = null, CancellationToken cancellationToken = default) - { - if (name == null) - { - throw new ArgumentNullException(nameof(name)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateCreateOrUpdateRequest(name, resourceGroupName, workspaceName, body); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 201: - { - DataContainerResource value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = DataContainerResource.DeserializeDataContainerResource(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); - } - } - - /// Create or update container. - /// Container name. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Container entity to create or update. - /// The cancellation token to use. - /// , , or is null. - public Response CreateOrUpdate(string name, string resourceGroupName, string workspaceName, DataContainerResource body = null, CancellationToken cancellationToken = default) - { - if (name == null) - { - throw new ArgumentNullException(nameof(name)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateCreateOrUpdateRequest(name, resourceGroupName, workspaceName, body); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 201: - { - DataContainerResource value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = DataContainerResource.DeserializeDataContainerResource(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw _clientDiagnostics.CreateRequestFailedException(message.Response); - } - } - - internal HttpMessage CreateGetRequest(string name, string resourceGroupName, string workspaceName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/data/", false); - uri.AppendPath(name, true); - uri.AppendQuery("api-version", apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - /// Get container. - /// Container name. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - /// , , or is null. - public async Task> GetAsync(string name, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - if (name == null) - { - throw new ArgumentNullException(nameof(name)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateGetRequest(name, resourceGroupName, workspaceName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - DataContainerResource value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = DataContainerResource.DeserializeDataContainerResource(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); - } - } - - /// Get container. - /// Container name. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - /// , , or is null. - public Response Get(string name, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - if (name == null) - { - throw new ArgumentNullException(nameof(name)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateGetRequest(name, resourceGroupName, workspaceName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - DataContainerResource value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = DataContainerResource.DeserializeDataContainerResource(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw _clientDiagnostics.CreateRequestFailedException(message.Response); - } - } - - internal HttpMessage CreateDeleteRequest(string name, string resourceGroupName, string workspaceName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Delete; - var uri = new RawRequestUriBuilder(); - uri.Reset(endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/data/", false); - uri.AppendPath(name, true); - uri.AppendQuery("api-version", apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - /// Delete container. - /// Container name. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - /// , , or is null. - public async Task DeleteAsync(string name, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - if (name == null) - { - throw new ArgumentNullException(nameof(name)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateDeleteRequest(name, resourceGroupName, workspaceName); - 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 container. - /// Container name. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - /// , , or is null. - public Response Delete(string name, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - if (name == null) - { - throw new ArgumentNullException(nameof(name)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateDeleteRequest(name, resourceGroupName, workspaceName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 204: - return message.Response; - default: - throw _clientDiagnostics.CreateRequestFailedException(message.Response); - } - } - - internal HttpMessage CreateListRequest(string resourceGroupName, string workspaceName, string skiptoken) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/data", false); - uri.AppendQuery("api-version", apiVersion, true); - if (skiptoken != null) - { - uri.AppendQuery("$skiptoken", skiptoken, true); - } - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - /// List containers. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Continuation token for pagination. - /// The cancellation token to use. - /// or is null. - public async Task> ListAsync(string resourceGroupName, string workspaceName, string skiptoken = null, CancellationToken cancellationToken = default) - { - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateListRequest(resourceGroupName, workspaceName, skiptoken); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - DataContainerResourceArmPaginatedResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = DataContainerResourceArmPaginatedResult.DeserializeDataContainerResourceArmPaginatedResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); - } - } - - /// List containers. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Continuation token for pagination. - /// The cancellation token to use. - /// or is null. - public Response List(string resourceGroupName, string workspaceName, string skiptoken = null, CancellationToken cancellationToken = default) - { - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateListRequest(resourceGroupName, workspaceName, skiptoken); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - DataContainerResourceArmPaginatedResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = DataContainerResourceArmPaginatedResult.DeserializeDataContainerResourceArmPaginatedResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw _clientDiagnostics.CreateRequestFailedException(message.Response); - } - } - - internal HttpMessage CreateListNextPageRequest(string nextLink, string resourceGroupName, string workspaceName, string skiptoken) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(endpoint); - uri.AppendRawNextLink(nextLink, false); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - /// List containers. - /// The URL to the next page of results. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Continuation token for pagination. - /// The cancellation token to use. - /// , , or is null. - public async Task> ListNextPageAsync(string nextLink, string resourceGroupName, string workspaceName, string skiptoken = null, CancellationToken cancellationToken = default) - { - if (nextLink == null) - { - throw new ArgumentNullException(nameof(nextLink)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateListNextPageRequest(nextLink, resourceGroupName, workspaceName, skiptoken); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - DataContainerResourceArmPaginatedResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = DataContainerResourceArmPaginatedResult.DeserializeDataContainerResourceArmPaginatedResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); - } - } - - /// List containers. - /// The URL to the next page of results. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Continuation token for pagination. - /// The cancellation token to use. - /// , , or is null. - public Response ListNextPage(string nextLink, string resourceGroupName, string workspaceName, string skiptoken = null, CancellationToken cancellationToken = default) - { - if (nextLink == null) - { - throw new ArgumentNullException(nameof(nextLink)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateListNextPageRequest(nextLink, resourceGroupName, workspaceName, skiptoken); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - DataContainerResourceArmPaginatedResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = DataContainerResourceArmPaginatedResult.DeserializeDataContainerResourceArmPaginatedResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw _clientDiagnostics.CreateRequestFailedException(message.Response); - } - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/DataVersionsOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/DataVersionsOperations.cs deleted file mode 100644 index 3f91c728c16d1..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/DataVersionsOperations.cs +++ /dev/null @@ -1,281 +0,0 @@ -// 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; -using Azure.ResourceManager.MachineLearningServices.Models; - -namespace Azure.ResourceManager.MachineLearningServices -{ - /// The DataVersions service client. - public partial class DataVersionsOperations - { - private readonly ClientDiagnostics _clientDiagnostics; - private readonly HttpPipeline _pipeline; - internal DataVersionsRestOperations RestClient { get; } - - /// Initializes a new instance of DataVersionsOperations for mocking. - protected DataVersionsOperations() - { - } - - /// Initializes a new instance of DataVersionsOperations. - /// The handler for diagnostic messaging in the client. - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// Azure subscription identifier. - /// server parameter. - /// Api Version. - internal DataVersionsOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2020-09-01-preview") - { - RestClient = new DataVersionsRestOperations(clientDiagnostics, pipeline, subscriptionId, endpoint, apiVersion); - _clientDiagnostics = clientDiagnostics; - _pipeline = pipeline; - } - - /// Create or update version. - /// Container name. - /// Version identifier. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Version entity to create or update. - /// The cancellation token to use. - public virtual async Task> CreateOrUpdateAsync(string name, string version, string resourceGroupName, string workspaceName, DataVersionResource body = null, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("DataVersionsOperations.CreateOrUpdate"); - scope.Start(); - try - { - return await RestClient.CreateOrUpdateAsync(name, version, resourceGroupName, workspaceName, body, cancellationToken).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Create or update version. - /// Container name. - /// Version identifier. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Version entity to create or update. - /// The cancellation token to use. - public virtual Response CreateOrUpdate(string name, string version, string resourceGroupName, string workspaceName, DataVersionResource body = null, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("DataVersionsOperations.CreateOrUpdate"); - scope.Start(); - try - { - return RestClient.CreateOrUpdate(name, version, resourceGroupName, workspaceName, body, cancellationToken); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Get version. - /// Container name. - /// Version identifier. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - public virtual async Task> GetAsync(string name, string version, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("DataVersionsOperations.Get"); - scope.Start(); - try - { - return await RestClient.GetAsync(name, version, resourceGroupName, workspaceName, cancellationToken).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Get version. - /// Container name. - /// Version identifier. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - public virtual Response Get(string name, string version, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("DataVersionsOperations.Get"); - scope.Start(); - try - { - return RestClient.Get(name, version, resourceGroupName, workspaceName, cancellationToken); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Delete version. - /// Container name. - /// Version identifier. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - public virtual async Task DeleteAsync(string name, string version, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("DataVersionsOperations.Delete"); - scope.Start(); - try - { - return await RestClient.DeleteAsync(name, version, resourceGroupName, workspaceName, cancellationToken).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Delete version. - /// Container name. - /// Version identifier. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - public virtual Response Delete(string name, string version, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("DataVersionsOperations.Delete"); - scope.Start(); - try - { - return RestClient.Delete(name, version, resourceGroupName, workspaceName, cancellationToken); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// List versions. - /// Container name. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Continuation token for pagination. - /// The cancellation token to use. - /// , , or is null. - public virtual AsyncPageable ListAsync(string name, string resourceGroupName, string workspaceName, string skiptoken = null, CancellationToken cancellationToken = default) - { - if (name == null) - { - throw new ArgumentNullException(nameof(name)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - async Task> FirstPageFunc(int? pageSizeHint) - { - using var scope = _clientDiagnostics.CreateScope("DataVersionsOperations.List"); - scope.Start(); - try - { - var response = await RestClient.ListAsync(name, resourceGroupName, workspaceName, skiptoken, 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("DataVersionsOperations.List"); - scope.Start(); - try - { - var response = await RestClient.ListNextPageAsync(nextLink, name, resourceGroupName, workspaceName, skiptoken, 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 versions. - /// Container name. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Continuation token for pagination. - /// The cancellation token to use. - /// , , or is null. - public virtual Pageable List(string name, string resourceGroupName, string workspaceName, string skiptoken = null, CancellationToken cancellationToken = default) - { - if (name == null) - { - throw new ArgumentNullException(nameof(name)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - Page FirstPageFunc(int? pageSizeHint) - { - using var scope = _clientDiagnostics.CreateScope("DataVersionsOperations.List"); - scope.Start(); - try - { - var response = RestClient.List(name, resourceGroupName, workspaceName, skiptoken, 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("DataVersionsOperations.List"); - scope.Start(); - try - { - var response = RestClient.ListNextPage(nextLink, name, resourceGroupName, workspaceName, skiptoken, 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/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/DataVersionsRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/DataVersionsRestOperations.cs deleted file mode 100644 index 9749162891ca1..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/DataVersionsRestOperations.cs +++ /dev/null @@ -1,578 +0,0 @@ -// 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.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager.MachineLearningServices.Models; - -namespace Azure.ResourceManager.MachineLearningServices -{ - internal partial class DataVersionsRestOperations - { - private string subscriptionId; - private Uri endpoint; - private string apiVersion; - private ClientDiagnostics _clientDiagnostics; - private HttpPipeline _pipeline; - - /// Initializes a new instance of DataVersionsRestOperations. - /// The handler for diagnostic messaging in the client. - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// Azure subscription identifier. - /// server parameter. - /// Api Version. - /// or is null. - public DataVersionsRestOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2020-09-01-preview") - { - if (subscriptionId == null) - { - throw new ArgumentNullException(nameof(subscriptionId)); - } - endpoint ??= new Uri("https://management.azure.com"); - if (apiVersion == null) - { - throw new ArgumentNullException(nameof(apiVersion)); - } - - this.subscriptionId = subscriptionId; - this.endpoint = endpoint; - this.apiVersion = apiVersion; - _clientDiagnostics = clientDiagnostics; - _pipeline = pipeline; - } - - internal HttpMessage CreateCreateOrUpdateRequest(string name, string version, string resourceGroupName, string workspaceName, DataVersionResource body) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Put; - var uri = new RawRequestUriBuilder(); - uri.Reset(endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/data/", false); - uri.AppendPath(name, true); - uri.AppendPath("/versions/", false); - uri.AppendPath(version, true); - uri.AppendQuery("api-version", apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - if (body != null) - { - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(body); - request.Content = content; - } - return message; - } - - /// Create or update version. - /// Container name. - /// Version identifier. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Version entity to create or update. - /// The cancellation token to use. - /// , , , or is null. - public async Task> CreateOrUpdateAsync(string name, string version, string resourceGroupName, string workspaceName, DataVersionResource body = null, CancellationToken cancellationToken = default) - { - if (name == null) - { - throw new ArgumentNullException(nameof(name)); - } - if (version == null) - { - throw new ArgumentNullException(nameof(version)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateCreateOrUpdateRequest(name, version, resourceGroupName, workspaceName, body); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 201: - { - DataVersionResource value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = DataVersionResource.DeserializeDataVersionResource(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); - } - } - - /// Create or update version. - /// Container name. - /// Version identifier. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Version entity to create or update. - /// The cancellation token to use. - /// , , , or is null. - public Response CreateOrUpdate(string name, string version, string resourceGroupName, string workspaceName, DataVersionResource body = null, CancellationToken cancellationToken = default) - { - if (name == null) - { - throw new ArgumentNullException(nameof(name)); - } - if (version == null) - { - throw new ArgumentNullException(nameof(version)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateCreateOrUpdateRequest(name, version, resourceGroupName, workspaceName, body); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 201: - { - DataVersionResource value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = DataVersionResource.DeserializeDataVersionResource(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw _clientDiagnostics.CreateRequestFailedException(message.Response); - } - } - - internal HttpMessage CreateGetRequest(string name, string version, string resourceGroupName, string workspaceName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/data/", false); - uri.AppendPath(name, true); - uri.AppendPath("/versions/", false); - uri.AppendPath(version, true); - uri.AppendQuery("api-version", apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - /// Get version. - /// Container name. - /// Version identifier. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - /// , , , or is null. - public async Task> GetAsync(string name, string version, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - if (name == null) - { - throw new ArgumentNullException(nameof(name)); - } - if (version == null) - { - throw new ArgumentNullException(nameof(version)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateGetRequest(name, version, resourceGroupName, workspaceName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - DataVersionResource value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = DataVersionResource.DeserializeDataVersionResource(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); - } - } - - /// Get version. - /// Container name. - /// Version identifier. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - /// , , , or is null. - public Response Get(string name, string version, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - if (name == null) - { - throw new ArgumentNullException(nameof(name)); - } - if (version == null) - { - throw new ArgumentNullException(nameof(version)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateGetRequest(name, version, resourceGroupName, workspaceName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - DataVersionResource value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = DataVersionResource.DeserializeDataVersionResource(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw _clientDiagnostics.CreateRequestFailedException(message.Response); - } - } - - internal HttpMessage CreateDeleteRequest(string name, string version, string resourceGroupName, string workspaceName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Delete; - var uri = new RawRequestUriBuilder(); - uri.Reset(endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/data/", false); - uri.AppendPath(name, true); - uri.AppendPath("/versions/", false); - uri.AppendPath(version, true); - uri.AppendQuery("api-version", apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - /// Delete version. - /// Container name. - /// Version identifier. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - /// , , , or is null. - public async Task DeleteAsync(string name, string version, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - if (name == null) - { - throw new ArgumentNullException(nameof(name)); - } - if (version == null) - { - throw new ArgumentNullException(nameof(version)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateDeleteRequest(name, version, resourceGroupName, workspaceName); - 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 version. - /// Container name. - /// Version identifier. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - /// , , , or is null. - public Response Delete(string name, string version, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - if (name == null) - { - throw new ArgumentNullException(nameof(name)); - } - if (version == null) - { - throw new ArgumentNullException(nameof(version)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateDeleteRequest(name, version, resourceGroupName, workspaceName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 204: - return message.Response; - default: - throw _clientDiagnostics.CreateRequestFailedException(message.Response); - } - } - - internal HttpMessage CreateListRequest(string name, string resourceGroupName, string workspaceName, string skiptoken) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/data/", false); - uri.AppendPath(name, true); - uri.AppendPath("/versions", false); - uri.AppendQuery("api-version", apiVersion, true); - if (skiptoken != null) - { - uri.AppendQuery("$skiptoken", skiptoken, true); - } - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - /// List versions. - /// Container name. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Continuation token for pagination. - /// The cancellation token to use. - /// , , or is null. - public async Task> ListAsync(string name, string resourceGroupName, string workspaceName, string skiptoken = null, CancellationToken cancellationToken = default) - { - if (name == null) - { - throw new ArgumentNullException(nameof(name)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateListRequest(name, resourceGroupName, workspaceName, skiptoken); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - DataVersionResourceArmPaginatedResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = DataVersionResourceArmPaginatedResult.DeserializeDataVersionResourceArmPaginatedResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); - } - } - - /// List versions. - /// Container name. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Continuation token for pagination. - /// The cancellation token to use. - /// , , or is null. - public Response List(string name, string resourceGroupName, string workspaceName, string skiptoken = null, CancellationToken cancellationToken = default) - { - if (name == null) - { - throw new ArgumentNullException(nameof(name)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateListRequest(name, resourceGroupName, workspaceName, skiptoken); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - DataVersionResourceArmPaginatedResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = DataVersionResourceArmPaginatedResult.DeserializeDataVersionResourceArmPaginatedResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw _clientDiagnostics.CreateRequestFailedException(message.Response); - } - } - - internal HttpMessage CreateListNextPageRequest(string nextLink, string name, string resourceGroupName, string workspaceName, string skiptoken) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(endpoint); - uri.AppendRawNextLink(nextLink, false); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - /// List versions. - /// The URL to the next page of results. - /// Container name. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Continuation token for pagination. - /// The cancellation token to use. - /// , , , or is null. - public async Task> ListNextPageAsync(string nextLink, string name, string resourceGroupName, string workspaceName, string skiptoken = null, CancellationToken cancellationToken = default) - { - if (nextLink == null) - { - throw new ArgumentNullException(nameof(nextLink)); - } - if (name == null) - { - throw new ArgumentNullException(nameof(name)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateListNextPageRequest(nextLink, name, resourceGroupName, workspaceName, skiptoken); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - DataVersionResourceArmPaginatedResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = DataVersionResourceArmPaginatedResult.DeserializeDataVersionResourceArmPaginatedResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); - } - } - - /// List versions. - /// The URL to the next page of results. - /// Container name. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Continuation token for pagination. - /// The cancellation token to use. - /// , , , or is null. - public Response ListNextPage(string nextLink, string name, string resourceGroupName, string workspaceName, string skiptoken = null, CancellationToken cancellationToken = default) - { - if (nextLink == null) - { - throw new ArgumentNullException(nameof(nextLink)); - } - if (name == null) - { - throw new ArgumentNullException(nameof(name)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateListNextPageRequest(nextLink, name, resourceGroupName, workspaceName, skiptoken); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - DataVersionResourceArmPaginatedResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = DataVersionResourceArmPaginatedResult.DeserializeDataVersionResourceArmPaginatedResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw _clientDiagnostics.CreateRequestFailedException(message.Response); - } - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/DatastoresOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/DatastoresOperations.cs deleted file mode 100644 index e5c393632c371..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/DatastoresOperations.cs +++ /dev/null @@ -1,318 +0,0 @@ -// 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.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager.MachineLearningServices.Models; - -namespace Azure.ResourceManager.MachineLearningServices -{ - /// The Datastores service client. - public partial class DatastoresOperations - { - private readonly ClientDiagnostics _clientDiagnostics; - private readonly HttpPipeline _pipeline; - internal DatastoresRestOperations RestClient { get; } - - /// Initializes a new instance of DatastoresOperations for mocking. - protected DatastoresOperations() - { - } - - /// Initializes a new instance of DatastoresOperations. - /// The handler for diagnostic messaging in the client. - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// Azure subscription identifier. - /// server parameter. - /// Api Version. - internal DatastoresOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2020-09-01-preview") - { - RestClient = new DatastoresRestOperations(clientDiagnostics, pipeline, subscriptionId, endpoint, apiVersion); - _clientDiagnostics = clientDiagnostics; - _pipeline = pipeline; - } - - /// Delete datastore. - /// Datastore name. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - public virtual async Task DeleteAsync(string name, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("DatastoresOperations.Delete"); - scope.Start(); - try - { - return await RestClient.DeleteAsync(name, resourceGroupName, workspaceName, cancellationToken).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Delete datastore. - /// Datastore name. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - public virtual Response Delete(string name, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("DatastoresOperations.Delete"); - scope.Start(); - try - { - return RestClient.Delete(name, resourceGroupName, workspaceName, cancellationToken); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Get datastore. - /// Datastore name. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - public virtual async Task> GetAsync(string name, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("DatastoresOperations.Get"); - scope.Start(); - try - { - return await RestClient.GetAsync(name, resourceGroupName, workspaceName, cancellationToken).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Get datastore. - /// Datastore name. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - public virtual Response Get(string name, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("DatastoresOperations.Get"); - scope.Start(); - try - { - return RestClient.Get(name, resourceGroupName, workspaceName, cancellationToken); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Create or update datastore. - /// Datastore name. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Datastore entity to create or update. - /// The cancellation token to use. - public virtual async Task> CreateOrUpdateAsync(string name, string resourceGroupName, string workspaceName, DatastorePropertiesResource body, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("DatastoresOperations.CreateOrUpdate"); - scope.Start(); - try - { - return await RestClient.CreateOrUpdateAsync(name, resourceGroupName, workspaceName, body, cancellationToken).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Create or update datastore. - /// Datastore name. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Datastore entity to create or update. - /// The cancellation token to use. - public virtual Response CreateOrUpdate(string name, string resourceGroupName, string workspaceName, DatastorePropertiesResource body, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("DatastoresOperations.CreateOrUpdate"); - scope.Start(); - try - { - return RestClient.CreateOrUpdate(name, resourceGroupName, workspaceName, body, cancellationToken); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Get datastore secrets. - /// Datastore name. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - public virtual async Task> ListSecretsAsync(string name, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("DatastoresOperations.ListSecrets"); - scope.Start(); - try - { - return await RestClient.ListSecretsAsync(name, resourceGroupName, workspaceName, cancellationToken).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Get datastore secrets. - /// Datastore name. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - public virtual Response ListSecrets(string name, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("DatastoresOperations.ListSecrets"); - scope.Start(); - try - { - return RestClient.ListSecrets(name, resourceGroupName, workspaceName, cancellationToken); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// List datastores. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Continuation token for pagination. - /// Maximum number of results to return. - /// Filter down to the workspace default datastore. - /// Names of datastores to return. - /// Text to search for in the datastore names. - /// Order by property (createdtime | modifiedtime | name). - /// Order by property in ascending order. - /// The cancellation token to use. - /// or is null. - public virtual AsyncPageable ListAsync(string resourceGroupName, string workspaceName, string skiptoken = null, int? count = null, bool? isDefault = null, IEnumerable names = null, string searchText = null, string orderBy = null, bool? orderByAsc = null, CancellationToken cancellationToken = default) - { - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - async Task> FirstPageFunc(int? pageSizeHint) - { - using var scope = _clientDiagnostics.CreateScope("DatastoresOperations.List"); - scope.Start(); - try - { - var response = await RestClient.ListAsync(resourceGroupName, workspaceName, skiptoken, count, isDefault, names, searchText, orderBy, orderByAsc, 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("DatastoresOperations.List"); - scope.Start(); - try - { - var response = await RestClient.ListNextPageAsync(nextLink, resourceGroupName, workspaceName, skiptoken, count, isDefault, names, searchText, orderBy, orderByAsc, 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 datastores. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Continuation token for pagination. - /// Maximum number of results to return. - /// Filter down to the workspace default datastore. - /// Names of datastores to return. - /// Text to search for in the datastore names. - /// Order by property (createdtime | modifiedtime | name). - /// Order by property in ascending order. - /// The cancellation token to use. - /// or is null. - public virtual Pageable List(string resourceGroupName, string workspaceName, string skiptoken = null, int? count = null, bool? isDefault = null, IEnumerable names = null, string searchText = null, string orderBy = null, bool? orderByAsc = null, CancellationToken cancellationToken = default) - { - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - Page FirstPageFunc(int? pageSizeHint) - { - using var scope = _clientDiagnostics.CreateScope("DatastoresOperations.List"); - scope.Start(); - try - { - var response = RestClient.List(resourceGroupName, workspaceName, skiptoken, count, isDefault, names, searchText, orderBy, orderByAsc, 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("DatastoresOperations.List"); - scope.Start(); - try - { - var response = RestClient.ListNextPage(nextLink, resourceGroupName, workspaceName, skiptoken, count, isDefault, names, searchText, orderBy, orderByAsc, 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/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/DatastoresRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/DatastoresRestOperations.cs deleted file mode 100644 index 63c0d0c7f215b..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/DatastoresRestOperations.cs +++ /dev/null @@ -1,670 +0,0 @@ -// 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.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager.MachineLearningServices.Models; - -namespace Azure.ResourceManager.MachineLearningServices -{ - internal partial class DatastoresRestOperations - { - private string subscriptionId; - private Uri endpoint; - private string apiVersion; - private ClientDiagnostics _clientDiagnostics; - private HttpPipeline _pipeline; - - /// Initializes a new instance of DatastoresRestOperations. - /// The handler for diagnostic messaging in the client. - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// Azure subscription identifier. - /// server parameter. - /// Api Version. - /// or is null. - public DatastoresRestOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2020-09-01-preview") - { - if (subscriptionId == null) - { - throw new ArgumentNullException(nameof(subscriptionId)); - } - endpoint ??= new Uri("https://management.azure.com"); - if (apiVersion == null) - { - throw new ArgumentNullException(nameof(apiVersion)); - } - - this.subscriptionId = subscriptionId; - this.endpoint = endpoint; - this.apiVersion = apiVersion; - _clientDiagnostics = clientDiagnostics; - _pipeline = pipeline; - } - - internal HttpMessage CreateListRequest(string resourceGroupName, string workspaceName, string skiptoken, int? count, bool? isDefault, IEnumerable names, string searchText, string orderBy, bool? orderByAsc) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/datastores", false); - uri.AppendQuery("api-version", apiVersion, true); - if (skiptoken != null) - { - uri.AppendQuery("$skiptoken", skiptoken, true); - } - if (count != null) - { - uri.AppendQuery("count", count.Value, true); - } - if (isDefault != null) - { - uri.AppendQuery("isDefault", isDefault.Value, true); - } - if (names != null) - { - uri.AppendQueryDelimited("names", names, ",", true); - } - if (searchText != null) - { - uri.AppendQuery("searchText", searchText, true); - } - if (orderBy != null) - { - uri.AppendQuery("orderBy", orderBy, true); - } - if (orderByAsc != null) - { - uri.AppendQuery("orderByAsc", orderByAsc.Value, true); - } - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - /// List datastores. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Continuation token for pagination. - /// Maximum number of results to return. - /// Filter down to the workspace default datastore. - /// Names of datastores to return. - /// Text to search for in the datastore names. - /// Order by property (createdtime | modifiedtime | name). - /// Order by property in ascending order. - /// The cancellation token to use. - /// or is null. - public async Task> ListAsync(string resourceGroupName, string workspaceName, string skiptoken = null, int? count = null, bool? isDefault = null, IEnumerable names = null, string searchText = null, string orderBy = null, bool? orderByAsc = null, CancellationToken cancellationToken = default) - { - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateListRequest(resourceGroupName, workspaceName, skiptoken, count, isDefault, names, searchText, orderBy, orderByAsc); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - DatastorePropertiesResourceArmPaginatedResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = DatastorePropertiesResourceArmPaginatedResult.DeserializeDatastorePropertiesResourceArmPaginatedResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); - } - } - - /// List datastores. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Continuation token for pagination. - /// Maximum number of results to return. - /// Filter down to the workspace default datastore. - /// Names of datastores to return. - /// Text to search for in the datastore names. - /// Order by property (createdtime | modifiedtime | name). - /// Order by property in ascending order. - /// The cancellation token to use. - /// or is null. - public Response List(string resourceGroupName, string workspaceName, string skiptoken = null, int? count = null, bool? isDefault = null, IEnumerable names = null, string searchText = null, string orderBy = null, bool? orderByAsc = null, CancellationToken cancellationToken = default) - { - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateListRequest(resourceGroupName, workspaceName, skiptoken, count, isDefault, names, searchText, orderBy, orderByAsc); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - DatastorePropertiesResourceArmPaginatedResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = DatastorePropertiesResourceArmPaginatedResult.DeserializeDatastorePropertiesResourceArmPaginatedResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw _clientDiagnostics.CreateRequestFailedException(message.Response); - } - } - - internal HttpMessage CreateDeleteRequest(string name, string resourceGroupName, string workspaceName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Delete; - var uri = new RawRequestUriBuilder(); - uri.Reset(endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/datastores/", false); - uri.AppendPath(name, true); - uri.AppendQuery("api-version", apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - /// Delete datastore. - /// Datastore name. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - /// , , or is null. - public async Task DeleteAsync(string name, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - if (name == null) - { - throw new ArgumentNullException(nameof(name)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateDeleteRequest(name, resourceGroupName, workspaceName); - 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 datastore. - /// Datastore name. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - /// , , or is null. - public Response Delete(string name, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - if (name == null) - { - throw new ArgumentNullException(nameof(name)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateDeleteRequest(name, resourceGroupName, workspaceName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 204: - return message.Response; - default: - throw _clientDiagnostics.CreateRequestFailedException(message.Response); - } - } - - internal HttpMessage CreateGetRequest(string name, string resourceGroupName, string workspaceName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/datastores/", false); - uri.AppendPath(name, true); - uri.AppendQuery("api-version", apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - /// Get datastore. - /// Datastore name. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - /// , , or is null. - public async Task> GetAsync(string name, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - if (name == null) - { - throw new ArgumentNullException(nameof(name)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateGetRequest(name, resourceGroupName, workspaceName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - DatastorePropertiesResource value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = DatastorePropertiesResource.DeserializeDatastorePropertiesResource(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); - } - } - - /// Get datastore. - /// Datastore name. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - /// , , or is null. - public Response Get(string name, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - if (name == null) - { - throw new ArgumentNullException(nameof(name)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateGetRequest(name, resourceGroupName, workspaceName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - DatastorePropertiesResource value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = DatastorePropertiesResource.DeserializeDatastorePropertiesResource(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw _clientDiagnostics.CreateRequestFailedException(message.Response); - } - } - - internal HttpMessage CreateCreateOrUpdateRequest(string name, string resourceGroupName, string workspaceName, DatastorePropertiesResource body) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Put; - var uri = new RawRequestUriBuilder(); - uri.Reset(endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/datastores/", false); - uri.AppendPath(name, true); - uri.AppendQuery("api-version", apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(body); - request.Content = content; - return message; - } - - /// Create or update datastore. - /// Datastore name. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Datastore entity to create or update. - /// The cancellation token to use. - /// , , , or is null. - public async Task> CreateOrUpdateAsync(string name, string resourceGroupName, string workspaceName, DatastorePropertiesResource body, CancellationToken cancellationToken = default) - { - if (name == null) - { - throw new ArgumentNullException(nameof(name)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - if (body == null) - { - throw new ArgumentNullException(nameof(body)); - } - - using var message = CreateCreateOrUpdateRequest(name, resourceGroupName, workspaceName, body); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 201: - { - DatastorePropertiesResource value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = DatastorePropertiesResource.DeserializeDatastorePropertiesResource(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); - } - } - - /// Create or update datastore. - /// Datastore name. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Datastore entity to create or update. - /// The cancellation token to use. - /// , , , or is null. - public Response CreateOrUpdate(string name, string resourceGroupName, string workspaceName, DatastorePropertiesResource body, CancellationToken cancellationToken = default) - { - if (name == null) - { - throw new ArgumentNullException(nameof(name)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - if (body == null) - { - throw new ArgumentNullException(nameof(body)); - } - - using var message = CreateCreateOrUpdateRequest(name, resourceGroupName, workspaceName, body); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 201: - { - DatastorePropertiesResource value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = DatastorePropertiesResource.DeserializeDatastorePropertiesResource(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw _clientDiagnostics.CreateRequestFailedException(message.Response); - } - } - - internal HttpMessage CreateListSecretsRequest(string name, string resourceGroupName, string workspaceName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/datastores/", false); - uri.AppendPath(name, true); - uri.AppendPath("/listSecrets", false); - uri.AppendQuery("api-version", apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - /// Get datastore secrets. - /// Datastore name. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - /// , , or is null. - public async Task> ListSecretsAsync(string name, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - if (name == null) - { - throw new ArgumentNullException(nameof(name)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateListSecretsRequest(name, resourceGroupName, workspaceName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - DatastoreCredentials value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = DatastoreCredentials.DeserializeDatastoreCredentials(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); - } - } - - /// Get datastore secrets. - /// Datastore name. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - /// , , or is null. - public Response ListSecrets(string name, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - if (name == null) - { - throw new ArgumentNullException(nameof(name)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateListSecretsRequest(name, resourceGroupName, workspaceName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - DatastoreCredentials value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = DatastoreCredentials.DeserializeDatastoreCredentials(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw _clientDiagnostics.CreateRequestFailedException(message.Response); - } - } - - internal HttpMessage CreateListNextPageRequest(string nextLink, string resourceGroupName, string workspaceName, string skiptoken, int? count, bool? isDefault, IEnumerable names, string searchText, string orderBy, bool? orderByAsc) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(endpoint); - uri.AppendRawNextLink(nextLink, false); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - /// List datastores. - /// The URL to the next page of results. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Continuation token for pagination. - /// Maximum number of results to return. - /// Filter down to the workspace default datastore. - /// Names of datastores to return. - /// Text to search for in the datastore names. - /// Order by property (createdtime | modifiedtime | name). - /// Order by property in ascending order. - /// The cancellation token to use. - /// , , or is null. - public async Task> ListNextPageAsync(string nextLink, string resourceGroupName, string workspaceName, string skiptoken = null, int? count = null, bool? isDefault = null, IEnumerable names = null, string searchText = null, string orderBy = null, bool? orderByAsc = null, CancellationToken cancellationToken = default) - { - if (nextLink == null) - { - throw new ArgumentNullException(nameof(nextLink)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateListNextPageRequest(nextLink, resourceGroupName, workspaceName, skiptoken, count, isDefault, names, searchText, orderBy, orderByAsc); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - DatastorePropertiesResourceArmPaginatedResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = DatastorePropertiesResourceArmPaginatedResult.DeserializeDatastorePropertiesResourceArmPaginatedResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); - } - } - - /// List datastores. - /// The URL to the next page of results. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Continuation token for pagination. - /// Maximum number of results to return. - /// Filter down to the workspace default datastore. - /// Names of datastores to return. - /// Text to search for in the datastore names. - /// Order by property (createdtime | modifiedtime | name). - /// Order by property in ascending order. - /// The cancellation token to use. - /// , , or is null. - public Response ListNextPage(string nextLink, string resourceGroupName, string workspaceName, string skiptoken = null, int? count = null, bool? isDefault = null, IEnumerable names = null, string searchText = null, string orderBy = null, bool? orderByAsc = null, CancellationToken cancellationToken = default) - { - if (nextLink == null) - { - throw new ArgumentNullException(nameof(nextLink)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateListNextPageRequest(nextLink, resourceGroupName, workspaceName, skiptoken, count, isDefault, names, searchText, orderBy, orderByAsc); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - DatastorePropertiesResourceArmPaginatedResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = DatastorePropertiesResourceArmPaginatedResult.DeserializeDatastorePropertiesResourceArmPaginatedResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw _clientDiagnostics.CreateRequestFailedException(message.Response); - } - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/EnvironmentContainersOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/EnvironmentContainersOperations.cs deleted file mode 100644 index cdf459c58802a..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/EnvironmentContainersOperations.cs +++ /dev/null @@ -1,265 +0,0 @@ -// 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; -using Azure.ResourceManager.MachineLearningServices.Models; - -namespace Azure.ResourceManager.MachineLearningServices -{ - /// The EnvironmentContainers service client. - public partial class EnvironmentContainersOperations - { - private readonly ClientDiagnostics _clientDiagnostics; - private readonly HttpPipeline _pipeline; - internal EnvironmentContainersRestOperations RestClient { get; } - - /// Initializes a new instance of EnvironmentContainersOperations for mocking. - protected EnvironmentContainersOperations() - { - } - - /// Initializes a new instance of EnvironmentContainersOperations. - /// The handler for diagnostic messaging in the client. - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// Azure subscription identifier. - /// server parameter. - /// Api Version. - internal EnvironmentContainersOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2020-09-01-preview") - { - RestClient = new EnvironmentContainersRestOperations(clientDiagnostics, pipeline, subscriptionId, endpoint, apiVersion); - _clientDiagnostics = clientDiagnostics; - _pipeline = pipeline; - } - - /// Create or update container. - /// Container name. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Container entity to create or update. - /// The cancellation token to use. - public virtual async Task> CreateOrUpdateAsync(string name, string resourceGroupName, string workspaceName, EnvironmentContainerResource body = null, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("EnvironmentContainersOperations.CreateOrUpdate"); - scope.Start(); - try - { - return await RestClient.CreateOrUpdateAsync(name, resourceGroupName, workspaceName, body, cancellationToken).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Create or update container. - /// Container name. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Container entity to create or update. - /// The cancellation token to use. - public virtual Response CreateOrUpdate(string name, string resourceGroupName, string workspaceName, EnvironmentContainerResource body = null, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("EnvironmentContainersOperations.CreateOrUpdate"); - scope.Start(); - try - { - return RestClient.CreateOrUpdate(name, resourceGroupName, workspaceName, body, cancellationToken); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Get container. - /// Container name. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - public virtual async Task> GetAsync(string name, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("EnvironmentContainersOperations.Get"); - scope.Start(); - try - { - return await RestClient.GetAsync(name, resourceGroupName, workspaceName, cancellationToken).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Get container. - /// Container name. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - public virtual Response Get(string name, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("EnvironmentContainersOperations.Get"); - scope.Start(); - try - { - return RestClient.Get(name, resourceGroupName, workspaceName, cancellationToken); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Delete container. - /// Container name. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - public virtual async Task DeleteAsync(string name, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("EnvironmentContainersOperations.Delete"); - scope.Start(); - try - { - return await RestClient.DeleteAsync(name, resourceGroupName, workspaceName, cancellationToken).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Delete container. - /// Container name. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - public virtual Response Delete(string name, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("EnvironmentContainersOperations.Delete"); - scope.Start(); - try - { - return RestClient.Delete(name, resourceGroupName, workspaceName, cancellationToken); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// List containers. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Continuation token for pagination. - /// The cancellation token to use. - /// or is null. - public virtual AsyncPageable ListAsync(string resourceGroupName, string workspaceName, string skiptoken = null, CancellationToken cancellationToken = default) - { - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - async Task> FirstPageFunc(int? pageSizeHint) - { - using var scope = _clientDiagnostics.CreateScope("EnvironmentContainersOperations.List"); - scope.Start(); - try - { - var response = await RestClient.ListAsync(resourceGroupName, workspaceName, skiptoken, 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("EnvironmentContainersOperations.List"); - scope.Start(); - try - { - var response = await RestClient.ListNextPageAsync(nextLink, resourceGroupName, workspaceName, skiptoken, 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 containers. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Continuation token for pagination. - /// The cancellation token to use. - /// or is null. - public virtual Pageable List(string resourceGroupName, string workspaceName, string skiptoken = null, CancellationToken cancellationToken = default) - { - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - Page FirstPageFunc(int? pageSizeHint) - { - using var scope = _clientDiagnostics.CreateScope("EnvironmentContainersOperations.List"); - scope.Start(); - try - { - var response = RestClient.List(resourceGroupName, workspaceName, skiptoken, 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("EnvironmentContainersOperations.List"); - scope.Start(); - try - { - var response = RestClient.ListNextPage(nextLink, resourceGroupName, workspaceName, skiptoken, 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/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/EnvironmentContainersRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/EnvironmentContainersRestOperations.cs deleted file mode 100644 index 9d06c7e941dac..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/EnvironmentContainersRestOperations.cs +++ /dev/null @@ -1,520 +0,0 @@ -// 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.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager.MachineLearningServices.Models; - -namespace Azure.ResourceManager.MachineLearningServices -{ - internal partial class EnvironmentContainersRestOperations - { - private string subscriptionId; - private Uri endpoint; - private string apiVersion; - private ClientDiagnostics _clientDiagnostics; - private HttpPipeline _pipeline; - - /// Initializes a new instance of EnvironmentContainersRestOperations. - /// The handler for diagnostic messaging in the client. - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// Azure subscription identifier. - /// server parameter. - /// Api Version. - /// or is null. - public EnvironmentContainersRestOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2020-09-01-preview") - { - if (subscriptionId == null) - { - throw new ArgumentNullException(nameof(subscriptionId)); - } - endpoint ??= new Uri("https://management.azure.com"); - if (apiVersion == null) - { - throw new ArgumentNullException(nameof(apiVersion)); - } - - this.subscriptionId = subscriptionId; - this.endpoint = endpoint; - this.apiVersion = apiVersion; - _clientDiagnostics = clientDiagnostics; - _pipeline = pipeline; - } - - internal HttpMessage CreateCreateOrUpdateRequest(string name, string resourceGroupName, string workspaceName, EnvironmentContainerResource body) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Put; - var uri = new RawRequestUriBuilder(); - uri.Reset(endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/environments/", false); - uri.AppendPath(name, true); - uri.AppendQuery("api-version", apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - if (body != null) - { - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(body); - request.Content = content; - } - return message; - } - - /// Create or update container. - /// Container name. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Container entity to create or update. - /// The cancellation token to use. - /// , , or is null. - public async Task> CreateOrUpdateAsync(string name, string resourceGroupName, string workspaceName, EnvironmentContainerResource body = null, CancellationToken cancellationToken = default) - { - if (name == null) - { - throw new ArgumentNullException(nameof(name)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateCreateOrUpdateRequest(name, resourceGroupName, workspaceName, body); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 201: - { - EnvironmentContainerResource value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = EnvironmentContainerResource.DeserializeEnvironmentContainerResource(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); - } - } - - /// Create or update container. - /// Container name. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Container entity to create or update. - /// The cancellation token to use. - /// , , or is null. - public Response CreateOrUpdate(string name, string resourceGroupName, string workspaceName, EnvironmentContainerResource body = null, CancellationToken cancellationToken = default) - { - if (name == null) - { - throw new ArgumentNullException(nameof(name)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateCreateOrUpdateRequest(name, resourceGroupName, workspaceName, body); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 201: - { - EnvironmentContainerResource value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = EnvironmentContainerResource.DeserializeEnvironmentContainerResource(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw _clientDiagnostics.CreateRequestFailedException(message.Response); - } - } - - internal HttpMessage CreateGetRequest(string name, string resourceGroupName, string workspaceName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/environments/", false); - uri.AppendPath(name, true); - uri.AppendQuery("api-version", apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - /// Get container. - /// Container name. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - /// , , or is null. - public async Task> GetAsync(string name, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - if (name == null) - { - throw new ArgumentNullException(nameof(name)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateGetRequest(name, resourceGroupName, workspaceName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - EnvironmentContainerResource value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = EnvironmentContainerResource.DeserializeEnvironmentContainerResource(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); - } - } - - /// Get container. - /// Container name. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - /// , , or is null. - public Response Get(string name, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - if (name == null) - { - throw new ArgumentNullException(nameof(name)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateGetRequest(name, resourceGroupName, workspaceName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - EnvironmentContainerResource value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = EnvironmentContainerResource.DeserializeEnvironmentContainerResource(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw _clientDiagnostics.CreateRequestFailedException(message.Response); - } - } - - internal HttpMessage CreateDeleteRequest(string name, string resourceGroupName, string workspaceName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Delete; - var uri = new RawRequestUriBuilder(); - uri.Reset(endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/environments/", false); - uri.AppendPath(name, true); - uri.AppendQuery("api-version", apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - /// Delete container. - /// Container name. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - /// , , or is null. - public async Task DeleteAsync(string name, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - if (name == null) - { - throw new ArgumentNullException(nameof(name)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateDeleteRequest(name, resourceGroupName, workspaceName); - 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 container. - /// Container name. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - /// , , or is null. - public Response Delete(string name, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - if (name == null) - { - throw new ArgumentNullException(nameof(name)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateDeleteRequest(name, resourceGroupName, workspaceName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 204: - return message.Response; - default: - throw _clientDiagnostics.CreateRequestFailedException(message.Response); - } - } - - internal HttpMessage CreateListRequest(string resourceGroupName, string workspaceName, string skiptoken) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/environments", false); - uri.AppendQuery("api-version", apiVersion, true); - if (skiptoken != null) - { - uri.AppendQuery("$skiptoken", skiptoken, true); - } - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - /// List containers. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Continuation token for pagination. - /// The cancellation token to use. - /// or is null. - public async Task> ListAsync(string resourceGroupName, string workspaceName, string skiptoken = null, CancellationToken cancellationToken = default) - { - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateListRequest(resourceGroupName, workspaceName, skiptoken); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - EnvironmentContainerResourceArmPaginatedResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = EnvironmentContainerResourceArmPaginatedResult.DeserializeEnvironmentContainerResourceArmPaginatedResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); - } - } - - /// List containers. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Continuation token for pagination. - /// The cancellation token to use. - /// or is null. - public Response List(string resourceGroupName, string workspaceName, string skiptoken = null, CancellationToken cancellationToken = default) - { - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateListRequest(resourceGroupName, workspaceName, skiptoken); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - EnvironmentContainerResourceArmPaginatedResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = EnvironmentContainerResourceArmPaginatedResult.DeserializeEnvironmentContainerResourceArmPaginatedResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw _clientDiagnostics.CreateRequestFailedException(message.Response); - } - } - - internal HttpMessage CreateListNextPageRequest(string nextLink, string resourceGroupName, string workspaceName, string skiptoken) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(endpoint); - uri.AppendRawNextLink(nextLink, false); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - /// List containers. - /// The URL to the next page of results. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Continuation token for pagination. - /// The cancellation token to use. - /// , , or is null. - public async Task> ListNextPageAsync(string nextLink, string resourceGroupName, string workspaceName, string skiptoken = null, CancellationToken cancellationToken = default) - { - if (nextLink == null) - { - throw new ArgumentNullException(nameof(nextLink)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateListNextPageRequest(nextLink, resourceGroupName, workspaceName, skiptoken); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - EnvironmentContainerResourceArmPaginatedResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = EnvironmentContainerResourceArmPaginatedResult.DeserializeEnvironmentContainerResourceArmPaginatedResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); - } - } - - /// List containers. - /// The URL to the next page of results. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Continuation token for pagination. - /// The cancellation token to use. - /// , , or is null. - public Response ListNextPage(string nextLink, string resourceGroupName, string workspaceName, string skiptoken = null, CancellationToken cancellationToken = default) - { - if (nextLink == null) - { - throw new ArgumentNullException(nameof(nextLink)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateListNextPageRequest(nextLink, resourceGroupName, workspaceName, skiptoken); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - EnvironmentContainerResourceArmPaginatedResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = EnvironmentContainerResourceArmPaginatedResult.DeserializeEnvironmentContainerResourceArmPaginatedResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw _clientDiagnostics.CreateRequestFailedException(message.Response); - } - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/EnvironmentSpecificationVersionsOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/EnvironmentSpecificationVersionsOperations.cs deleted file mode 100644 index dbbe6f6d1c947..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/EnvironmentSpecificationVersionsOperations.cs +++ /dev/null @@ -1,281 +0,0 @@ -// 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; -using Azure.ResourceManager.MachineLearningServices.Models; - -namespace Azure.ResourceManager.MachineLearningServices -{ - /// The EnvironmentSpecificationVersions service client. - public partial class EnvironmentSpecificationVersionsOperations - { - private readonly ClientDiagnostics _clientDiagnostics; - private readonly HttpPipeline _pipeline; - internal EnvironmentSpecificationVersionsRestOperations RestClient { get; } - - /// Initializes a new instance of EnvironmentSpecificationVersionsOperations for mocking. - protected EnvironmentSpecificationVersionsOperations() - { - } - - /// Initializes a new instance of EnvironmentSpecificationVersionsOperations. - /// The handler for diagnostic messaging in the client. - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// Azure subscription identifier. - /// server parameter. - /// Api Version. - internal EnvironmentSpecificationVersionsOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2020-09-01-preview") - { - RestClient = new EnvironmentSpecificationVersionsRestOperations(clientDiagnostics, pipeline, subscriptionId, endpoint, apiVersion); - _clientDiagnostics = clientDiagnostics; - _pipeline = pipeline; - } - - /// The String to use. - /// The String to use. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The EnvironmentSpecificationVersionResource to use. - /// The cancellation token to use. - public virtual async Task> CreateOrUpdateAsync(string name, string version, string resourceGroupName, string workspaceName, EnvironmentSpecificationVersionResource body = null, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("EnvironmentSpecificationVersionsOperations.CreateOrUpdate"); - scope.Start(); - try - { - return await RestClient.CreateOrUpdateAsync(name, version, resourceGroupName, workspaceName, body, cancellationToken).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// The String to use. - /// The String to use. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The EnvironmentSpecificationVersionResource to use. - /// The cancellation token to use. - public virtual Response CreateOrUpdate(string name, string version, string resourceGroupName, string workspaceName, EnvironmentSpecificationVersionResource body = null, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("EnvironmentSpecificationVersionsOperations.CreateOrUpdate"); - scope.Start(); - try - { - return RestClient.CreateOrUpdate(name, version, resourceGroupName, workspaceName, body, cancellationToken); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Get version. - /// Container name. - /// Version identifier. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - public virtual async Task> GetAsync(string name, string version, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("EnvironmentSpecificationVersionsOperations.Get"); - scope.Start(); - try - { - return await RestClient.GetAsync(name, version, resourceGroupName, workspaceName, cancellationToken).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Get version. - /// Container name. - /// Version identifier. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - public virtual Response Get(string name, string version, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("EnvironmentSpecificationVersionsOperations.Get"); - scope.Start(); - try - { - return RestClient.Get(name, version, resourceGroupName, workspaceName, cancellationToken); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Delete version. - /// Container name. - /// Version identifier. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - public virtual async Task DeleteAsync(string name, string version, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("EnvironmentSpecificationVersionsOperations.Delete"); - scope.Start(); - try - { - return await RestClient.DeleteAsync(name, version, resourceGroupName, workspaceName, cancellationToken).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Delete version. - /// Container name. - /// Version identifier. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - public virtual Response Delete(string name, string version, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("EnvironmentSpecificationVersionsOperations.Delete"); - scope.Start(); - try - { - return RestClient.Delete(name, version, resourceGroupName, workspaceName, cancellationToken); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// The String to use. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The String to use. - /// The String to use. - /// Continuation token for pagination. - /// The cancellation token to use. - /// , , or is null. - public virtual AsyncPageable ListAsync(string name, string resourceGroupName, string workspaceName, string orderby = null, string top = null, string skiptoken = null, CancellationToken cancellationToken = default) - { - if (name == null) - { - throw new ArgumentNullException(nameof(name)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - async Task> FirstPageFunc(int? pageSizeHint) - { - using var scope = _clientDiagnostics.CreateScope("EnvironmentSpecificationVersionsOperations.List"); - scope.Start(); - try - { - var response = await RestClient.ListAsync(name, resourceGroupName, workspaceName, orderby, top, skiptoken, 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("EnvironmentSpecificationVersionsOperations.List"); - scope.Start(); - try - { - var response = await RestClient.ListNextPageAsync(nextLink, name, resourceGroupName, workspaceName, orderby, top, skiptoken, 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); - } - - /// The String to use. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The String to use. - /// The String to use. - /// Continuation token for pagination. - /// The cancellation token to use. - /// , , or is null. - public virtual Pageable List(string name, string resourceGroupName, string workspaceName, string orderby = null, string top = null, string skiptoken = null, CancellationToken cancellationToken = default) - { - if (name == null) - { - throw new ArgumentNullException(nameof(name)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - Page FirstPageFunc(int? pageSizeHint) - { - using var scope = _clientDiagnostics.CreateScope("EnvironmentSpecificationVersionsOperations.List"); - scope.Start(); - try - { - var response = RestClient.List(name, resourceGroupName, workspaceName, orderby, top, skiptoken, 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("EnvironmentSpecificationVersionsOperations.List"); - scope.Start(); - try - { - var response = RestClient.ListNextPage(nextLink, name, resourceGroupName, workspaceName, orderby, top, skiptoken, 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/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/EnvironmentSpecificationVersionsRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/EnvironmentSpecificationVersionsRestOperations.cs deleted file mode 100644 index 3aa4859269e64..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/EnvironmentSpecificationVersionsRestOperations.cs +++ /dev/null @@ -1,588 +0,0 @@ -// 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.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager.MachineLearningServices.Models; - -namespace Azure.ResourceManager.MachineLearningServices -{ - internal partial class EnvironmentSpecificationVersionsRestOperations - { - private string subscriptionId; - private Uri endpoint; - private string apiVersion; - private ClientDiagnostics _clientDiagnostics; - private HttpPipeline _pipeline; - - /// Initializes a new instance of EnvironmentSpecificationVersionsRestOperations. - /// The handler for diagnostic messaging in the client. - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// Azure subscription identifier. - /// server parameter. - /// Api Version. - /// or is null. - public EnvironmentSpecificationVersionsRestOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2020-09-01-preview") - { - if (subscriptionId == null) - { - throw new ArgumentNullException(nameof(subscriptionId)); - } - endpoint ??= new Uri("https://management.azure.com"); - if (apiVersion == null) - { - throw new ArgumentNullException(nameof(apiVersion)); - } - - this.subscriptionId = subscriptionId; - this.endpoint = endpoint; - this.apiVersion = apiVersion; - _clientDiagnostics = clientDiagnostics; - _pipeline = pipeline; - } - - internal HttpMessage CreateCreateOrUpdateRequest(string name, string version, string resourceGroupName, string workspaceName, EnvironmentSpecificationVersionResource body) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Put; - var uri = new RawRequestUriBuilder(); - uri.Reset(endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/environments/", false); - uri.AppendPath(name, true); - uri.AppendPath("/versions/", false); - uri.AppendPath(version, true); - uri.AppendQuery("api-version", apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - if (body != null) - { - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(body); - request.Content = content; - } - return message; - } - - /// The String to use. - /// The String to use. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The EnvironmentSpecificationVersionResource to use. - /// The cancellation token to use. - /// , , , or is null. - public async Task> CreateOrUpdateAsync(string name, string version, string resourceGroupName, string workspaceName, EnvironmentSpecificationVersionResource body = null, CancellationToken cancellationToken = default) - { - if (name == null) - { - throw new ArgumentNullException(nameof(name)); - } - if (version == null) - { - throw new ArgumentNullException(nameof(version)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateCreateOrUpdateRequest(name, version, resourceGroupName, workspaceName, body); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 201: - { - EnvironmentSpecificationVersionResource value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = EnvironmentSpecificationVersionResource.DeserializeEnvironmentSpecificationVersionResource(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); - } - } - - /// The String to use. - /// The String to use. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The EnvironmentSpecificationVersionResource to use. - /// The cancellation token to use. - /// , , , or is null. - public Response CreateOrUpdate(string name, string version, string resourceGroupName, string workspaceName, EnvironmentSpecificationVersionResource body = null, CancellationToken cancellationToken = default) - { - if (name == null) - { - throw new ArgumentNullException(nameof(name)); - } - if (version == null) - { - throw new ArgumentNullException(nameof(version)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateCreateOrUpdateRequest(name, version, resourceGroupName, workspaceName, body); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 201: - { - EnvironmentSpecificationVersionResource value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = EnvironmentSpecificationVersionResource.DeserializeEnvironmentSpecificationVersionResource(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw _clientDiagnostics.CreateRequestFailedException(message.Response); - } - } - - internal HttpMessage CreateGetRequest(string name, string version, string resourceGroupName, string workspaceName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/environments/", false); - uri.AppendPath(name, true); - uri.AppendPath("/versions/", false); - uri.AppendPath(version, true); - uri.AppendQuery("api-version", apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - /// Get version. - /// Container name. - /// Version identifier. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - /// , , , or is null. - public async Task> GetAsync(string name, string version, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - if (name == null) - { - throw new ArgumentNullException(nameof(name)); - } - if (version == null) - { - throw new ArgumentNullException(nameof(version)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateGetRequest(name, version, resourceGroupName, workspaceName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - EnvironmentSpecificationVersionResource value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = EnvironmentSpecificationVersionResource.DeserializeEnvironmentSpecificationVersionResource(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); - } - } - - /// Get version. - /// Container name. - /// Version identifier. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - /// , , , or is null. - public Response Get(string name, string version, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - if (name == null) - { - throw new ArgumentNullException(nameof(name)); - } - if (version == null) - { - throw new ArgumentNullException(nameof(version)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateGetRequest(name, version, resourceGroupName, workspaceName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - EnvironmentSpecificationVersionResource value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = EnvironmentSpecificationVersionResource.DeserializeEnvironmentSpecificationVersionResource(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw _clientDiagnostics.CreateRequestFailedException(message.Response); - } - } - - internal HttpMessage CreateDeleteRequest(string name, string version, string resourceGroupName, string workspaceName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Delete; - var uri = new RawRequestUriBuilder(); - uri.Reset(endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/environments/", false); - uri.AppendPath(name, true); - uri.AppendPath("/versions/", false); - uri.AppendPath(version, true); - uri.AppendQuery("api-version", apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - /// Delete version. - /// Container name. - /// Version identifier. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - /// , , , or is null. - public async Task DeleteAsync(string name, string version, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - if (name == null) - { - throw new ArgumentNullException(nameof(name)); - } - if (version == null) - { - throw new ArgumentNullException(nameof(version)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateDeleteRequest(name, version, resourceGroupName, workspaceName); - 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 version. - /// Container name. - /// Version identifier. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - /// , , , or is null. - public Response Delete(string name, string version, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - if (name == null) - { - throw new ArgumentNullException(nameof(name)); - } - if (version == null) - { - throw new ArgumentNullException(nameof(version)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateDeleteRequest(name, version, resourceGroupName, workspaceName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 204: - return message.Response; - default: - throw _clientDiagnostics.CreateRequestFailedException(message.Response); - } - } - - internal HttpMessage CreateListRequest(string name, string resourceGroupName, string workspaceName, string orderby, string top, string skiptoken) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/environments/", false); - uri.AppendPath(name, true); - uri.AppendPath("/versions", false); - uri.AppendQuery("api-version", apiVersion, true); - if (orderby != null) - { - uri.AppendQuery("$orderby", orderby, true); - } - if (top != null) - { - uri.AppendQuery("$top", top, true); - } - if (skiptoken != null) - { - uri.AppendQuery("$skiptoken", skiptoken, true); - } - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - /// The String to use. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The String to use. - /// The String to use. - /// Continuation token for pagination. - /// The cancellation token to use. - /// , , or is null. - public async Task> ListAsync(string name, string resourceGroupName, string workspaceName, string orderby = null, string top = null, string skiptoken = null, CancellationToken cancellationToken = default) - { - if (name == null) - { - throw new ArgumentNullException(nameof(name)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateListRequest(name, resourceGroupName, workspaceName, orderby, top, skiptoken); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - EnvironmentSpecificationVersionResourceArmPaginatedResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = EnvironmentSpecificationVersionResourceArmPaginatedResult.DeserializeEnvironmentSpecificationVersionResourceArmPaginatedResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); - } - } - - /// The String to use. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The String to use. - /// The String to use. - /// Continuation token for pagination. - /// The cancellation token to use. - /// , , or is null. - public Response List(string name, string resourceGroupName, string workspaceName, string orderby = null, string top = null, string skiptoken = null, CancellationToken cancellationToken = default) - { - if (name == null) - { - throw new ArgumentNullException(nameof(name)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateListRequest(name, resourceGroupName, workspaceName, orderby, top, skiptoken); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - EnvironmentSpecificationVersionResourceArmPaginatedResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = EnvironmentSpecificationVersionResourceArmPaginatedResult.DeserializeEnvironmentSpecificationVersionResourceArmPaginatedResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw _clientDiagnostics.CreateRequestFailedException(message.Response); - } - } - - internal HttpMessage CreateListNextPageRequest(string nextLink, string name, string resourceGroupName, string workspaceName, string orderby, string top, string skiptoken) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(endpoint); - uri.AppendRawNextLink(nextLink, false); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - /// The URL to the next page of results. - /// The String to use. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The String to use. - /// The String to use. - /// Continuation token for pagination. - /// The cancellation token to use. - /// , , , or is null. - public async Task> ListNextPageAsync(string nextLink, string name, string resourceGroupName, string workspaceName, string orderby = null, string top = null, string skiptoken = null, CancellationToken cancellationToken = default) - { - if (nextLink == null) - { - throw new ArgumentNullException(nameof(nextLink)); - } - if (name == null) - { - throw new ArgumentNullException(nameof(name)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateListNextPageRequest(nextLink, name, resourceGroupName, workspaceName, orderby, top, skiptoken); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - EnvironmentSpecificationVersionResourceArmPaginatedResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = EnvironmentSpecificationVersionResourceArmPaginatedResult.DeserializeEnvironmentSpecificationVersionResourceArmPaginatedResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); - } - } - - /// The URL to the next page of results. - /// The String to use. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The String to use. - /// The String to use. - /// Continuation token for pagination. - /// The cancellation token to use. - /// , , , or is null. - public Response ListNextPage(string nextLink, string name, string resourceGroupName, string workspaceName, string orderby = null, string top = null, string skiptoken = null, CancellationToken cancellationToken = default) - { - if (nextLink == null) - { - throw new ArgumentNullException(nameof(nextLink)); - } - if (name == null) - { - throw new ArgumentNullException(nameof(name)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateListNextPageRequest(nextLink, name, resourceGroupName, workspaceName, orderby, top, skiptoken); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - EnvironmentSpecificationVersionResourceArmPaginatedResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = EnvironmentSpecificationVersionResourceArmPaginatedResult.DeserializeEnvironmentSpecificationVersionResourceArmPaginatedResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw _clientDiagnostics.CreateRequestFailedException(message.Response); - } - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/JobsOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/JobsOperations.cs deleted file mode 100644 index dbced772ddda3..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/JobsOperations.cs +++ /dev/null @@ -1,347 +0,0 @@ -// 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; -using Azure.ResourceManager.MachineLearningServices.Models; - -namespace Azure.ResourceManager.MachineLearningServices -{ - /// The Jobs service client. - public partial class JobsOperations - { - private readonly ClientDiagnostics _clientDiagnostics; - private readonly HttpPipeline _pipeline; - internal JobsRestOperations RestClient { get; } - - /// Initializes a new instance of JobsOperations for mocking. - protected JobsOperations() - { - } - - /// Initializes a new instance of JobsOperations. - /// The handler for diagnostic messaging in the client. - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// Azure subscription identifier. - /// server parameter. - /// Api Version. - internal JobsOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2020-09-01-preview") - { - RestClient = new JobsRestOperations(clientDiagnostics, pipeline, subscriptionId, endpoint, apiVersion); - _clientDiagnostics = clientDiagnostics; - _pipeline = pipeline; - } - - /// Creates and executes a Job. - /// The name and identifier for the Job. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Job definition object. - /// The cancellation token to use. - public virtual async Task> CreateOrUpdateAsync(string id, string resourceGroupName, string workspaceName, JobBaseResource body = null, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("JobsOperations.CreateOrUpdate"); - scope.Start(); - try - { - return await RestClient.CreateOrUpdateAsync(id, resourceGroupName, workspaceName, body, cancellationToken).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Creates and executes a Job. - /// The name and identifier for the Job. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Job definition object. - /// The cancellation token to use. - public virtual Response CreateOrUpdate(string id, string resourceGroupName, string workspaceName, JobBaseResource body = null, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("JobsOperations.CreateOrUpdate"); - scope.Start(); - try - { - return RestClient.CreateOrUpdate(id, resourceGroupName, workspaceName, body, cancellationToken); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Gets a Job by name/id. - /// The name and identifier for the Job. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - public virtual async Task> GetAsync(string id, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("JobsOperations.Get"); - scope.Start(); - try - { - return await RestClient.GetAsync(id, resourceGroupName, workspaceName, cancellationToken).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Gets a Job by name/id. - /// The name and identifier for the Job. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - public virtual Response Get(string id, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("JobsOperations.Get"); - scope.Start(); - try - { - return RestClient.Get(id, resourceGroupName, workspaceName, cancellationToken); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Deletes a Job. - /// The name and identifier for the Job. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - public virtual async Task DeleteAsync(string id, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("JobsOperations.Delete"); - scope.Start(); - try - { - return await RestClient.DeleteAsync(id, resourceGroupName, workspaceName, cancellationToken).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Deletes a Job. - /// The name and identifier for the Job. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - public virtual Response Delete(string id, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("JobsOperations.Delete"); - scope.Start(); - try - { - return RestClient.Delete(id, resourceGroupName, workspaceName, cancellationToken); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Cancels a Job. - /// The name and identifier for the Job. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - public virtual async Task CancelAsync(string id, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("JobsOperations.Cancel"); - scope.Start(); - try - { - return await RestClient.CancelAsync(id, resourceGroupName, workspaceName, cancellationToken).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Cancels a Job. - /// The name and identifier for the Job. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - public virtual Response Cancel(string id, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("JobsOperations.Cancel"); - scope.Start(); - try - { - return RestClient.Cancel(id, resourceGroupName, workspaceName, cancellationToken); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Polls a Job operation. - /// The name and identifier for the Job. - /// The operation ID of the async operation to be polled. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - public virtual async Task PollAsync(string id, string operationId, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("JobsOperations.Poll"); - scope.Start(); - try - { - return await RestClient.PollAsync(id, operationId, resourceGroupName, workspaceName, cancellationToken).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Polls a Job operation. - /// The name and identifier for the Job. - /// The operation ID of the async operation to be polled. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - public virtual Response Poll(string id, string operationId, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("JobsOperations.Poll"); - scope.Start(); - try - { - return RestClient.Poll(id, operationId, resourceGroupName, workspaceName, cancellationToken); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Lists Jobs in the workspace. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Continuation token for pagination. - /// The cancellation token to use. - /// or is null. - public virtual AsyncPageable ListAsync(string resourceGroupName, string workspaceName, string skiptoken = null, CancellationToken cancellationToken = default) - { - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - async Task> FirstPageFunc(int? pageSizeHint) - { - using var scope = _clientDiagnostics.CreateScope("JobsOperations.List"); - scope.Start(); - try - { - var response = await RestClient.ListAsync(resourceGroupName, workspaceName, skiptoken, 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("JobsOperations.List"); - scope.Start(); - try - { - var response = await RestClient.ListNextPageAsync(nextLink, resourceGroupName, workspaceName, skiptoken, 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 Jobs in the workspace. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Continuation token for pagination. - /// The cancellation token to use. - /// or is null. - public virtual Pageable List(string resourceGroupName, string workspaceName, string skiptoken = null, CancellationToken cancellationToken = default) - { - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - Page FirstPageFunc(int? pageSizeHint) - { - using var scope = _clientDiagnostics.CreateScope("JobsOperations.List"); - scope.Start(); - try - { - var response = RestClient.List(resourceGroupName, workspaceName, skiptoken, 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("JobsOperations.List"); - scope.Start(); - try - { - var response = RestClient.ListNextPage(nextLink, resourceGroupName, workspaceName, skiptoken, 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/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/JobsRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/JobsRestOperations.cs deleted file mode 100644 index f2249fd2bfbd7..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/JobsRestOperations.cs +++ /dev/null @@ -1,707 +0,0 @@ -// 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.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager.MachineLearningServices.Models; - -namespace Azure.ResourceManager.MachineLearningServices -{ - internal partial class JobsRestOperations - { - private string subscriptionId; - private Uri endpoint; - private string apiVersion; - private ClientDiagnostics _clientDiagnostics; - private HttpPipeline _pipeline; - - /// Initializes a new instance of JobsRestOperations. - /// The handler for diagnostic messaging in the client. - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// Azure subscription identifier. - /// server parameter. - /// Api Version. - /// or is null. - public JobsRestOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2020-09-01-preview") - { - if (subscriptionId == null) - { - throw new ArgumentNullException(nameof(subscriptionId)); - } - endpoint ??= new Uri("https://management.azure.com"); - if (apiVersion == null) - { - throw new ArgumentNullException(nameof(apiVersion)); - } - - this.subscriptionId = subscriptionId; - this.endpoint = endpoint; - this.apiVersion = apiVersion; - _clientDiagnostics = clientDiagnostics; - _pipeline = pipeline; - } - - internal HttpMessage CreateCreateOrUpdateRequest(string id, string resourceGroupName, string workspaceName, JobBaseResource body) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Put; - var uri = new RawRequestUriBuilder(); - uri.Reset(endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/jobs/", false); - uri.AppendPath(id, true); - uri.AppendQuery("api-version", apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - if (body != null) - { - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(body); - request.Content = content; - } - return message; - } - - /// Creates and executes a Job. - /// The name and identifier for the Job. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Job definition object. - /// The cancellation token to use. - /// , , or is null. - public async Task> CreateOrUpdateAsync(string id, string resourceGroupName, string workspaceName, JobBaseResource body = null, CancellationToken cancellationToken = default) - { - if (id == null) - { - throw new ArgumentNullException(nameof(id)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateCreateOrUpdateRequest(id, resourceGroupName, workspaceName, body); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 201: - { - JobBaseResource value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = JobBaseResource.DeserializeJobBaseResource(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); - } - } - - /// Creates and executes a Job. - /// The name and identifier for the Job. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Job definition object. - /// The cancellation token to use. - /// , , or is null. - public Response CreateOrUpdate(string id, string resourceGroupName, string workspaceName, JobBaseResource body = null, CancellationToken cancellationToken = default) - { - if (id == null) - { - throw new ArgumentNullException(nameof(id)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateCreateOrUpdateRequest(id, resourceGroupName, workspaceName, body); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 201: - { - JobBaseResource value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = JobBaseResource.DeserializeJobBaseResource(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw _clientDiagnostics.CreateRequestFailedException(message.Response); - } - } - - internal HttpMessage CreateGetRequest(string id, string resourceGroupName, string workspaceName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/jobs/", false); - uri.AppendPath(id, true); - uri.AppendQuery("api-version", apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - /// Gets a Job by name/id. - /// The name and identifier for the Job. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - /// , , or is null. - public async Task> GetAsync(string id, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - if (id == null) - { - throw new ArgumentNullException(nameof(id)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateGetRequest(id, resourceGroupName, workspaceName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - JobBaseResource value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = JobBaseResource.DeserializeJobBaseResource(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); - } - } - - /// Gets a Job by name/id. - /// The name and identifier for the Job. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - /// , , or is null. - public Response Get(string id, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - if (id == null) - { - throw new ArgumentNullException(nameof(id)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateGetRequest(id, resourceGroupName, workspaceName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - JobBaseResource value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = JobBaseResource.DeserializeJobBaseResource(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw _clientDiagnostics.CreateRequestFailedException(message.Response); - } - } - - internal HttpMessage CreateDeleteRequest(string id, string resourceGroupName, string workspaceName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Delete; - var uri = new RawRequestUriBuilder(); - uri.Reset(endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/jobs/", false); - uri.AppendPath(id, true); - uri.AppendQuery("api-version", apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - /// Deletes a Job. - /// The name and identifier for the Job. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - /// , , or is null. - public async Task DeleteAsync(string id, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - if (id == null) - { - throw new ArgumentNullException(nameof(id)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateDeleteRequest(id, resourceGroupName, workspaceName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 202: - case 204: - return message.Response; - default: - throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); - } - } - - /// Deletes a Job. - /// The name and identifier for the Job. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - /// , , or is null. - public Response Delete(string id, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - if (id == null) - { - throw new ArgumentNullException(nameof(id)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateDeleteRequest(id, resourceGroupName, workspaceName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 202: - case 204: - return message.Response; - default: - throw _clientDiagnostics.CreateRequestFailedException(message.Response); - } - } - - internal HttpMessage CreateListRequest(string resourceGroupName, string workspaceName, string skiptoken) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/jobs", false); - uri.AppendQuery("api-version", apiVersion, true); - if (skiptoken != null) - { - uri.AppendQuery("$skiptoken", skiptoken, true); - } - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - /// Lists Jobs in the workspace. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Continuation token for pagination. - /// The cancellation token to use. - /// or is null. - public async Task> ListAsync(string resourceGroupName, string workspaceName, string skiptoken = null, CancellationToken cancellationToken = default) - { - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateListRequest(resourceGroupName, workspaceName, skiptoken); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - JobBaseResourceArmPaginatedResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = JobBaseResourceArmPaginatedResult.DeserializeJobBaseResourceArmPaginatedResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); - } - } - - /// Lists Jobs in the workspace. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Continuation token for pagination. - /// The cancellation token to use. - /// or is null. - public Response List(string resourceGroupName, string workspaceName, string skiptoken = null, CancellationToken cancellationToken = default) - { - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateListRequest(resourceGroupName, workspaceName, skiptoken); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - JobBaseResourceArmPaginatedResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = JobBaseResourceArmPaginatedResult.DeserializeJobBaseResourceArmPaginatedResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw _clientDiagnostics.CreateRequestFailedException(message.Response); - } - } - - internal HttpMessage CreateCancelRequest(string id, string resourceGroupName, string workspaceName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/jobs/", false); - uri.AppendPath(id, true); - uri.AppendPath("/cancel", false); - uri.AppendQuery("api-version", apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - /// Cancels a Job. - /// The name and identifier for the Job. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - /// , , or is null. - public async Task CancelAsync(string id, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - if (id == null) - { - throw new ArgumentNullException(nameof(id)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateCancelRequest(id, resourceGroupName, workspaceName); - 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 Job. - /// The name and identifier for the Job. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - /// , , or is null. - public Response Cancel(string id, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - if (id == null) - { - throw new ArgumentNullException(nameof(id)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateCancelRequest(id, resourceGroupName, workspaceName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - return message.Response; - default: - throw _clientDiagnostics.CreateRequestFailedException(message.Response); - } - } - - internal HttpMessage CreatePollRequest(string id, string operationId, string resourceGroupName, string workspaceName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/jobs/", false); - uri.AppendPath(id, true); - uri.AppendPath("/operationresults/", false); - uri.AppendPath(operationId, true); - uri.AppendQuery("api-version", apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - /// Polls a Job operation. - /// The name and identifier for the Job. - /// The operation ID of the async operation to be polled. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - /// , , , or is null. - public async Task PollAsync(string id, string operationId, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - if (id == null) - { - throw new ArgumentNullException(nameof(id)); - } - if (operationId == null) - { - throw new ArgumentNullException(nameof(operationId)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreatePollRequest(id, operationId, resourceGroupName, workspaceName); - 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); - } - } - - /// Polls a Job operation. - /// The name and identifier for the Job. - /// The operation ID of the async operation to be polled. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - /// , , , or is null. - public Response Poll(string id, string operationId, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - if (id == null) - { - throw new ArgumentNullException(nameof(id)); - } - if (operationId == null) - { - throw new ArgumentNullException(nameof(operationId)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreatePollRequest(id, operationId, resourceGroupName, workspaceName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 202: - return message.Response; - default: - throw _clientDiagnostics.CreateRequestFailedException(message.Response); - } - } - - internal HttpMessage CreateListNextPageRequest(string nextLink, string resourceGroupName, string workspaceName, string skiptoken) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(endpoint); - uri.AppendRawNextLink(nextLink, false); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - /// Lists Jobs in the workspace. - /// The URL to the next page of results. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Continuation token for pagination. - /// The cancellation token to use. - /// , , or is null. - public async Task> ListNextPageAsync(string nextLink, string resourceGroupName, string workspaceName, string skiptoken = null, CancellationToken cancellationToken = default) - { - if (nextLink == null) - { - throw new ArgumentNullException(nameof(nextLink)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateListNextPageRequest(nextLink, resourceGroupName, workspaceName, skiptoken); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - JobBaseResourceArmPaginatedResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = JobBaseResourceArmPaginatedResult.DeserializeJobBaseResourceArmPaginatedResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); - } - } - - /// Lists Jobs in the workspace. - /// The URL to the next page of results. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Continuation token for pagination. - /// The cancellation token to use. - /// , , or is null. - public Response ListNextPage(string nextLink, string resourceGroupName, string workspaceName, string skiptoken = null, CancellationToken cancellationToken = default) - { - if (nextLink == null) - { - throw new ArgumentNullException(nameof(nextLink)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateListNextPageRequest(nextLink, resourceGroupName, workspaceName, skiptoken); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - JobBaseResourceArmPaginatedResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = JobBaseResourceArmPaginatedResult.DeserializeJobBaseResourceArmPaginatedResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw _clientDiagnostics.CreateRequestFailedException(message.Response); - } - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/LabelingJobsOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/LabelingJobsOperations.cs deleted file mode 100644 index 665f8f42ca49a..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/LabelingJobsOperations.cs +++ /dev/null @@ -1,435 +0,0 @@ -// 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; -using Azure.ResourceManager.MachineLearningServices.Models; - -namespace Azure.ResourceManager.MachineLearningServices -{ - /// The LabelingJobs service client. - public partial class LabelingJobsOperations - { - private readonly ClientDiagnostics _clientDiagnostics; - private readonly HttpPipeline _pipeline; - internal LabelingJobsRestOperations RestClient { get; } - - /// Initializes a new instance of LabelingJobsOperations for mocking. - protected LabelingJobsOperations() - { - } - - /// Initializes a new instance of LabelingJobsOperations. - /// The handler for diagnostic messaging in the client. - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// Azure subscription identifier. - /// server parameter. - /// Api Version. - internal LabelingJobsOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2020-09-01-preview") - { - RestClient = new LabelingJobsRestOperations(clientDiagnostics, pipeline, subscriptionId, endpoint, apiVersion); - _clientDiagnostics = clientDiagnostics; - _pipeline = pipeline; - } - - /// Creates or updates a labeling job. - /// The name and identifier for the LabelingJob. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// LabelingJob definition object. - /// The cancellation token to use. - public virtual async Task> CreateOrUpdateAsync(string id, string resourceGroupName, string workspaceName, LabelingJobResource body = null, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("LabelingJobsOperations.CreateOrUpdate"); - scope.Start(); - try - { - return await RestClient.CreateOrUpdateAsync(id, resourceGroupName, workspaceName, body, cancellationToken).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Creates or updates a labeling job. - /// The name and identifier for the LabelingJob. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// LabelingJob definition object. - /// The cancellation token to use. - public virtual Response CreateOrUpdate(string id, string resourceGroupName, string workspaceName, LabelingJobResource body = null, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("LabelingJobsOperations.CreateOrUpdate"); - scope.Start(); - try - { - return RestClient.CreateOrUpdate(id, resourceGroupName, workspaceName, body, cancellationToken); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Gets a labeling job by name/id. - /// The name and identifier for the LabelingJob. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Boolean value to indicate whether to include JobInstructions in response. - /// Boolean value to indicate Whether to include LabelCategories in response. - /// The cancellation token to use. - public virtual async Task> GetAsync(string id, string resourceGroupName, string workspaceName, bool? includeJobInstructions = null, bool? includeLabelCategories = null, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("LabelingJobsOperations.Get"); - scope.Start(); - try - { - return await RestClient.GetAsync(id, resourceGroupName, workspaceName, includeJobInstructions, includeLabelCategories, cancellationToken).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Gets a labeling job by name/id. - /// The name and identifier for the LabelingJob. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Boolean value to indicate whether to include JobInstructions in response. - /// Boolean value to indicate Whether to include LabelCategories in response. - /// The cancellation token to use. - public virtual Response Get(string id, string resourceGroupName, string workspaceName, bool? includeJobInstructions = null, bool? includeLabelCategories = null, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("LabelingJobsOperations.Get"); - scope.Start(); - try - { - return RestClient.Get(id, resourceGroupName, workspaceName, includeJobInstructions, includeLabelCategories, cancellationToken); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Delete a labeling job. - /// The name and identifier for the LabelingJob. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - public virtual async Task DeleteAsync(string id, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("LabelingJobsOperations.Delete"); - scope.Start(); - try - { - return await RestClient.DeleteAsync(id, resourceGroupName, workspaceName, cancellationToken).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Delete a labeling job. - /// The name and identifier for the LabelingJob. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - public virtual Response Delete(string id, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("LabelingJobsOperations.Delete"); - scope.Start(); - try - { - return RestClient.Delete(id, resourceGroupName, workspaceName, cancellationToken); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Pause a labeling job. - /// The name and identifier for the LabelingJob. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - public virtual async Task PauseAsync(string id, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("LabelingJobsOperations.Pause"); - scope.Start(); - try - { - return await RestClient.PauseAsync(id, resourceGroupName, workspaceName, cancellationToken).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Pause a labeling job. - /// The name and identifier for the LabelingJob. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - public virtual Response Pause(string id, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("LabelingJobsOperations.Pause"); - scope.Start(); - try - { - return RestClient.Pause(id, resourceGroupName, workspaceName, cancellationToken); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Resume a labeling job. - /// The name and identifier for the LabelingJob. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - public virtual async Task ResumeAsync(string id, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("LabelingJobsOperations.Resume"); - scope.Start(); - try - { - return await RestClient.ResumeAsync(id, resourceGroupName, workspaceName, cancellationToken).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Resume a labeling job. - /// The name and identifier for the LabelingJob. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - public virtual Response Resume(string id, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("LabelingJobsOperations.Resume"); - scope.Start(); - try - { - return RestClient.Resume(id, resourceGroupName, workspaceName, cancellationToken); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Export labels from a labeling job. - /// The name and identifier for the LabelingJob. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The desired format of export operation. - /// The cancellation token to use. - public virtual async Task ExportLabelsAsync(string id, string resourceGroupName, string workspaceName, ExportFormatType? body = null, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("LabelingJobsOperations.ExportLabels"); - scope.Start(); - try - { - return await RestClient.ExportLabelsAsync(id, resourceGroupName, workspaceName, body, cancellationToken).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Export labels from a labeling job. - /// The name and identifier for the LabelingJob. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The desired format of export operation. - /// The cancellation token to use. - public virtual Response ExportLabels(string id, string resourceGroupName, string workspaceName, ExportFormatType? body = null, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("LabelingJobsOperations.ExportLabels"); - scope.Start(); - try - { - return RestClient.ExportLabels(id, resourceGroupName, workspaceName, body, cancellationToken); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Get export summary from a labeling job. - /// The name and identifier for the LabelingJob. - /// The unique identifier of Export Labels operation. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - public virtual async Task> GetExportSummaryAsync(string id, Guid exportId, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("LabelingJobsOperations.GetExportSummary"); - scope.Start(); - try - { - return await RestClient.GetExportSummaryAsync(id, exportId, resourceGroupName, workspaceName, cancellationToken).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Get export summary from a labeling job. - /// The name and identifier for the LabelingJob. - /// The unique identifier of Export Labels operation. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - public virtual Response GetExportSummary(string id, Guid exportId, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("LabelingJobsOperations.GetExportSummary"); - scope.Start(); - try - { - return RestClient.GetExportSummary(id, exportId, resourceGroupName, workspaceName, cancellationToken); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Lists labeling jobs in the workspace. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Continuation token for pagination. - /// Number of labeling jobs to return. - /// The cancellation token to use. - /// or is null. - public virtual AsyncPageable ListAsync(string resourceGroupName, string workspaceName, string skiptoken = null, int? count = null, CancellationToken cancellationToken = default) - { - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - async Task> FirstPageFunc(int? pageSizeHint) - { - using var scope = _clientDiagnostics.CreateScope("LabelingJobsOperations.List"); - scope.Start(); - try - { - var response = await RestClient.ListAsync(resourceGroupName, workspaceName, skiptoken, count, 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("LabelingJobsOperations.List"); - scope.Start(); - try - { - var response = await RestClient.ListNextPageAsync(nextLink, resourceGroupName, workspaceName, skiptoken, count, 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 labeling jobs in the workspace. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Continuation token for pagination. - /// Number of labeling jobs to return. - /// The cancellation token to use. - /// or is null. - public virtual Pageable List(string resourceGroupName, string workspaceName, string skiptoken = null, int? count = null, CancellationToken cancellationToken = default) - { - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - Page FirstPageFunc(int? pageSizeHint) - { - using var scope = _clientDiagnostics.CreateScope("LabelingJobsOperations.List"); - scope.Start(); - try - { - var response = RestClient.List(resourceGroupName, workspaceName, skiptoken, count, 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("LabelingJobsOperations.List"); - scope.Start(); - try - { - var response = RestClient.ListNextPage(nextLink, resourceGroupName, workspaceName, skiptoken, count, 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/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/LabelingJobsRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/LabelingJobsRestOperations.cs deleted file mode 100644 index 52dda109ecd85..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/LabelingJobsRestOperations.cs +++ /dev/null @@ -1,906 +0,0 @@ -// 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.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager.MachineLearningServices.Models; - -namespace Azure.ResourceManager.MachineLearningServices -{ - internal partial class LabelingJobsRestOperations - { - private string subscriptionId; - private Uri endpoint; - private string apiVersion; - private ClientDiagnostics _clientDiagnostics; - private HttpPipeline _pipeline; - - /// Initializes a new instance of LabelingJobsRestOperations. - /// The handler for diagnostic messaging in the client. - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// Azure subscription identifier. - /// server parameter. - /// Api Version. - /// or is null. - public LabelingJobsRestOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2020-09-01-preview") - { - if (subscriptionId == null) - { - throw new ArgumentNullException(nameof(subscriptionId)); - } - endpoint ??= new Uri("https://management.azure.com"); - if (apiVersion == null) - { - throw new ArgumentNullException(nameof(apiVersion)); - } - - this.subscriptionId = subscriptionId; - this.endpoint = endpoint; - this.apiVersion = apiVersion; - _clientDiagnostics = clientDiagnostics; - _pipeline = pipeline; - } - - internal HttpMessage CreateCreateOrUpdateRequest(string id, string resourceGroupName, string workspaceName, LabelingJobResource body) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Put; - var uri = new RawRequestUriBuilder(); - uri.Reset(endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/labelingJobs/", false); - uri.AppendPath(id, true); - uri.AppendQuery("api-version", apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - if (body != null) - { - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(body); - request.Content = content; - } - return message; - } - - /// Creates or updates a labeling job. - /// The name and identifier for the LabelingJob. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// LabelingJob definition object. - /// The cancellation token to use. - /// , , or is null. - public async Task> CreateOrUpdateAsync(string id, string resourceGroupName, string workspaceName, LabelingJobResource body = null, CancellationToken cancellationToken = default) - { - if (id == null) - { - throw new ArgumentNullException(nameof(id)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateCreateOrUpdateRequest(id, resourceGroupName, workspaceName, body); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 201: - { - LabelingJobResource value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = LabelingJobResource.DeserializeLabelingJobResource(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); - } - } - - /// Creates or updates a labeling job. - /// The name and identifier for the LabelingJob. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// LabelingJob definition object. - /// The cancellation token to use. - /// , , or is null. - public Response CreateOrUpdate(string id, string resourceGroupName, string workspaceName, LabelingJobResource body = null, CancellationToken cancellationToken = default) - { - if (id == null) - { - throw new ArgumentNullException(nameof(id)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateCreateOrUpdateRequest(id, resourceGroupName, workspaceName, body); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 201: - { - LabelingJobResource value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = LabelingJobResource.DeserializeLabelingJobResource(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw _clientDiagnostics.CreateRequestFailedException(message.Response); - } - } - - internal HttpMessage CreateGetRequest(string id, string resourceGroupName, string workspaceName, bool? includeJobInstructions, bool? includeLabelCategories) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/labelingJobs/", false); - uri.AppendPath(id, true); - uri.AppendQuery("api-version", apiVersion, true); - if (includeJobInstructions != null) - { - uri.AppendQuery("includeJobInstructions", includeJobInstructions.Value, true); - } - if (includeLabelCategories != null) - { - uri.AppendQuery("includeLabelCategories", includeLabelCategories.Value, true); - } - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - /// Gets a labeling job by name/id. - /// The name and identifier for the LabelingJob. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Boolean value to indicate whether to include JobInstructions in response. - /// Boolean value to indicate Whether to include LabelCategories in response. - /// The cancellation token to use. - /// , , or is null. - public async Task> GetAsync(string id, string resourceGroupName, string workspaceName, bool? includeJobInstructions = null, bool? includeLabelCategories = null, CancellationToken cancellationToken = default) - { - if (id == null) - { - throw new ArgumentNullException(nameof(id)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateGetRequest(id, resourceGroupName, workspaceName, includeJobInstructions, includeLabelCategories); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - LabelingJobResource value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = LabelingJobResource.DeserializeLabelingJobResource(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); - } - } - - /// Gets a labeling job by name/id. - /// The name and identifier for the LabelingJob. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Boolean value to indicate whether to include JobInstructions in response. - /// Boolean value to indicate Whether to include LabelCategories in response. - /// The cancellation token to use. - /// , , or is null. - public Response Get(string id, string resourceGroupName, string workspaceName, bool? includeJobInstructions = null, bool? includeLabelCategories = null, CancellationToken cancellationToken = default) - { - if (id == null) - { - throw new ArgumentNullException(nameof(id)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateGetRequest(id, resourceGroupName, workspaceName, includeJobInstructions, includeLabelCategories); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - LabelingJobResource value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = LabelingJobResource.DeserializeLabelingJobResource(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw _clientDiagnostics.CreateRequestFailedException(message.Response); - } - } - - internal HttpMessage CreateDeleteRequest(string id, string resourceGroupName, string workspaceName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Delete; - var uri = new RawRequestUriBuilder(); - uri.Reset(endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/labelingJobs/", false); - uri.AppendPath(id, true); - uri.AppendQuery("api-version", apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - /// Delete a labeling job. - /// The name and identifier for the LabelingJob. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - /// , , or is null. - public async Task DeleteAsync(string id, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - if (id == null) - { - throw new ArgumentNullException(nameof(id)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateDeleteRequest(id, resourceGroupName, workspaceName); - 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 a labeling job. - /// The name and identifier for the LabelingJob. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - /// , , or is null. - public Response Delete(string id, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - if (id == null) - { - throw new ArgumentNullException(nameof(id)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateDeleteRequest(id, resourceGroupName, workspaceName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 204: - return message.Response; - default: - throw _clientDiagnostics.CreateRequestFailedException(message.Response); - } - } - - internal HttpMessage CreateListRequest(string resourceGroupName, string workspaceName, string skiptoken, int? count) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/labelingJobs", false); - uri.AppendQuery("api-version", apiVersion, true); - if (skiptoken != null) - { - uri.AppendQuery("$skiptoken", skiptoken, true); - } - if (count != null) - { - uri.AppendQuery("count", count.Value, true); - } - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - /// Lists labeling jobs in the workspace. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Continuation token for pagination. - /// Number of labeling jobs to return. - /// The cancellation token to use. - /// or is null. - public async Task> ListAsync(string resourceGroupName, string workspaceName, string skiptoken = null, int? count = null, CancellationToken cancellationToken = default) - { - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateListRequest(resourceGroupName, workspaceName, skiptoken, count); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - LabelingJobResourceArmPaginatedResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = LabelingJobResourceArmPaginatedResult.DeserializeLabelingJobResourceArmPaginatedResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); - } - } - - /// Lists labeling jobs in the workspace. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Continuation token for pagination. - /// Number of labeling jobs to return. - /// The cancellation token to use. - /// or is null. - public Response List(string resourceGroupName, string workspaceName, string skiptoken = null, int? count = null, CancellationToken cancellationToken = default) - { - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateListRequest(resourceGroupName, workspaceName, skiptoken, count); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - LabelingJobResourceArmPaginatedResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = LabelingJobResourceArmPaginatedResult.DeserializeLabelingJobResourceArmPaginatedResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw _clientDiagnostics.CreateRequestFailedException(message.Response); - } - } - - internal HttpMessage CreatePauseRequest(string id, string resourceGroupName, string workspaceName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/labelingJobs/", false); - uri.AppendPath(id, true); - uri.AppendPath("/pause", false); - uri.AppendQuery("api-version", apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - /// Pause a labeling job. - /// The name and identifier for the LabelingJob. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - /// , , or is null. - public async Task PauseAsync(string id, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - if (id == null) - { - throw new ArgumentNullException(nameof(id)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreatePauseRequest(id, resourceGroupName, workspaceName); - 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); - } - } - - /// Pause a labeling job. - /// The name and identifier for the LabelingJob. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - /// , , or is null. - public Response Pause(string id, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - if (id == null) - { - throw new ArgumentNullException(nameof(id)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreatePauseRequest(id, resourceGroupName, workspaceName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - return message.Response; - default: - throw _clientDiagnostics.CreateRequestFailedException(message.Response); - } - } - - internal HttpMessage CreateResumeRequest(string id, string resourceGroupName, string workspaceName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/labelingJobs/", false); - uri.AppendPath(id, true); - uri.AppendPath("/resume", false); - uri.AppendQuery("api-version", apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - /// Resume a labeling job. - /// The name and identifier for the LabelingJob. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - /// , , or is null. - public async Task ResumeAsync(string id, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - if (id == null) - { - throw new ArgumentNullException(nameof(id)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateResumeRequest(id, resourceGroupName, workspaceName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 202: - return message.Response; - default: - throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); - } - } - - /// Resume a labeling job. - /// The name and identifier for the LabelingJob. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - /// , , or is null. - public Response Resume(string id, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - if (id == null) - { - throw new ArgumentNullException(nameof(id)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateResumeRequest(id, resourceGroupName, workspaceName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 202: - return message.Response; - default: - throw _clientDiagnostics.CreateRequestFailedException(message.Response); - } - } - - internal HttpMessage CreateExportLabelsRequest(string id, string resourceGroupName, string workspaceName, ExportFormatType? body) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/labelingJobs/", false); - uri.AppendPath(id, true); - uri.AppendPath("/exportLabels", false); - uri.AppendQuery("api-version", apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - if (body != null) - { - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteStringValue(body.Value.ToString()); - request.Content = content; - } - return message; - } - - /// Export labels from a labeling job. - /// The name and identifier for the LabelingJob. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The desired format of export operation. - /// The cancellation token to use. - /// , , or is null. - public async Task ExportLabelsAsync(string id, string resourceGroupName, string workspaceName, ExportFormatType? body = null, CancellationToken cancellationToken = default) - { - if (id == null) - { - throw new ArgumentNullException(nameof(id)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateExportLabelsRequest(id, resourceGroupName, workspaceName, body); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 202: - return message.Response; - default: - throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); - } - } - - /// Export labels from a labeling job. - /// The name and identifier for the LabelingJob. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The desired format of export operation. - /// The cancellation token to use. - /// , , or is null. - public Response ExportLabels(string id, string resourceGroupName, string workspaceName, ExportFormatType? body = null, CancellationToken cancellationToken = default) - { - if (id == null) - { - throw new ArgumentNullException(nameof(id)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateExportLabelsRequest(id, resourceGroupName, workspaceName, body); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 202: - return message.Response; - default: - throw _clientDiagnostics.CreateRequestFailedException(message.Response); - } - } - - internal HttpMessage CreateGetExportSummaryRequest(string id, Guid exportId, string resourceGroupName, string workspaceName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/labelingJobs/", false); - uri.AppendPath(id, true); - uri.AppendPath("/exportLabels/", false); - uri.AppendPath(exportId, true); - uri.AppendQuery("api-version", apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - /// Get export summary from a labeling job. - /// The name and identifier for the LabelingJob. - /// The unique identifier of Export Labels operation. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - /// , , or is null. - public async Task> GetExportSummaryAsync(string id, Guid exportId, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - if (id == null) - { - throw new ArgumentNullException(nameof(id)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateGetExportSummaryRequest(id, exportId, resourceGroupName, workspaceName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - ExportSummaryResource value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = ExportSummaryResource.DeserializeExportSummaryResource(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); - } - } - - /// Get export summary from a labeling job. - /// The name and identifier for the LabelingJob. - /// The unique identifier of Export Labels operation. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - /// , , or is null. - public Response GetExportSummary(string id, Guid exportId, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - if (id == null) - { - throw new ArgumentNullException(nameof(id)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateGetExportSummaryRequest(id, exportId, resourceGroupName, workspaceName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - ExportSummaryResource value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = ExportSummaryResource.DeserializeExportSummaryResource(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw _clientDiagnostics.CreateRequestFailedException(message.Response); - } - } - - internal HttpMessage CreateListNextPageRequest(string nextLink, string resourceGroupName, string workspaceName, string skiptoken, int? count) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(endpoint); - uri.AppendRawNextLink(nextLink, false); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - /// Lists labeling jobs in the workspace. - /// The URL to the next page of results. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Continuation token for pagination. - /// Number of labeling jobs to return. - /// The cancellation token to use. - /// , , or is null. - public async Task> ListNextPageAsync(string nextLink, string resourceGroupName, string workspaceName, string skiptoken = null, int? count = null, CancellationToken cancellationToken = default) - { - if (nextLink == null) - { - throw new ArgumentNullException(nameof(nextLink)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateListNextPageRequest(nextLink, resourceGroupName, workspaceName, skiptoken, count); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - LabelingJobResourceArmPaginatedResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = LabelingJobResourceArmPaginatedResult.DeserializeLabelingJobResourceArmPaginatedResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); - } - } - - /// Lists labeling jobs in the workspace. - /// The URL to the next page of results. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Continuation token for pagination. - /// Number of labeling jobs to return. - /// The cancellation token to use. - /// , , or is null. - public Response ListNextPage(string nextLink, string resourceGroupName, string workspaceName, string skiptoken = null, int? count = null, CancellationToken cancellationToken = default) - { - if (nextLink == null) - { - throw new ArgumentNullException(nameof(nextLink)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateListNextPageRequest(nextLink, resourceGroupName, workspaceName, skiptoken, count); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - LabelingJobResourceArmPaginatedResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = LabelingJobResourceArmPaginatedResult.DeserializeLabelingJobResourceArmPaginatedResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw _clientDiagnostics.CreateRequestFailedException(message.Response); - } - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/LinkedServicesOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/LinkedServicesOperations.cs deleted file mode 100644 index 5597fe0e42f2f..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/LinkedServicesOperations.cs +++ /dev/null @@ -1,202 +0,0 @@ -// 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.Pipeline; -using Azure.ResourceManager.MachineLearningServices.Models; - -namespace Azure.ResourceManager.MachineLearningServices -{ - /// The LinkedServices service client. - public partial class LinkedServicesOperations - { - private readonly ClientDiagnostics _clientDiagnostics; - private readonly HttpPipeline _pipeline; - internal LinkedServicesRestOperations RestClient { get; } - - /// Initializes a new instance of LinkedServicesOperations for mocking. - protected LinkedServicesOperations() - { - } - - /// Initializes a new instance of LinkedServicesOperations. - /// The handler for diagnostic messaging in the client. - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// Azure subscription identifier. - /// server parameter. - /// Api Version. - internal LinkedServicesOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2020-09-01-preview") - { - RestClient = new LinkedServicesRestOperations(clientDiagnostics, pipeline, subscriptionId, endpoint, apiVersion); - _clientDiagnostics = clientDiagnostics; - _pipeline = pipeline; - } - - /// List all linked services under an AML workspace. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - public virtual async Task> ListAsync(string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("LinkedServicesOperations.List"); - scope.Start(); - try - { - return await RestClient.ListAsync(resourceGroupName, workspaceName, cancellationToken).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// List all linked services under an AML workspace. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - public virtual Response List(string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("LinkedServicesOperations.List"); - scope.Start(); - try - { - return RestClient.List(resourceGroupName, workspaceName, cancellationToken); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Add a new linked service. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Friendly name of the linked workspace. - /// The object for creating or updating a linked service. - /// The cancellation token to use. - public virtual async Task> CreateAsync(string resourceGroupName, string workspaceName, string linkName, LinkedServiceRequest parameters, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("LinkedServicesOperations.Create"); - scope.Start(); - try - { - return await RestClient.CreateAsync(resourceGroupName, workspaceName, linkName, parameters, cancellationToken).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Add a new linked service. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Friendly name of the linked workspace. - /// The object for creating or updating a linked service. - /// The cancellation token to use. - public virtual Response Create(string resourceGroupName, string workspaceName, string linkName, LinkedServiceRequest parameters, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("LinkedServicesOperations.Create"); - scope.Start(); - try - { - return RestClient.Create(resourceGroupName, workspaceName, linkName, parameters, cancellationToken); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Get the detail of a linked service. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Friendly name of the linked workspace. - /// The cancellation token to use. - public virtual async Task> GetAsync(string resourceGroupName, string workspaceName, string linkName, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("LinkedServicesOperations.Get"); - scope.Start(); - try - { - return await RestClient.GetAsync(resourceGroupName, workspaceName, linkName, cancellationToken).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Get the detail of a linked service. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Friendly name of the linked workspace. - /// The cancellation token to use. - public virtual Response Get(string resourceGroupName, string workspaceName, string linkName, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("LinkedServicesOperations.Get"); - scope.Start(); - try - { - return RestClient.Get(resourceGroupName, workspaceName, linkName, cancellationToken); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Delete a linked service. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Friendly name of the linked workspace. - /// The cancellation token to use. - public virtual async Task DeleteAsync(string resourceGroupName, string workspaceName, string linkName, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("LinkedServicesOperations.Delete"); - scope.Start(); - try - { - return await RestClient.DeleteAsync(resourceGroupName, workspaceName, linkName, cancellationToken).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Delete a linked service. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Friendly name of the linked workspace. - /// The cancellation token to use. - public virtual Response Delete(string resourceGroupName, string workspaceName, string linkName, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("LinkedServicesOperations.Delete"); - scope.Start(); - try - { - return RestClient.Delete(resourceGroupName, workspaceName, linkName, cancellationToken); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/LinkedServicesRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/LinkedServicesRestOperations.cs deleted file mode 100644 index d275f55a11b71..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/LinkedServicesRestOperations.cs +++ /dev/null @@ -1,428 +0,0 @@ -// 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.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager.MachineLearningServices.Models; - -namespace Azure.ResourceManager.MachineLearningServices -{ - internal partial class LinkedServicesRestOperations - { - private string subscriptionId; - private Uri endpoint; - private string apiVersion; - private ClientDiagnostics _clientDiagnostics; - private HttpPipeline _pipeline; - - /// Initializes a new instance of LinkedServicesRestOperations. - /// The handler for diagnostic messaging in the client. - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// Azure subscription identifier. - /// server parameter. - /// Api Version. - /// or is null. - public LinkedServicesRestOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2020-09-01-preview") - { - if (subscriptionId == null) - { - throw new ArgumentNullException(nameof(subscriptionId)); - } - endpoint ??= new Uri("https://management.azure.com"); - if (apiVersion == null) - { - throw new ArgumentNullException(nameof(apiVersion)); - } - - this.subscriptionId = subscriptionId; - this.endpoint = endpoint; - this.apiVersion = apiVersion; - _clientDiagnostics = clientDiagnostics; - _pipeline = pipeline; - } - - internal HttpMessage CreateListRequest(string resourceGroupName, string workspaceName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/linkedServices", false); - uri.AppendQuery("api-version", apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - /// List all linked services under an AML workspace. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - /// or is null. - public async Task> ListAsync(string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateListRequest(resourceGroupName, workspaceName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - LinkedServiceList value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = LinkedServiceList.DeserializeLinkedServiceList(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); - } - } - - /// List all linked services under an AML workspace. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - /// or is null. - public Response List(string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateListRequest(resourceGroupName, workspaceName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - LinkedServiceList value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = LinkedServiceList.DeserializeLinkedServiceList(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw _clientDiagnostics.CreateRequestFailedException(message.Response); - } - } - - internal HttpMessage CreateCreateRequest(string resourceGroupName, string workspaceName, string linkName, LinkedServiceRequest parameters) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Put; - var uri = new RawRequestUriBuilder(); - uri.Reset(endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/linkedServices/", false); - uri.AppendPath(linkName, true); - uri.AppendQuery("api-version", apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(parameters); - request.Content = content; - return message; - } - - /// Add a new linked service. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Friendly name of the linked workspace. - /// The object for creating or updating a linked service. - /// The cancellation token to use. - /// , , , or is null. - public async Task> CreateAsync(string resourceGroupName, string workspaceName, string linkName, LinkedServiceRequest parameters, CancellationToken cancellationToken = default) - { - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - if (linkName == null) - { - throw new ArgumentNullException(nameof(linkName)); - } - if (parameters == null) - { - throw new ArgumentNullException(nameof(parameters)); - } - - using var message = CreateCreateRequest(resourceGroupName, workspaceName, linkName, parameters); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - LinkedServiceResponse value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = LinkedServiceResponse.DeserializeLinkedServiceResponse(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); - } - } - - /// Add a new linked service. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Friendly name of the linked workspace. - /// The object for creating or updating a linked service. - /// The cancellation token to use. - /// , , , or is null. - public Response Create(string resourceGroupName, string workspaceName, string linkName, LinkedServiceRequest parameters, CancellationToken cancellationToken = default) - { - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - if (linkName == null) - { - throw new ArgumentNullException(nameof(linkName)); - } - if (parameters == null) - { - throw new ArgumentNullException(nameof(parameters)); - } - - using var message = CreateCreateRequest(resourceGroupName, workspaceName, linkName, parameters); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - LinkedServiceResponse value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = LinkedServiceResponse.DeserializeLinkedServiceResponse(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw _clientDiagnostics.CreateRequestFailedException(message.Response); - } - } - - internal HttpMessage CreateGetRequest(string resourceGroupName, string workspaceName, string linkName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/linkedServices/", false); - uri.AppendPath(linkName, true); - uri.AppendQuery("api-version", apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - /// Get the detail of a linked service. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Friendly name of the linked workspace. - /// The cancellation token to use. - /// , , or is null. - public async Task> GetAsync(string resourceGroupName, string workspaceName, string linkName, CancellationToken cancellationToken = default) - { - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - if (linkName == null) - { - throw new ArgumentNullException(nameof(linkName)); - } - - using var message = CreateGetRequest(resourceGroupName, workspaceName, linkName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - LinkedServiceResponse value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = LinkedServiceResponse.DeserializeLinkedServiceResponse(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); - } - } - - /// Get the detail of a linked service. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Friendly name of the linked workspace. - /// The cancellation token to use. - /// , , or is null. - public Response Get(string resourceGroupName, string workspaceName, string linkName, CancellationToken cancellationToken = default) - { - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - if (linkName == null) - { - throw new ArgumentNullException(nameof(linkName)); - } - - using var message = CreateGetRequest(resourceGroupName, workspaceName, linkName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - LinkedServiceResponse value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = LinkedServiceResponse.DeserializeLinkedServiceResponse(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw _clientDiagnostics.CreateRequestFailedException(message.Response); - } - } - - internal HttpMessage CreateDeleteRequest(string resourceGroupName, string workspaceName, string linkName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Delete; - var uri = new RawRequestUriBuilder(); - uri.Reset(endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/linkedServices/", false); - uri.AppendPath(linkName, true); - uri.AppendQuery("api-version", apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - /// Delete a linked service. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Friendly name of the linked workspace. - /// The cancellation token to use. - /// , , or is null. - public async Task DeleteAsync(string resourceGroupName, string workspaceName, string linkName, CancellationToken cancellationToken = default) - { - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - if (linkName == null) - { - throw new ArgumentNullException(nameof(linkName)); - } - - using var message = CreateDeleteRequest(resourceGroupName, workspaceName, linkName); - 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 a linked service. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Friendly name of the linked workspace. - /// The cancellation token to use. - /// , , or is null. - public Response Delete(string resourceGroupName, string workspaceName, string linkName, CancellationToken cancellationToken = default) - { - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - if (linkName == null) - { - throw new ArgumentNullException(nameof(linkName)); - } - - using var message = CreateDeleteRequest(resourceGroupName, workspaceName, linkName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 204: - return message.Response; - default: - throw _clientDiagnostics.CreateRequestFailedException(message.Response); - } - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/MachineLearningServiceCreateOrUpdateHeaders.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/MachineLearningServiceCreateOrUpdateHeaders.cs deleted file mode 100644 index 1933a538b1e16..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/MachineLearningServiceCreateOrUpdateHeaders.cs +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using Azure; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices -{ - internal partial class MachineLearningServiceCreateOrUpdateHeaders - { - private readonly Response _response; - public MachineLearningServiceCreateOrUpdateHeaders(Response response) - { - _response = response; - } - /// URI to poll for asynchronous operation status. - public string AzureAsyncOperation => _response.Headers.TryGetValue("Azure-AsyncOperation", out string value) ? value : null; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/MachineLearningServiceCreateOrUpdateOperation.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/MachineLearningServiceCreateOrUpdateOperation.cs deleted file mode 100644 index 1637f2bcc5815..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/MachineLearningServiceCreateOrUpdateOperation.cs +++ /dev/null @@ -1,72 +0,0 @@ -// 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.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager.MachineLearningServices.Models; - -namespace Azure.ResourceManager.MachineLearningServices -{ - /// Creates or updates service. This call will update a service if it exists. This is a nonrecoverable operation. If your intent is to create a new service, do a GET first to verify that it does not exist yet. - public partial class MachineLearningServiceCreateOrUpdateOperation : Operation, IOperationSource - { - private readonly ArmOperationHelpers _operation; - - /// Initializes a new instance of MachineLearningServiceCreateOrUpdateOperation for mocking. - protected MachineLearningServiceCreateOrUpdateOperation() - { - } - - internal MachineLearningServiceCreateOrUpdateOperation(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Request request, Response response) - { - _operation = new ArmOperationHelpers(this, clientDiagnostics, pipeline, request, response, OperationFinalStateVia.Location, "MachineLearningServiceCreateOrUpdateOperation"); - } - /// - public override string Id => _operation.Id; - - /// - public override ServiceResource 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); - - ServiceResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) - { - using var document = JsonDocument.Parse(response.ContentStream); - return ServiceResource.DeserializeServiceResource(document.RootElement); - } - - async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) - { - using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); - return ServiceResource.DeserializeServiceResource(document.RootElement); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/MachineLearningServiceOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/MachineLearningServiceOperations.cs deleted file mode 100644 index 9f7af7ca9e972..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/MachineLearningServiceOperations.cs +++ /dev/null @@ -1,321 +0,0 @@ -// 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; -using Azure.ResourceManager.MachineLearningServices.Models; - -namespace Azure.ResourceManager.MachineLearningServices -{ - /// The MachineLearningService service client. - public partial class MachineLearningServiceOperations - { - private readonly ClientDiagnostics _clientDiagnostics; - private readonly HttpPipeline _pipeline; - internal MachineLearningServiceRestOperations RestClient { get; } - - /// Initializes a new instance of MachineLearningServiceOperations for mocking. - protected MachineLearningServiceOperations() - { - } - - /// Initializes a new instance of MachineLearningServiceOperations. - /// The handler for diagnostic messaging in the client. - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// Azure subscription identifier. - /// server parameter. - /// Api Version. - internal MachineLearningServiceOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2020-09-01-preview") - { - RestClient = new MachineLearningServiceRestOperations(clientDiagnostics, pipeline, subscriptionId, endpoint, apiVersion); - _clientDiagnostics = clientDiagnostics; - _pipeline = pipeline; - } - - /// Get a Service by name. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Name of the Azure Machine Learning service. - /// Set to True to include Model details. - /// The cancellation token to use. - public virtual async Task> GetAsync(string resourceGroupName, string workspaceName, string serviceName, bool? expand = null, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("MachineLearningServiceOperations.Get"); - scope.Start(); - try - { - return await RestClient.GetAsync(resourceGroupName, workspaceName, serviceName, expand, cancellationToken).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Get a Service by name. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Name of the Azure Machine Learning service. - /// Set to True to include Model details. - /// The cancellation token to use. - public virtual Response Get(string resourceGroupName, string workspaceName, string serviceName, bool? expand = null, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("MachineLearningServiceOperations.Get"); - scope.Start(); - try - { - return RestClient.Get(resourceGroupName, workspaceName, serviceName, expand, cancellationToken); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Delete a specific Service.. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Name of the Azure Machine Learning service. - /// The cancellation token to use. - public virtual async Task DeleteAsync(string resourceGroupName, string workspaceName, string serviceName, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("MachineLearningServiceOperations.Delete"); - scope.Start(); - try - { - return await RestClient.DeleteAsync(resourceGroupName, workspaceName, serviceName, cancellationToken).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Delete a specific Service.. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Name of the Azure Machine Learning service. - /// The cancellation token to use. - public virtual Response Delete(string resourceGroupName, string workspaceName, string serviceName, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("MachineLearningServiceOperations.Delete"); - scope.Start(); - try - { - return RestClient.Delete(resourceGroupName, workspaceName, serviceName, cancellationToken); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Gets services in specified workspace. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Continuation token for pagination. - /// The Model Id. - /// The Model name. - /// The object tag. - /// A set of tags with which to filter the returned services. It is a comma separated string of tags key or tags key=value Example: tagKey1,tagKey2,tagKey3=value3 . - /// A set of properties with which to filter the returned services. It is a comma separated string of properties key and/or properties key=value Example: propKey1,propKey2,propKey3=value3 . - /// runId for model associated with service. - /// Set to True to include Model details. - /// The option to order the response. - /// The cancellation token to use. - /// or is null. - public virtual AsyncPageable ListByWorkspaceAsync(string resourceGroupName, string workspaceName, string skiptoken = null, string modelId = null, string modelName = null, string tag = null, string tags = null, string properties = null, string runId = null, bool? expand = null, OrderString? orderby = null, CancellationToken cancellationToken = default) - { - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - async Task> FirstPageFunc(int? pageSizeHint) - { - using var scope = _clientDiagnostics.CreateScope("MachineLearningServiceOperations.ListByWorkspace"); - scope.Start(); - try - { - var response = await RestClient.ListByWorkspaceAsync(resourceGroupName, workspaceName, skiptoken, modelId, modelName, tag, tags, properties, runId, expand, orderby, 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("MachineLearningServiceOperations.ListByWorkspace"); - scope.Start(); - try - { - var response = await RestClient.ListByWorkspaceNextPageAsync(nextLink, resourceGroupName, workspaceName, skiptoken, modelId, modelName, tag, tags, properties, runId, expand, orderby, 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); - } - - /// Gets services in specified workspace. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Continuation token for pagination. - /// The Model Id. - /// The Model name. - /// The object tag. - /// A set of tags with which to filter the returned services. It is a comma separated string of tags key or tags key=value Example: tagKey1,tagKey2,tagKey3=value3 . - /// A set of properties with which to filter the returned services. It is a comma separated string of properties key and/or properties key=value Example: propKey1,propKey2,propKey3=value3 . - /// runId for model associated with service. - /// Set to True to include Model details. - /// The option to order the response. - /// The cancellation token to use. - /// or is null. - public virtual Pageable ListByWorkspace(string resourceGroupName, string workspaceName, string skiptoken = null, string modelId = null, string modelName = null, string tag = null, string tags = null, string properties = null, string runId = null, bool? expand = null, OrderString? orderby = null, CancellationToken cancellationToken = default) - { - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - Page FirstPageFunc(int? pageSizeHint) - { - using var scope = _clientDiagnostics.CreateScope("MachineLearningServiceOperations.ListByWorkspace"); - scope.Start(); - try - { - var response = RestClient.ListByWorkspace(resourceGroupName, workspaceName, skiptoken, modelId, modelName, tag, tags, properties, runId, expand, orderby, 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("MachineLearningServiceOperations.ListByWorkspace"); - scope.Start(); - try - { - var response = RestClient.ListByWorkspaceNextPage(nextLink, resourceGroupName, workspaceName, skiptoken, modelId, modelName, tag, tags, properties, runId, expand, orderby, 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 or updates service. This call will update a service if it exists. This is a nonrecoverable operation. If your intent is to create a new service, do a GET first to verify that it does not exist yet. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Name of the Azure Machine Learning service. - /// The payload that is used to create or update the Service. - /// The cancellation token to use. - /// , , , or is null. - public virtual async Task StartCreateOrUpdateAsync(string resourceGroupName, string workspaceName, string serviceName, CreateServiceRequest properties, CancellationToken cancellationToken = default) - { - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - if (serviceName == null) - { - throw new ArgumentNullException(nameof(serviceName)); - } - if (properties == null) - { - throw new ArgumentNullException(nameof(properties)); - } - - using var scope = _clientDiagnostics.CreateScope("MachineLearningServiceOperations.StartCreateOrUpdate"); - scope.Start(); - try - { - var originalResponse = await RestClient.CreateOrUpdateAsync(resourceGroupName, workspaceName, serviceName, properties, cancellationToken).ConfigureAwait(false); - return new MachineLearningServiceCreateOrUpdateOperation(_clientDiagnostics, _pipeline, RestClient.CreateCreateOrUpdateRequest(resourceGroupName, workspaceName, serviceName, properties).Request, originalResponse); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Creates or updates service. This call will update a service if it exists. This is a nonrecoverable operation. If your intent is to create a new service, do a GET first to verify that it does not exist yet. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Name of the Azure Machine Learning service. - /// The payload that is used to create or update the Service. - /// The cancellation token to use. - /// , , , or is null. - public virtual MachineLearningServiceCreateOrUpdateOperation StartCreateOrUpdate(string resourceGroupName, string workspaceName, string serviceName, CreateServiceRequest properties, CancellationToken cancellationToken = default) - { - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - if (serviceName == null) - { - throw new ArgumentNullException(nameof(serviceName)); - } - if (properties == null) - { - throw new ArgumentNullException(nameof(properties)); - } - - using var scope = _clientDiagnostics.CreateScope("MachineLearningServiceOperations.StartCreateOrUpdate"); - scope.Start(); - try - { - var originalResponse = RestClient.CreateOrUpdate(resourceGroupName, workspaceName, serviceName, properties, cancellationToken); - return new MachineLearningServiceCreateOrUpdateOperation(_clientDiagnostics, _pipeline, RestClient.CreateCreateOrUpdateRequest(resourceGroupName, workspaceName, serviceName, properties).Request, originalResponse); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/MachineLearningServiceRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/MachineLearningServiceRestOperations.cs deleted file mode 100644 index 4e7c0904fb7d3..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/MachineLearningServiceRestOperations.cs +++ /dev/null @@ -1,587 +0,0 @@ -// 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.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager.MachineLearningServices.Models; - -namespace Azure.ResourceManager.MachineLearningServices -{ - internal partial class MachineLearningServiceRestOperations - { - private string subscriptionId; - private Uri endpoint; - private string apiVersion; - private ClientDiagnostics _clientDiagnostics; - private HttpPipeline _pipeline; - - /// Initializes a new instance of MachineLearningServiceRestOperations. - /// The handler for diagnostic messaging in the client. - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// Azure subscription identifier. - /// server parameter. - /// Api Version. - /// or is null. - public MachineLearningServiceRestOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2020-09-01-preview") - { - if (subscriptionId == null) - { - throw new ArgumentNullException(nameof(subscriptionId)); - } - endpoint ??= new Uri("https://management.azure.com"); - if (apiVersion == null) - { - throw new ArgumentNullException(nameof(apiVersion)); - } - - this.subscriptionId = subscriptionId; - this.endpoint = endpoint; - this.apiVersion = apiVersion; - _clientDiagnostics = clientDiagnostics; - _pipeline = pipeline; - } - - internal HttpMessage CreateListByWorkspaceRequest(string resourceGroupName, string workspaceName, string skiptoken, string modelId, string modelName, string tag, string tags, string properties, string runId, bool? expand, OrderString? orderby) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/services", false); - uri.AppendQuery("api-version", apiVersion, true); - if (skiptoken != null) - { - uri.AppendQuery("$skiptoken", skiptoken, true); - } - if (modelId != null) - { - uri.AppendQuery("modelId", modelId, true); - } - if (modelName != null) - { - uri.AppendQuery("modelName", modelName, true); - } - if (tag != null) - { - uri.AppendQuery("tag", tag, true); - } - if (tags != null) - { - uri.AppendQuery("tags", tags, true); - } - if (properties != null) - { - uri.AppendQuery("properties", properties, true); - } - if (runId != null) - { - uri.AppendQuery("runId", runId, true); - } - if (expand != null) - { - uri.AppendQuery("expand", expand.Value, true); - } - if (orderby != null) - { - uri.AppendQuery("orderby", orderby.Value.ToString(), true); - } - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - /// Gets services in specified workspace. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Continuation token for pagination. - /// The Model Id. - /// The Model name. - /// The object tag. - /// A set of tags with which to filter the returned services. It is a comma separated string of tags key or tags key=value Example: tagKey1,tagKey2,tagKey3=value3 . - /// A set of properties with which to filter the returned services. It is a comma separated string of properties key and/or properties key=value Example: propKey1,propKey2,propKey3=value3 . - /// runId for model associated with service. - /// Set to True to include Model details. - /// The option to order the response. - /// The cancellation token to use. - /// or is null. - public async Task> ListByWorkspaceAsync(string resourceGroupName, string workspaceName, string skiptoken = null, string modelId = null, string modelName = null, string tag = null, string tags = null, string properties = null, string runId = null, bool? expand = null, OrderString? orderby = null, CancellationToken cancellationToken = default) - { - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateListByWorkspaceRequest(resourceGroupName, workspaceName, skiptoken, modelId, modelName, tag, tags, properties, runId, expand, orderby); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - PaginatedServiceList value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = PaginatedServiceList.DeserializePaginatedServiceList(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); - } - } - - /// Gets services in specified workspace. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Continuation token for pagination. - /// The Model Id. - /// The Model name. - /// The object tag. - /// A set of tags with which to filter the returned services. It is a comma separated string of tags key or tags key=value Example: tagKey1,tagKey2,tagKey3=value3 . - /// A set of properties with which to filter the returned services. It is a comma separated string of properties key and/or properties key=value Example: propKey1,propKey2,propKey3=value3 . - /// runId for model associated with service. - /// Set to True to include Model details. - /// The option to order the response. - /// The cancellation token to use. - /// or is null. - public Response ListByWorkspace(string resourceGroupName, string workspaceName, string skiptoken = null, string modelId = null, string modelName = null, string tag = null, string tags = null, string properties = null, string runId = null, bool? expand = null, OrderString? orderby = null, CancellationToken cancellationToken = default) - { - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateListByWorkspaceRequest(resourceGroupName, workspaceName, skiptoken, modelId, modelName, tag, tags, properties, runId, expand, orderby); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - PaginatedServiceList value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = PaginatedServiceList.DeserializePaginatedServiceList(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw _clientDiagnostics.CreateRequestFailedException(message.Response); - } - } - - internal HttpMessage CreateGetRequest(string resourceGroupName, string workspaceName, string serviceName, bool? expand) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/services/", false); - uri.AppendPath(serviceName, true); - uri.AppendQuery("api-version", apiVersion, true); - if (expand != null) - { - uri.AppendQuery("expand", expand.Value, true); - } - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - /// Get a Service by name. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Name of the Azure Machine Learning service. - /// Set to True to include Model details. - /// The cancellation token to use. - /// , , or is null. - public async Task> GetAsync(string resourceGroupName, string workspaceName, string serviceName, bool? expand = null, CancellationToken cancellationToken = default) - { - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - if (serviceName == null) - { - throw new ArgumentNullException(nameof(serviceName)); - } - - using var message = CreateGetRequest(resourceGroupName, workspaceName, serviceName, expand); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - ServiceResource value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = ServiceResource.DeserializeServiceResource(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); - } - } - - /// Get a Service by name. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Name of the Azure Machine Learning service. - /// Set to True to include Model details. - /// The cancellation token to use. - /// , , or is null. - public Response Get(string resourceGroupName, string workspaceName, string serviceName, bool? expand = null, CancellationToken cancellationToken = default) - { - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - if (serviceName == null) - { - throw new ArgumentNullException(nameof(serviceName)); - } - - using var message = CreateGetRequest(resourceGroupName, workspaceName, serviceName, expand); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - ServiceResource value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = ServiceResource.DeserializeServiceResource(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw _clientDiagnostics.CreateRequestFailedException(message.Response); - } - } - - internal HttpMessage CreateDeleteRequest(string resourceGroupName, string workspaceName, string serviceName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Delete; - var uri = new RawRequestUriBuilder(); - uri.Reset(endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/services/", false); - uri.AppendPath(serviceName, true); - uri.AppendQuery("api-version", apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - /// Delete a specific Service.. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Name of the Azure Machine Learning service. - /// The cancellation token to use. - /// , , or is null. - public async Task DeleteAsync(string resourceGroupName, string workspaceName, string serviceName, CancellationToken cancellationToken = default) - { - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - if (serviceName == null) - { - throw new ArgumentNullException(nameof(serviceName)); - } - - using var message = CreateDeleteRequest(resourceGroupName, workspaceName, serviceName); - 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 a specific Service.. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Name of the Azure Machine Learning service. - /// The cancellation token to use. - /// , , or is null. - public Response Delete(string resourceGroupName, string workspaceName, string serviceName, CancellationToken cancellationToken = default) - { - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - if (serviceName == null) - { - throw new ArgumentNullException(nameof(serviceName)); - } - - using var message = CreateDeleteRequest(resourceGroupName, workspaceName, serviceName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 204: - return message.Response; - default: - throw _clientDiagnostics.CreateRequestFailedException(message.Response); - } - } - - internal HttpMessage CreateCreateOrUpdateRequest(string resourceGroupName, string workspaceName, string serviceName, CreateServiceRequest properties) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Put; - var uri = new RawRequestUriBuilder(); - uri.Reset(endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/services/", false); - uri.AppendPath(serviceName, true); - uri.AppendQuery("api-version", apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(properties); - request.Content = content; - return message; - } - - /// Creates or updates service. This call will update a service if it exists. This is a nonrecoverable operation. If your intent is to create a new service, do a GET first to verify that it does not exist yet. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Name of the Azure Machine Learning service. - /// The payload that is used to create or update the Service. - /// The cancellation token to use. - /// , , , or is null. - public async Task> CreateOrUpdateAsync(string resourceGroupName, string workspaceName, string serviceName, CreateServiceRequest properties, CancellationToken cancellationToken = default) - { - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - if (serviceName == null) - { - throw new ArgumentNullException(nameof(serviceName)); - } - if (properties == null) - { - throw new ArgumentNullException(nameof(properties)); - } - - using var message = CreateCreateOrUpdateRequest(resourceGroupName, workspaceName, serviceName, properties); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - var headers = new MachineLearningServiceCreateOrUpdateHeaders(message.Response); - switch (message.Response.Status) - { - case 200: - case 201: - return ResponseWithHeaders.FromValue(headers, message.Response); - default: - throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); - } - } - - /// Creates or updates service. This call will update a service if it exists. This is a nonrecoverable operation. If your intent is to create a new service, do a GET first to verify that it does not exist yet. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Name of the Azure Machine Learning service. - /// The payload that is used to create or update the Service. - /// The cancellation token to use. - /// , , , or is null. - public ResponseWithHeaders CreateOrUpdate(string resourceGroupName, string workspaceName, string serviceName, CreateServiceRequest properties, CancellationToken cancellationToken = default) - { - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - if (serviceName == null) - { - throw new ArgumentNullException(nameof(serviceName)); - } - if (properties == null) - { - throw new ArgumentNullException(nameof(properties)); - } - - using var message = CreateCreateOrUpdateRequest(resourceGroupName, workspaceName, serviceName, properties); - _pipeline.Send(message, cancellationToken); - var headers = new MachineLearningServiceCreateOrUpdateHeaders(message.Response); - switch (message.Response.Status) - { - case 200: - case 201: - return ResponseWithHeaders.FromValue(headers, message.Response); - default: - throw _clientDiagnostics.CreateRequestFailedException(message.Response); - } - } - - internal HttpMessage CreateListByWorkspaceNextPageRequest(string nextLink, string resourceGroupName, string workspaceName, string skiptoken, string modelId, string modelName, string tag, string tags, string properties, string runId, bool? expand, OrderString? orderby) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(endpoint); - uri.AppendRawNextLink(nextLink, false); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - /// Gets services in specified workspace. - /// The URL to the next page of results. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Continuation token for pagination. - /// The Model Id. - /// The Model name. - /// The object tag. - /// A set of tags with which to filter the returned services. It is a comma separated string of tags key or tags key=value Example: tagKey1,tagKey2,tagKey3=value3 . - /// A set of properties with which to filter the returned services. It is a comma separated string of properties key and/or properties key=value Example: propKey1,propKey2,propKey3=value3 . - /// runId for model associated with service. - /// Set to True to include Model details. - /// The option to order the response. - /// The cancellation token to use. - /// , , or is null. - public async Task> ListByWorkspaceNextPageAsync(string nextLink, string resourceGroupName, string workspaceName, string skiptoken = null, string modelId = null, string modelName = null, string tag = null, string tags = null, string properties = null, string runId = null, bool? expand = null, OrderString? orderby = null, CancellationToken cancellationToken = default) - { - if (nextLink == null) - { - throw new ArgumentNullException(nameof(nextLink)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateListByWorkspaceNextPageRequest(nextLink, resourceGroupName, workspaceName, skiptoken, modelId, modelName, tag, tags, properties, runId, expand, orderby); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - PaginatedServiceList value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = PaginatedServiceList.DeserializePaginatedServiceList(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); - } - } - - /// Gets services in specified workspace. - /// The URL to the next page of results. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Continuation token for pagination. - /// The Model Id. - /// The Model name. - /// The object tag. - /// A set of tags with which to filter the returned services. It is a comma separated string of tags key or tags key=value Example: tagKey1,tagKey2,tagKey3=value3 . - /// A set of properties with which to filter the returned services. It is a comma separated string of properties key and/or properties key=value Example: propKey1,propKey2,propKey3=value3 . - /// runId for model associated with service. - /// Set to True to include Model details. - /// The option to order the response. - /// The cancellation token to use. - /// , , or is null. - public Response ListByWorkspaceNextPage(string nextLink, string resourceGroupName, string workspaceName, string skiptoken = null, string modelId = null, string modelName = null, string tag = null, string tags = null, string properties = null, string runId = null, bool? expand = null, OrderString? orderby = null, CancellationToken cancellationToken = default) - { - if (nextLink == null) - { - throw new ArgumentNullException(nameof(nextLink)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateListByWorkspaceNextPageRequest(nextLink, resourceGroupName, workspaceName, skiptoken, modelId, modelName, tag, tags, properties, runId, expand, orderby); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - PaginatedServiceList value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = PaginatedServiceList.DeserializePaginatedServiceList(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw _clientDiagnostics.CreateRequestFailedException(message.Response); - } - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/MachineLearningServicesManagementClient.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/MachineLearningServicesManagementClient.cs index 066ba14ce27f0..e51ea27ca78f5 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/MachineLearningServicesManagementClient.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/MachineLearningServicesManagementClient.cs @@ -26,7 +26,7 @@ protected MachineLearningServicesManagementClient() } /// Initializes a new instance of MachineLearningServicesManagementClient. - /// Azure subscription identifier. + /// The ID of the target subscription. /// The OAuth token for making client requests. /// The options for configuring the client. public MachineLearningServicesManagementClient(string subscriptionId, TokenCredential tokenCredential, MachineLearningServicesManagementClientOptions options = null) : this(null, subscriptionId, tokenCredential, options) @@ -34,7 +34,7 @@ public MachineLearningServicesManagementClient(string subscriptionId, TokenCrede } /// Initializes a new instance of MachineLearningServicesManagementClient. /// server parameter. - /// Azure subscription identifier. + /// The ID of the target subscription. /// The OAuth token for making client requests. /// The options for configuring the client. /// is null. @@ -59,9 +59,6 @@ public MachineLearningServicesManagementClient(Uri endpoint, string subscription /// Returns an instance of WorkspacesOperations. public virtual WorkspacesOperations Workspaces => new WorkspacesOperations(_clientDiagnostics, _pipeline, _subscriptionId, _endpoint); - /// Returns an instance of WorkspaceFeaturesOperations. - public virtual WorkspaceFeaturesOperations WorkspaceFeatures => new WorkspaceFeaturesOperations(_clientDiagnostics, _pipeline, _subscriptionId, _endpoint); - /// Returns an instance of UsagesOperations. public virtual UsagesOperations Usages => new UsagesOperations(_clientDiagnostics, _pipeline, _subscriptionId, _endpoint); @@ -71,11 +68,8 @@ public MachineLearningServicesManagementClient(Uri endpoint, string subscription /// Returns an instance of QuotasOperations. public virtual QuotasOperations Quotas => new QuotasOperations(_clientDiagnostics, _pipeline, _subscriptionId, _endpoint); - /// Returns an instance of MachineLearningComputeOperations. - public virtual MachineLearningComputeOperations MachineLearningCompute => new MachineLearningComputeOperations(_clientDiagnostics, _pipeline, _subscriptionId, _endpoint); - - /// Returns an instance of AzureMachineLearningWorkspacesOperations. - public virtual AzureMachineLearningWorkspacesOperations AzureMachineLearningWorkspaces => new AzureMachineLearningWorkspacesOperations(_clientDiagnostics, _pipeline, _subscriptionId, _endpoint); + /// Returns an instance of ComputeOperations. + public virtual ComputeOperations Compute => new ComputeOperations(_clientDiagnostics, _pipeline, _subscriptionId, _endpoint); /// Returns an instance of PrivateEndpointConnectionsOperations. public virtual PrivateEndpointConnectionsOperations PrivateEndpointConnections => new PrivateEndpointConnectionsOperations(_clientDiagnostics, _pipeline, _subscriptionId, _endpoint); @@ -83,49 +77,13 @@ public MachineLearningServicesManagementClient(Uri endpoint, string subscription /// Returns an instance of PrivateLinkResourcesOperations. public virtual PrivateLinkResourcesOperations PrivateLinkResources => new PrivateLinkResourcesOperations(_clientDiagnostics, _pipeline, _subscriptionId, _endpoint); - /// Returns an instance of LinkedServicesOperations. - public virtual LinkedServicesOperations LinkedServices => new LinkedServicesOperations(_clientDiagnostics, _pipeline, _subscriptionId, _endpoint); - - /// Returns an instance of MachineLearningServiceOperations. - public virtual MachineLearningServiceOperations MachineLearningService => new MachineLearningServiceOperations(_clientDiagnostics, _pipeline, _subscriptionId, _endpoint); - - /// Returns an instance of NotebooksOperations. - public virtual NotebooksOperations Notebooks => new NotebooksOperations(_clientDiagnostics, _pipeline, _subscriptionId, _endpoint); - /// Returns an instance of WorkspaceConnectionsOperations. public virtual WorkspaceConnectionsOperations WorkspaceConnections => new WorkspaceConnectionsOperations(_clientDiagnostics, _pipeline, _subscriptionId, _endpoint); - /// Returns an instance of CodeContainersOperations. - public virtual CodeContainersOperations CodeContainers => new CodeContainersOperations(_clientDiagnostics, _pipeline, _subscriptionId, _endpoint); - - /// Returns an instance of CodeVersionsOperations. - public virtual CodeVersionsOperations CodeVersions => new CodeVersionsOperations(_clientDiagnostics, _pipeline, _subscriptionId, _endpoint); - - /// Returns an instance of DataContainersOperations. - public virtual DataContainersOperations DataContainers => new DataContainersOperations(_clientDiagnostics, _pipeline, _subscriptionId, _endpoint); - - /// Returns an instance of DatastoresOperations. - public virtual DatastoresOperations Datastores => new DatastoresOperations(_clientDiagnostics, _pipeline, _subscriptionId, _endpoint); - - /// Returns an instance of DataVersionsOperations. - public virtual DataVersionsOperations DataVersions => new DataVersionsOperations(_clientDiagnostics, _pipeline, _subscriptionId, _endpoint); - - /// Returns an instance of EnvironmentContainersOperations. - public virtual EnvironmentContainersOperations EnvironmentContainers => new EnvironmentContainersOperations(_clientDiagnostics, _pipeline, _subscriptionId, _endpoint); - - /// Returns an instance of EnvironmentSpecificationVersionsOperations. - public virtual EnvironmentSpecificationVersionsOperations EnvironmentSpecificationVersions => new EnvironmentSpecificationVersionsOperations(_clientDiagnostics, _pipeline, _subscriptionId, _endpoint); - - /// Returns an instance of JobsOperations. - public virtual JobsOperations Jobs => new JobsOperations(_clientDiagnostics, _pipeline, _subscriptionId, _endpoint); - - /// Returns an instance of LabelingJobsOperations. - public virtual LabelingJobsOperations LabelingJobs => new LabelingJobsOperations(_clientDiagnostics, _pipeline, _subscriptionId, _endpoint); - - /// Returns an instance of ModelContainersOperations. - public virtual ModelContainersOperations ModelContainers => new ModelContainersOperations(_clientDiagnostics, _pipeline, _subscriptionId, _endpoint); + /// Returns an instance of WorkspaceFeaturesOperations. + public virtual WorkspaceFeaturesOperations WorkspaceFeatures => new WorkspaceFeaturesOperations(_clientDiagnostics, _pipeline, _subscriptionId, _endpoint); - /// Returns an instance of ModelVersionsOperations. - public virtual ModelVersionsOperations ModelVersions => new ModelVersionsOperations(_clientDiagnostics, _pipeline, _subscriptionId, _endpoint); + /// Returns an instance of WorkspaceSkusOperations. + public virtual WorkspaceSkusOperations WorkspaceSkus => new WorkspaceSkusOperations(_clientDiagnostics, _pipeline, _subscriptionId, _endpoint); } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/ModelContainersOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/ModelContainersOperations.cs deleted file mode 100644 index bb3334769df05..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/ModelContainersOperations.cs +++ /dev/null @@ -1,267 +0,0 @@ -// 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; -using Azure.ResourceManager.MachineLearningServices.Models; - -namespace Azure.ResourceManager.MachineLearningServices -{ - /// The ModelContainers service client. - public partial class ModelContainersOperations - { - private readonly ClientDiagnostics _clientDiagnostics; - private readonly HttpPipeline _pipeline; - internal ModelContainersRestOperations RestClient { get; } - - /// Initializes a new instance of ModelContainersOperations for mocking. - protected ModelContainersOperations() - { - } - - /// Initializes a new instance of ModelContainersOperations. - /// The handler for diagnostic messaging in the client. - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// Azure subscription identifier. - /// server parameter. - /// Api Version. - internal ModelContainersOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2020-09-01-preview") - { - RestClient = new ModelContainersRestOperations(clientDiagnostics, pipeline, subscriptionId, endpoint, apiVersion); - _clientDiagnostics = clientDiagnostics; - _pipeline = pipeline; - } - - /// Create or update container. - /// Container name. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Container entity to create or update. - /// The cancellation token to use. - public virtual async Task> CreateOrUpdateAsync(string name, string resourceGroupName, string workspaceName, ModelContainerResource body = null, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("ModelContainersOperations.CreateOrUpdate"); - scope.Start(); - try - { - return await RestClient.CreateOrUpdateAsync(name, resourceGroupName, workspaceName, body, cancellationToken).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Create or update container. - /// Container name. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Container entity to create or update. - /// The cancellation token to use. - public virtual Response CreateOrUpdate(string name, string resourceGroupName, string workspaceName, ModelContainerResource body = null, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("ModelContainersOperations.CreateOrUpdate"); - scope.Start(); - try - { - return RestClient.CreateOrUpdate(name, resourceGroupName, workspaceName, body, cancellationToken); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Get container. - /// Container name. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - public virtual async Task> GetAsync(string name, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("ModelContainersOperations.Get"); - scope.Start(); - try - { - return await RestClient.GetAsync(name, resourceGroupName, workspaceName, cancellationToken).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Get container. - /// Container name. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - public virtual Response Get(string name, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("ModelContainersOperations.Get"); - scope.Start(); - try - { - return RestClient.Get(name, resourceGroupName, workspaceName, cancellationToken); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Delete container. - /// Container name. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - public virtual async Task DeleteAsync(string name, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("ModelContainersOperations.Delete"); - scope.Start(); - try - { - return await RestClient.DeleteAsync(name, resourceGroupName, workspaceName, cancellationToken).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Delete container. - /// Container name. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - public virtual Response Delete(string name, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("ModelContainersOperations.Delete"); - scope.Start(); - try - { - return RestClient.Delete(name, resourceGroupName, workspaceName, cancellationToken); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// List model containers. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Continuation token for pagination. - /// Maximum number of results to return. - /// The cancellation token to use. - /// or is null. - public virtual AsyncPageable ListAsync(string resourceGroupName, string workspaceName, string skiptoken = null, int? count = null, CancellationToken cancellationToken = default) - { - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - async Task> FirstPageFunc(int? pageSizeHint) - { - using var scope = _clientDiagnostics.CreateScope("ModelContainersOperations.List"); - scope.Start(); - try - { - var response = await RestClient.ListAsync(resourceGroupName, workspaceName, skiptoken, count, 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("ModelContainersOperations.List"); - scope.Start(); - try - { - var response = await RestClient.ListNextPageAsync(nextLink, resourceGroupName, workspaceName, skiptoken, count, 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 model containers. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Continuation token for pagination. - /// Maximum number of results to return. - /// The cancellation token to use. - /// or is null. - public virtual Pageable List(string resourceGroupName, string workspaceName, string skiptoken = null, int? count = null, CancellationToken cancellationToken = default) - { - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - Page FirstPageFunc(int? pageSizeHint) - { - using var scope = _clientDiagnostics.CreateScope("ModelContainersOperations.List"); - scope.Start(); - try - { - var response = RestClient.List(resourceGroupName, workspaceName, skiptoken, count, 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("ModelContainersOperations.List"); - scope.Start(); - try - { - var response = RestClient.ListNextPage(nextLink, resourceGroupName, workspaceName, skiptoken, count, 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/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/ModelContainersRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/ModelContainersRestOperations.cs deleted file mode 100644 index b277efaf24e0e..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/ModelContainersRestOperations.cs +++ /dev/null @@ -1,528 +0,0 @@ -// 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.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager.MachineLearningServices.Models; - -namespace Azure.ResourceManager.MachineLearningServices -{ - internal partial class ModelContainersRestOperations - { - private string subscriptionId; - private Uri endpoint; - private string apiVersion; - private ClientDiagnostics _clientDiagnostics; - private HttpPipeline _pipeline; - - /// Initializes a new instance of ModelContainersRestOperations. - /// The handler for diagnostic messaging in the client. - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// Azure subscription identifier. - /// server parameter. - /// Api Version. - /// or is null. - public ModelContainersRestOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2020-09-01-preview") - { - if (subscriptionId == null) - { - throw new ArgumentNullException(nameof(subscriptionId)); - } - endpoint ??= new Uri("https://management.azure.com"); - if (apiVersion == null) - { - throw new ArgumentNullException(nameof(apiVersion)); - } - - this.subscriptionId = subscriptionId; - this.endpoint = endpoint; - this.apiVersion = apiVersion; - _clientDiagnostics = clientDiagnostics; - _pipeline = pipeline; - } - - internal HttpMessage CreateListRequest(string resourceGroupName, string workspaceName, string skiptoken, int? count) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/models", false); - uri.AppendQuery("api-version", apiVersion, true); - if (skiptoken != null) - { - uri.AppendQuery("$skiptoken", skiptoken, true); - } - if (count != null) - { - uri.AppendQuery("count", count.Value, true); - } - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - /// List model containers. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Continuation token for pagination. - /// Maximum number of results to return. - /// The cancellation token to use. - /// or is null. - public async Task> ListAsync(string resourceGroupName, string workspaceName, string skiptoken = null, int? count = null, CancellationToken cancellationToken = default) - { - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateListRequest(resourceGroupName, workspaceName, skiptoken, count); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - ModelContainerResourceArmPaginatedResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = ModelContainerResourceArmPaginatedResult.DeserializeModelContainerResourceArmPaginatedResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); - } - } - - /// List model containers. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Continuation token for pagination. - /// Maximum number of results to return. - /// The cancellation token to use. - /// or is null. - public Response List(string resourceGroupName, string workspaceName, string skiptoken = null, int? count = null, CancellationToken cancellationToken = default) - { - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateListRequest(resourceGroupName, workspaceName, skiptoken, count); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - ModelContainerResourceArmPaginatedResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = ModelContainerResourceArmPaginatedResult.DeserializeModelContainerResourceArmPaginatedResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw _clientDiagnostics.CreateRequestFailedException(message.Response); - } - } - - internal HttpMessage CreateCreateOrUpdateRequest(string name, string resourceGroupName, string workspaceName, ModelContainerResource body) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Put; - var uri = new RawRequestUriBuilder(); - uri.Reset(endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/models/", false); - uri.AppendPath(name, true); - uri.AppendQuery("api-version", apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - if (body != null) - { - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(body); - request.Content = content; - } - return message; - } - - /// Create or update container. - /// Container name. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Container entity to create or update. - /// The cancellation token to use. - /// , , or is null. - public async Task> CreateOrUpdateAsync(string name, string resourceGroupName, string workspaceName, ModelContainerResource body = null, CancellationToken cancellationToken = default) - { - if (name == null) - { - throw new ArgumentNullException(nameof(name)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateCreateOrUpdateRequest(name, resourceGroupName, workspaceName, body); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 201: - { - ModelContainerResource value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = ModelContainerResource.DeserializeModelContainerResource(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); - } - } - - /// Create or update container. - /// Container name. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Container entity to create or update. - /// The cancellation token to use. - /// , , or is null. - public Response CreateOrUpdate(string name, string resourceGroupName, string workspaceName, ModelContainerResource body = null, CancellationToken cancellationToken = default) - { - if (name == null) - { - throw new ArgumentNullException(nameof(name)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateCreateOrUpdateRequest(name, resourceGroupName, workspaceName, body); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 201: - { - ModelContainerResource value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = ModelContainerResource.DeserializeModelContainerResource(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw _clientDiagnostics.CreateRequestFailedException(message.Response); - } - } - - internal HttpMessage CreateGetRequest(string name, string resourceGroupName, string workspaceName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/models/", false); - uri.AppendPath(name, true); - uri.AppendQuery("api-version", apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - /// Get container. - /// Container name. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - /// , , or is null. - public async Task> GetAsync(string name, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - if (name == null) - { - throw new ArgumentNullException(nameof(name)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateGetRequest(name, resourceGroupName, workspaceName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - ModelContainerResource value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = ModelContainerResource.DeserializeModelContainerResource(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); - } - } - - /// Get container. - /// Container name. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - /// , , or is null. - public Response Get(string name, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - if (name == null) - { - throw new ArgumentNullException(nameof(name)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateGetRequest(name, resourceGroupName, workspaceName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - ModelContainerResource value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = ModelContainerResource.DeserializeModelContainerResource(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw _clientDiagnostics.CreateRequestFailedException(message.Response); - } - } - - internal HttpMessage CreateDeleteRequest(string name, string resourceGroupName, string workspaceName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Delete; - var uri = new RawRequestUriBuilder(); - uri.Reset(endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/models/", false); - uri.AppendPath(name, true); - uri.AppendQuery("api-version", apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - /// Delete container. - /// Container name. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - /// , , or is null. - public async Task DeleteAsync(string name, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - if (name == null) - { - throw new ArgumentNullException(nameof(name)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateDeleteRequest(name, resourceGroupName, workspaceName); - 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 container. - /// Container name. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - /// , , or is null. - public Response Delete(string name, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - if (name == null) - { - throw new ArgumentNullException(nameof(name)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateDeleteRequest(name, resourceGroupName, workspaceName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 204: - return message.Response; - default: - throw _clientDiagnostics.CreateRequestFailedException(message.Response); - } - } - - internal HttpMessage CreateListNextPageRequest(string nextLink, string resourceGroupName, string workspaceName, string skiptoken, int? count) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(endpoint); - uri.AppendRawNextLink(nextLink, false); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - /// List model containers. - /// The URL to the next page of results. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Continuation token for pagination. - /// Maximum number of results to return. - /// The cancellation token to use. - /// , , or is null. - public async Task> ListNextPageAsync(string nextLink, string resourceGroupName, string workspaceName, string skiptoken = null, int? count = null, CancellationToken cancellationToken = default) - { - if (nextLink == null) - { - throw new ArgumentNullException(nameof(nextLink)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateListNextPageRequest(nextLink, resourceGroupName, workspaceName, skiptoken, count); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - ModelContainerResourceArmPaginatedResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = ModelContainerResourceArmPaginatedResult.DeserializeModelContainerResourceArmPaginatedResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); - } - } - - /// List model containers. - /// The URL to the next page of results. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Continuation token for pagination. - /// Maximum number of results to return. - /// The cancellation token to use. - /// , , or is null. - public Response ListNextPage(string nextLink, string resourceGroupName, string workspaceName, string skiptoken = null, int? count = null, CancellationToken cancellationToken = default) - { - if (nextLink == null) - { - throw new ArgumentNullException(nameof(nextLink)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateListNextPageRequest(nextLink, resourceGroupName, workspaceName, skiptoken, count); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - ModelContainerResourceArmPaginatedResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = ModelContainerResourceArmPaginatedResult.DeserializeModelContainerResourceArmPaginatedResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw _clientDiagnostics.CreateRequestFailedException(message.Response); - } - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/ModelVersionsOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/ModelVersionsOperations.cs deleted file mode 100644 index bbf2a65b41509..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/ModelVersionsOperations.cs +++ /dev/null @@ -1,297 +0,0 @@ -// 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; -using Azure.ResourceManager.MachineLearningServices.Models; - -namespace Azure.ResourceManager.MachineLearningServices -{ - /// The ModelVersions service client. - public partial class ModelVersionsOperations - { - private readonly ClientDiagnostics _clientDiagnostics; - private readonly HttpPipeline _pipeline; - internal ModelVersionsRestOperations RestClient { get; } - - /// Initializes a new instance of ModelVersionsOperations for mocking. - protected ModelVersionsOperations() - { - } - - /// Initializes a new instance of ModelVersionsOperations. - /// The handler for diagnostic messaging in the client. - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// Azure subscription identifier. - /// server parameter. - /// Api Version. - internal ModelVersionsOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2020-09-01-preview") - { - RestClient = new ModelVersionsRestOperations(clientDiagnostics, pipeline, subscriptionId, endpoint, apiVersion); - _clientDiagnostics = clientDiagnostics; - _pipeline = pipeline; - } - - /// Create or update version. - /// Container name. - /// Version identifier. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Version entity to create or update. - /// The cancellation token to use. - public virtual async Task> CreateOrUpdateAsync(string name, string version, string resourceGroupName, string workspaceName, ModelVersionResource body = null, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("ModelVersionsOperations.CreateOrUpdate"); - scope.Start(); - try - { - return await RestClient.CreateOrUpdateAsync(name, version, resourceGroupName, workspaceName, body, cancellationToken).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Create or update version. - /// Container name. - /// Version identifier. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Version entity to create or update. - /// The cancellation token to use. - public virtual Response CreateOrUpdate(string name, string version, string resourceGroupName, string workspaceName, ModelVersionResource body = null, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("ModelVersionsOperations.CreateOrUpdate"); - scope.Start(); - try - { - return RestClient.CreateOrUpdate(name, version, resourceGroupName, workspaceName, body, cancellationToken); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Get version. - /// Container name. - /// Version identifier. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - public virtual async Task> GetAsync(string name, string version, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("ModelVersionsOperations.Get"); - scope.Start(); - try - { - return await RestClient.GetAsync(name, version, resourceGroupName, workspaceName, cancellationToken).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Get version. - /// Container name. - /// Version identifier. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - public virtual Response Get(string name, string version, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("ModelVersionsOperations.Get"); - scope.Start(); - try - { - return RestClient.Get(name, version, resourceGroupName, workspaceName, cancellationToken); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Delete version. - /// Container name. - /// Version identifier. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - public virtual async Task DeleteAsync(string name, string version, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("ModelVersionsOperations.Delete"); - scope.Start(); - try - { - return await RestClient.DeleteAsync(name, version, resourceGroupName, workspaceName, cancellationToken).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Delete version. - /// Container name. - /// Version identifier. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - public virtual Response Delete(string name, string version, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("ModelVersionsOperations.Delete"); - scope.Start(); - try - { - return RestClient.Delete(name, version, resourceGroupName, workspaceName, cancellationToken); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// List model versions. - /// Model name. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Continuation token for pagination. - /// Model version. - /// Model description. - /// Maximum number of results to return. - /// Number of initial results to skip. - /// Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - /// Comma-separated list of property names (and optionally values). Example: prop1,prop2=value2. - /// Property by which to order the results. - /// Only return the most recent version of a model. - /// The cancellation token to use. - /// , , or is null. - public virtual AsyncPageable ListAsync(string name, string resourceGroupName, string workspaceName, string skiptoken = null, string version = null, string description = null, int? count = null, int? offset = null, string tags = null, string properties = null, string orderBy = null, bool? latestVersionOnly = null, CancellationToken cancellationToken = default) - { - if (name == null) - { - throw new ArgumentNullException(nameof(name)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - async Task> FirstPageFunc(int? pageSizeHint) - { - using var scope = _clientDiagnostics.CreateScope("ModelVersionsOperations.List"); - scope.Start(); - try - { - var response = await RestClient.ListAsync(name, resourceGroupName, workspaceName, skiptoken, version, description, count, offset, tags, properties, orderBy, latestVersionOnly, 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("ModelVersionsOperations.List"); - scope.Start(); - try - { - var response = await RestClient.ListNextPageAsync(nextLink, name, resourceGroupName, workspaceName, skiptoken, version, description, count, offset, tags, properties, orderBy, latestVersionOnly, 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 model versions. - /// Model name. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Continuation token for pagination. - /// Model version. - /// Model description. - /// Maximum number of results to return. - /// Number of initial results to skip. - /// Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - /// Comma-separated list of property names (and optionally values). Example: prop1,prop2=value2. - /// Property by which to order the results. - /// Only return the most recent version of a model. - /// The cancellation token to use. - /// , , or is null. - public virtual Pageable List(string name, string resourceGroupName, string workspaceName, string skiptoken = null, string version = null, string description = null, int? count = null, int? offset = null, string tags = null, string properties = null, string orderBy = null, bool? latestVersionOnly = null, CancellationToken cancellationToken = default) - { - if (name == null) - { - throw new ArgumentNullException(nameof(name)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - Page FirstPageFunc(int? pageSizeHint) - { - using var scope = _clientDiagnostics.CreateScope("ModelVersionsOperations.List"); - scope.Start(); - try - { - var response = RestClient.List(name, resourceGroupName, workspaceName, skiptoken, version, description, count, offset, tags, properties, orderBy, latestVersionOnly, 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("ModelVersionsOperations.List"); - scope.Start(); - try - { - var response = RestClient.ListNextPage(nextLink, name, resourceGroupName, workspaceName, skiptoken, version, description, count, offset, tags, properties, orderBy, latestVersionOnly, 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/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/ModelVersionsRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/ModelVersionsRestOperations.cs deleted file mode 100644 index 83e3d7dae6a31..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/ModelVersionsRestOperations.cs +++ /dev/null @@ -1,642 +0,0 @@ -// 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.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager.MachineLearningServices.Models; - -namespace Azure.ResourceManager.MachineLearningServices -{ - internal partial class ModelVersionsRestOperations - { - private string subscriptionId; - private Uri endpoint; - private string apiVersion; - private ClientDiagnostics _clientDiagnostics; - private HttpPipeline _pipeline; - - /// Initializes a new instance of ModelVersionsRestOperations. - /// The handler for diagnostic messaging in the client. - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// Azure subscription identifier. - /// server parameter. - /// Api Version. - /// or is null. - public ModelVersionsRestOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2020-09-01-preview") - { - if (subscriptionId == null) - { - throw new ArgumentNullException(nameof(subscriptionId)); - } - endpoint ??= new Uri("https://management.azure.com"); - if (apiVersion == null) - { - throw new ArgumentNullException(nameof(apiVersion)); - } - - this.subscriptionId = subscriptionId; - this.endpoint = endpoint; - this.apiVersion = apiVersion; - _clientDiagnostics = clientDiagnostics; - _pipeline = pipeline; - } - - internal HttpMessage CreateListRequest(string name, string resourceGroupName, string workspaceName, string skiptoken, string version, string description, int? count, int? offset, string tags, string properties, string orderBy, bool? latestVersionOnly) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/models/", false); - uri.AppendPath(name, true); - uri.AppendPath("/versions", false); - uri.AppendQuery("api-version", apiVersion, true); - if (skiptoken != null) - { - uri.AppendQuery("$skiptoken", skiptoken, true); - } - if (version != null) - { - uri.AppendQuery("version", version, true); - } - if (description != null) - { - uri.AppendQuery("description", description, true); - } - if (count != null) - { - uri.AppendQuery("count", count.Value, true); - } - if (offset != null) - { - uri.AppendQuery("offset", offset.Value, true); - } - if (tags != null) - { - uri.AppendQuery("tags", tags, true); - } - if (properties != null) - { - uri.AppendQuery("properties", properties, true); - } - if (orderBy != null) - { - uri.AppendQuery("orderBy", orderBy, true); - } - if (latestVersionOnly != null) - { - uri.AppendQuery("latestVersionOnly", latestVersionOnly.Value, true); - } - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - /// List model versions. - /// Model name. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Continuation token for pagination. - /// Model version. - /// Model description. - /// Maximum number of results to return. - /// Number of initial results to skip. - /// Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - /// Comma-separated list of property names (and optionally values). Example: prop1,prop2=value2. - /// Property by which to order the results. - /// Only return the most recent version of a model. - /// The cancellation token to use. - /// , , or is null. - public async Task> ListAsync(string name, string resourceGroupName, string workspaceName, string skiptoken = null, string version = null, string description = null, int? count = null, int? offset = null, string tags = null, string properties = null, string orderBy = null, bool? latestVersionOnly = null, CancellationToken cancellationToken = default) - { - if (name == null) - { - throw new ArgumentNullException(nameof(name)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateListRequest(name, resourceGroupName, workspaceName, skiptoken, version, description, count, offset, tags, properties, orderBy, latestVersionOnly); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - ModelVersionResourceArmPaginatedResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = ModelVersionResourceArmPaginatedResult.DeserializeModelVersionResourceArmPaginatedResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); - } - } - - /// List model versions. - /// Model name. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Continuation token for pagination. - /// Model version. - /// Model description. - /// Maximum number of results to return. - /// Number of initial results to skip. - /// Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - /// Comma-separated list of property names (and optionally values). Example: prop1,prop2=value2. - /// Property by which to order the results. - /// Only return the most recent version of a model. - /// The cancellation token to use. - /// , , or is null. - public Response List(string name, string resourceGroupName, string workspaceName, string skiptoken = null, string version = null, string description = null, int? count = null, int? offset = null, string tags = null, string properties = null, string orderBy = null, bool? latestVersionOnly = null, CancellationToken cancellationToken = default) - { - if (name == null) - { - throw new ArgumentNullException(nameof(name)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateListRequest(name, resourceGroupName, workspaceName, skiptoken, version, description, count, offset, tags, properties, orderBy, latestVersionOnly); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - ModelVersionResourceArmPaginatedResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = ModelVersionResourceArmPaginatedResult.DeserializeModelVersionResourceArmPaginatedResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw _clientDiagnostics.CreateRequestFailedException(message.Response); - } - } - - internal HttpMessage CreateCreateOrUpdateRequest(string name, string version, string resourceGroupName, string workspaceName, ModelVersionResource body) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Put; - var uri = new RawRequestUriBuilder(); - uri.Reset(endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/models/", false); - uri.AppendPath(name, true); - uri.AppendPath("/versions/", false); - uri.AppendPath(version, true); - uri.AppendQuery("api-version", apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - if (body != null) - { - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(body); - request.Content = content; - } - return message; - } - - /// Create or update version. - /// Container name. - /// Version identifier. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Version entity to create or update. - /// The cancellation token to use. - /// , , , or is null. - public async Task> CreateOrUpdateAsync(string name, string version, string resourceGroupName, string workspaceName, ModelVersionResource body = null, CancellationToken cancellationToken = default) - { - if (name == null) - { - throw new ArgumentNullException(nameof(name)); - } - if (version == null) - { - throw new ArgumentNullException(nameof(version)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateCreateOrUpdateRequest(name, version, resourceGroupName, workspaceName, body); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 201: - { - ModelVersionResource value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = ModelVersionResource.DeserializeModelVersionResource(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); - } - } - - /// Create or update version. - /// Container name. - /// Version identifier. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Version entity to create or update. - /// The cancellation token to use. - /// , , , or is null. - public Response CreateOrUpdate(string name, string version, string resourceGroupName, string workspaceName, ModelVersionResource body = null, CancellationToken cancellationToken = default) - { - if (name == null) - { - throw new ArgumentNullException(nameof(name)); - } - if (version == null) - { - throw new ArgumentNullException(nameof(version)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateCreateOrUpdateRequest(name, version, resourceGroupName, workspaceName, body); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 201: - { - ModelVersionResource value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = ModelVersionResource.DeserializeModelVersionResource(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw _clientDiagnostics.CreateRequestFailedException(message.Response); - } - } - - internal HttpMessage CreateGetRequest(string name, string version, string resourceGroupName, string workspaceName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/models/", false); - uri.AppendPath(name, true); - uri.AppendPath("/versions/", false); - uri.AppendPath(version, true); - uri.AppendQuery("api-version", apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - /// Get version. - /// Container name. - /// Version identifier. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - /// , , , or is null. - public async Task> GetAsync(string name, string version, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - if (name == null) - { - throw new ArgumentNullException(nameof(name)); - } - if (version == null) - { - throw new ArgumentNullException(nameof(version)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateGetRequest(name, version, resourceGroupName, workspaceName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - ModelVersionResource value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = ModelVersionResource.DeserializeModelVersionResource(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); - } - } - - /// Get version. - /// Container name. - /// Version identifier. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - /// , , , or is null. - public Response Get(string name, string version, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - if (name == null) - { - throw new ArgumentNullException(nameof(name)); - } - if (version == null) - { - throw new ArgumentNullException(nameof(version)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateGetRequest(name, version, resourceGroupName, workspaceName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - ModelVersionResource value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = ModelVersionResource.DeserializeModelVersionResource(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw _clientDiagnostics.CreateRequestFailedException(message.Response); - } - } - - internal HttpMessage CreateDeleteRequest(string name, string version, string resourceGroupName, string workspaceName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Delete; - var uri = new RawRequestUriBuilder(); - uri.Reset(endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/models/", false); - uri.AppendPath(name, true); - uri.AppendPath("/versions/", false); - uri.AppendPath(version, true); - uri.AppendQuery("api-version", apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - /// Delete version. - /// Container name. - /// Version identifier. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - /// , , , or is null. - public async Task DeleteAsync(string name, string version, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - if (name == null) - { - throw new ArgumentNullException(nameof(name)); - } - if (version == null) - { - throw new ArgumentNullException(nameof(version)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateDeleteRequest(name, version, resourceGroupName, workspaceName); - 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 version. - /// Container name. - /// Version identifier. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - /// , , , or is null. - public Response Delete(string name, string version, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - if (name == null) - { - throw new ArgumentNullException(nameof(name)); - } - if (version == null) - { - throw new ArgumentNullException(nameof(version)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateDeleteRequest(name, version, resourceGroupName, workspaceName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 204: - return message.Response; - default: - throw _clientDiagnostics.CreateRequestFailedException(message.Response); - } - } - - internal HttpMessage CreateListNextPageRequest(string nextLink, string name, string resourceGroupName, string workspaceName, string skiptoken, string version, string description, int? count, int? offset, string tags, string properties, string orderBy, bool? latestVersionOnly) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(endpoint); - uri.AppendRawNextLink(nextLink, false); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - /// List model versions. - /// The URL to the next page of results. - /// Model name. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Continuation token for pagination. - /// Model version. - /// Model description. - /// Maximum number of results to return. - /// Number of initial results to skip. - /// Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - /// Comma-separated list of property names (and optionally values). Example: prop1,prop2=value2. - /// Property by which to order the results. - /// Only return the most recent version of a model. - /// The cancellation token to use. - /// , , , or is null. - public async Task> ListNextPageAsync(string nextLink, string name, string resourceGroupName, string workspaceName, string skiptoken = null, string version = null, string description = null, int? count = null, int? offset = null, string tags = null, string properties = null, string orderBy = null, bool? latestVersionOnly = null, CancellationToken cancellationToken = default) - { - if (nextLink == null) - { - throw new ArgumentNullException(nameof(nextLink)); - } - if (name == null) - { - throw new ArgumentNullException(nameof(name)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateListNextPageRequest(nextLink, name, resourceGroupName, workspaceName, skiptoken, version, description, count, offset, tags, properties, orderBy, latestVersionOnly); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - ModelVersionResourceArmPaginatedResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = ModelVersionResourceArmPaginatedResult.DeserializeModelVersionResourceArmPaginatedResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); - } - } - - /// List model versions. - /// The URL to the next page of results. - /// Model name. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Continuation token for pagination. - /// Model version. - /// Model description. - /// Maximum number of results to return. - /// Number of initial results to skip. - /// Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - /// Comma-separated list of property names (and optionally values). Example: prop1,prop2=value2. - /// Property by which to order the results. - /// Only return the most recent version of a model. - /// The cancellation token to use. - /// , , , or is null. - public Response ListNextPage(string nextLink, string name, string resourceGroupName, string workspaceName, string skiptoken = null, string version = null, string description = null, int? count = null, int? offset = null, string tags = null, string properties = null, string orderBy = null, bool? latestVersionOnly = null, CancellationToken cancellationToken = default) - { - if (nextLink == null) - { - throw new ArgumentNullException(nameof(nextLink)); - } - if (name == null) - { - throw new ArgumentNullException(nameof(name)); - } - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateListNextPageRequest(nextLink, name, resourceGroupName, workspaceName, skiptoken, version, description, count, offset, tags, properties, orderBy, latestVersionOnly); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - ModelVersionResourceArmPaginatedResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = ModelVersionResourceArmPaginatedResult.DeserializeModelVersionResourceArmPaginatedResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw _clientDiagnostics.CreateRequestFailedException(message.Response); - } - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceCreateRequest.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceCreateRequest.Serialization.cs deleted file mode 100644 index 1b8080564455d..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceCreateRequest.Serialization.cs +++ /dev/null @@ -1,120 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class ACIServiceCreateRequest : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(ContainerResourceRequirements)) - { - writer.WritePropertyName("containerResourceRequirements"); - writer.WriteObjectValue(ContainerResourceRequirements); - } - if (Optional.IsDefined(AuthEnabled)) - { - writer.WritePropertyName("authEnabled"); - writer.WriteBooleanValue(AuthEnabled.Value); - } - if (Optional.IsDefined(SslEnabled)) - { - writer.WritePropertyName("sslEnabled"); - writer.WriteBooleanValue(SslEnabled.Value); - } - if (Optional.IsDefined(AppInsightsEnabled)) - { - writer.WritePropertyName("appInsightsEnabled"); - writer.WriteBooleanValue(AppInsightsEnabled.Value); - } - if (Optional.IsDefined(DataCollection)) - { - writer.WritePropertyName("dataCollection"); - writer.WriteObjectValue(DataCollection); - } - if (Optional.IsDefined(SslCertificate)) - { - writer.WritePropertyName("sslCertificate"); - writer.WriteStringValue(SslCertificate); - } - if (Optional.IsDefined(SslKey)) - { - writer.WritePropertyName("sslKey"); - writer.WriteStringValue(SslKey); - } - if (Optional.IsDefined(Cname)) - { - writer.WritePropertyName("cname"); - writer.WriteStringValue(Cname); - } - if (Optional.IsDefined(DnsNameLabel)) - { - writer.WritePropertyName("dnsNameLabel"); - writer.WriteStringValue(DnsNameLabel); - } - if (Optional.IsDefined(VnetConfiguration)) - { - writer.WritePropertyName("vnetConfiguration"); - writer.WriteObjectValue(VnetConfiguration); - } - if (Optional.IsDefined(EncryptionProperties)) - { - writer.WritePropertyName("encryptionProperties"); - writer.WriteObjectValue(EncryptionProperties); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(KvTags)) - { - writer.WritePropertyName("kvTags"); - writer.WriteStartObject(); - foreach (var item in KvTags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Properties)) - { - writer.WritePropertyName("properties"); - writer.WriteStartObject(); - foreach (var item in Properties) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsDefined(Keys)) - { - writer.WritePropertyName("keys"); - writer.WriteObjectValue(Keys); - } - writer.WritePropertyName("computeType"); - writer.WriteStringValue(ComputeType.ToString()); - if (Optional.IsDefined(EnvironmentImageRequest)) - { - writer.WritePropertyName("environmentImageRequest"); - writer.WriteObjectValue(EnvironmentImageRequest); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"); - writer.WriteStringValue(Location); - } - writer.WriteEndObject(); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceCreateRequest.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceCreateRequest.cs deleted file mode 100644 index d8c50553632b1..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceCreateRequest.cs +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// The ACIServiceCreateRequest. - public partial class ACIServiceCreateRequest : CreateServiceRequest - { - /// Initializes a new instance of ACIServiceCreateRequest. - public ACIServiceCreateRequest() - { - ComputeType = ComputeEnvironmentType.ACI; - } - - /// The container resource requirements. - public ContainerResourceRequirements ContainerResourceRequirements { get; set; } - /// Whether or not authentication is enabled on the service. - public bool? AuthEnabled { get; set; } - /// Whether or not SSL is enabled. - public bool? SslEnabled { get; set; } - /// Whether or not Application Insights is enabled. - public bool? AppInsightsEnabled { get; set; } - /// Details of the data collection options specified. - public ACIServiceCreateRequestDataCollection DataCollection { get; set; } - /// The public SSL certificate in PEM format to use if SSL is enabled. - public string SslCertificate { get; set; } - /// The public SSL key in PEM format for the certificate. - public string SslKey { get; set; } - /// The CName for the service. - public string Cname { get; set; } - /// The Dns label for the service. - public string DnsNameLabel { get; set; } - /// The virtual network configuration. - public ACIServiceCreateRequestVnetConfiguration VnetConfiguration { get; set; } - /// The encryption properties. - public ACIServiceCreateRequestEncryptionProperties EncryptionProperties { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceCreateRequestDataCollection.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceCreateRequestDataCollection.Serialization.cs deleted file mode 100644 index cc64c61aaacba..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceCreateRequestDataCollection.Serialization.cs +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class ACIServiceCreateRequestDataCollection : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(EventHubEnabled)) - { - writer.WritePropertyName("eventHubEnabled"); - writer.WriteBooleanValue(EventHubEnabled.Value); - } - if (Optional.IsDefined(StorageEnabled)) - { - writer.WritePropertyName("storageEnabled"); - writer.WriteBooleanValue(StorageEnabled.Value); - } - writer.WriteEndObject(); - } - - internal static ACIServiceCreateRequestDataCollection DeserializeACIServiceCreateRequestDataCollection(JsonElement element) - { - Optional eventHubEnabled = default; - Optional storageEnabled = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("eventHubEnabled")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - eventHubEnabled = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("storageEnabled")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - storageEnabled = property.Value.GetBoolean(); - continue; - } - } - return new ACIServiceCreateRequestDataCollection(Optional.ToNullable(eventHubEnabled), Optional.ToNullable(storageEnabled)); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceCreateRequestDataCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceCreateRequestDataCollection.cs deleted file mode 100644 index 785e4ffea5756..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceCreateRequestDataCollection.cs +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// Details of the data collection options specified. - public partial class ACIServiceCreateRequestDataCollection : ModelDataCollection - { - /// Initializes a new instance of ACIServiceCreateRequestDataCollection. - public ACIServiceCreateRequestDataCollection() - { - } - - /// Initializes a new instance of ACIServiceCreateRequestDataCollection. - /// Option for enabling/disabling Event Hub. - /// Option for enabling/disabling storage. - internal ACIServiceCreateRequestDataCollection(bool? eventHubEnabled, bool? storageEnabled) : base(eventHubEnabled, storageEnabled) - { - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceCreateRequestEncryptionProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceCreateRequestEncryptionProperties.Serialization.cs deleted file mode 100644 index ecd32a4ef826d..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceCreateRequestEncryptionProperties.Serialization.cs +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class ACIServiceCreateRequestEncryptionProperties : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("vaultBaseUrl"); - writer.WriteStringValue(VaultBaseUrl); - writer.WritePropertyName("keyName"); - writer.WriteStringValue(KeyName); - writer.WritePropertyName("keyVersion"); - writer.WriteStringValue(KeyVersion); - writer.WriteEndObject(); - } - - internal static ACIServiceCreateRequestEncryptionProperties DeserializeACIServiceCreateRequestEncryptionProperties(JsonElement element) - { - string vaultBaseUrl = default; - string keyName = default; - string keyVersion = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("vaultBaseUrl")) - { - vaultBaseUrl = property.Value.GetString(); - continue; - } - if (property.NameEquals("keyName")) - { - keyName = property.Value.GetString(); - continue; - } - if (property.NameEquals("keyVersion")) - { - keyVersion = property.Value.GetString(); - continue; - } - } - return new ACIServiceCreateRequestEncryptionProperties(vaultBaseUrl, keyName, keyVersion); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceCreateRequestEncryptionProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceCreateRequestEncryptionProperties.cs deleted file mode 100644 index a9627df73880e..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceCreateRequestEncryptionProperties.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// The encryption properties. - public partial class ACIServiceCreateRequestEncryptionProperties : EncryptionProperties - { - /// Initializes a new instance of ACIServiceCreateRequestEncryptionProperties. - /// vault base Url. - /// Encryption Key name. - /// Encryption Key Version. - /// , , or is null. - public ACIServiceCreateRequestEncryptionProperties(string vaultBaseUrl, string keyName, string keyVersion) : base(vaultBaseUrl, keyName, keyVersion) - { - if (vaultBaseUrl == null) - { - throw new ArgumentNullException(nameof(vaultBaseUrl)); - } - if (keyName == null) - { - throw new ArgumentNullException(nameof(keyName)); - } - if (keyVersion == null) - { - throw new ArgumentNullException(nameof(keyVersion)); - } - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceCreateRequestVnetConfiguration.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceCreateRequestVnetConfiguration.Serialization.cs deleted file mode 100644 index 31edbf27e056b..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceCreateRequestVnetConfiguration.Serialization.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class ACIServiceCreateRequestVnetConfiguration : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(VnetName)) - { - writer.WritePropertyName("vnetName"); - writer.WriteStringValue(VnetName); - } - if (Optional.IsDefined(SubnetName)) - { - writer.WritePropertyName("subnetName"); - writer.WriteStringValue(SubnetName); - } - writer.WriteEndObject(); - } - - internal static ACIServiceCreateRequestVnetConfiguration DeserializeACIServiceCreateRequestVnetConfiguration(JsonElement element) - { - Optional vnetName = default; - Optional subnetName = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("vnetName")) - { - vnetName = property.Value.GetString(); - continue; - } - if (property.NameEquals("subnetName")) - { - subnetName = property.Value.GetString(); - continue; - } - } - return new ACIServiceCreateRequestVnetConfiguration(vnetName.Value, subnetName.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceCreateRequestVnetConfiguration.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceCreateRequestVnetConfiguration.cs deleted file mode 100644 index 6f2ecf107c1d5..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceCreateRequestVnetConfiguration.cs +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// The virtual network configuration. - public partial class ACIServiceCreateRequestVnetConfiguration : VnetConfiguration - { - /// Initializes a new instance of ACIServiceCreateRequestVnetConfiguration. - public ACIServiceCreateRequestVnetConfiguration() - { - } - - /// Initializes a new instance of ACIServiceCreateRequestVnetConfiguration. - /// The name of the virtual network. - /// The name of the virtual network subnet. - internal ACIServiceCreateRequestVnetConfiguration(string vnetName, string subnetName) : base(vnetName, subnetName) - { - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceResponse.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceResponse.Serialization.cs deleted file mode 100644 index 95f87d5b5337d..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceResponse.Serialization.cs +++ /dev/null @@ -1,389 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class ACIServiceResponse : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(ContainerResourceRequirements)) - { - writer.WritePropertyName("containerResourceRequirements"); - writer.WriteObjectValue(ContainerResourceRequirements); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"); - writer.WriteStringValue(Location); - } - if (Optional.IsDefined(AuthEnabled)) - { - writer.WritePropertyName("authEnabled"); - writer.WriteBooleanValue(AuthEnabled.Value); - } - if (Optional.IsDefined(SslEnabled)) - { - writer.WritePropertyName("sslEnabled"); - writer.WriteBooleanValue(SslEnabled.Value); - } - if (Optional.IsDefined(AppInsightsEnabled)) - { - writer.WritePropertyName("appInsightsEnabled"); - writer.WriteBooleanValue(AppInsightsEnabled.Value); - } - if (Optional.IsDefined(DataCollection)) - { - writer.WritePropertyName("dataCollection"); - writer.WriteObjectValue(DataCollection); - } - if (Optional.IsDefined(SslCertificate)) - { - writer.WritePropertyName("sslCertificate"); - writer.WriteStringValue(SslCertificate); - } - if (Optional.IsDefined(SslKey)) - { - writer.WritePropertyName("sslKey"); - writer.WriteStringValue(SslKey); - } - if (Optional.IsDefined(Cname)) - { - writer.WritePropertyName("cname"); - writer.WriteStringValue(Cname); - } - if (Optional.IsDefined(PublicIp)) - { - writer.WritePropertyName("publicIp"); - writer.WriteStringValue(PublicIp); - } - if (Optional.IsDefined(PublicFqdn)) - { - writer.WritePropertyName("publicFqdn"); - writer.WriteStringValue(PublicFqdn); - } - if (Optional.IsCollectionDefined(Models)) - { - writer.WritePropertyName("models"); - writer.WriteStartArray(); - foreach (var item in Models) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(EnvironmentImageRequest)) - { - writer.WritePropertyName("environmentImageRequest"); - writer.WriteObjectValue(EnvironmentImageRequest); - } - if (Optional.IsDefined(VnetConfiguration)) - { - writer.WritePropertyName("vnetConfiguration"); - writer.WriteObjectValue(VnetConfiguration); - } - if (Optional.IsDefined(EncryptionProperties)) - { - writer.WritePropertyName("encryptionProperties"); - writer.WriteObjectValue(EncryptionProperties); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(KvTags)) - { - writer.WritePropertyName("kvTags"); - writer.WriteStartObject(); - foreach (var item in KvTags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Properties)) - { - writer.WritePropertyName("properties"); - writer.WriteStartObject(); - foreach (var item in Properties) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("computeType"); - writer.WriteStringValue(ComputeType.ToString()); - if (Optional.IsDefined(DeploymentType)) - { - writer.WritePropertyName("deploymentType"); - writer.WriteStringValue(DeploymentType.Value.ToString()); - } - writer.WriteEndObject(); - } - - internal static ACIServiceResponse DeserializeACIServiceResponse(JsonElement element) - { - Optional containerResourceRequirements = default; - Optional scoringUri = default; - Optional location = default; - Optional authEnabled = default; - Optional sslEnabled = default; - Optional appInsightsEnabled = default; - Optional dataCollection = default; - Optional sslCertificate = default; - Optional sslKey = default; - Optional cname = default; - Optional publicIp = default; - Optional publicFqdn = default; - Optional swaggerUri = default; - Optional> modelConfigMap = default; - Optional> models = default; - Optional environmentImageRequest = default; - Optional vnetConfiguration = default; - Optional encryptionProperties = default; - Optional description = default; - Optional> kvTags = default; - Optional> properties = default; - Optional state = default; - Optional error = default; - ComputeEnvironmentType computeType = default; - Optional deploymentType = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("containerResourceRequirements")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - containerResourceRequirements = ContainerResourceRequirements.DeserializeContainerResourceRequirements(property.Value); - continue; - } - if (property.NameEquals("scoringUri")) - { - scoringUri = property.Value.GetString(); - continue; - } - if (property.NameEquals("location")) - { - location = property.Value.GetString(); - continue; - } - if (property.NameEquals("authEnabled")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - authEnabled = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("sslEnabled")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - sslEnabled = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("appInsightsEnabled")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - appInsightsEnabled = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("dataCollection")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - dataCollection = ACIServiceResponseDataCollection.DeserializeACIServiceResponseDataCollection(property.Value); - continue; - } - if (property.NameEquals("sslCertificate")) - { - sslCertificate = property.Value.GetString(); - continue; - } - if (property.NameEquals("sslKey")) - { - sslKey = property.Value.GetString(); - continue; - } - if (property.NameEquals("cname")) - { - cname = property.Value.GetString(); - continue; - } - if (property.NameEquals("publicIp")) - { - publicIp = property.Value.GetString(); - continue; - } - if (property.NameEquals("publicFqdn")) - { - publicFqdn = property.Value.GetString(); - continue; - } - if (property.NameEquals("swaggerUri")) - { - swaggerUri = property.Value.GetString(); - continue; - } - if (property.NameEquals("modelConfigMap")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetObject()); - } - modelConfigMap = dictionary; - continue; - } - if (property.NameEquals("models")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(Model.DeserializeModel(item)); - } - models = array; - continue; - } - if (property.NameEquals("environmentImageRequest")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - environmentImageRequest = ACIServiceResponseEnvironmentImageRequest.DeserializeACIServiceResponseEnvironmentImageRequest(property.Value); - continue; - } - if (property.NameEquals("vnetConfiguration")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - vnetConfiguration = ACIServiceResponseVnetConfiguration.DeserializeACIServiceResponseVnetConfiguration(property.Value); - continue; - } - if (property.NameEquals("encryptionProperties")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - encryptionProperties = ACIServiceResponseEncryptionProperties.DeserializeACIServiceResponseEncryptionProperties(property.Value); - continue; - } - if (property.NameEquals("description")) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("kvTags")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - kvTags = dictionary; - continue; - } - if (property.NameEquals("properties")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - properties = dictionary; - continue; - } - if (property.NameEquals("state")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - state = new WebServiceState(property.Value.GetString()); - continue; - } - if (property.NameEquals("error")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - error = ServiceResponseBaseError.DeserializeServiceResponseBaseError(property.Value); - continue; - } - if (property.NameEquals("computeType")) - { - computeType = new ComputeEnvironmentType(property.Value.GetString()); - continue; - } - if (property.NameEquals("deploymentType")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - deploymentType = new DeploymentType(property.Value.GetString()); - continue; - } - } - return new ACIServiceResponse(description.Value, Optional.ToDictionary(kvTags), Optional.ToDictionary(properties), Optional.ToNullable(state), error.Value, computeType, Optional.ToNullable(deploymentType), containerResourceRequirements.Value, scoringUri.Value, location.Value, Optional.ToNullable(authEnabled), Optional.ToNullable(sslEnabled), Optional.ToNullable(appInsightsEnabled), dataCollection.Value, sslCertificate.Value, sslKey.Value, cname.Value, publicIp.Value, publicFqdn.Value, swaggerUri.Value, Optional.ToDictionary(modelConfigMap), Optional.ToList(models), environmentImageRequest.Value, vnetConfiguration.Value, encryptionProperties.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceResponse.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceResponse.cs deleted file mode 100644 index 099a44c955a5a..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceResponse.cs +++ /dev/null @@ -1,110 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// The response for an ACI service. - public partial class ACIServiceResponse : ServiceResponseBase - { - /// Initializes a new instance of ACIServiceResponse. - public ACIServiceResponse() - { - ModelConfigMap = new ChangeTrackingDictionary(); - Models = new ChangeTrackingList(); - ComputeType = ComputeEnvironmentType.ACI; - } - - /// Initializes a new instance of ACIServiceResponse. - /// The service description. - /// The service tag dictionary. Tags are mutable. - /// The service property dictionary. Properties are immutable. - /// The current state of the service. - /// The error details. - /// The compute environment type for the service. - /// The deployment type for the service. - /// The container resource requirements. - /// The Uri for sending scoring requests. - /// The name of the Azure location/region. - /// Whether or not authentication is enabled on the service. - /// Whether or not SSL is enabled. - /// Whether or not Application Insights is enabled. - /// Details of the data collection options specified. - /// The public SSL certificate in PEM format to use if SSL is enabled. - /// The public SSL key in PEM format for the certificate. - /// The CName for the service. - /// The public IP address for the service. - /// The public Fqdn for the service. - /// The Uri for sending swagger requests. - /// Details on the models and configurations. - /// The list of models. - /// The Environment, models and assets used for inferencing. - /// The virtual network configuration. - /// The encryption properties. - internal ACIServiceResponse(string description, IDictionary kvTags, IDictionary properties, WebServiceState? state, ServiceResponseBaseError error, ComputeEnvironmentType computeType, DeploymentType? deploymentType, ContainerResourceRequirements containerResourceRequirements, string scoringUri, string location, bool? authEnabled, bool? sslEnabled, bool? appInsightsEnabled, ACIServiceResponseDataCollection dataCollection, string sslCertificate, string sslKey, string cname, string publicIp, string publicFqdn, string swaggerUri, IReadOnlyDictionary modelConfigMap, IList models, ACIServiceResponseEnvironmentImageRequest environmentImageRequest, ACIServiceResponseVnetConfiguration vnetConfiguration, ACIServiceResponseEncryptionProperties encryptionProperties) : base(description, kvTags, properties, state, error, computeType, deploymentType) - { - ContainerResourceRequirements = containerResourceRequirements; - ScoringUri = scoringUri; - Location = location; - AuthEnabled = authEnabled; - SslEnabled = sslEnabled; - AppInsightsEnabled = appInsightsEnabled; - DataCollection = dataCollection; - SslCertificate = sslCertificate; - SslKey = sslKey; - Cname = cname; - PublicIp = publicIp; - PublicFqdn = publicFqdn; - SwaggerUri = swaggerUri; - ModelConfigMap = modelConfigMap; - Models = models; - EnvironmentImageRequest = environmentImageRequest; - VnetConfiguration = vnetConfiguration; - EncryptionProperties = encryptionProperties; - ComputeType = computeType; - } - - /// The container resource requirements. - public ContainerResourceRequirements ContainerResourceRequirements { get; set; } - /// The Uri for sending scoring requests. - public string ScoringUri { get; } - /// The name of the Azure location/region. - public string Location { get; set; } - /// Whether or not authentication is enabled on the service. - public bool? AuthEnabled { get; set; } - /// Whether or not SSL is enabled. - public bool? SslEnabled { get; set; } - /// Whether or not Application Insights is enabled. - public bool? AppInsightsEnabled { get; set; } - /// Details of the data collection options specified. - public ACIServiceResponseDataCollection DataCollection { get; set; } - /// The public SSL certificate in PEM format to use if SSL is enabled. - public string SslCertificate { get; set; } - /// The public SSL key in PEM format for the certificate. - public string SslKey { get; set; } - /// The CName for the service. - public string Cname { get; set; } - /// The public IP address for the service. - public string PublicIp { get; set; } - /// The public Fqdn for the service. - public string PublicFqdn { get; set; } - /// The Uri for sending swagger requests. - public string SwaggerUri { get; } - /// Details on the models and configurations. - public IReadOnlyDictionary ModelConfigMap { get; } - /// The list of models. - public IList Models { get; } - /// The Environment, models and assets used for inferencing. - public ACIServiceResponseEnvironmentImageRequest EnvironmentImageRequest { get; set; } - /// The virtual network configuration. - public ACIServiceResponseVnetConfiguration VnetConfiguration { get; set; } - /// The encryption properties. - public ACIServiceResponseEncryptionProperties EncryptionProperties { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceResponseDataCollection.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceResponseDataCollection.Serialization.cs deleted file mode 100644 index 8f0ee9b37522c..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceResponseDataCollection.Serialization.cs +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class ACIServiceResponseDataCollection : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(EventHubEnabled)) - { - writer.WritePropertyName("eventHubEnabled"); - writer.WriteBooleanValue(EventHubEnabled.Value); - } - if (Optional.IsDefined(StorageEnabled)) - { - writer.WritePropertyName("storageEnabled"); - writer.WriteBooleanValue(StorageEnabled.Value); - } - writer.WriteEndObject(); - } - - internal static ACIServiceResponseDataCollection DeserializeACIServiceResponseDataCollection(JsonElement element) - { - Optional eventHubEnabled = default; - Optional storageEnabled = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("eventHubEnabled")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - eventHubEnabled = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("storageEnabled")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - storageEnabled = property.Value.GetBoolean(); - continue; - } - } - return new ACIServiceResponseDataCollection(Optional.ToNullable(eventHubEnabled), Optional.ToNullable(storageEnabled)); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceResponseDataCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceResponseDataCollection.cs deleted file mode 100644 index 1044ffb135ca1..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceResponseDataCollection.cs +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// Details of the data collection options specified. - public partial class ACIServiceResponseDataCollection : ModelDataCollection - { - /// Initializes a new instance of ACIServiceResponseDataCollection. - public ACIServiceResponseDataCollection() - { - } - - /// Initializes a new instance of ACIServiceResponseDataCollection. - /// Option for enabling/disabling Event Hub. - /// Option for enabling/disabling storage. - internal ACIServiceResponseDataCollection(bool? eventHubEnabled, bool? storageEnabled) : base(eventHubEnabled, storageEnabled) - { - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceResponseEncryptionProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceResponseEncryptionProperties.Serialization.cs deleted file mode 100644 index 78efe37624243..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceResponseEncryptionProperties.Serialization.cs +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class ACIServiceResponseEncryptionProperties : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("vaultBaseUrl"); - writer.WriteStringValue(VaultBaseUrl); - writer.WritePropertyName("keyName"); - writer.WriteStringValue(KeyName); - writer.WritePropertyName("keyVersion"); - writer.WriteStringValue(KeyVersion); - writer.WriteEndObject(); - } - - internal static ACIServiceResponseEncryptionProperties DeserializeACIServiceResponseEncryptionProperties(JsonElement element) - { - string vaultBaseUrl = default; - string keyName = default; - string keyVersion = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("vaultBaseUrl")) - { - vaultBaseUrl = property.Value.GetString(); - continue; - } - if (property.NameEquals("keyName")) - { - keyName = property.Value.GetString(); - continue; - } - if (property.NameEquals("keyVersion")) - { - keyVersion = property.Value.GetString(); - continue; - } - } - return new ACIServiceResponseEncryptionProperties(vaultBaseUrl, keyName, keyVersion); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceResponseEncryptionProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceResponseEncryptionProperties.cs deleted file mode 100644 index 077c270e083ca..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceResponseEncryptionProperties.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// The encryption properties. - public partial class ACIServiceResponseEncryptionProperties : EncryptionProperties - { - /// Initializes a new instance of ACIServiceResponseEncryptionProperties. - /// vault base Url. - /// Encryption Key name. - /// Encryption Key Version. - /// , , or is null. - public ACIServiceResponseEncryptionProperties(string vaultBaseUrl, string keyName, string keyVersion) : base(vaultBaseUrl, keyName, keyVersion) - { - if (vaultBaseUrl == null) - { - throw new ArgumentNullException(nameof(vaultBaseUrl)); - } - if (keyName == null) - { - throw new ArgumentNullException(nameof(keyName)); - } - if (keyVersion == null) - { - throw new ArgumentNullException(nameof(keyVersion)); - } - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceResponseEnvironmentImageRequest.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceResponseEnvironmentImageRequest.Serialization.cs deleted file mode 100644 index ecb164d5d7da1..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceResponseEnvironmentImageRequest.Serialization.cs +++ /dev/null @@ -1,151 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class ACIServiceResponseEnvironmentImageRequest : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(DriverProgram)) - { - writer.WritePropertyName("driverProgram"); - writer.WriteStringValue(DriverProgram); - } - if (Optional.IsCollectionDefined(Assets)) - { - writer.WritePropertyName("assets"); - writer.WriteStartArray(); - foreach (var item in Assets) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(ModelIds)) - { - writer.WritePropertyName("modelIds"); - writer.WriteStartArray(); - foreach (var item in ModelIds) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(Models)) - { - writer.WritePropertyName("models"); - writer.WriteStartArray(); - foreach (var item in Models) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Environment)) - { - writer.WritePropertyName("environment"); - writer.WriteObjectValue(Environment); - } - if (Optional.IsDefined(EnvironmentReference)) - { - writer.WritePropertyName("environmentReference"); - writer.WriteObjectValue(EnvironmentReference); - } - writer.WriteEndObject(); - } - - internal static ACIServiceResponseEnvironmentImageRequest DeserializeACIServiceResponseEnvironmentImageRequest(JsonElement element) - { - Optional driverProgram = default; - Optional> assets = default; - Optional> modelIds = default; - Optional> models = default; - Optional environment = default; - Optional environmentReference = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("driverProgram")) - { - driverProgram = property.Value.GetString(); - continue; - } - if (property.NameEquals("assets")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(ImageAsset.DeserializeImageAsset(item)); - } - assets = array; - continue; - } - if (property.NameEquals("modelIds")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - modelIds = array; - continue; - } - if (property.NameEquals("models")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(Model.DeserializeModel(item)); - } - models = array; - continue; - } - if (property.NameEquals("environment")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - environment = EnvironmentImageResponseEnvironment.DeserializeEnvironmentImageResponseEnvironment(property.Value); - continue; - } - if (property.NameEquals("environmentReference")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - environmentReference = EnvironmentImageResponseEnvironmentReference.DeserializeEnvironmentImageResponseEnvironmentReference(property.Value); - continue; - } - } - return new ACIServiceResponseEnvironmentImageRequest(driverProgram.Value, Optional.ToList(assets), Optional.ToList(modelIds), Optional.ToList(models), environment.Value, environmentReference.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceResponseEnvironmentImageRequest.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceResponseEnvironmentImageRequest.cs deleted file mode 100644 index 44a8c6be830b9..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceResponseEnvironmentImageRequest.cs +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// The Environment, models and assets used for inferencing. - public partial class ACIServiceResponseEnvironmentImageRequest : EnvironmentImageResponse - { - /// Initializes a new instance of ACIServiceResponseEnvironmentImageRequest. - public ACIServiceResponseEnvironmentImageRequest() - { - } - - /// Initializes a new instance of ACIServiceResponseEnvironmentImageRequest. - /// The name of the driver file. - /// The list of assets. - /// The list of model Ids. - /// The list of models. - /// The details of the AZURE ML environment. - /// The unique identifying details of the AZURE ML environment. - internal ACIServiceResponseEnvironmentImageRequest(string driverProgram, IList assets, IList modelIds, IList models, EnvironmentImageResponseEnvironment environment, EnvironmentImageResponseEnvironmentReference environmentReference) : base(driverProgram, assets, modelIds, models, environment, environmentReference) - { - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceResponseVnetConfiguration.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceResponseVnetConfiguration.Serialization.cs deleted file mode 100644 index 5c0ea2e9fbb15..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceResponseVnetConfiguration.Serialization.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class ACIServiceResponseVnetConfiguration : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(VnetName)) - { - writer.WritePropertyName("vnetName"); - writer.WriteStringValue(VnetName); - } - if (Optional.IsDefined(SubnetName)) - { - writer.WritePropertyName("subnetName"); - writer.WriteStringValue(SubnetName); - } - writer.WriteEndObject(); - } - - internal static ACIServiceResponseVnetConfiguration DeserializeACIServiceResponseVnetConfiguration(JsonElement element) - { - Optional vnetName = default; - Optional subnetName = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("vnetName")) - { - vnetName = property.Value.GetString(); - continue; - } - if (property.NameEquals("subnetName")) - { - subnetName = property.Value.GetString(); - continue; - } - } - return new ACIServiceResponseVnetConfiguration(vnetName.Value, subnetName.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceResponseVnetConfiguration.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceResponseVnetConfiguration.cs deleted file mode 100644 index 5d6c8a3d79087..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceResponseVnetConfiguration.cs +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// The virtual network configuration. - public partial class ACIServiceResponseVnetConfiguration : VnetConfiguration - { - /// Initializes a new instance of ACIServiceResponseVnetConfiguration. - public ACIServiceResponseVnetConfiguration() - { - } - - /// Initializes a new instance of ACIServiceResponseVnetConfiguration. - /// The name of the virtual network. - /// The name of the virtual network subnet. - internal ACIServiceResponseVnetConfiguration(string vnetName, string subnetName) : base(vnetName, subnetName) - { - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKS.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKS.Serialization.cs index 78bba19ba4bae..15fd7218ec06d 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKS.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKS.Serialization.cs @@ -39,6 +39,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("resourceId"); writer.WriteStringValue(ResourceId); } + if (Optional.IsDefined(DisableLocalAuth)) + { + writer.WritePropertyName("disableLocalAuth"); + writer.WriteBooleanValue(DisableLocalAuth.Value); + } writer.WriteEndObject(); } @@ -52,8 +57,9 @@ internal static AKS DeserializeAKS(JsonElement element) Optional createdOn = default; Optional modifiedOn = default; Optional resourceId = default; - Optional> provisioningErrors = default; + Optional> provisioningErrors = default; Optional isAttachedCompute = default; + Optional disableLocalAuth = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("properties")) @@ -123,10 +129,10 @@ internal static AKS DeserializeAKS(JsonElement element) property.ThrowNonNullablePropertyIsNull(); continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(MachineLearningServiceError.DeserializeMachineLearningServiceError(item)); + array.Add(ErrorResponse.DeserializeErrorResponse(item)); } provisioningErrors = array; continue; @@ -141,8 +147,18 @@ internal static AKS DeserializeAKS(JsonElement element) isAttachedCompute = property.Value.GetBoolean(); continue; } + if (property.NameEquals("disableLocalAuth")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + disableLocalAuth = property.Value.GetBoolean(); + continue; + } } - return new AKS(computeType, computeLocation.Value, Optional.ToNullable(provisioningState), description.Value, Optional.ToNullable(createdOn), Optional.ToNullable(modifiedOn), resourceId.Value, Optional.ToList(provisioningErrors), Optional.ToNullable(isAttachedCompute), properties.Value); + return new AKS(computeType, computeLocation.Value, Optional.ToNullable(provisioningState), description.Value, Optional.ToNullable(createdOn), Optional.ToNullable(modifiedOn), resourceId.Value, Optional.ToList(provisioningErrors), Optional.ToNullable(isAttachedCompute), Optional.ToNullable(disableLocalAuth), properties.Value); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKS.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKS.cs index 5fa28ae66bc9e..c3eb69ab57d1a 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKS.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKS.cs @@ -24,13 +24,14 @@ public AKS() /// Location for the underlying compute. /// The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. /// The description of the Machine Learning compute. - /// The date and time when the compute was created. - /// The date and time when the compute was last modified. + /// The time at which the compute was created. + /// The time at which the compute was last modified. /// ARM resource id of the underlying compute. /// Errors during provisioning. /// Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning service provisioned it if false. + /// Opt-out of local authentication and ensure customers can use only MSI and AAD exclusively for authentication. /// AKS properties. - internal AKS(ComputeType computeType, string computeLocation, ProvisioningState? provisioningState, string description, DateTimeOffset? createdOn, DateTimeOffset? modifiedOn, string resourceId, IReadOnlyList provisioningErrors, bool? isAttachedCompute, AKSProperties properties) : base(computeType, computeLocation, provisioningState, description, createdOn, modifiedOn, resourceId, provisioningErrors, isAttachedCompute) + internal AKS(ComputeType computeType, string computeLocation, ProvisioningState? provisioningState, string description, DateTimeOffset? createdOn, DateTimeOffset? modifiedOn, string resourceId, IReadOnlyList provisioningErrors, bool? isAttachedCompute, bool? disableLocalAuth, AKSProperties properties) : base(computeType, computeLocation, provisioningState, description, createdOn, modifiedOn, resourceId, provisioningErrors, isAttachedCompute, disableLocalAuth) { Properties = properties; ComputeType = computeType; diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSProperties.Serialization.cs index 2c63b88b8f5ae..e16f23a632fde 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSProperties.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSProperties.Serialization.cs @@ -26,10 +26,15 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("agentCount"); writer.WriteNumberValue(AgentCount.Value); } - if (Optional.IsDefined(AgentVMSize)) + if (Optional.IsDefined(AgentVmSize)) { - writer.WritePropertyName("agentVMSize"); - writer.WriteStringValue(AgentVMSize); + writer.WritePropertyName("agentVmSize"); + writer.WriteStringValue(AgentVmSize); + } + if (Optional.IsDefined(ClusterPurpose)) + { + writer.WritePropertyName("clusterPurpose"); + writer.WriteStringValue(ClusterPurpose.Value.ToString()); } if (Optional.IsDefined(SslConfiguration)) { @@ -41,6 +46,16 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("aksNetworkingConfiguration"); writer.WriteObjectValue(AksNetworkingConfiguration); } + if (Optional.IsDefined(LoadBalancerType)) + { + writer.WritePropertyName("loadBalancerType"); + writer.WriteStringValue(LoadBalancerType.Value.ToString()); + } + if (Optional.IsDefined(LoadBalancerSubnet)) + { + writer.WritePropertyName("loadBalancerSubnet"); + writer.WriteStringValue(LoadBalancerSubnet); + } writer.WriteEndObject(); } @@ -49,9 +64,12 @@ internal static AKSProperties DeserializeAKSProperties(JsonElement element) Optional clusterFqdn = default; Optional> systemServices = default; Optional agentCount = default; - Optional agentVMSize = default; + Optional agentVmSize = default; + Optional clusterPurpose = default; Optional sslConfiguration = default; Optional aksNetworkingConfiguration = default; + Optional loadBalancerType = default; + Optional loadBalancerSubnet = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("clusterFqdn")) @@ -84,9 +102,19 @@ internal static AKSProperties DeserializeAKSProperties(JsonElement element) agentCount = property.Value.GetInt32(); continue; } - if (property.NameEquals("agentVMSize")) + if (property.NameEquals("agentVmSize")) { - agentVMSize = property.Value.GetString(); + agentVmSize = property.Value.GetString(); + continue; + } + if (property.NameEquals("clusterPurpose")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + clusterPurpose = new ClusterPurpose(property.Value.GetString()); continue; } if (property.NameEquals("sslConfiguration")) @@ -109,8 +137,23 @@ internal static AKSProperties DeserializeAKSProperties(JsonElement element) aksNetworkingConfiguration = AksNetworkingConfiguration.DeserializeAksNetworkingConfiguration(property.Value); continue; } + if (property.NameEquals("loadBalancerType")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + loadBalancerType = new LoadBalancerType(property.Value.GetString()); + continue; + } + if (property.NameEquals("loadBalancerSubnet")) + { + loadBalancerSubnet = property.Value.GetString(); + continue; + } } - return new AKSProperties(clusterFqdn.Value, Optional.ToList(systemServices), Optional.ToNullable(agentCount), agentVMSize.Value, sslConfiguration.Value, aksNetworkingConfiguration.Value); + return new AKSProperties(clusterFqdn.Value, Optional.ToList(systemServices), Optional.ToNullable(agentCount), agentVmSize.Value, Optional.ToNullable(clusterPurpose), sslConfiguration.Value, aksNetworkingConfiguration.Value, Optional.ToNullable(loadBalancerType), loadBalancerSubnet.Value); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSProperties.cs index 1489464b0c6e7..ff4a67de13a48 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSProperties.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSProperties.cs @@ -23,17 +23,23 @@ public AKSProperties() /// Cluster full qualified domain name. /// System services. /// Number of agents. - /// Agent virtual machine size. + /// Agent virtual machine size. + /// Intended usage of the cluster. /// SSL configuration. /// AKS networking configuration for vnet. - internal AKSProperties(string clusterFqdn, IReadOnlyList systemServices, int? agentCount, string agentVMSize, SslConfiguration sslConfiguration, AksNetworkingConfiguration aksNetworkingConfiguration) + /// Load Balancer Type. + /// Load Balancer Subnet. + internal AKSProperties(string clusterFqdn, IReadOnlyList systemServices, int? agentCount, string agentVmSize, ClusterPurpose? clusterPurpose, SslConfiguration sslConfiguration, AksNetworkingConfiguration aksNetworkingConfiguration, LoadBalancerType? loadBalancerType, string loadBalancerSubnet) { ClusterFqdn = clusterFqdn; SystemServices = systemServices; AgentCount = agentCount; - AgentVMSize = agentVMSize; + AgentVmSize = agentVmSize; + ClusterPurpose = clusterPurpose; SslConfiguration = sslConfiguration; AksNetworkingConfiguration = aksNetworkingConfiguration; + LoadBalancerType = loadBalancerType; + LoadBalancerSubnet = loadBalancerSubnet; } /// Cluster full qualified domain name. @@ -43,10 +49,16 @@ internal AKSProperties(string clusterFqdn, IReadOnlyList systemSe /// Number of agents. public int? AgentCount { get; set; } /// Agent virtual machine size. - public string AgentVMSize { get; set; } + public string AgentVmSize { get; set; } + /// Intended usage of the cluster. + public ClusterPurpose? ClusterPurpose { get; set; } /// SSL configuration. public SslConfiguration SslConfiguration { get; set; } /// AKS networking configuration for vnet. public AksNetworkingConfiguration AksNetworkingConfiguration { get; set; } + /// Load Balancer Type. + public LoadBalancerType? LoadBalancerType { get; set; } + /// Load Balancer Subnet. + public string LoadBalancerSubnet { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSReplicaStatus.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSReplicaStatus.Serialization.cs deleted file mode 100644 index 4920430a0111c..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSReplicaStatus.Serialization.cs +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class AKSReplicaStatus - { - internal static AKSReplicaStatus DeserializeAKSReplicaStatus(JsonElement element) - { - Optional desiredReplicas = default; - Optional updatedReplicas = default; - Optional availableReplicas = default; - Optional error = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("desiredReplicas")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - desiredReplicas = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("updatedReplicas")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - updatedReplicas = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("availableReplicas")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - availableReplicas = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("error")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - error = AKSReplicaStatusError.DeserializeAKSReplicaStatusError(property.Value); - continue; - } - } - return new AKSReplicaStatus(Optional.ToNullable(desiredReplicas), Optional.ToNullable(updatedReplicas), Optional.ToNullable(availableReplicas), error.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSReplicaStatus.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSReplicaStatus.cs deleted file mode 100644 index 4c56e3d72feca..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSReplicaStatus.cs +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// The AKSReplicaStatus. - public partial class AKSReplicaStatus - { - /// Initializes a new instance of AKSReplicaStatus. - internal AKSReplicaStatus() - { - } - - /// Initializes a new instance of AKSReplicaStatus. - /// The desired number of replicas. - /// The number of updated replicas. - /// The number of available replicas. - /// The error details. - internal AKSReplicaStatus(int? desiredReplicas, int? updatedReplicas, int? availableReplicas, AKSReplicaStatusError error) - { - DesiredReplicas = desiredReplicas; - UpdatedReplicas = updatedReplicas; - AvailableReplicas = availableReplicas; - Error = error; - } - - /// The desired number of replicas. - public int? DesiredReplicas { get; } - /// The number of updated replicas. - public int? UpdatedReplicas { get; } - /// The number of available replicas. - public int? AvailableReplicas { get; } - /// The error details. - public AKSReplicaStatusError Error { get; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSReplicaStatusError.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSReplicaStatusError.cs deleted file mode 100644 index a3becc701704a..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSReplicaStatusError.cs +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// The error details. - public partial class AKSReplicaStatusError : ErrorResponse - { - /// Initializes a new instance of AKSReplicaStatusError. - internal AKSReplicaStatusError() - { - } - - /// Initializes a new instance of AKSReplicaStatusError. - /// Error code. - /// Error message. - /// An array of error detail objects. - internal AKSReplicaStatusError(string code, string message, IReadOnlyList details) : base(code, message, details) - { - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceCreateRequest.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceCreateRequest.Serialization.cs deleted file mode 100644 index c6811f88ac0db..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceCreateRequest.Serialization.cs +++ /dev/null @@ -1,145 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class AKSServiceCreateRequest : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(NumReplicas)) - { - writer.WritePropertyName("numReplicas"); - writer.WriteNumberValue(NumReplicas.Value); - } - if (Optional.IsDefined(DataCollection)) - { - writer.WritePropertyName("dataCollection"); - writer.WriteObjectValue(DataCollection); - } - if (Optional.IsDefined(ComputeName)) - { - writer.WritePropertyName("computeName"); - writer.WriteStringValue(ComputeName); - } - if (Optional.IsDefined(AppInsightsEnabled)) - { - writer.WritePropertyName("appInsightsEnabled"); - writer.WriteBooleanValue(AppInsightsEnabled.Value); - } - if (Optional.IsDefined(AutoScaler)) - { - writer.WritePropertyName("autoScaler"); - writer.WriteObjectValue(AutoScaler); - } - if (Optional.IsDefined(ContainerResourceRequirements)) - { - writer.WritePropertyName("containerResourceRequirements"); - writer.WriteObjectValue(ContainerResourceRequirements); - } - if (Optional.IsDefined(MaxConcurrentRequestsPerContainer)) - { - writer.WritePropertyName("maxConcurrentRequestsPerContainer"); - writer.WriteNumberValue(MaxConcurrentRequestsPerContainer.Value); - } - if (Optional.IsDefined(MaxQueueWaitMs)) - { - writer.WritePropertyName("maxQueueWaitMs"); - writer.WriteNumberValue(MaxQueueWaitMs.Value); - } - if (Optional.IsDefined(Namespace)) - { - writer.WritePropertyName("namespace"); - writer.WriteStringValue(Namespace); - } - if (Optional.IsDefined(ScoringTimeoutMs)) - { - writer.WritePropertyName("scoringTimeoutMs"); - writer.WriteNumberValue(ScoringTimeoutMs.Value); - } - if (Optional.IsDefined(AuthEnabled)) - { - writer.WritePropertyName("authEnabled"); - writer.WriteBooleanValue(AuthEnabled.Value); - } - if (Optional.IsDefined(LivenessProbeRequirements)) - { - writer.WritePropertyName("livenessProbeRequirements"); - writer.WriteObjectValue(LivenessProbeRequirements); - } - if (Optional.IsDefined(AadAuthEnabled)) - { - writer.WritePropertyName("aadAuthEnabled"); - writer.WriteBooleanValue(AadAuthEnabled.Value); - } - if (Optional.IsDefined(IsDefault)) - { - writer.WritePropertyName("isDefault"); - writer.WriteBooleanValue(IsDefault.Value); - } - if (Optional.IsDefined(TrafficPercentile)) - { - writer.WritePropertyName("trafficPercentile"); - writer.WriteNumberValue(TrafficPercentile.Value); - } - if (Optional.IsDefined(Type)) - { - writer.WritePropertyName("type"); - writer.WriteStringValue(Type.Value.ToString()); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(KvTags)) - { - writer.WritePropertyName("kvTags"); - writer.WriteStartObject(); - foreach (var item in KvTags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Properties)) - { - writer.WritePropertyName("properties"); - writer.WriteStartObject(); - foreach (var item in Properties) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsDefined(Keys)) - { - writer.WritePropertyName("keys"); - writer.WriteObjectValue(Keys); - } - writer.WritePropertyName("computeType"); - writer.WriteStringValue(ComputeType.ToString()); - if (Optional.IsDefined(EnvironmentImageRequest)) - { - writer.WritePropertyName("environmentImageRequest"); - writer.WriteObjectValue(EnvironmentImageRequest); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"); - writer.WriteStringValue(Location); - } - writer.WriteEndObject(); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceCreateRequest.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceCreateRequest.cs deleted file mode 100644 index 7fc7abc131668..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceCreateRequest.cs +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// The request to create an AKS service. - public partial class AKSServiceCreateRequest : CreateEndpointVariantRequest - { - /// Initializes a new instance of AKSServiceCreateRequest. - public AKSServiceCreateRequest() - { - ComputeType = ComputeEnvironmentType.AKS; - } - - /// The number of replicas on the cluster. - public int? NumReplicas { get; set; } - /// Details of the data collection options specified. - public AKSServiceCreateRequestDataCollection DataCollection { get; set; } - /// The name of the compute resource. - public string ComputeName { get; set; } - /// Whether or not Application Insights is enabled. - public bool? AppInsightsEnabled { get; set; } - /// The auto scaler properties. - public AKSServiceCreateRequestAutoScaler AutoScaler { get; set; } - /// The container resource requirements. - public ContainerResourceRequirements ContainerResourceRequirements { get; set; } - /// The maximum number of concurrent requests per container. - public int? MaxConcurrentRequestsPerContainer { get; set; } - /// Maximum time a request will wait in the queue (in milliseconds). After this time, the service will return 503 (Service Unavailable). - public int? MaxQueueWaitMs { get; set; } - /// Kubernetes namespace for the service. - public string Namespace { get; set; } - /// The scoring timeout in milliseconds. - public int? ScoringTimeoutMs { get; set; } - /// Whether or not authentication is enabled. - public bool? AuthEnabled { get; set; } - /// The liveness probe requirements. - public AKSServiceCreateRequestLivenessProbeRequirements LivenessProbeRequirements { get; set; } - /// Whether or not AAD authentication is enabled. - public bool? AadAuthEnabled { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceCreateRequestAutoScaler.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceCreateRequestAutoScaler.Serialization.cs deleted file mode 100644 index d8fb57039b838..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceCreateRequestAutoScaler.Serialization.cs +++ /dev/null @@ -1,109 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class AKSServiceCreateRequestAutoScaler : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(AutoscaleEnabled)) - { - writer.WritePropertyName("autoscaleEnabled"); - writer.WriteBooleanValue(AutoscaleEnabled.Value); - } - if (Optional.IsDefined(MinReplicas)) - { - writer.WritePropertyName("minReplicas"); - writer.WriteNumberValue(MinReplicas.Value); - } - if (Optional.IsDefined(MaxReplicas)) - { - writer.WritePropertyName("maxReplicas"); - writer.WriteNumberValue(MaxReplicas.Value); - } - if (Optional.IsDefined(TargetUtilization)) - { - writer.WritePropertyName("targetUtilization"); - writer.WriteNumberValue(TargetUtilization.Value); - } - if (Optional.IsDefined(RefreshPeriodInSeconds)) - { - writer.WritePropertyName("refreshPeriodInSeconds"); - writer.WriteNumberValue(RefreshPeriodInSeconds.Value); - } - writer.WriteEndObject(); - } - - internal static AKSServiceCreateRequestAutoScaler DeserializeAKSServiceCreateRequestAutoScaler(JsonElement element) - { - Optional autoscaleEnabled = default; - Optional minReplicas = default; - Optional maxReplicas = default; - Optional targetUtilization = default; - Optional refreshPeriodInSeconds = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("autoscaleEnabled")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - autoscaleEnabled = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("minReplicas")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - minReplicas = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("maxReplicas")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - maxReplicas = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("targetUtilization")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - targetUtilization = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("refreshPeriodInSeconds")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - refreshPeriodInSeconds = property.Value.GetInt32(); - continue; - } - } - return new AKSServiceCreateRequestAutoScaler(Optional.ToNullable(autoscaleEnabled), Optional.ToNullable(minReplicas), Optional.ToNullable(maxReplicas), Optional.ToNullable(targetUtilization), Optional.ToNullable(refreshPeriodInSeconds)); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceCreateRequestAutoScaler.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceCreateRequestAutoScaler.cs deleted file mode 100644 index 7b78c35851122..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceCreateRequestAutoScaler.cs +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// The auto scaler properties. - public partial class AKSServiceCreateRequestAutoScaler : AutoScaler - { - /// Initializes a new instance of AKSServiceCreateRequestAutoScaler. - public AKSServiceCreateRequestAutoScaler() - { - } - - /// Initializes a new instance of AKSServiceCreateRequestAutoScaler. - /// Option to enable/disable auto scaling. - /// The minimum number of replicas to scale down to. - /// The maximum number of replicas in the cluster. - /// The target utilization percentage to use for determining whether to scale the cluster. - /// The amount of seconds to wait between auto scale updates. - internal AKSServiceCreateRequestAutoScaler(bool? autoscaleEnabled, int? minReplicas, int? maxReplicas, int? targetUtilization, int? refreshPeriodInSeconds) : base(autoscaleEnabled, minReplicas, maxReplicas, targetUtilization, refreshPeriodInSeconds) - { - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceCreateRequestDataCollection.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceCreateRequestDataCollection.Serialization.cs deleted file mode 100644 index ba6822968dd74..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceCreateRequestDataCollection.Serialization.cs +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class AKSServiceCreateRequestDataCollection : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(EventHubEnabled)) - { - writer.WritePropertyName("eventHubEnabled"); - writer.WriteBooleanValue(EventHubEnabled.Value); - } - if (Optional.IsDefined(StorageEnabled)) - { - writer.WritePropertyName("storageEnabled"); - writer.WriteBooleanValue(StorageEnabled.Value); - } - writer.WriteEndObject(); - } - - internal static AKSServiceCreateRequestDataCollection DeserializeAKSServiceCreateRequestDataCollection(JsonElement element) - { - Optional eventHubEnabled = default; - Optional storageEnabled = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("eventHubEnabled")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - eventHubEnabled = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("storageEnabled")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - storageEnabled = property.Value.GetBoolean(); - continue; - } - } - return new AKSServiceCreateRequestDataCollection(Optional.ToNullable(eventHubEnabled), Optional.ToNullable(storageEnabled)); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceCreateRequestDataCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceCreateRequestDataCollection.cs deleted file mode 100644 index 2b8049f0b8096..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceCreateRequestDataCollection.cs +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// Details of the data collection options specified. - public partial class AKSServiceCreateRequestDataCollection : ModelDataCollection - { - /// Initializes a new instance of AKSServiceCreateRequestDataCollection. - public AKSServiceCreateRequestDataCollection() - { - } - - /// Initializes a new instance of AKSServiceCreateRequestDataCollection. - /// Option for enabling/disabling Event Hub. - /// Option for enabling/disabling storage. - internal AKSServiceCreateRequestDataCollection(bool? eventHubEnabled, bool? storageEnabled) : base(eventHubEnabled, storageEnabled) - { - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceCreateRequestLivenessProbeRequirements.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceCreateRequestLivenessProbeRequirements.Serialization.cs deleted file mode 100644 index 93357ee13b00d..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceCreateRequestLivenessProbeRequirements.Serialization.cs +++ /dev/null @@ -1,109 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class AKSServiceCreateRequestLivenessProbeRequirements : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(FailureThreshold)) - { - writer.WritePropertyName("failureThreshold"); - writer.WriteNumberValue(FailureThreshold.Value); - } - if (Optional.IsDefined(SuccessThreshold)) - { - writer.WritePropertyName("successThreshold"); - writer.WriteNumberValue(SuccessThreshold.Value); - } - if (Optional.IsDefined(TimeoutSeconds)) - { - writer.WritePropertyName("timeoutSeconds"); - writer.WriteNumberValue(TimeoutSeconds.Value); - } - if (Optional.IsDefined(PeriodSeconds)) - { - writer.WritePropertyName("periodSeconds"); - writer.WriteNumberValue(PeriodSeconds.Value); - } - if (Optional.IsDefined(InitialDelaySeconds)) - { - writer.WritePropertyName("initialDelaySeconds"); - writer.WriteNumberValue(InitialDelaySeconds.Value); - } - writer.WriteEndObject(); - } - - internal static AKSServiceCreateRequestLivenessProbeRequirements DeserializeAKSServiceCreateRequestLivenessProbeRequirements(JsonElement element) - { - Optional failureThreshold = default; - Optional successThreshold = default; - Optional timeoutSeconds = default; - Optional periodSeconds = default; - Optional initialDelaySeconds = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("failureThreshold")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - failureThreshold = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("successThreshold")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - successThreshold = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("timeoutSeconds")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - timeoutSeconds = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("periodSeconds")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - periodSeconds = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("initialDelaySeconds")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - initialDelaySeconds = property.Value.GetInt32(); - continue; - } - } - return new AKSServiceCreateRequestLivenessProbeRequirements(Optional.ToNullable(failureThreshold), Optional.ToNullable(successThreshold), Optional.ToNullable(timeoutSeconds), Optional.ToNullable(periodSeconds), Optional.ToNullable(initialDelaySeconds)); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceCreateRequestLivenessProbeRequirements.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceCreateRequestLivenessProbeRequirements.cs deleted file mode 100644 index 878a83ca9696e..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceCreateRequestLivenessProbeRequirements.cs +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// The liveness probe requirements. - public partial class AKSServiceCreateRequestLivenessProbeRequirements : LivenessProbeRequirements - { - /// Initializes a new instance of AKSServiceCreateRequestLivenessProbeRequirements. - public AKSServiceCreateRequestLivenessProbeRequirements() - { - } - - /// Initializes a new instance of AKSServiceCreateRequestLivenessProbeRequirements. - /// The number of failures to allow before returning an unhealthy status. - /// The number of successful probes before returning a healthy status. - /// The probe timeout in seconds. - /// The length of time between probes in seconds. - /// The delay before the first probe in seconds. - internal AKSServiceCreateRequestLivenessProbeRequirements(int? failureThreshold, int? successThreshold, int? timeoutSeconds, int? periodSeconds, int? initialDelaySeconds) : base(failureThreshold, successThreshold, timeoutSeconds, periodSeconds, initialDelaySeconds) - { - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceResponse.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceResponse.Serialization.cs deleted file mode 100644 index 81fb68f041a6a..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceResponse.Serialization.cs +++ /dev/null @@ -1,468 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class AKSServiceResponse : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Models)) - { - writer.WritePropertyName("models"); - writer.WriteStartArray(); - foreach (var item in Models) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(ContainerResourceRequirements)) - { - writer.WritePropertyName("containerResourceRequirements"); - writer.WriteObjectValue(ContainerResourceRequirements); - } - if (Optional.IsDefined(MaxConcurrentRequestsPerContainer)) - { - writer.WritePropertyName("maxConcurrentRequestsPerContainer"); - writer.WriteNumberValue(MaxConcurrentRequestsPerContainer.Value); - } - if (Optional.IsDefined(MaxQueueWaitMs)) - { - writer.WritePropertyName("maxQueueWaitMs"); - writer.WriteNumberValue(MaxQueueWaitMs.Value); - } - if (Optional.IsDefined(ComputeName)) - { - writer.WritePropertyName("computeName"); - writer.WriteStringValue(ComputeName); - } - if (Optional.IsDefined(Namespace)) - { - writer.WritePropertyName("namespace"); - writer.WriteStringValue(Namespace); - } - if (Optional.IsDefined(NumReplicas)) - { - writer.WritePropertyName("numReplicas"); - writer.WriteNumberValue(NumReplicas.Value); - } - if (Optional.IsDefined(DataCollection)) - { - writer.WritePropertyName("dataCollection"); - writer.WriteObjectValue(DataCollection); - } - if (Optional.IsDefined(AppInsightsEnabled)) - { - writer.WritePropertyName("appInsightsEnabled"); - writer.WriteBooleanValue(AppInsightsEnabled.Value); - } - if (Optional.IsDefined(AutoScaler)) - { - writer.WritePropertyName("autoScaler"); - writer.WriteObjectValue(AutoScaler); - } - if (Optional.IsDefined(ScoringTimeoutMs)) - { - writer.WritePropertyName("scoringTimeoutMs"); - writer.WriteNumberValue(ScoringTimeoutMs.Value); - } - if (Optional.IsDefined(LivenessProbeRequirements)) - { - writer.WritePropertyName("livenessProbeRequirements"); - writer.WriteObjectValue(LivenessProbeRequirements); - } - if (Optional.IsDefined(AuthEnabled)) - { - writer.WritePropertyName("authEnabled"); - writer.WriteBooleanValue(AuthEnabled.Value); - } - if (Optional.IsDefined(AadAuthEnabled)) - { - writer.WritePropertyName("aadAuthEnabled"); - writer.WriteBooleanValue(AadAuthEnabled.Value); - } - if (Optional.IsDefined(EnvironmentImageRequest)) - { - writer.WritePropertyName("environmentImageRequest"); - writer.WriteObjectValue(EnvironmentImageRequest); - } - if (Optional.IsDefined(IsDefault)) - { - writer.WritePropertyName("isDefault"); - writer.WriteBooleanValue(IsDefault.Value); - } - if (Optional.IsDefined(TrafficPercentile)) - { - writer.WritePropertyName("trafficPercentile"); - writer.WriteNumberValue(TrafficPercentile.Value); - } - if (Optional.IsDefined(Type)) - { - writer.WritePropertyName("type"); - writer.WriteStringValue(Type.Value.ToString()); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(KvTags)) - { - writer.WritePropertyName("kvTags"); - writer.WriteStartObject(); - foreach (var item in KvTags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Properties)) - { - writer.WritePropertyName("properties"); - writer.WriteStartObject(); - foreach (var item in Properties) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("computeType"); - writer.WriteStringValue(ComputeType.ToString()); - if (Optional.IsDefined(DeploymentType)) - { - writer.WritePropertyName("deploymentType"); - writer.WriteStringValue(DeploymentType.Value.ToString()); - } - writer.WriteEndObject(); - } - - internal static AKSServiceResponse DeserializeAKSServiceResponse(JsonElement element) - { - Optional> models = default; - Optional containerResourceRequirements = default; - Optional maxConcurrentRequestsPerContainer = default; - Optional maxQueueWaitMs = default; - Optional computeName = default; - Optional @namespace = default; - Optional numReplicas = default; - Optional dataCollection = default; - Optional appInsightsEnabled = default; - Optional autoScaler = default; - Optional scoringUri = default; - Optional deploymentStatus = default; - Optional scoringTimeoutMs = default; - Optional livenessProbeRequirements = default; - Optional authEnabled = default; - Optional aadAuthEnabled = default; - Optional swaggerUri = default; - Optional> modelConfigMap = default; - Optional environmentImageRequest = default; - Optional isDefault = default; - Optional trafficPercentile = default; - Optional type = default; - Optional description = default; - Optional> kvTags = default; - Optional> properties = default; - Optional state = default; - Optional error = default; - ComputeEnvironmentType computeType = default; - Optional deploymentType = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("models")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(Model.DeserializeModel(item)); - } - models = array; - continue; - } - if (property.NameEquals("containerResourceRequirements")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - containerResourceRequirements = ContainerResourceRequirements.DeserializeContainerResourceRequirements(property.Value); - continue; - } - if (property.NameEquals("maxConcurrentRequestsPerContainer")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - maxConcurrentRequestsPerContainer = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("maxQueueWaitMs")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - maxQueueWaitMs = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("computeName")) - { - computeName = property.Value.GetString(); - continue; - } - if (property.NameEquals("namespace")) - { - @namespace = property.Value.GetString(); - continue; - } - if (property.NameEquals("numReplicas")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - numReplicas = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("dataCollection")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - dataCollection = AKSServiceResponseDataCollection.DeserializeAKSServiceResponseDataCollection(property.Value); - continue; - } - if (property.NameEquals("appInsightsEnabled")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - appInsightsEnabled = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("autoScaler")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - autoScaler = AKSServiceResponseAutoScaler.DeserializeAKSServiceResponseAutoScaler(property.Value); - continue; - } - if (property.NameEquals("scoringUri")) - { - scoringUri = property.Value.GetString(); - continue; - } - if (property.NameEquals("deploymentStatus")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - deploymentStatus = AKSServiceResponseDeploymentStatus.DeserializeAKSServiceResponseDeploymentStatus(property.Value); - continue; - } - if (property.NameEquals("scoringTimeoutMs")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - scoringTimeoutMs = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("livenessProbeRequirements")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - livenessProbeRequirements = AKSServiceResponseLivenessProbeRequirements.DeserializeAKSServiceResponseLivenessProbeRequirements(property.Value); - continue; - } - if (property.NameEquals("authEnabled")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - authEnabled = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("aadAuthEnabled")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - aadAuthEnabled = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("swaggerUri")) - { - swaggerUri = property.Value.GetString(); - continue; - } - if (property.NameEquals("modelConfigMap")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetObject()); - } - modelConfigMap = dictionary; - continue; - } - if (property.NameEquals("environmentImageRequest")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - environmentImageRequest = AKSServiceResponseEnvironmentImageRequest.DeserializeAKSServiceResponseEnvironmentImageRequest(property.Value); - continue; - } - if (property.NameEquals("isDefault")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - isDefault = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("trafficPercentile")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - trafficPercentile = property.Value.GetSingle(); - continue; - } - if (property.NameEquals("type")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - type = new VariantType(property.Value.GetString()); - continue; - } - if (property.NameEquals("description")) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("kvTags")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - kvTags = dictionary; - continue; - } - if (property.NameEquals("properties")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - properties = dictionary; - continue; - } - if (property.NameEquals("state")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - state = new WebServiceState(property.Value.GetString()); - continue; - } - if (property.NameEquals("error")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - error = ServiceResponseBaseError.DeserializeServiceResponseBaseError(property.Value); - continue; - } - if (property.NameEquals("computeType")) - { - computeType = new ComputeEnvironmentType(property.Value.GetString()); - continue; - } - if (property.NameEquals("deploymentType")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - deploymentType = new DeploymentType(property.Value.GetString()); - continue; - } - } - return new AKSServiceResponse(description.Value, Optional.ToDictionary(kvTags), Optional.ToDictionary(properties), Optional.ToNullable(state), error.Value, computeType, Optional.ToNullable(deploymentType), Optional.ToNullable(isDefault), Optional.ToNullable(trafficPercentile), Optional.ToNullable(type), Optional.ToList(models), containerResourceRequirements.Value, Optional.ToNullable(maxConcurrentRequestsPerContainer), Optional.ToNullable(maxQueueWaitMs), computeName.Value, @namespace.Value, Optional.ToNullable(numReplicas), dataCollection.Value, Optional.ToNullable(appInsightsEnabled), autoScaler.Value, scoringUri.Value, deploymentStatus.Value, Optional.ToNullable(scoringTimeoutMs), livenessProbeRequirements.Value, Optional.ToNullable(authEnabled), Optional.ToNullable(aadAuthEnabled), swaggerUri.Value, Optional.ToDictionary(modelConfigMap), environmentImageRequest.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceResponse.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceResponse.cs deleted file mode 100644 index b8e323d0acaba..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceResponse.cs +++ /dev/null @@ -1,117 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// The response for an AKS service. - public partial class AKSServiceResponse : AKSVariantResponse - { - /// Initializes a new instance of AKSServiceResponse. - public AKSServiceResponse() - { - Models = new ChangeTrackingList(); - ModelConfigMap = new ChangeTrackingDictionary(); - ComputeType = ComputeEnvironmentType.AKS; - } - - /// Initializes a new instance of AKSServiceResponse. - /// The service description. - /// The service tag dictionary. Tags are mutable. - /// The service property dictionary. Properties are immutable. - /// The current state of the service. - /// The error details. - /// The compute environment type for the service. - /// The deployment type for the service. - /// Is this the default variant. - /// The amount of traffic variant receives. - /// The type of the variant. - /// The list of models. - /// The container resource requirements. - /// The maximum number of concurrent requests per container. - /// Maximum time a request will wait in the queue (in milliseconds). After this time, the service will return 503 (Service Unavailable). - /// The name of the compute resource. - /// The Kubernetes namespace of the deployment. - /// The number of replicas on the cluster. - /// Details of the data collection options specified. - /// Whether or not Application Insights is enabled. - /// The auto scaler properties. - /// The Uri for sending scoring requests. - /// The deployment status. - /// The scoring timeout in milliseconds. - /// The liveness probe requirements. - /// Whether or not authentication is enabled. - /// Whether or not AAD authentication is enabled. - /// The Uri for sending swagger requests. - /// Details on the models and configurations. - /// The Environment, models and assets used for inferencing. - internal AKSServiceResponse(string description, IDictionary kvTags, IDictionary properties, WebServiceState? state, ServiceResponseBaseError error, ComputeEnvironmentType computeType, DeploymentType? deploymentType, bool? isDefault, float? trafficPercentile, VariantType? type, IList models, ContainerResourceRequirements containerResourceRequirements, int? maxConcurrentRequestsPerContainer, int? maxQueueWaitMs, string computeName, string @namespace, int? numReplicas, AKSServiceResponseDataCollection dataCollection, bool? appInsightsEnabled, AKSServiceResponseAutoScaler autoScaler, string scoringUri, AKSServiceResponseDeploymentStatus deploymentStatus, int? scoringTimeoutMs, AKSServiceResponseLivenessProbeRequirements livenessProbeRequirements, bool? authEnabled, bool? aadAuthEnabled, string swaggerUri, IReadOnlyDictionary modelConfigMap, AKSServiceResponseEnvironmentImageRequest environmentImageRequest) : base(description, kvTags, properties, state, error, computeType, deploymentType, isDefault, trafficPercentile, type) - { - Models = models; - ContainerResourceRequirements = containerResourceRequirements; - MaxConcurrentRequestsPerContainer = maxConcurrentRequestsPerContainer; - MaxQueueWaitMs = maxQueueWaitMs; - ComputeName = computeName; - Namespace = @namespace; - NumReplicas = numReplicas; - DataCollection = dataCollection; - AppInsightsEnabled = appInsightsEnabled; - AutoScaler = autoScaler; - ScoringUri = scoringUri; - DeploymentStatus = deploymentStatus; - ScoringTimeoutMs = scoringTimeoutMs; - LivenessProbeRequirements = livenessProbeRequirements; - AuthEnabled = authEnabled; - AadAuthEnabled = aadAuthEnabled; - SwaggerUri = swaggerUri; - ModelConfigMap = modelConfigMap; - EnvironmentImageRequest = environmentImageRequest; - ComputeType = computeType; - } - - /// The list of models. - public IList Models { get; } - /// The container resource requirements. - public ContainerResourceRequirements ContainerResourceRequirements { get; set; } - /// The maximum number of concurrent requests per container. - public int? MaxConcurrentRequestsPerContainer { get; set; } - /// Maximum time a request will wait in the queue (in milliseconds). After this time, the service will return 503 (Service Unavailable). - public int? MaxQueueWaitMs { get; set; } - /// The name of the compute resource. - public string ComputeName { get; set; } - /// The Kubernetes namespace of the deployment. - public string Namespace { get; set; } - /// The number of replicas on the cluster. - public int? NumReplicas { get; set; } - /// Details of the data collection options specified. - public AKSServiceResponseDataCollection DataCollection { get; set; } - /// Whether or not Application Insights is enabled. - public bool? AppInsightsEnabled { get; set; } - /// The auto scaler properties. - public AKSServiceResponseAutoScaler AutoScaler { get; set; } - /// The Uri for sending scoring requests. - public string ScoringUri { get; } - /// The deployment status. - public AKSServiceResponseDeploymentStatus DeploymentStatus { get; } - /// The scoring timeout in milliseconds. - public int? ScoringTimeoutMs { get; set; } - /// The liveness probe requirements. - public AKSServiceResponseLivenessProbeRequirements LivenessProbeRequirements { get; set; } - /// Whether or not authentication is enabled. - public bool? AuthEnabled { get; set; } - /// Whether or not AAD authentication is enabled. - public bool? AadAuthEnabled { get; set; } - /// The Uri for sending swagger requests. - public string SwaggerUri { get; } - /// Details on the models and configurations. - public IReadOnlyDictionary ModelConfigMap { get; } - /// The Environment, models and assets used for inferencing. - public AKSServiceResponseEnvironmentImageRequest EnvironmentImageRequest { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceResponseAutoScaler.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceResponseAutoScaler.Serialization.cs deleted file mode 100644 index 4ead8067ca66c..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceResponseAutoScaler.Serialization.cs +++ /dev/null @@ -1,109 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class AKSServiceResponseAutoScaler : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(AutoscaleEnabled)) - { - writer.WritePropertyName("autoscaleEnabled"); - writer.WriteBooleanValue(AutoscaleEnabled.Value); - } - if (Optional.IsDefined(MinReplicas)) - { - writer.WritePropertyName("minReplicas"); - writer.WriteNumberValue(MinReplicas.Value); - } - if (Optional.IsDefined(MaxReplicas)) - { - writer.WritePropertyName("maxReplicas"); - writer.WriteNumberValue(MaxReplicas.Value); - } - if (Optional.IsDefined(TargetUtilization)) - { - writer.WritePropertyName("targetUtilization"); - writer.WriteNumberValue(TargetUtilization.Value); - } - if (Optional.IsDefined(RefreshPeriodInSeconds)) - { - writer.WritePropertyName("refreshPeriodInSeconds"); - writer.WriteNumberValue(RefreshPeriodInSeconds.Value); - } - writer.WriteEndObject(); - } - - internal static AKSServiceResponseAutoScaler DeserializeAKSServiceResponseAutoScaler(JsonElement element) - { - Optional autoscaleEnabled = default; - Optional minReplicas = default; - Optional maxReplicas = default; - Optional targetUtilization = default; - Optional refreshPeriodInSeconds = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("autoscaleEnabled")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - autoscaleEnabled = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("minReplicas")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - minReplicas = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("maxReplicas")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - maxReplicas = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("targetUtilization")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - targetUtilization = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("refreshPeriodInSeconds")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - refreshPeriodInSeconds = property.Value.GetInt32(); - continue; - } - } - return new AKSServiceResponseAutoScaler(Optional.ToNullable(autoscaleEnabled), Optional.ToNullable(minReplicas), Optional.ToNullable(maxReplicas), Optional.ToNullable(targetUtilization), Optional.ToNullable(refreshPeriodInSeconds)); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceResponseAutoScaler.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceResponseAutoScaler.cs deleted file mode 100644 index 7c7acead409b4..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceResponseAutoScaler.cs +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// The auto scaler properties. - public partial class AKSServiceResponseAutoScaler : AutoScaler - { - /// Initializes a new instance of AKSServiceResponseAutoScaler. - public AKSServiceResponseAutoScaler() - { - } - - /// Initializes a new instance of AKSServiceResponseAutoScaler. - /// Option to enable/disable auto scaling. - /// The minimum number of replicas to scale down to. - /// The maximum number of replicas in the cluster. - /// The target utilization percentage to use for determining whether to scale the cluster. - /// The amount of seconds to wait between auto scale updates. - internal AKSServiceResponseAutoScaler(bool? autoscaleEnabled, int? minReplicas, int? maxReplicas, int? targetUtilization, int? refreshPeriodInSeconds) : base(autoscaleEnabled, minReplicas, maxReplicas, targetUtilization, refreshPeriodInSeconds) - { - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceResponseDataCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceResponseDataCollection.cs deleted file mode 100644 index 1b77bc9c5a8a9..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceResponseDataCollection.cs +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// Details of the data collection options specified. - public partial class AKSServiceResponseDataCollection : ModelDataCollection - { - /// Initializes a new instance of AKSServiceResponseDataCollection. - public AKSServiceResponseDataCollection() - { - } - - /// Initializes a new instance of AKSServiceResponseDataCollection. - /// Option for enabling/disabling Event Hub. - /// Option for enabling/disabling storage. - internal AKSServiceResponseDataCollection(bool? eventHubEnabled, bool? storageEnabled) : base(eventHubEnabled, storageEnabled) - { - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceResponseDeploymentStatus.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceResponseDeploymentStatus.Serialization.cs deleted file mode 100644 index 63a04f5744d1e..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceResponseDeploymentStatus.Serialization.cs +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class AKSServiceResponseDeploymentStatus - { - internal static AKSServiceResponseDeploymentStatus DeserializeAKSServiceResponseDeploymentStatus(JsonElement element) - { - Optional desiredReplicas = default; - Optional updatedReplicas = default; - Optional availableReplicas = default; - Optional error = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("desiredReplicas")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - desiredReplicas = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("updatedReplicas")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - updatedReplicas = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("availableReplicas")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - availableReplicas = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("error")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - error = AKSReplicaStatusError.DeserializeAKSReplicaStatusError(property.Value); - continue; - } - } - return new AKSServiceResponseDeploymentStatus(Optional.ToNullable(desiredReplicas), Optional.ToNullable(updatedReplicas), Optional.ToNullable(availableReplicas), error.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceResponseDeploymentStatus.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceResponseDeploymentStatus.cs deleted file mode 100644 index 8f5e547ccf544..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceResponseDeploymentStatus.cs +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// The deployment status. - public partial class AKSServiceResponseDeploymentStatus : AKSReplicaStatus - { - /// Initializes a new instance of AKSServiceResponseDeploymentStatus. - internal AKSServiceResponseDeploymentStatus() - { - } - - /// Initializes a new instance of AKSServiceResponseDeploymentStatus. - /// The desired number of replicas. - /// The number of updated replicas. - /// The number of available replicas. - /// The error details. - internal AKSServiceResponseDeploymentStatus(int? desiredReplicas, int? updatedReplicas, int? availableReplicas, AKSReplicaStatusError error) : base(desiredReplicas, updatedReplicas, availableReplicas, error) - { - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceResponseEnvironmentImageRequest.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceResponseEnvironmentImageRequest.Serialization.cs deleted file mode 100644 index f427e4283d933..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceResponseEnvironmentImageRequest.Serialization.cs +++ /dev/null @@ -1,151 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class AKSServiceResponseEnvironmentImageRequest : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(DriverProgram)) - { - writer.WritePropertyName("driverProgram"); - writer.WriteStringValue(DriverProgram); - } - if (Optional.IsCollectionDefined(Assets)) - { - writer.WritePropertyName("assets"); - writer.WriteStartArray(); - foreach (var item in Assets) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(ModelIds)) - { - writer.WritePropertyName("modelIds"); - writer.WriteStartArray(); - foreach (var item in ModelIds) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(Models)) - { - writer.WritePropertyName("models"); - writer.WriteStartArray(); - foreach (var item in Models) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Environment)) - { - writer.WritePropertyName("environment"); - writer.WriteObjectValue(Environment); - } - if (Optional.IsDefined(EnvironmentReference)) - { - writer.WritePropertyName("environmentReference"); - writer.WriteObjectValue(EnvironmentReference); - } - writer.WriteEndObject(); - } - - internal static AKSServiceResponseEnvironmentImageRequest DeserializeAKSServiceResponseEnvironmentImageRequest(JsonElement element) - { - Optional driverProgram = default; - Optional> assets = default; - Optional> modelIds = default; - Optional> models = default; - Optional environment = default; - Optional environmentReference = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("driverProgram")) - { - driverProgram = property.Value.GetString(); - continue; - } - if (property.NameEquals("assets")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(ImageAsset.DeserializeImageAsset(item)); - } - assets = array; - continue; - } - if (property.NameEquals("modelIds")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - modelIds = array; - continue; - } - if (property.NameEquals("models")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(Model.DeserializeModel(item)); - } - models = array; - continue; - } - if (property.NameEquals("environment")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - environment = EnvironmentImageResponseEnvironment.DeserializeEnvironmentImageResponseEnvironment(property.Value); - continue; - } - if (property.NameEquals("environmentReference")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - environmentReference = EnvironmentImageResponseEnvironmentReference.DeserializeEnvironmentImageResponseEnvironmentReference(property.Value); - continue; - } - } - return new AKSServiceResponseEnvironmentImageRequest(driverProgram.Value, Optional.ToList(assets), Optional.ToList(modelIds), Optional.ToList(models), environment.Value, environmentReference.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceResponseEnvironmentImageRequest.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceResponseEnvironmentImageRequest.cs deleted file mode 100644 index 2e335560b380b..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceResponseEnvironmentImageRequest.cs +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// The Environment, models and assets used for inferencing. - public partial class AKSServiceResponseEnvironmentImageRequest : EnvironmentImageResponse - { - /// Initializes a new instance of AKSServiceResponseEnvironmentImageRequest. - public AKSServiceResponseEnvironmentImageRequest() - { - } - - /// Initializes a new instance of AKSServiceResponseEnvironmentImageRequest. - /// The name of the driver file. - /// The list of assets. - /// The list of model Ids. - /// The list of models. - /// The details of the AZURE ML environment. - /// The unique identifying details of the AZURE ML environment. - internal AKSServiceResponseEnvironmentImageRequest(string driverProgram, IList assets, IList modelIds, IList models, EnvironmentImageResponseEnvironment environment, EnvironmentImageResponseEnvironmentReference environmentReference) : base(driverProgram, assets, modelIds, models, environment, environmentReference) - { - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceResponseLivenessProbeRequirements.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceResponseLivenessProbeRequirements.Serialization.cs deleted file mode 100644 index 4065039758b32..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceResponseLivenessProbeRequirements.Serialization.cs +++ /dev/null @@ -1,109 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class AKSServiceResponseLivenessProbeRequirements : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(FailureThreshold)) - { - writer.WritePropertyName("failureThreshold"); - writer.WriteNumberValue(FailureThreshold.Value); - } - if (Optional.IsDefined(SuccessThreshold)) - { - writer.WritePropertyName("successThreshold"); - writer.WriteNumberValue(SuccessThreshold.Value); - } - if (Optional.IsDefined(TimeoutSeconds)) - { - writer.WritePropertyName("timeoutSeconds"); - writer.WriteNumberValue(TimeoutSeconds.Value); - } - if (Optional.IsDefined(PeriodSeconds)) - { - writer.WritePropertyName("periodSeconds"); - writer.WriteNumberValue(PeriodSeconds.Value); - } - if (Optional.IsDefined(InitialDelaySeconds)) - { - writer.WritePropertyName("initialDelaySeconds"); - writer.WriteNumberValue(InitialDelaySeconds.Value); - } - writer.WriteEndObject(); - } - - internal static AKSServiceResponseLivenessProbeRequirements DeserializeAKSServiceResponseLivenessProbeRequirements(JsonElement element) - { - Optional failureThreshold = default; - Optional successThreshold = default; - Optional timeoutSeconds = default; - Optional periodSeconds = default; - Optional initialDelaySeconds = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("failureThreshold")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - failureThreshold = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("successThreshold")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - successThreshold = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("timeoutSeconds")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - timeoutSeconds = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("periodSeconds")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - periodSeconds = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("initialDelaySeconds")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - initialDelaySeconds = property.Value.GetInt32(); - continue; - } - } - return new AKSServiceResponseLivenessProbeRequirements(Optional.ToNullable(failureThreshold), Optional.ToNullable(successThreshold), Optional.ToNullable(timeoutSeconds), Optional.ToNullable(periodSeconds), Optional.ToNullable(initialDelaySeconds)); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceResponseLivenessProbeRequirements.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceResponseLivenessProbeRequirements.cs deleted file mode 100644 index 5b4aca36f96c1..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceResponseLivenessProbeRequirements.cs +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// The liveness probe requirements. - public partial class AKSServiceResponseLivenessProbeRequirements : LivenessProbeRequirements - { - /// Initializes a new instance of AKSServiceResponseLivenessProbeRequirements. - public AKSServiceResponseLivenessProbeRequirements() - { - } - - /// Initializes a new instance of AKSServiceResponseLivenessProbeRequirements. - /// The number of failures to allow before returning an unhealthy status. - /// The number of successful probes before returning a healthy status. - /// The probe timeout in seconds. - /// The length of time between probes in seconds. - /// The delay before the first probe in seconds. - internal AKSServiceResponseLivenessProbeRequirements(int? failureThreshold, int? successThreshold, int? timeoutSeconds, int? periodSeconds, int? initialDelaySeconds) : base(failureThreshold, successThreshold, timeoutSeconds, periodSeconds, initialDelaySeconds) - { - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSVariantResponse.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSVariantResponse.Serialization.cs deleted file mode 100644 index 47d58ea6bb32b..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSVariantResponse.Serialization.cs +++ /dev/null @@ -1,196 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class AKSVariantResponse : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(IsDefault)) - { - writer.WritePropertyName("isDefault"); - writer.WriteBooleanValue(IsDefault.Value); - } - if (Optional.IsDefined(TrafficPercentile)) - { - writer.WritePropertyName("trafficPercentile"); - writer.WriteNumberValue(TrafficPercentile.Value); - } - if (Optional.IsDefined(Type)) - { - writer.WritePropertyName("type"); - writer.WriteStringValue(Type.Value.ToString()); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(KvTags)) - { - writer.WritePropertyName("kvTags"); - writer.WriteStartObject(); - foreach (var item in KvTags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Properties)) - { - writer.WritePropertyName("properties"); - writer.WriteStartObject(); - foreach (var item in Properties) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("computeType"); - writer.WriteStringValue(ComputeType.ToString()); - if (Optional.IsDefined(DeploymentType)) - { - writer.WritePropertyName("deploymentType"); - writer.WriteStringValue(DeploymentType.Value.ToString()); - } - writer.WriteEndObject(); - } - - internal static AKSVariantResponse DeserializeAKSVariantResponse(JsonElement element) - { - if (element.TryGetProperty("computeType", out JsonElement discriminator)) - { - switch (discriminator.GetString()) - { - case "AKS": return AKSServiceResponse.DeserializeAKSServiceResponse(element); - } - } - Optional isDefault = default; - Optional trafficPercentile = default; - Optional type = default; - Optional description = default; - Optional> kvTags = default; - Optional> properties = default; - Optional state = default; - Optional error = default; - ComputeEnvironmentType computeType = default; - Optional deploymentType = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("isDefault")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - isDefault = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("trafficPercentile")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - trafficPercentile = property.Value.GetSingle(); - continue; - } - if (property.NameEquals("type")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - type = new VariantType(property.Value.GetString()); - continue; - } - if (property.NameEquals("description")) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("kvTags")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - kvTags = dictionary; - continue; - } - if (property.NameEquals("properties")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - properties = dictionary; - continue; - } - if (property.NameEquals("state")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - state = new WebServiceState(property.Value.GetString()); - continue; - } - if (property.NameEquals("error")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - error = ServiceResponseBaseError.DeserializeServiceResponseBaseError(property.Value); - continue; - } - if (property.NameEquals("computeType")) - { - computeType = new ComputeEnvironmentType(property.Value.GetString()); - continue; - } - if (property.NameEquals("deploymentType")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - deploymentType = new DeploymentType(property.Value.GetString()); - continue; - } - } - return new AKSVariantResponse(description.Value, Optional.ToDictionary(kvTags), Optional.ToDictionary(properties), Optional.ToNullable(state), error.Value, computeType, Optional.ToNullable(deploymentType), Optional.ToNullable(isDefault), Optional.ToNullable(trafficPercentile), Optional.ToNullable(type)); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSVariantResponse.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSVariantResponse.cs deleted file mode 100644 index fe375750d79be..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSVariantResponse.cs +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// The response for an AKS variant. - public partial class AKSVariantResponse : ServiceResponseBase - { - /// Initializes a new instance of AKSVariantResponse. - public AKSVariantResponse() - { - ComputeType = new ComputeEnvironmentType("Custom"); - } - - /// Initializes a new instance of AKSVariantResponse. - /// The service description. - /// The service tag dictionary. Tags are mutable. - /// The service property dictionary. Properties are immutable. - /// The current state of the service. - /// The error details. - /// The compute environment type for the service. - /// The deployment type for the service. - /// Is this the default variant. - /// The amount of traffic variant receives. - /// The type of the variant. - internal AKSVariantResponse(string description, IDictionary kvTags, IDictionary properties, WebServiceState? state, ServiceResponseBaseError error, ComputeEnvironmentType computeType, DeploymentType? deploymentType, bool? isDefault, float? trafficPercentile, VariantType? type) : base(description, kvTags, properties, state, error, computeType, deploymentType) - { - IsDefault = isDefault; - TrafficPercentile = trafficPercentile; - Type = type; - ComputeType = computeType; - } - - /// Is this the default variant. - public bool? IsDefault { get; set; } - /// The amount of traffic variant receives. - public float? TrafficPercentile { get; set; } - /// The type of the variant. - public VariantType? Type { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AccountKeySection.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AccountKeySection.Serialization.cs deleted file mode 100644 index fb43226600445..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AccountKeySection.Serialization.cs +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class AccountKeySection : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Key)) - { - writer.WritePropertyName("key"); - writer.WriteStringValue(Key); - } - writer.WriteEndObject(); - } - - internal static AccountKeySection DeserializeAccountKeySection(JsonElement element) - { - Optional key = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("key")) - { - key = property.Value.GetString(); - continue; - } - } - return new AccountKeySection(key.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AccountKeySection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AccountKeySection.cs deleted file mode 100644 index 00a8d220a2938..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AccountKeySection.cs +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// The AccountKeySection. - public partial class AccountKeySection - { - /// Initializes a new instance of AccountKeySection. - public AccountKeySection() - { - } - - /// Initializes a new instance of AccountKeySection. - /// Storage account key. - internal AccountKeySection(string key) - { - Key = key; - } - - /// Storage account key. - public string Key { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AksComputeSecretsProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AksComputeSecretsProperties.Serialization.cs new file mode 100644 index 0000000000000..72571ef12c4be --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AksComputeSecretsProperties.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.ResourceManager.MachineLearningServices.Models +{ + public partial class AksComputeSecretsProperties + { + internal static AksComputeSecretsProperties DeserializeAksComputeSecretsProperties(JsonElement element) + { + Optional userKubeConfig = default; + Optional adminKubeConfig = default; + Optional imagePullSecretName = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("userKubeConfig")) + { + userKubeConfig = property.Value.GetString(); + continue; + } + if (property.NameEquals("adminKubeConfig")) + { + adminKubeConfig = property.Value.GetString(); + continue; + } + if (property.NameEquals("imagePullSecretName")) + { + imagePullSecretName = property.Value.GetString(); + continue; + } + } + return new AksComputeSecretsProperties(userKubeConfig.Value, adminKubeConfig.Value, imagePullSecretName.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AksComputeSecretsProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AksComputeSecretsProperties.cs new file mode 100644 index 0000000000000..3fa6764031d0c --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AksComputeSecretsProperties.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Properties of AksComputeSecrets. + public partial class AksComputeSecretsProperties + { + /// Initializes a new instance of AksComputeSecretsProperties. + internal AksComputeSecretsProperties() + { + } + + /// Initializes a new instance of AksComputeSecretsProperties. + /// Content of kubeconfig file that can be used to connect to the Kubernetes cluster. + /// Content of kubeconfig file that can be used to connect to the Kubernetes cluster. + /// Image registry pull secret. + internal AksComputeSecretsProperties(string userKubeConfig, string adminKubeConfig, string imagePullSecretName) + { + UserKubeConfig = userKubeConfig; + AdminKubeConfig = adminKubeConfig; + ImagePullSecretName = imagePullSecretName; + } + + /// Content of kubeconfig file that can be used to connect to the Kubernetes cluster. + public string UserKubeConfig { get; } + /// Content of kubeconfig file that can be used to connect to the Kubernetes cluster. + public string AdminKubeConfig { get; } + /// Image registry pull secret. + public string ImagePullSecretName { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AmlCompute.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AmlCompute.Serialization.cs index 7a39249a4cef4..ea9b734d985fc 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AmlCompute.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AmlCompute.Serialization.cs @@ -39,6 +39,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("resourceId"); writer.WriteStringValue(ResourceId); } + if (Optional.IsDefined(DisableLocalAuth)) + { + writer.WritePropertyName("disableLocalAuth"); + writer.WriteBooleanValue(DisableLocalAuth.Value); + } writer.WriteEndObject(); } @@ -52,8 +57,9 @@ internal static AmlCompute DeserializeAmlCompute(JsonElement element) Optional createdOn = default; Optional modifiedOn = default; Optional resourceId = default; - Optional> provisioningErrors = default; + Optional> provisioningErrors = default; Optional isAttachedCompute = default; + Optional disableLocalAuth = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("properties")) @@ -123,10 +129,10 @@ internal static AmlCompute DeserializeAmlCompute(JsonElement element) property.ThrowNonNullablePropertyIsNull(); continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(MachineLearningServiceError.DeserializeMachineLearningServiceError(item)); + array.Add(ErrorResponse.DeserializeErrorResponse(item)); } provisioningErrors = array; continue; @@ -141,8 +147,18 @@ internal static AmlCompute DeserializeAmlCompute(JsonElement element) isAttachedCompute = property.Value.GetBoolean(); continue; } + if (property.NameEquals("disableLocalAuth")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + disableLocalAuth = property.Value.GetBoolean(); + continue; + } } - return new AmlCompute(computeType, computeLocation.Value, Optional.ToNullable(provisioningState), description.Value, Optional.ToNullable(createdOn), Optional.ToNullable(modifiedOn), resourceId.Value, Optional.ToList(provisioningErrors), Optional.ToNullable(isAttachedCompute), properties.Value); + return new AmlCompute(computeType, computeLocation.Value, Optional.ToNullable(provisioningState), description.Value, Optional.ToNullable(createdOn), Optional.ToNullable(modifiedOn), resourceId.Value, Optional.ToList(provisioningErrors), Optional.ToNullable(isAttachedCompute), Optional.ToNullable(disableLocalAuth), properties.Value); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AmlCompute.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AmlCompute.cs index 81221c0b69104..92836231b32c1 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AmlCompute.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AmlCompute.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.MachineLearningServices.Models { - /// An Azure Machine Learning compute. + /// Properties(top level) of AmlCompute. public partial class AmlCompute : Compute { /// Initializes a new instance of AmlCompute. @@ -24,19 +24,20 @@ public AmlCompute() /// Location for the underlying compute. /// The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. /// The description of the Machine Learning compute. - /// The date and time when the compute was created. - /// The date and time when the compute was last modified. + /// The time at which the compute was created. + /// The time at which the compute was last modified. /// ARM resource id of the underlying compute. /// Errors during provisioning. /// Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning service provisioned it if false. - /// AML Compute properties. - internal AmlCompute(ComputeType computeType, string computeLocation, ProvisioningState? provisioningState, string description, DateTimeOffset? createdOn, DateTimeOffset? modifiedOn, string resourceId, IReadOnlyList provisioningErrors, bool? isAttachedCompute, AmlComputeProperties properties) : base(computeType, computeLocation, provisioningState, description, createdOn, modifiedOn, resourceId, provisioningErrors, isAttachedCompute) + /// Opt-out of local authentication and ensure customers can use only MSI and AAD exclusively for authentication. + /// Properties of AmlCompute. + internal AmlCompute(ComputeType computeType, string computeLocation, ProvisioningState? provisioningState, string description, DateTimeOffset? createdOn, DateTimeOffset? modifiedOn, string resourceId, IReadOnlyList provisioningErrors, bool? isAttachedCompute, bool? disableLocalAuth, AmlComputeProperties properties) : base(computeType, computeLocation, provisioningState, description, createdOn, modifiedOn, resourceId, provisioningErrors, isAttachedCompute, disableLocalAuth) { Properties = properties; ComputeType = computeType; } - /// AML Compute properties. + /// Properties of AmlCompute. public AmlComputeProperties Properties { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AmlComputeNodesInformation.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AmlComputeNodesInformation.Serialization.cs index e271e077cc6ec..3e827f31248e1 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AmlComputeNodesInformation.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AmlComputeNodesInformation.Serialization.cs @@ -11,12 +11,11 @@ namespace Azure.ResourceManager.MachineLearningServices.Models { - public partial class AmlComputeNodesInformation + internal partial class AmlComputeNodesInformation { internal static AmlComputeNodesInformation DeserializeAmlComputeNodesInformation(JsonElement element) { Optional> nodes = default; - ComputeType computeType = default; Optional nextLink = default; foreach (var property in element.EnumerateObject()) { @@ -35,18 +34,13 @@ internal static AmlComputeNodesInformation DeserializeAmlComputeNodesInformation nodes = array; continue; } - if (property.NameEquals("computeType")) - { - computeType = new ComputeType(property.Value.GetString()); - continue; - } if (property.NameEquals("nextLink")) { nextLink = property.Value.GetString(); continue; } } - return new AmlComputeNodesInformation(computeType, nextLink.Value, Optional.ToList(nodes)); + return new AmlComputeNodesInformation(Optional.ToList(nodes), nextLink.Value); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AmlComputeNodesInformation.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AmlComputeNodesInformation.cs index c821a72467b51..b64bc8390c6b2 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AmlComputeNodesInformation.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AmlComputeNodesInformation.cs @@ -10,27 +10,27 @@ namespace Azure.ResourceManager.MachineLearningServices.Models { - /// Compute node information related to a AmlCompute. - public partial class AmlComputeNodesInformation : ComputeNodesInformation + /// Result of AmlCompute Nodes. + internal partial class AmlComputeNodesInformation { /// Initializes a new instance of AmlComputeNodesInformation. internal AmlComputeNodesInformation() { Nodes = new ChangeTrackingList(); - ComputeType = ComputeType.AmlCompute; } /// Initializes a new instance of AmlComputeNodesInformation. - /// The type of compute. - /// The continuation token. /// The collection of returned AmlCompute nodes details. - internal AmlComputeNodesInformation(ComputeType computeType, string nextLink, IReadOnlyList nodes) : base(computeType, nextLink) + /// The continuation token. + internal AmlComputeNodesInformation(IReadOnlyList nodes, string nextLink) { Nodes = nodes; - ComputeType = computeType; + NextLink = nextLink; } /// The collection of returned AmlCompute nodes details. public IReadOnlyList Nodes { get; } + /// The continuation token. + public string NextLink { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AmlComputeProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AmlComputeProperties.Serialization.cs index e6c28e487c927..ff035b8cbe151 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AmlComputeProperties.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AmlComputeProperties.Serialization.cs @@ -83,7 +83,7 @@ internal static AmlComputeProperties DeserializeAmlComputeProperties(JsonElement Optional remoteLoginPortPublicAccess = default; Optional allocationState = default; Optional allocationStateTransitionTime = default; - Optional> errors = default; + Optional> errors = default; Optional currentNodeCount = default; Optional targetNodeCount = default; Optional nodeStateCounts = default; @@ -202,10 +202,10 @@ internal static AmlComputeProperties DeserializeAmlComputeProperties(JsonElement property.ThrowNonNullablePropertyIsNull(); continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(MachineLearningServiceError.DeserializeMachineLearningServiceError(item)); + array.Add(ErrorResponse.DeserializeErrorResponse(item)); } errors = array; continue; diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AmlComputeProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AmlComputeProperties.cs index 5c46472483cfd..f35eb66164950 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AmlComputeProperties.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AmlComputeProperties.cs @@ -17,7 +17,7 @@ public partial class AmlComputeProperties /// Initializes a new instance of AmlComputeProperties. public AmlComputeProperties() { - Errors = new ChangeTrackingList(); + Errors = new ChangeTrackingList(); } /// Initializes a new instance of AmlComputeProperties. @@ -37,7 +37,7 @@ public AmlComputeProperties() /// The target number of compute nodes for the compute. If the allocationState is resizing, this property denotes the target node count for the ongoing resize operation. If the allocationState is steady, this property denotes the target node count for the previous resize operation. /// Counts of various node states on the compute. /// Enable or disable node public IP address provisioning. Possible values are: Possible values are: true - Indicates that the compute nodes will have public IPs provisioned. false - Indicates that the compute nodes will have a private endpoint and no public IPs. - internal AmlComputeProperties(OsType? osType, string vmSize, VmPriority? vmPriority, VirtualMachineImage virtualMachineImage, bool? isolatedNetwork, ScaleSettings scaleSettings, UserAccountCredentials userAccountCredentials, ResourceId subnet, RemoteLoginPortPublicAccess? remoteLoginPortPublicAccess, AllocationState? allocationState, DateTimeOffset? allocationStateTransitionTime, IReadOnlyList errors, int? currentNodeCount, int? targetNodeCount, NodeStateCounts nodeStateCounts, bool? enableNodePublicIp) + internal AmlComputeProperties(OsType? osType, string vmSize, VmPriority? vmPriority, VirtualMachineImage virtualMachineImage, bool? isolatedNetwork, ScaleSettings scaleSettings, UserAccountCredentials userAccountCredentials, ResourceId subnet, RemoteLoginPortPublicAccess? remoteLoginPortPublicAccess, AllocationState? allocationState, DateTimeOffset? allocationStateTransitionTime, IReadOnlyList errors, int? currentNodeCount, int? targetNodeCount, NodeStateCounts nodeStateCounts, bool? enableNodePublicIp) { OsType = osType; VmSize = vmSize; @@ -80,7 +80,7 @@ internal AmlComputeProperties(OsType? osType, string vmSize, VmPriority? vmPrior /// The time at which the compute entered its current allocation state. public DateTimeOffset? AllocationStateTransitionTime { get; } /// Collection of errors encountered by various compute nodes during node setup. - public IReadOnlyList Errors { get; } + public IReadOnlyList Errors { get; } /// The number of compute nodes currently assigned to the compute. public int? CurrentNodeCount { get; } /// The target number of compute nodes for the compute. If the allocationState is resizing, this property denotes the target node count for the ongoing resize operation. If the allocationState is steady, this property denotes the target node count for the previous resize operation. diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AssetPath.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AssetPath.cs deleted file mode 100644 index 5b5ab849b5754..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AssetPath.cs +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// Details of an AssetUri. - public partial class AssetPath - { - /// Initializes a new instance of AssetPath. - /// The path of file/directory. - /// is null. - public AssetPath(string path) - { - if (path == null) - { - throw new ArgumentNullException(nameof(path)); - } - - Path = path; - } - - /// Initializes a new instance of AssetPath. - /// The path of file/directory. - /// Whether the path defines a directory or a single file. - internal AssetPath(string path, bool? isDirectory) - { - Path = path; - IsDirectory = isDirectory; - } - - /// The path of file/directory. - public string Path { get; set; } - /// Whether the path defines a directory or a single file. - public bool? IsDirectory { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AuthKeys.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AuthKeys.Serialization.cs deleted file mode 100644 index 49ada343135b8..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AuthKeys.Serialization.cs +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class AuthKeys : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(PrimaryKey)) - { - writer.WritePropertyName("primaryKey"); - writer.WriteStringValue(PrimaryKey); - } - if (Optional.IsDefined(SecondaryKey)) - { - writer.WritePropertyName("secondaryKey"); - writer.WriteStringValue(SecondaryKey); - } - writer.WriteEndObject(); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AuthKeys.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AuthKeys.cs deleted file mode 100644 index 15b49b123b75f..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AuthKeys.cs +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// The AuthKeys. - public partial class AuthKeys - { - /// Initializes a new instance of AuthKeys. - public AuthKeys() - { - } - - /// The primary key. - public string PrimaryKey { get; set; } - /// The secondary key. - public string SecondaryKey { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelDataCollection.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AutoPauseProperties.Serialization.cs similarity index 53% rename from sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelDataCollection.Serialization.cs rename to sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AutoPauseProperties.Serialization.cs index 208165b30f163..63dfed527c1e6 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelDataCollection.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AutoPauseProperties.Serialization.cs @@ -10,52 +10,52 @@ namespace Azure.ResourceManager.MachineLearningServices.Models { - public partial class ModelDataCollection : IUtf8JsonSerializable + public partial class AutoPauseProperties : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); - if (Optional.IsDefined(EventHubEnabled)) + if (Optional.IsDefined(DelayInMinutes)) { - writer.WritePropertyName("eventHubEnabled"); - writer.WriteBooleanValue(EventHubEnabled.Value); + writer.WritePropertyName("delayInMinutes"); + writer.WriteNumberValue(DelayInMinutes.Value); } - if (Optional.IsDefined(StorageEnabled)) + if (Optional.IsDefined(Enabled)) { - writer.WritePropertyName("storageEnabled"); - writer.WriteBooleanValue(StorageEnabled.Value); + writer.WritePropertyName("enabled"); + writer.WriteBooleanValue(Enabled.Value); } writer.WriteEndObject(); } - internal static ModelDataCollection DeserializeModelDataCollection(JsonElement element) + internal static AutoPauseProperties DeserializeAutoPauseProperties(JsonElement element) { - Optional eventHubEnabled = default; - Optional storageEnabled = default; + Optional delayInMinutes = default; + Optional enabled = default; foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("eventHubEnabled")) + if (property.NameEquals("delayInMinutes")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } - eventHubEnabled = property.Value.GetBoolean(); + delayInMinutes = property.Value.GetInt32(); continue; } - if (property.NameEquals("storageEnabled")) + if (property.NameEquals("enabled")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } - storageEnabled = property.Value.GetBoolean(); + enabled = property.Value.GetBoolean(); continue; } } - return new ModelDataCollection(Optional.ToNullable(eventHubEnabled), Optional.ToNullable(storageEnabled)); + return new AutoPauseProperties(Optional.ToNullable(delayInMinutes), Optional.ToNullable(enabled)); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AutoPauseProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AutoPauseProperties.cs new file mode 100644 index 0000000000000..a1634077366fc --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AutoPauseProperties.cs @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Auto pause properties. + public partial class AutoPauseProperties + { + /// Initializes a new instance of AutoPauseProperties. + public AutoPauseProperties() + { + } + + /// Initializes a new instance of AutoPauseProperties. + /// . + /// . + internal AutoPauseProperties(int? delayInMinutes, bool? enabled) + { + DelayInMinutes = delayInMinutes; + Enabled = enabled; + } + + public int? DelayInMinutes { get; set; } + public bool? Enabled { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AutoScaleProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AutoScaleProperties.Serialization.cs new file mode 100644 index 0000000000000..53ca7f441e11c --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AutoScaleProperties.Serialization.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class AutoScaleProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(MinNodeCount)) + { + writer.WritePropertyName("minNodeCount"); + writer.WriteNumberValue(MinNodeCount.Value); + } + if (Optional.IsDefined(Enabled)) + { + writer.WritePropertyName("enabled"); + writer.WriteBooleanValue(Enabled.Value); + } + if (Optional.IsDefined(MaxNodeCount)) + { + writer.WritePropertyName("maxNodeCount"); + writer.WriteNumberValue(MaxNodeCount.Value); + } + writer.WriteEndObject(); + } + + internal static AutoScaleProperties DeserializeAutoScaleProperties(JsonElement element) + { + Optional minNodeCount = default; + Optional enabled = default; + Optional maxNodeCount = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("minNodeCount")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + minNodeCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("enabled")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + enabled = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("maxNodeCount")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + maxNodeCount = property.Value.GetInt32(); + continue; + } + } + return new AutoScaleProperties(Optional.ToNullable(minNodeCount), Optional.ToNullable(enabled), Optional.ToNullable(maxNodeCount)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AutoScaleProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AutoScaleProperties.cs new file mode 100644 index 0000000000000..20c4341e0f772 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AutoScaleProperties.cs @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Auto scale properties. + public partial class AutoScaleProperties + { + /// Initializes a new instance of AutoScaleProperties. + public AutoScaleProperties() + { + } + + /// Initializes a new instance of AutoScaleProperties. + /// . + /// . + /// . + internal AutoScaleProperties(int? minNodeCount, bool? enabled, int? maxNodeCount) + { + MinNodeCount = minNodeCount; + Enabled = enabled; + MaxNodeCount = maxNodeCount; + } + + public int? MinNodeCount { get; set; } + public bool? Enabled { get; set; } + public int? MaxNodeCount { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AutoScaler.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AutoScaler.Serialization.cs deleted file mode 100644 index aee6c096f72bd..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AutoScaler.Serialization.cs +++ /dev/null @@ -1,109 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class AutoScaler : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(AutoscaleEnabled)) - { - writer.WritePropertyName("autoscaleEnabled"); - writer.WriteBooleanValue(AutoscaleEnabled.Value); - } - if (Optional.IsDefined(MinReplicas)) - { - writer.WritePropertyName("minReplicas"); - writer.WriteNumberValue(MinReplicas.Value); - } - if (Optional.IsDefined(MaxReplicas)) - { - writer.WritePropertyName("maxReplicas"); - writer.WriteNumberValue(MaxReplicas.Value); - } - if (Optional.IsDefined(TargetUtilization)) - { - writer.WritePropertyName("targetUtilization"); - writer.WriteNumberValue(TargetUtilization.Value); - } - if (Optional.IsDefined(RefreshPeriodInSeconds)) - { - writer.WritePropertyName("refreshPeriodInSeconds"); - writer.WriteNumberValue(RefreshPeriodInSeconds.Value); - } - writer.WriteEndObject(); - } - - internal static AutoScaler DeserializeAutoScaler(JsonElement element) - { - Optional autoscaleEnabled = default; - Optional minReplicas = default; - Optional maxReplicas = default; - Optional targetUtilization = default; - Optional refreshPeriodInSeconds = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("autoscaleEnabled")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - autoscaleEnabled = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("minReplicas")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - minReplicas = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("maxReplicas")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - maxReplicas = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("targetUtilization")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - targetUtilization = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("refreshPeriodInSeconds")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - refreshPeriodInSeconds = property.Value.GetInt32(); - continue; - } - } - return new AutoScaler(Optional.ToNullable(autoscaleEnabled), Optional.ToNullable(minReplicas), Optional.ToNullable(maxReplicas), Optional.ToNullable(targetUtilization), Optional.ToNullable(refreshPeriodInSeconds)); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AutoScaler.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AutoScaler.cs deleted file mode 100644 index 7dc2d956cfbc4..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AutoScaler.cs +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// The Auto Scaler properties. - public partial class AutoScaler - { - /// Initializes a new instance of AutoScaler. - public AutoScaler() - { - } - - /// Initializes a new instance of AutoScaler. - /// Option to enable/disable auto scaling. - /// The minimum number of replicas to scale down to. - /// The maximum number of replicas in the cluster. - /// The target utilization percentage to use for determining whether to scale the cluster. - /// The amount of seconds to wait between auto scale updates. - internal AutoScaler(bool? autoscaleEnabled, int? minReplicas, int? maxReplicas, int? targetUtilization, int? refreshPeriodInSeconds) - { - AutoscaleEnabled = autoscaleEnabled; - MinReplicas = minReplicas; - MaxReplicas = maxReplicas; - TargetUtilization = targetUtilization; - RefreshPeriodInSeconds = refreshPeriodInSeconds; - } - - /// Option to enable/disable auto scaling. - public bool? AutoscaleEnabled { get; set; } - /// The minimum number of replicas to scale down to. - public int? MinReplicas { get; set; } - /// The maximum number of replicas in the cluster. - public int? MaxReplicas { get; set; } - /// The target utilization percentage to use for determining whether to scale the cluster. - public int? TargetUtilization { get; set; } - /// The amount of seconds to wait between auto scale updates. - public int? RefreshPeriodInSeconds { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AzureDataLakeSection.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AzureDataLakeSection.Serialization.cs deleted file mode 100644 index a824be707d759..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AzureDataLakeSection.Serialization.cs +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class AzureDataLakeSection : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("credentials"); - writer.WriteObjectValue(Credentials); - writer.WritePropertyName("storeName"); - writer.WriteStringValue(StoreName); - writer.WriteEndObject(); - } - - internal static AzureDataLakeSection DeserializeAzureDataLakeSection(JsonElement element) - { - DatastoreCredentials credentials = default; - string storeName = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("credentials")) - { - credentials = DatastoreCredentials.DeserializeDatastoreCredentials(property.Value); - continue; - } - if (property.NameEquals("storeName")) - { - storeName = property.Value.GetString(); - continue; - } - } - return new AzureDataLakeSection(credentials, storeName); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AzureDataLakeSection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AzureDataLakeSection.cs deleted file mode 100644 index ebed5125fb7e7..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AzureDataLakeSection.cs +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// The AzureDataLakeSection. - public partial class AzureDataLakeSection - { - /// Initializes a new instance of AzureDataLakeSection. - /// . - /// Azure Data Lake store name. - /// or is null. - public AzureDataLakeSection(DatastoreCredentials credentials, string storeName) - { - if (credentials == null) - { - throw new ArgumentNullException(nameof(credentials)); - } - if (storeName == null) - { - throw new ArgumentNullException(nameof(storeName)); - } - - Credentials = credentials; - StoreName = storeName; - } - - public DatastoreCredentials Credentials { get; set; } - /// Azure Data Lake store name. - public string StoreName { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AzureMySqlSection.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AzureMySqlSection.Serialization.cs deleted file mode 100644 index dcc86047a4e9f..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AzureMySqlSection.Serialization.cs +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class AzureMySqlSection : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("credentials"); - writer.WriteObjectValue(Credentials); - writer.WritePropertyName("databaseName"); - writer.WriteStringValue(DatabaseName); - writer.WritePropertyName("endpoint"); - writer.WriteStringValue(Endpoint); - writer.WritePropertyName("portNumber"); - writer.WriteNumberValue(PortNumber); - writer.WritePropertyName("serverName"); - writer.WriteStringValue(ServerName); - writer.WriteEndObject(); - } - - internal static AzureMySqlSection DeserializeAzureMySqlSection(JsonElement element) - { - DatastoreCredentials credentials = default; - string databaseName = default; - string endpoint = default; - int portNumber = default; - string serverName = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("credentials")) - { - credentials = DatastoreCredentials.DeserializeDatastoreCredentials(property.Value); - continue; - } - if (property.NameEquals("databaseName")) - { - databaseName = property.Value.GetString(); - continue; - } - if (property.NameEquals("endpoint")) - { - endpoint = property.Value.GetString(); - continue; - } - if (property.NameEquals("portNumber")) - { - portNumber = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("serverName")) - { - serverName = property.Value.GetString(); - continue; - } - } - return new AzureMySqlSection(credentials, databaseName, endpoint, portNumber, serverName); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AzureMySqlSection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AzureMySqlSection.cs deleted file mode 100644 index 6c52ac4b87c2b..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AzureMySqlSection.cs +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// The AzureMySqlSection. - public partial class AzureMySqlSection - { - /// Initializes a new instance of AzureMySqlSection. - /// . - /// Azure SQL database name. - /// Azure cloud endpoint for the database. - /// Azure SQL server port. - /// Azure SQL server name. - /// , , , or is null. - public AzureMySqlSection(DatastoreCredentials credentials, string databaseName, string endpoint, int portNumber, string serverName) - { - if (credentials == null) - { - throw new ArgumentNullException(nameof(credentials)); - } - if (databaseName == null) - { - throw new ArgumentNullException(nameof(databaseName)); - } - if (endpoint == null) - { - throw new ArgumentNullException(nameof(endpoint)); - } - if (serverName == null) - { - throw new ArgumentNullException(nameof(serverName)); - } - - Credentials = credentials; - DatabaseName = databaseName; - Endpoint = endpoint; - PortNumber = portNumber; - ServerName = serverName; - } - - public DatastoreCredentials Credentials { get; set; } - /// Azure SQL database name. - public string DatabaseName { get; set; } - /// Azure cloud endpoint for the database. - public string Endpoint { get; set; } - /// Azure SQL server port. - public int PortNumber { get; set; } - /// Azure SQL server name. - public string ServerName { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AzurePostgreSqlSection.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AzurePostgreSqlSection.Serialization.cs deleted file mode 100644 index 10b42931eaf8f..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AzurePostgreSqlSection.Serialization.cs +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class AzurePostgreSqlSection : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(EnableSSL)) - { - writer.WritePropertyName("enableSSL"); - writer.WriteBooleanValue(EnableSSL.Value); - } - writer.WritePropertyName("credentials"); - writer.WriteObjectValue(Credentials); - writer.WritePropertyName("databaseName"); - writer.WriteStringValue(DatabaseName); - writer.WritePropertyName("endpoint"); - writer.WriteStringValue(Endpoint); - writer.WritePropertyName("portNumber"); - writer.WriteNumberValue(PortNumber); - writer.WritePropertyName("serverName"); - writer.WriteStringValue(ServerName); - writer.WriteEndObject(); - } - - internal static AzurePostgreSqlSection DeserializeAzurePostgreSqlSection(JsonElement element) - { - Optional enableSSL = default; - DatastoreCredentials credentials = default; - string databaseName = default; - string endpoint = default; - int portNumber = default; - string serverName = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("enableSSL")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - enableSSL = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("credentials")) - { - credentials = DatastoreCredentials.DeserializeDatastoreCredentials(property.Value); - continue; - } - if (property.NameEquals("databaseName")) - { - databaseName = property.Value.GetString(); - continue; - } - if (property.NameEquals("endpoint")) - { - endpoint = property.Value.GetString(); - continue; - } - if (property.NameEquals("portNumber")) - { - portNumber = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("serverName")) - { - serverName = property.Value.GetString(); - continue; - } - } - return new AzurePostgreSqlSection(Optional.ToNullable(enableSSL), credentials, databaseName, endpoint, portNumber, serverName); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AzurePostgreSqlSection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AzurePostgreSqlSection.cs deleted file mode 100644 index 878843e6bf017..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AzurePostgreSqlSection.cs +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// The AzurePostgreSqlSection. - public partial class AzurePostgreSqlSection - { - /// Initializes a new instance of AzurePostgreSqlSection. - /// . - /// Azure SQL database name. - /// Azure cloud endpoint for the database. - /// Azure SQL server port. - /// Azure SQL server name. - /// , , , or is null. - public AzurePostgreSqlSection(DatastoreCredentials credentials, string databaseName, string endpoint, int portNumber, string serverName) - { - if (credentials == null) - { - throw new ArgumentNullException(nameof(credentials)); - } - if (databaseName == null) - { - throw new ArgumentNullException(nameof(databaseName)); - } - if (endpoint == null) - { - throw new ArgumentNullException(nameof(endpoint)); - } - if (serverName == null) - { - throw new ArgumentNullException(nameof(serverName)); - } - - Credentials = credentials; - DatabaseName = databaseName; - Endpoint = endpoint; - PortNumber = portNumber; - ServerName = serverName; - } - - /// Initializes a new instance of AzurePostgreSqlSection. - /// Whether the Azure PostgreSQL server requires SSL. - /// . - /// Azure SQL database name. - /// Azure cloud endpoint for the database. - /// Azure SQL server port. - /// Azure SQL server name. - internal AzurePostgreSqlSection(bool? enableSSL, DatastoreCredentials credentials, string databaseName, string endpoint, int portNumber, string serverName) - { - EnableSSL = enableSSL; - Credentials = credentials; - DatabaseName = databaseName; - Endpoint = endpoint; - PortNumber = portNumber; - ServerName = serverName; - } - - /// Whether the Azure PostgreSQL server requires SSL. - public bool? EnableSSL { get; set; } - public DatastoreCredentials Credentials { get; set; } - /// Azure SQL database name. - public string DatabaseName { get; set; } - /// Azure cloud endpoint for the database. - public string Endpoint { get; set; } - /// Azure SQL server port. - public int PortNumber { get; set; } - /// Azure SQL server name. - public string ServerName { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AzureSqlDatabaseSection.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AzureSqlDatabaseSection.Serialization.cs deleted file mode 100644 index dfc3bde4d648a..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AzureSqlDatabaseSection.Serialization.cs +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class AzureSqlDatabaseSection : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("credentials"); - writer.WriteObjectValue(Credentials); - writer.WritePropertyName("databaseName"); - writer.WriteStringValue(DatabaseName); - writer.WritePropertyName("endpoint"); - writer.WriteStringValue(Endpoint); - writer.WritePropertyName("portNumber"); - writer.WriteNumberValue(PortNumber); - writer.WritePropertyName("serverName"); - writer.WriteStringValue(ServerName); - writer.WriteEndObject(); - } - - internal static AzureSqlDatabaseSection DeserializeAzureSqlDatabaseSection(JsonElement element) - { - DatastoreCredentials credentials = default; - string databaseName = default; - string endpoint = default; - int portNumber = default; - string serverName = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("credentials")) - { - credentials = DatastoreCredentials.DeserializeDatastoreCredentials(property.Value); - continue; - } - if (property.NameEquals("databaseName")) - { - databaseName = property.Value.GetString(); - continue; - } - if (property.NameEquals("endpoint")) - { - endpoint = property.Value.GetString(); - continue; - } - if (property.NameEquals("portNumber")) - { - portNumber = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("serverName")) - { - serverName = property.Value.GetString(); - continue; - } - } - return new AzureSqlDatabaseSection(credentials, databaseName, endpoint, portNumber, serverName); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AzureSqlDatabaseSection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AzureSqlDatabaseSection.cs deleted file mode 100644 index 548c2f3358244..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AzureSqlDatabaseSection.cs +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// The AzureSqlDatabaseSection. - public partial class AzureSqlDatabaseSection - { - /// Initializes a new instance of AzureSqlDatabaseSection. - /// . - /// Azure SQL database name. - /// Azure cloud endpoint for the database. - /// Azure SQL server port. - /// Azure SQL server name. - /// , , , or is null. - public AzureSqlDatabaseSection(DatastoreCredentials credentials, string databaseName, string endpoint, int portNumber, string serverName) - { - if (credentials == null) - { - throw new ArgumentNullException(nameof(credentials)); - } - if (databaseName == null) - { - throw new ArgumentNullException(nameof(databaseName)); - } - if (endpoint == null) - { - throw new ArgumentNullException(nameof(endpoint)); - } - if (serverName == null) - { - throw new ArgumentNullException(nameof(serverName)); - } - - Credentials = credentials; - DatabaseName = databaseName; - Endpoint = endpoint; - PortNumber = portNumber; - ServerName = serverName; - } - - public DatastoreCredentials Credentials { get; set; } - /// Azure SQL database name. - public string DatabaseName { get; set; } - /// Azure cloud endpoint for the database. - public string Endpoint { get; set; } - /// Azure SQL server port. - public int PortNumber { get; set; } - /// Azure SQL server name. - public string ServerName { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AzureStorageSection.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AzureStorageSection.Serialization.cs deleted file mode 100644 index 9829db15547f5..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AzureStorageSection.Serialization.cs +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class AzureStorageSection : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("accountName"); - writer.WriteStringValue(AccountName); - if (Optional.IsDefined(BlobCacheTimeout)) - { - writer.WritePropertyName("blobCacheTimeout"); - writer.WriteNumberValue(BlobCacheTimeout.Value); - } - writer.WritePropertyName("containerName"); - writer.WriteStringValue(ContainerName); - writer.WritePropertyName("credentials"); - writer.WriteObjectValue(Credentials); - writer.WritePropertyName("endpoint"); - writer.WriteStringValue(Endpoint); - writer.WritePropertyName("protocol"); - writer.WriteStringValue(Protocol); - writer.WriteEndObject(); - } - - internal static AzureStorageSection DeserializeAzureStorageSection(JsonElement element) - { - string accountName = default; - Optional blobCacheTimeout = default; - string containerName = default; - DatastoreCredentials credentials = default; - string endpoint = default; - string protocol = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("accountName")) - { - accountName = property.Value.GetString(); - continue; - } - if (property.NameEquals("blobCacheTimeout")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - blobCacheTimeout = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("containerName")) - { - containerName = property.Value.GetString(); - continue; - } - if (property.NameEquals("credentials")) - { - credentials = DatastoreCredentials.DeserializeDatastoreCredentials(property.Value); - continue; - } - if (property.NameEquals("endpoint")) - { - endpoint = property.Value.GetString(); - continue; - } - if (property.NameEquals("protocol")) - { - protocol = property.Value.GetString(); - continue; - } - } - return new AzureStorageSection(accountName, Optional.ToNullable(blobCacheTimeout), containerName, credentials, endpoint, protocol); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AzureStorageSection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AzureStorageSection.cs deleted file mode 100644 index 14a320b584ad1..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AzureStorageSection.cs +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// The AzureStorageSection. - public partial class AzureStorageSection - { - /// Initializes a new instance of AzureStorageSection. - /// Storage account name. - /// Storage account container name. - /// . - /// Azure cloud endpoint for the storage account. - /// Protocol used to communicate with the storage account. - /// , , , , or is null. - public AzureStorageSection(string accountName, string containerName, DatastoreCredentials credentials, string endpoint, string protocol) - { - if (accountName == null) - { - throw new ArgumentNullException(nameof(accountName)); - } - if (containerName == null) - { - throw new ArgumentNullException(nameof(containerName)); - } - if (credentials == null) - { - throw new ArgumentNullException(nameof(credentials)); - } - if (endpoint == null) - { - throw new ArgumentNullException(nameof(endpoint)); - } - if (protocol == null) - { - throw new ArgumentNullException(nameof(protocol)); - } - - AccountName = accountName; - ContainerName = containerName; - Credentials = credentials; - Endpoint = endpoint; - Protocol = protocol; - } - - /// Initializes a new instance of AzureStorageSection. - /// Storage account name. - /// Blob storage cache timeout. - /// Storage account container name. - /// . - /// Azure cloud endpoint for the storage account. - /// Protocol used to communicate with the storage account. - internal AzureStorageSection(string accountName, int? blobCacheTimeout, string containerName, DatastoreCredentials credentials, string endpoint, string protocol) - { - AccountName = accountName; - BlobCacheTimeout = blobCacheTimeout; - ContainerName = containerName; - Credentials = credentials; - Endpoint = endpoint; - Protocol = protocol; - } - - /// Storage account name. - public string AccountName { get; set; } - /// Blob storage cache timeout. - public int? BlobCacheTimeout { get; set; } - /// Storage account container name. - public string ContainerName { get; set; } - public DatastoreCredentials Credentials { get; set; } - /// Azure cloud endpoint for the storage account. - public string Endpoint { get; set; } - /// Protocol used to communicate with the storage account. - public string Protocol { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CertificateSection.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CertificateSection.Serialization.cs deleted file mode 100644 index 7d1662c391f95..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CertificateSection.Serialization.cs +++ /dev/null @@ -1,87 +0,0 @@ -// 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.ResourceManager.MachineLearningServices.Models -{ - public partial class CertificateSection : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(AuthorityUrl)) - { - writer.WritePropertyName("authorityUrl"); - writer.WriteStringValue(AuthorityUrl); - } - if (Optional.IsDefined(ResourceUri)) - { - writer.WritePropertyName("resourceUri"); - writer.WriteStringValue(ResourceUri); - } - writer.WritePropertyName("tenantId"); - writer.WriteStringValue(TenantId); - writer.WritePropertyName("clientId"); - writer.WriteStringValue(ClientId); - if (Optional.IsDefined(Certificate)) - { - writer.WritePropertyName("certificate"); - writer.WriteStringValue(Certificate); - } - writer.WritePropertyName("thumbprint"); - writer.WriteStringValue(Thumbprint); - writer.WriteEndObject(); - } - - internal static CertificateSection DeserializeCertificateSection(JsonElement element) - { - Optional authorityUrl = default; - Optional resourceUri = default; - Guid tenantId = default; - Guid clientId = default; - Optional certificate = default; - string thumbprint = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("authorityUrl")) - { - authorityUrl = property.Value.GetString(); - continue; - } - if (property.NameEquals("resourceUri")) - { - resourceUri = property.Value.GetString(); - continue; - } - if (property.NameEquals("tenantId")) - { - tenantId = property.Value.GetGuid(); - continue; - } - if (property.NameEquals("clientId")) - { - clientId = property.Value.GetGuid(); - continue; - } - if (property.NameEquals("certificate")) - { - certificate = property.Value.GetString(); - continue; - } - if (property.NameEquals("thumbprint")) - { - thumbprint = property.Value.GetString(); - continue; - } - } - return new CertificateSection(authorityUrl.Value, resourceUri.Value, tenantId, clientId, certificate.Value, thumbprint); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CertificateSection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CertificateSection.cs deleted file mode 100644 index 0ee1a80b01874..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CertificateSection.cs +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// The CertificateSection. - public partial class CertificateSection - { - /// Initializes a new instance of CertificateSection. - /// ID of the tenant to which the service principal belongs. - /// Service principal client ID. - /// Thumbprint of the certificate used for authentication. - /// is null. - public CertificateSection(Guid tenantId, Guid clientId, string thumbprint) - { - if (thumbprint == null) - { - throw new ArgumentNullException(nameof(thumbprint)); - } - - TenantId = tenantId; - ClientId = clientId; - Thumbprint = thumbprint; - } - - /// Initializes a new instance of CertificateSection. - /// Authority URL used for authentication. - /// Resource the service principal has access to. - /// ID of the tenant to which the service principal belongs. - /// Service principal client ID. - /// Service principal certificate. - /// Thumbprint of the certificate used for authentication. - internal CertificateSection(string authorityUrl, string resourceUri, Guid tenantId, Guid clientId, string certificate, string thumbprint) - { - AuthorityUrl = authorityUrl; - ResourceUri = resourceUri; - TenantId = tenantId; - ClientId = clientId; - Certificate = certificate; - Thumbprint = thumbprint; - } - - /// Authority URL used for authentication. - public string AuthorityUrl { get; set; } - /// Resource the service principal has access to. - public string ResourceUri { get; set; } - /// ID of the tenant to which the service principal belongs. - public Guid TenantId { get; set; } - /// Service principal client ID. - public Guid ClientId { get; set; } - /// Service principal certificate. - public string Certificate { get; set; } - /// Thumbprint of the certificate used for authentication. - public string Thumbprint { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ClusterPurpose.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ClusterPurpose.cs new file mode 100644 index 0000000000000..52a0c6b6b1fe5 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ClusterPurpose.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Intended usage of the cluster. + public readonly partial struct ClusterPurpose : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + /// is null. + public ClusterPurpose(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string FastProdValue = "FastProd"; + private const string DenseProdValue = "DenseProd"; + private const string DevTestValue = "DevTest"; + + /// FastProd. + public static ClusterPurpose FastProd { get; } = new ClusterPurpose(FastProdValue); + /// DenseProd. + public static ClusterPurpose DenseProd { get; } = new ClusterPurpose(DenseProdValue); + /// DevTest. + public static ClusterPurpose DevTest { get; } = new ClusterPurpose(DevTestValue); + /// Determines if two values are the same. + public static bool operator ==(ClusterPurpose left, ClusterPurpose right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ClusterPurpose left, ClusterPurpose right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator ClusterPurpose(string value) => new ClusterPurpose(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ClusterPurpose other && Equals(other); + /// + public bool Equals(ClusterPurpose 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/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ClusterUpdateParameters.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ClusterUpdateParameters.Serialization.cs index 1d13fa1066f5b..a92a19973f8cb 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ClusterUpdateParameters.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ClusterUpdateParameters.Serialization.cs @@ -17,10 +17,10 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteStartObject(); writer.WritePropertyName("properties"); writer.WriteStartObject(); - if (Optional.IsDefined(ScaleSettings)) + if (Optional.IsDefined(Properties)) { - writer.WritePropertyName("scaleSettings"); - writer.WriteObjectValue(ScaleSettings); + writer.WritePropertyName("properties"); + writer.WriteObjectValue(Properties); } writer.WriteEndObject(); writer.WriteEndObject(); diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ClusterUpdateParameters.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ClusterUpdateParameters.cs index a6bfda5cd8537..9d08beffa6510 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ClusterUpdateParameters.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ClusterUpdateParameters.cs @@ -15,7 +15,7 @@ public ClusterUpdateParameters() { } - /// Desired scale settings for the amlCompute. - public ScaleSettings ScaleSettings { get; set; } + /// Properties of ClusterUpdate. + public ScaleSettingsInformation Properties { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CodeConfiguration.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CodeConfiguration.Serialization.cs deleted file mode 100644 index 9ad0d259a13f7..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CodeConfiguration.Serialization.cs +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class CodeConfiguration : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(CodeArtifactId)) - { - writer.WritePropertyName("codeArtifactId"); - writer.WriteStringValue(CodeArtifactId); - } - writer.WritePropertyName("command"); - writer.WriteStringValue(Command); - writer.WriteEndObject(); - } - - internal static CodeConfiguration DeserializeCodeConfiguration(JsonElement element) - { - Optional codeArtifactId = default; - string command = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("codeArtifactId")) - { - codeArtifactId = property.Value.GetString(); - continue; - } - if (property.NameEquals("command")) - { - command = property.Value.GetString(); - continue; - } - } - return new CodeConfiguration(codeArtifactId.Value, command); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CodeConfiguration.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CodeConfiguration.cs deleted file mode 100644 index 1bb52e7af5d30..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CodeConfiguration.cs +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// The CodeConfiguration. - public partial class CodeConfiguration - { - /// Initializes a new instance of CodeConfiguration. - /// The command to execute on startup of the job. eg. ["python", "train.py"]. - /// is null. - public CodeConfiguration(string command) - { - if (command == null) - { - throw new ArgumentNullException(nameof(command)); - } - - Command = command; - } - - /// Initializes a new instance of CodeConfiguration. - /// The ID of the code asset. - /// The command to execute on startup of the job. eg. ["python", "train.py"]. - internal CodeConfiguration(string codeArtifactId, string command) - { - CodeArtifactId = codeArtifactId; - Command = command; - } - - /// The ID of the code asset. - public string CodeArtifactId { get; set; } - /// The command to execute on startup of the job. eg. ["python", "train.py"]. - public string Command { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CodeContainer.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CodeContainer.cs deleted file mode 100644 index dff567cdda194..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CodeContainer.cs +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// The CodeContainer. - public partial class CodeContainer - { - /// Initializes a new instance of CodeContainer. - public CodeContainer() - { - Properties = new ChangeTrackingDictionary(); - Tags = new ChangeTrackingDictionary(); - } - - /// Initializes a new instance of CodeContainer. - /// Dictionary of <string>. - /// Dictionary of <string>. - /// . - internal CodeContainer(IDictionary properties, IDictionary tags, string description) - { - Properties = properties; - Tags = tags; - Description = description; - } - - /// Dictionary of <string>. - public IDictionary Properties { get; } - /// Dictionary of <string>. - public IDictionary Tags { get; } - public string Description { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CodeContainerResource.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CodeContainerResource.Serialization.cs deleted file mode 100644 index efe4330da3a14..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CodeContainerResource.Serialization.cs +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class CodeContainerResource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("properties"); - writer.WriteObjectValue(Properties); - writer.WriteEndObject(); - } - - internal static CodeContainerResource DeserializeCodeContainerResource(JsonElement element) - { - Optional id = default; - Optional name = default; - Optional type = default; - CodeContainer properties = default; - Optional systemData = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("id")) - { - id = property.Value.GetString(); - continue; - } - if (property.NameEquals("name")) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type")) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("properties")) - { - properties = CodeContainer.DeserializeCodeContainer(property.Value); - continue; - } - if (property.NameEquals("systemData")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - systemData = SystemData.DeserializeSystemData(property.Value); - continue; - } - } - return new CodeContainerResource(id.Value, name.Value, type.Value, properties, systemData.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CodeContainerResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CodeContainerResource.cs deleted file mode 100644 index 032e5fd54600b..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CodeContainerResource.cs +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// Azure Resource Manager resource envelope. - public partial class CodeContainerResource - { - /// Initializes a new instance of CodeContainerResource. - /// . - /// is null. - public CodeContainerResource(CodeContainer properties) - { - if (properties == null) - { - throw new ArgumentNullException(nameof(properties)); - } - - Properties = properties; - } - - /// Initializes a new instance of CodeContainerResource. - /// The resource URL of the entity (not URL encoded). - /// The name of the resource entity. - /// The resource provider and type. - /// . - /// Metadata pertaining to creation and last modification of the resource. - internal CodeContainerResource(string id, string name, string type, CodeContainer properties, SystemData systemData) - { - Id = id; - Name = name; - Type = type; - Properties = properties; - SystemData = systemData; - } - - /// The resource URL of the entity (not URL encoded). - public string Id { get; } - /// The name of the resource entity. - public string Name { get; } - /// The resource provider and type. - public string Type { get; } - public CodeContainer Properties { get; set; } - /// Metadata pertaining to creation and last modification of the resource. - public SystemData SystemData { get; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CodeContainerResourceArmPaginatedResult.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CodeContainerResourceArmPaginatedResult.Serialization.cs deleted file mode 100644 index 89d7862e64d42..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CodeContainerResourceArmPaginatedResult.Serialization.cs +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - internal partial class CodeContainerResourceArmPaginatedResult - { - internal static CodeContainerResourceArmPaginatedResult DeserializeCodeContainerResourceArmPaginatedResult(JsonElement element) - { - Optional> value = default; - Optional nextLink = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("value")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(CodeContainerResource.DeserializeCodeContainerResource(item)); - } - value = array; - continue; - } - if (property.NameEquals("nextLink")) - { - nextLink = property.Value.GetString(); - continue; - } - } - return new CodeContainerResourceArmPaginatedResult(Optional.ToList(value), nextLink.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CodeContainerResourceArmPaginatedResult.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CodeContainerResourceArmPaginatedResult.cs deleted file mode 100644 index 7278a4481789a..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CodeContainerResourceArmPaginatedResult.cs +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// A paginated list of CodeContainer entities. - internal partial class CodeContainerResourceArmPaginatedResult - { - /// Initializes a new instance of CodeContainerResourceArmPaginatedResult. - internal CodeContainerResourceArmPaginatedResult() - { - Value = new ChangeTrackingList(); - } - - /// Initializes a new instance of CodeContainerResourceArmPaginatedResult. - /// An array of objects of type CodeContainer. - /// . - internal CodeContainerResourceArmPaginatedResult(IReadOnlyList value, string nextLink) - { - Value = value; - NextLink = nextLink; - } - - /// An array of objects of type CodeContainer. - public IReadOnlyList Value { get; } - public string NextLink { get; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CodeVersion.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CodeVersion.Serialization.cs deleted file mode 100644 index b3ba4b113f4e9..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CodeVersion.Serialization.cs +++ /dev/null @@ -1,122 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class CodeVersion : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(DatastoreId)) - { - writer.WritePropertyName("datastoreId"); - writer.WriteStringValue(DatastoreId); - } - if (Optional.IsDefined(AssetPath)) - { - writer.WritePropertyName("assetPath"); - writer.WriteObjectValue(AssetPath); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Properties)) - { - writer.WritePropertyName("properties"); - writer.WriteStartObject(); - foreach (var item in Properties) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WriteEndObject(); - } - - internal static CodeVersion DeserializeCodeVersion(JsonElement element) - { - Optional datastoreId = default; - Optional assetPath = default; - Optional description = default; - Optional> tags = default; - Optional> properties = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("datastoreId")) - { - datastoreId = property.Value.GetString(); - continue; - } - if (property.NameEquals("assetPath")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - assetPath = AssetPath.DeserializeAssetPath(property.Value); - continue; - } - if (property.NameEquals("description")) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("tags")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - tags = dictionary; - continue; - } - if (property.NameEquals("properties")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - properties = dictionary; - continue; - } - } - return new CodeVersion(datastoreId.Value, assetPath.Value, description.Value, Optional.ToDictionary(tags), Optional.ToDictionary(properties)); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CodeVersion.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CodeVersion.cs deleted file mode 100644 index fbe40444e3cd4..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CodeVersion.cs +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// Details of an RegisteredCode. - public partial class CodeVersion - { - /// Initializes a new instance of CodeVersion. - public CodeVersion() - { - Tags = new ChangeTrackingDictionary(); - Properties = new ChangeTrackingDictionary(); - } - - /// Initializes a new instance of CodeVersion. - /// The asset datastoreId. - /// Details of an AssetUri. - /// The asset description text. - /// Tag dictionary. Tags can be added, removed, and updated. - /// The asset property dictionary. - internal CodeVersion(string datastoreId, AssetPath assetPath, string description, IDictionary tags, IDictionary properties) - { - DatastoreId = datastoreId; - AssetPath = assetPath; - Description = description; - Tags = tags; - Properties = properties; - } - - /// The asset datastoreId. - public string DatastoreId { get; set; } - /// Details of an AssetUri. - public AssetPath AssetPath { get; set; } - /// The asset description text. - public string Description { get; set; } - /// Tag dictionary. Tags can be added, removed, and updated. - public IDictionary Tags { get; } - /// The asset property dictionary. - public IDictionary Properties { get; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CodeVersionResource.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CodeVersionResource.Serialization.cs deleted file mode 100644 index b7bca4690ad2b..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CodeVersionResource.Serialization.cs +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class CodeVersionResource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("properties"); - writer.WriteObjectValue(Properties); - writer.WriteEndObject(); - } - - internal static CodeVersionResource DeserializeCodeVersionResource(JsonElement element) - { - Optional id = default; - Optional name = default; - Optional type = default; - CodeVersion properties = default; - Optional systemData = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("id")) - { - id = property.Value.GetString(); - continue; - } - if (property.NameEquals("name")) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type")) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("properties")) - { - properties = CodeVersion.DeserializeCodeVersion(property.Value); - continue; - } - if (property.NameEquals("systemData")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - systemData = SystemData.DeserializeSystemData(property.Value); - continue; - } - } - return new CodeVersionResource(id.Value, name.Value, type.Value, properties, systemData.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CodeVersionResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CodeVersionResource.cs deleted file mode 100644 index bddb1ee47ff0f..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CodeVersionResource.cs +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// Azure Resource Manager resource envelope. - public partial class CodeVersionResource - { - /// Initializes a new instance of CodeVersionResource. - /// Details of an RegisteredCode. - /// is null. - public CodeVersionResource(CodeVersion properties) - { - if (properties == null) - { - throw new ArgumentNullException(nameof(properties)); - } - - Properties = properties; - } - - /// Initializes a new instance of CodeVersionResource. - /// The resource URL of the entity (not URL encoded). - /// The name of the resource entity. - /// The resource provider and type. - /// Details of an RegisteredCode. - /// Metadata pertaining to creation and last modification of the resource. - internal CodeVersionResource(string id, string name, string type, CodeVersion properties, SystemData systemData) - { - Id = id; - Name = name; - Type = type; - Properties = properties; - SystemData = systemData; - } - - /// The resource URL of the entity (not URL encoded). - public string Id { get; } - /// The name of the resource entity. - public string Name { get; } - /// The resource provider and type. - public string Type { get; } - /// Details of an RegisteredCode. - public CodeVersion Properties { get; set; } - /// Metadata pertaining to creation and last modification of the resource. - public SystemData SystemData { get; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CodeVersionResourceArmPaginatedResult.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CodeVersionResourceArmPaginatedResult.cs deleted file mode 100644 index 203acf32281dc..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CodeVersionResourceArmPaginatedResult.cs +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// A paginated list of CodeVersion entities. - internal partial class CodeVersionResourceArmPaginatedResult - { - /// Initializes a new instance of CodeVersionResourceArmPaginatedResult. - internal CodeVersionResourceArmPaginatedResult() - { - Value = new ChangeTrackingList(); - } - - /// Initializes a new instance of CodeVersionResourceArmPaginatedResult. - /// An array of objects of type CodeVersion. - /// . - internal CodeVersionResourceArmPaginatedResult(IReadOnlyList value, string nextLink) - { - Value = value; - NextLink = nextLink; - } - - /// An array of objects of type CodeVersion. - public IReadOnlyList Value { get; } - public string NextLink { get; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CommandJob.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CommandJob.Serialization.cs deleted file mode 100644 index 12784685ac2a6..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CommandJob.Serialization.cs +++ /dev/null @@ -1,243 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class CommandJob : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Status)) - { - writer.WritePropertyName("status"); - writer.WriteStringValue(Status.Value.ToString()); - } - if (Optional.IsDefined(MaxRunDurationSeconds)) - { - writer.WritePropertyName("maxRunDurationSeconds"); - writer.WriteNumberValue(MaxRunDurationSeconds.Value); - } - writer.WritePropertyName("codeConfiguration"); - writer.WriteObjectValue(CodeConfiguration); - if (Optional.IsDefined(EnvironmentId)) - { - writer.WritePropertyName("environmentId"); - writer.WriteStringValue(EnvironmentId); - } - if (Optional.IsCollectionDefined(DataBindings)) - { - writer.WritePropertyName("dataBindings"); - writer.WriteStartObject(); - foreach (var item in DataBindings) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsDefined(DistributionConfiguration)) - { - writer.WritePropertyName("distributionConfiguration"); - writer.WriteObjectValue(DistributionConfiguration); - } - if (Optional.IsDefined(ExperimentName)) - { - writer.WritePropertyName("experimentName"); - writer.WriteStringValue(ExperimentName); - } - writer.WritePropertyName("computeBinding"); - writer.WriteObjectValue(ComputeBinding); - if (Optional.IsDefined(Output)) - { - writer.WritePropertyName("output"); - writer.WriteObjectValue(Output); - } - writer.WritePropertyName("jobType"); - writer.WriteStringValue(JobType.ToString()); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Properties)) - { - writer.WritePropertyName("properties"); - writer.WriteStartObject(); - foreach (var item in Properties) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WriteEndObject(); - } - - internal static CommandJob DeserializeCommandJob(JsonElement element) - { - Optional status = default; - Optional maxRunDurationSeconds = default; - CodeConfiguration codeConfiguration = default; - Optional environmentId = default; - Optional> dataBindings = default; - Optional distributionConfiguration = default; - Optional experimentName = default; - ComputeBinding computeBinding = default; - Optional output = default; - JobType jobType = default; - Optional interactionEndpoints = default; - Optional description = default; - Optional> tags = default; - Optional> properties = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("status")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - status = new JobStatus(property.Value.GetString()); - continue; - } - if (property.NameEquals("maxRunDurationSeconds")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - maxRunDurationSeconds = property.Value.GetInt64(); - continue; - } - if (property.NameEquals("codeConfiguration")) - { - codeConfiguration = CodeConfiguration.DeserializeCodeConfiguration(property.Value); - continue; - } - if (property.NameEquals("environmentId")) - { - environmentId = property.Value.GetString(); - continue; - } - if (property.NameEquals("dataBindings")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, DataBinding.DeserializeDataBinding(property0.Value)); - } - dataBindings = dictionary; - continue; - } - if (property.NameEquals("distributionConfiguration")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - distributionConfiguration = DistributionConfiguration.DeserializeDistributionConfiguration(property.Value); - continue; - } - if (property.NameEquals("experimentName")) - { - experimentName = property.Value.GetString(); - continue; - } - if (property.NameEquals("computeBinding")) - { - computeBinding = ComputeBinding.DeserializeComputeBinding(property.Value); - continue; - } - if (property.NameEquals("output")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - output = JobOutput.DeserializeJobOutput(property.Value); - continue; - } - if (property.NameEquals("jobType")) - { - jobType = new JobType(property.Value.GetString()); - continue; - } - if (property.NameEquals("interactionEndpoints")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - interactionEndpoints = JobBaseInteractionEndpoints.DeserializeJobBaseInteractionEndpoints(property.Value); - continue; - } - if (property.NameEquals("description")) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("tags")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - tags = dictionary; - continue; - } - if (property.NameEquals("properties")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - properties = dictionary; - continue; - } - } - return new CommandJob(jobType, interactionEndpoints.Value, description.Value, Optional.ToDictionary(tags), Optional.ToDictionary(properties), experimentName.Value, computeBinding, output.Value, Optional.ToNullable(status), Optional.ToNullable(maxRunDurationSeconds), codeConfiguration, environmentId.Value, Optional.ToDictionary(dataBindings), distributionConfiguration.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CommandJob.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CommandJob.cs deleted file mode 100644 index 1ab0c7f0e3889..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CommandJob.cs +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// Code Job definition. - public partial class CommandJob : ComputeJobBase - { - /// Initializes a new instance of CommandJob. - /// Compute binding definition. - /// . - /// or is null. - public CommandJob(ComputeBinding computeBinding, CodeConfiguration codeConfiguration) : base(computeBinding) - { - if (computeBinding == null) - { - throw new ArgumentNullException(nameof(computeBinding)); - } - if (codeConfiguration == null) - { - throw new ArgumentNullException(nameof(codeConfiguration)); - } - - CodeConfiguration = codeConfiguration; - DataBindings = new ChangeTrackingDictionary(); - JobType = JobType.Command; - } - - /// Initializes a new instance of CommandJob. - /// Specifies the type of job. - /// - /// Dictonary of endpoint URIs, keyed by enumerated job endpoints. - /// - /// For local jobs, a job endpoint will have a value of FileStreamObject. - /// - /// The asset description text. - /// Tag dictionary. Tags can be added, removed, and updated. - /// The asset property dictionary. - /// The name of the experiment the job belongs to. If not set, the job is placed in the "Default" experiment. - /// Compute binding definition. - /// . - /// Status of the job. - /// The max run duration in seconds, after which the job will be cancelled. - /// . - /// Environment specification of the job. - /// Mapping of data bindings used in the job. - /// . - internal CommandJob(JobType jobType, JobBaseInteractionEndpoints interactionEndpoints, string description, IDictionary tags, IDictionary properties, string experimentName, ComputeBinding computeBinding, JobOutput output, JobStatus? status, long? maxRunDurationSeconds, CodeConfiguration codeConfiguration, string environmentId, IDictionary dataBindings, DistributionConfiguration distributionConfiguration) : base(jobType, interactionEndpoints, description, tags, properties, experimentName, computeBinding, output) - { - Status = status; - MaxRunDurationSeconds = maxRunDurationSeconds; - CodeConfiguration = codeConfiguration; - EnvironmentId = environmentId; - DataBindings = dataBindings; - DistributionConfiguration = distributionConfiguration; - JobType = jobType; - } - - /// Status of the job. - public JobStatus? Status { get; set; } - /// The max run duration in seconds, after which the job will be cancelled. - public long? MaxRunDurationSeconds { get; set; } - public CodeConfiguration CodeConfiguration { get; set; } - /// Environment specification of the job. - public string EnvironmentId { get; set; } - /// Mapping of data bindings used in the job. - public IDictionary DataBindings { get; } - public DistributionConfiguration DistributionConfiguration { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AssetPath.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Components1D3SwueSchemasComputeresourceAllof1.Serialization.cs similarity index 50% rename from sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AssetPath.Serialization.cs rename to sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Components1D3SwueSchemasComputeresourceAllof1.Serialization.cs index 9351a47b65189..83c087f6b8f69 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AssetPath.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Components1D3SwueSchemasComputeresourceAllof1.Serialization.cs @@ -10,44 +10,36 @@ namespace Azure.ResourceManager.MachineLearningServices.Models { - public partial class AssetPath : IUtf8JsonSerializable + public partial class Components1D3SwueSchemasComputeresourceAllof1 : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); - writer.WritePropertyName("path"); - writer.WriteStringValue(Path); - if (Optional.IsDefined(IsDirectory)) + if (Optional.IsDefined(Properties)) { - writer.WritePropertyName("isDirectory"); - writer.WriteBooleanValue(IsDirectory.Value); + writer.WritePropertyName("properties"); + writer.WriteObjectValue(Properties); } writer.WriteEndObject(); } - internal static AssetPath DeserializeAssetPath(JsonElement element) + internal static Components1D3SwueSchemasComputeresourceAllof1 DeserializeComponents1D3SwueSchemasComputeresourceAllof1(JsonElement element) { - string path = default; - Optional isDirectory = default; + Optional properties = default; foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("path")) - { - path = property.Value.GetString(); - continue; - } - if (property.NameEquals("isDirectory")) + if (property.NameEquals("properties")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } - isDirectory = property.Value.GetBoolean(); + properties = Compute.DeserializeCompute(property.Value); continue; } } - return new AssetPath(path, Optional.ToNullable(isDirectory)); + return new Components1D3SwueSchemasComputeresourceAllof1(properties.Value); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Components1D3SwueSchemasComputeresourceAllof1.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Components1D3SwueSchemasComputeresourceAllof1.cs new file mode 100644 index 0000000000000..a6fcfe6fc8e58 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Components1D3SwueSchemasComputeresourceAllof1.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The Components1D3SwueSchemasComputeresourceAllof1. + public partial class Components1D3SwueSchemasComputeresourceAllof1 + { + /// Initializes a new instance of Components1D3SwueSchemasComputeresourceAllof1. + public Components1D3SwueSchemasComputeresourceAllof1() + { + } + + /// Initializes a new instance of Components1D3SwueSchemasComputeresourceAllof1. + /// Compute properties. + internal Components1D3SwueSchemasComputeresourceAllof1(Compute properties) + { + Properties = properties; + } + + /// Compute properties. + public Compute Properties { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Compute.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Compute.Serialization.cs index 2cc3d7ecfeebf..274c4326879be 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Compute.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Compute.Serialization.cs @@ -34,6 +34,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("resourceId"); writer.WriteStringValue(ResourceId); } + if (Optional.IsDefined(DisableLocalAuth)) + { + writer.WritePropertyName("disableLocalAuth"); + writer.WriteBooleanValue(DisableLocalAuth.Value); + } writer.WriteEndObject(); } @@ -50,6 +55,8 @@ internal static Compute DeserializeCompute(JsonElement element) case "DataLakeAnalytics": return DataLakeAnalytics.DeserializeDataLakeAnalytics(element); case "Databricks": return Databricks.DeserializeDatabricks(element); case "HDInsight": return HDInsight.DeserializeHDInsight(element); + case "Kubernetes": return Kubernetes.DeserializeKubernetes(element); + case "SynapseSpark": return SynapseSpark.DeserializeSynapseSpark(element); case "VirtualMachine": return VirtualMachine.DeserializeVirtualMachine(element); } } @@ -60,8 +67,9 @@ internal static Compute DeserializeCompute(JsonElement element) Optional createdOn = default; Optional modifiedOn = default; Optional resourceId = default; - Optional> provisioningErrors = default; + Optional> provisioningErrors = default; Optional isAttachedCompute = default; + Optional disableLocalAuth = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("computeType")) @@ -121,10 +129,10 @@ internal static Compute DeserializeCompute(JsonElement element) property.ThrowNonNullablePropertyIsNull(); continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(MachineLearningServiceError.DeserializeMachineLearningServiceError(item)); + array.Add(ErrorResponse.DeserializeErrorResponse(item)); } provisioningErrors = array; continue; @@ -139,8 +147,18 @@ internal static Compute DeserializeCompute(JsonElement element) isAttachedCompute = property.Value.GetBoolean(); continue; } + if (property.NameEquals("disableLocalAuth")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + disableLocalAuth = property.Value.GetBoolean(); + continue; + } } - return new Compute(computeType, computeLocation.Value, Optional.ToNullable(provisioningState), description.Value, Optional.ToNullable(createdOn), Optional.ToNullable(modifiedOn), resourceId.Value, Optional.ToList(provisioningErrors), Optional.ToNullable(isAttachedCompute)); + return new Compute(computeType, computeLocation.Value, Optional.ToNullable(provisioningState), description.Value, Optional.ToNullable(createdOn), Optional.ToNullable(modifiedOn), resourceId.Value, Optional.ToList(provisioningErrors), Optional.ToNullable(isAttachedCompute), Optional.ToNullable(disableLocalAuth)); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Compute.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Compute.cs index 5563c78fd41c4..fd87d250acdad 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Compute.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Compute.cs @@ -17,7 +17,7 @@ public partial class Compute /// Initializes a new instance of Compute. public Compute() { - ProvisioningErrors = new ChangeTrackingList(); + ProvisioningErrors = new ChangeTrackingList(); } /// Initializes a new instance of Compute. @@ -25,12 +25,13 @@ public Compute() /// Location for the underlying compute. /// The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. /// The description of the Machine Learning compute. - /// The date and time when the compute was created. - /// The date and time when the compute was last modified. + /// The time at which the compute was created. + /// The time at which the compute was last modified. /// ARM resource id of the underlying compute. /// Errors during provisioning. /// Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning service provisioned it if false. - internal Compute(ComputeType computeType, string computeLocation, ProvisioningState? provisioningState, string description, DateTimeOffset? createdOn, DateTimeOffset? modifiedOn, string resourceId, IReadOnlyList provisioningErrors, bool? isAttachedCompute) + /// Opt-out of local authentication and ensure customers can use only MSI and AAD exclusively for authentication. + internal Compute(ComputeType computeType, string computeLocation, ProvisioningState? provisioningState, string description, DateTimeOffset? createdOn, DateTimeOffset? modifiedOn, string resourceId, IReadOnlyList provisioningErrors, bool? isAttachedCompute, bool? disableLocalAuth) { ComputeType = computeType; ComputeLocation = computeLocation; @@ -41,6 +42,7 @@ internal Compute(ComputeType computeType, string computeLocation, ProvisioningSt ResourceId = resourceId; ProvisioningErrors = provisioningErrors; IsAttachedCompute = isAttachedCompute; + DisableLocalAuth = disableLocalAuth; } /// The type of compute. @@ -51,15 +53,17 @@ internal Compute(ComputeType computeType, string computeLocation, ProvisioningSt public ProvisioningState? ProvisioningState { get; } /// The description of the Machine Learning compute. public string Description { get; set; } - /// The date and time when the compute was created. + /// The time at which the compute was created. public DateTimeOffset? CreatedOn { get; } - /// The date and time when the compute was last modified. + /// The time at which the compute was last modified. public DateTimeOffset? ModifiedOn { get; } /// ARM resource id of the underlying compute. public string ResourceId { get; set; } /// Errors during provisioning. - public IReadOnlyList ProvisioningErrors { get; } + public IReadOnlyList ProvisioningErrors { get; } /// Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning service provisioned it if false. public bool? IsAttachedCompute { get; } + /// Opt-out of local authentication and ensure customers can use only MSI and AAD exclusively for authentication. + public bool? DisableLocalAuth { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeBinding.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeBinding.Serialization.cs deleted file mode 100644 index 0ce0f1cf173e6..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeBinding.Serialization.cs +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class ComputeBinding : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(ComputeId)) - { - writer.WritePropertyName("computeId"); - writer.WriteStringValue(ComputeId); - } - if (Optional.IsDefined(NodeCount)) - { - writer.WritePropertyName("nodeCount"); - writer.WriteNumberValue(NodeCount.Value); - } - if (Optional.IsDefined(IsLocal)) - { - writer.WritePropertyName("isLocal"); - writer.WriteBooleanValue(IsLocal.Value); - } - writer.WriteEndObject(); - } - - internal static ComputeBinding DeserializeComputeBinding(JsonElement element) - { - Optional computeId = default; - Optional nodeCount = default; - Optional isLocal = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("computeId")) - { - computeId = property.Value.GetString(); - continue; - } - if (property.NameEquals("nodeCount")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - nodeCount = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("isLocal")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - isLocal = property.Value.GetBoolean(); - continue; - } - } - return new ComputeBinding(computeId.Value, Optional.ToNullable(nodeCount), Optional.ToNullable(isLocal)); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeBinding.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeBinding.cs deleted file mode 100644 index 384d1e7f69c3d..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeBinding.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// Compute binding definition. - public partial class ComputeBinding - { - /// Initializes a new instance of ComputeBinding. - public ComputeBinding() - { - } - - /// Initializes a new instance of ComputeBinding. - /// Resource ID of the compute resource. - /// Number of nodes. - /// Set to true for jobs running on local compute. - internal ComputeBinding(string computeId, int? nodeCount, bool? isLocal) - { - ComputeId = computeId; - NodeCount = nodeCount; - IsLocal = isLocal; - } - - /// Resource ID of the compute resource. - public string ComputeId { get; set; } - /// Number of nodes. - public int? NodeCount { get; set; } - /// Set to true for jobs running on local compute. - public bool? IsLocal { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeEnvironmentType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeEnvironmentType.cs deleted file mode 100644 index 4d3df69e1cb84..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeEnvironmentType.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// The compute environment type for the service. - public readonly partial struct ComputeEnvironmentType : IEquatable - { - private readonly string _value; - - /// Determines if two values are the same. - /// is null. - public ComputeEnvironmentType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string ACIValue = "ACI"; - private const string AKSValue = "AKS"; - - /// ACI. - public static ComputeEnvironmentType ACI { get; } = new ComputeEnvironmentType(ACIValue); - /// AKS. - public static ComputeEnvironmentType AKS { get; } = new ComputeEnvironmentType(AKSValue); - /// Determines if two values are the same. - public static bool operator ==(ComputeEnvironmentType left, ComputeEnvironmentType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(ComputeEnvironmentType left, ComputeEnvironmentType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator ComputeEnvironmentType(string value) => new ComputeEnvironmentType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is ComputeEnvironmentType other && Equals(other); - /// - public bool Equals(ComputeEnvironmentType 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/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeInstance.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeInstance.Serialization.cs index f6877c450bf6c..f51118dab6ed5 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeInstance.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeInstance.Serialization.cs @@ -39,6 +39,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("resourceId"); writer.WriteStringValue(ResourceId); } + if (Optional.IsDefined(DisableLocalAuth)) + { + writer.WritePropertyName("disableLocalAuth"); + writer.WriteBooleanValue(DisableLocalAuth.Value); + } writer.WriteEndObject(); } @@ -52,8 +57,9 @@ internal static ComputeInstance DeserializeComputeInstance(JsonElement element) Optional createdOn = default; Optional modifiedOn = default; Optional resourceId = default; - Optional> provisioningErrors = default; + Optional> provisioningErrors = default; Optional isAttachedCompute = default; + Optional disableLocalAuth = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("properties")) @@ -123,10 +129,10 @@ internal static ComputeInstance DeserializeComputeInstance(JsonElement element) property.ThrowNonNullablePropertyIsNull(); continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(MachineLearningServiceError.DeserializeMachineLearningServiceError(item)); + array.Add(ErrorResponse.DeserializeErrorResponse(item)); } provisioningErrors = array; continue; @@ -141,8 +147,18 @@ internal static ComputeInstance DeserializeComputeInstance(JsonElement element) isAttachedCompute = property.Value.GetBoolean(); continue; } + if (property.NameEquals("disableLocalAuth")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + disableLocalAuth = property.Value.GetBoolean(); + continue; + } } - return new ComputeInstance(computeType, computeLocation.Value, Optional.ToNullable(provisioningState), description.Value, Optional.ToNullable(createdOn), Optional.ToNullable(modifiedOn), resourceId.Value, Optional.ToList(provisioningErrors), Optional.ToNullable(isAttachedCompute), properties.Value); + return new ComputeInstance(computeType, computeLocation.Value, Optional.ToNullable(provisioningState), description.Value, Optional.ToNullable(createdOn), Optional.ToNullable(modifiedOn), resourceId.Value, Optional.ToList(provisioningErrors), Optional.ToNullable(isAttachedCompute), Optional.ToNullable(disableLocalAuth), properties.Value); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeInstance.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeInstance.cs index 75b4964509c21..650760fc9f1b7 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeInstance.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeInstance.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.MachineLearningServices.Models { - /// An Azure Machine Learning compute instance. + /// Properties(top level) of ComputeInstance. public partial class ComputeInstance : Compute { /// Initializes a new instance of ComputeInstance. @@ -24,19 +24,20 @@ public ComputeInstance() /// Location for the underlying compute. /// The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. /// The description of the Machine Learning compute. - /// The date and time when the compute was created. - /// The date and time when the compute was last modified. + /// The time at which the compute was created. + /// The time at which the compute was last modified. /// ARM resource id of the underlying compute. /// Errors during provisioning. /// Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning service provisioned it if false. - /// Compute Instance properties. - internal ComputeInstance(ComputeType computeType, string computeLocation, ProvisioningState? provisioningState, string description, DateTimeOffset? createdOn, DateTimeOffset? modifiedOn, string resourceId, IReadOnlyList provisioningErrors, bool? isAttachedCompute, ComputeInstanceProperties properties) : base(computeType, computeLocation, provisioningState, description, createdOn, modifiedOn, resourceId, provisioningErrors, isAttachedCompute) + /// Opt-out of local authentication and ensure customers can use only MSI and AAD exclusively for authentication. + /// Properties of ComputeInstance. + internal ComputeInstance(ComputeType computeType, string computeLocation, ProvisioningState? provisioningState, string description, DateTimeOffset? createdOn, DateTimeOffset? modifiedOn, string resourceId, IReadOnlyList provisioningErrors, bool? isAttachedCompute, bool? disableLocalAuth, ComputeInstanceProperties properties) : base(computeType, computeLocation, provisioningState, description, createdOn, modifiedOn, resourceId, provisioningErrors, isAttachedCompute, disableLocalAuth) { Properties = properties; ComputeType = computeType; } - /// Compute Instance properties. + /// Properties of ComputeInstance. public ComputeInstanceProperties Properties { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeInstanceProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeInstanceProperties.Serialization.cs index 1a4acf48302da..521adbb08d265 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeInstanceProperties.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeInstanceProperties.Serialization.cs @@ -46,6 +46,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("personalComputeInstanceSettings"); writer.WriteObjectValue(PersonalComputeInstanceSettings); } + if (Optional.IsDefined(SetupScripts)) + { + writer.WritePropertyName("setupScripts"); + writer.WriteObjectValue(SetupScripts); + } writer.WriteEndObject(); } @@ -58,10 +63,11 @@ internal static ComputeInstanceProperties DeserializeComputeInstanceProperties(J Optional connectivityEndpoints = default; Optional> applications = default; Optional createdBy = default; - Optional> errors = default; + Optional> errors = default; Optional state = default; Optional computeInstanceAuthorizationType = default; Optional personalComputeInstanceSettings = default; + Optional setupScripts = default; Optional lastOperation = default; foreach (var property in element.EnumerateObject()) { @@ -142,10 +148,10 @@ internal static ComputeInstanceProperties DeserializeComputeInstanceProperties(J property.ThrowNonNullablePropertyIsNull(); continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(MachineLearningServiceError.DeserializeMachineLearningServiceError(item)); + array.Add(ErrorResponse.DeserializeErrorResponse(item)); } errors = array; continue; @@ -180,6 +186,16 @@ internal static ComputeInstanceProperties DeserializeComputeInstanceProperties(J personalComputeInstanceSettings = PersonalComputeInstanceSettings.DeserializePersonalComputeInstanceSettings(property.Value); continue; } + if (property.NameEquals("setupScripts")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + setupScripts = SetupScripts.DeserializeSetupScripts(property.Value); + continue; + } if (property.NameEquals("lastOperation")) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -191,7 +207,7 @@ internal static ComputeInstanceProperties DeserializeComputeInstanceProperties(J continue; } } - return new ComputeInstanceProperties(vmSize.Value, subnet.Value, Optional.ToNullable(applicationSharingPolicy), sshSettings.Value, connectivityEndpoints.Value, Optional.ToList(applications), createdBy.Value, Optional.ToList(errors), Optional.ToNullable(state), Optional.ToNullable(computeInstanceAuthorizationType), personalComputeInstanceSettings.Value, lastOperation.Value); + return new ComputeInstanceProperties(vmSize.Value, subnet.Value, Optional.ToNullable(applicationSharingPolicy), sshSettings.Value, connectivityEndpoints.Value, Optional.ToList(applications), createdBy.Value, Optional.ToList(errors), Optional.ToNullable(state), Optional.ToNullable(computeInstanceAuthorizationType), personalComputeInstanceSettings.Value, setupScripts.Value, lastOperation.Value); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeInstanceProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeInstanceProperties.cs index 5d6b4b36f54c6..5ca725d9aaa3a 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeInstanceProperties.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeInstanceProperties.cs @@ -17,7 +17,7 @@ public partial class ComputeInstanceProperties public ComputeInstanceProperties() { Applications = new ChangeTrackingList(); - Errors = new ChangeTrackingList(); + Errors = new ChangeTrackingList(); } /// Initializes a new instance of ComputeInstanceProperties. @@ -32,8 +32,9 @@ public ComputeInstanceProperties() /// The current state of this ComputeInstance. /// The Compute Instance Authorization type. Available values are personal (default). /// Settings for a personal compute instance. + /// Details of customized scripts to execute for setting up the cluster. /// The last operation on ComputeInstance. - internal ComputeInstanceProperties(string vmSize, ResourceId subnet, ApplicationSharingPolicy? applicationSharingPolicy, ComputeInstanceSshSettings sshSettings, ComputeInstanceConnectivityEndpoints connectivityEndpoints, IReadOnlyList applications, ComputeInstanceCreatedBy createdBy, IReadOnlyList errors, ComputeInstanceState? state, ComputeInstanceAuthorizationType? computeInstanceAuthorizationType, PersonalComputeInstanceSettings personalComputeInstanceSettings, ComputeInstanceLastOperation lastOperation) + internal ComputeInstanceProperties(string vmSize, ResourceId subnet, ApplicationSharingPolicy? applicationSharingPolicy, ComputeInstanceSshSettings sshSettings, ComputeInstanceConnectivityEndpoints connectivityEndpoints, IReadOnlyList applications, ComputeInstanceCreatedBy createdBy, IReadOnlyList errors, ComputeInstanceState? state, ComputeInstanceAuthorizationType? computeInstanceAuthorizationType, PersonalComputeInstanceSettings personalComputeInstanceSettings, SetupScripts setupScripts, ComputeInstanceLastOperation lastOperation) { VmSize = vmSize; Subnet = subnet; @@ -46,6 +47,7 @@ internal ComputeInstanceProperties(string vmSize, ResourceId subnet, Application State = state; ComputeInstanceAuthorizationType = computeInstanceAuthorizationType; PersonalComputeInstanceSettings = personalComputeInstanceSettings; + SetupScripts = setupScripts; LastOperation = lastOperation; } @@ -64,13 +66,15 @@ internal ComputeInstanceProperties(string vmSize, ResourceId subnet, Application /// Describes information on user who created this ComputeInstance. public ComputeInstanceCreatedBy CreatedBy { get; } /// Collection of errors encountered on this ComputeInstance. - public IReadOnlyList Errors { get; } + public IReadOnlyList Errors { get; } /// The current state of this ComputeInstance. public ComputeInstanceState? State { get; } /// The Compute Instance Authorization type. Available values are personal (default). public ComputeInstanceAuthorizationType? ComputeInstanceAuthorizationType { get; set; } /// Settings for a personal compute instance. public PersonalComputeInstanceSettings PersonalComputeInstanceSettings { get; set; } + /// Details of customized scripts to execute for setting up the cluster. + public SetupScripts SetupScripts { get; set; } /// The last operation on ComputeInstance. public ComputeInstanceLastOperation LastOperation { get; } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeJobBase.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeJobBase.Serialization.cs deleted file mode 100644 index 794de254874e2..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeJobBase.Serialization.cs +++ /dev/null @@ -1,157 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class ComputeJobBase : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(ExperimentName)) - { - writer.WritePropertyName("experimentName"); - writer.WriteStringValue(ExperimentName); - } - writer.WritePropertyName("computeBinding"); - writer.WriteObjectValue(ComputeBinding); - if (Optional.IsDefined(Output)) - { - writer.WritePropertyName("output"); - writer.WriteObjectValue(Output); - } - writer.WritePropertyName("jobType"); - writer.WriteStringValue(JobType.ToString()); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Properties)) - { - writer.WritePropertyName("properties"); - writer.WriteStartObject(); - foreach (var item in Properties) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WriteEndObject(); - } - - internal static ComputeJobBase DeserializeComputeJobBase(JsonElement element) - { - if (element.TryGetProperty("jobType", out JsonElement discriminator)) - { - switch (discriminator.GetString()) - { - case "Command": return CommandJob.DeserializeCommandJob(element); - case "Sweep": return SweepJob.DeserializeSweepJob(element); - } - } - Optional experimentName = default; - ComputeBinding computeBinding = default; - Optional output = default; - JobType jobType = default; - Optional interactionEndpoints = default; - Optional description = default; - Optional> tags = default; - Optional> properties = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("experimentName")) - { - experimentName = property.Value.GetString(); - continue; - } - if (property.NameEquals("computeBinding")) - { - computeBinding = ComputeBinding.DeserializeComputeBinding(property.Value); - continue; - } - if (property.NameEquals("output")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - output = JobOutput.DeserializeJobOutput(property.Value); - continue; - } - if (property.NameEquals("jobType")) - { - jobType = new JobType(property.Value.GetString()); - continue; - } - if (property.NameEquals("interactionEndpoints")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - interactionEndpoints = JobBaseInteractionEndpoints.DeserializeJobBaseInteractionEndpoints(property.Value); - continue; - } - if (property.NameEquals("description")) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("tags")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - tags = dictionary; - continue; - } - if (property.NameEquals("properties")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - properties = dictionary; - continue; - } - } - return new ComputeJobBase(jobType, interactionEndpoints.Value, description.Value, Optional.ToDictionary(tags), Optional.ToDictionary(properties), experimentName.Value, computeBinding, output.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeJobBase.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeJobBase.cs deleted file mode 100644 index abe12c0e119e3..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeJobBase.cs +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// Compute job base definition. - public partial class ComputeJobBase : JobBase - { - /// Initializes a new instance of ComputeJobBase. - /// Compute binding definition. - /// is null. - public ComputeJobBase(ComputeBinding computeBinding) - { - if (computeBinding == null) - { - throw new ArgumentNullException(nameof(computeBinding)); - } - - ComputeBinding = computeBinding; - JobType = new JobType("ComputeJobBase"); - } - - /// Initializes a new instance of ComputeJobBase. - /// Specifies the type of job. - /// - /// Dictonary of endpoint URIs, keyed by enumerated job endpoints. - /// - /// For local jobs, a job endpoint will have a value of FileStreamObject. - /// - /// The asset description text. - /// Tag dictionary. Tags can be added, removed, and updated. - /// The asset property dictionary. - /// The name of the experiment the job belongs to. If not set, the job is placed in the "Default" experiment. - /// Compute binding definition. - /// . - internal ComputeJobBase(JobType jobType, JobBaseInteractionEndpoints interactionEndpoints, string description, IDictionary tags, IDictionary properties, string experimentName, ComputeBinding computeBinding, JobOutput output) : base(jobType, interactionEndpoints, description, tags, properties) - { - ExperimentName = experimentName; - ComputeBinding = computeBinding; - Output = output; - JobType = jobType; - } - - /// The name of the experiment the job belongs to. If not set, the job is placed in the "Default" experiment. - public string ExperimentName { get; set; } - /// Compute binding definition. - public ComputeBinding ComputeBinding { get; set; } - public JobOutput Output { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeNodesInformation.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeNodesInformation.Serialization.cs deleted file mode 100644 index 73a6a0529a494..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeNodesInformation.Serialization.cs +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class ComputeNodesInformation - { - internal static ComputeNodesInformation DeserializeComputeNodesInformation(JsonElement element) - { - if (element.TryGetProperty("computeType", out JsonElement discriminator)) - { - switch (discriminator.GetString()) - { - case "AmlCompute": return AmlComputeNodesInformation.DeserializeAmlComputeNodesInformation(element); - } - } - ComputeType computeType = default; - Optional nextLink = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("computeType")) - { - computeType = new ComputeType(property.Value.GetString()); - continue; - } - if (property.NameEquals("nextLink")) - { - nextLink = property.Value.GetString(); - continue; - } - } - return new ComputeNodesInformation(computeType, nextLink.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeNodesInformation.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeNodesInformation.cs deleted file mode 100644 index d8792966e3c0e..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeNodesInformation.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// Compute nodes information related to a Machine Learning compute. Might differ for every type of compute. - public partial class ComputeNodesInformation - { - /// Initializes a new instance of ComputeNodesInformation. - internal ComputeNodesInformation() - { - } - - /// Initializes a new instance of ComputeNodesInformation. - /// The type of compute. - /// The continuation token. - internal ComputeNodesInformation(ComputeType computeType, string nextLink) - { - ComputeType = computeType; - NextLink = nextLink; - } - - /// The type of compute. - internal ComputeType ComputeType { get; set; } - /// The continuation token. - public string NextLink { get; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeResource.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeResource.Serialization.cs index dd7d1ecef0358..c7fa7dd677629 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeResource.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeResource.Serialization.cs @@ -16,11 +16,6 @@ public partial class ComputeResource : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); - if (Optional.IsDefined(Properties)) - { - writer.WritePropertyName("properties"); - writer.WriteObjectValue(Properties); - } if (Optional.IsDefined(Identity)) { writer.WritePropertyName("identity"); @@ -47,41 +42,27 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("sku"); writer.WriteObjectValue(Sku); } + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"); + writer.WriteObjectValue(Properties); + } writer.WriteEndObject(); } internal static ComputeResource DeserializeComputeResource(JsonElement element) { - Optional properties = default; - Optional id = default; - Optional name = default; Optional identity = default; Optional location = default; - Optional type = default; Optional> tags = default; Optional sku = default; + Optional systemData = default; + Optional properties = default; + Optional id = default; + Optional name = default; + Optional type = default; foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("properties")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - properties = Compute.DeserializeCompute(property.Value); - continue; - } - if (property.NameEquals("id")) - { - id = property.Value.GetString(); - continue; - } - if (property.NameEquals("name")) - { - name = property.Value.GetString(); - continue; - } if (property.NameEquals("identity")) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -97,11 +78,6 @@ internal static ComputeResource DeserializeComputeResource(JsonElement element) location = property.Value.GetString(); continue; } - if (property.NameEquals("type")) - { - type = property.Value.GetString(); - continue; - } if (property.NameEquals("tags")) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -127,8 +103,43 @@ internal static ComputeResource DeserializeComputeResource(JsonElement element) sku = Sku.DeserializeSku(property.Value); continue; } + if (property.NameEquals("systemData")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + systemData = SystemData.DeserializeSystemData(property.Value); + continue; + } + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + properties = Compute.DeserializeCompute(property.Value); + continue; + } + if (property.NameEquals("id")) + { + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } } - return new ComputeResource(id.Value, name.Value, identity.Value, location.Value, type.Value, Optional.ToDictionary(tags), sku.Value, properties.Value); + return new ComputeResource(id.Value, name.Value, type.Value, identity.Value, location.Value, Optional.ToDictionary(tags), sku.Value, systemData.Value, properties.Value); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeResource.cs index 65c9430a50d11..41cbb75ba8293 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeResource.cs @@ -6,6 +6,7 @@ #nullable disable using System.Collections.Generic; +using Azure.Core; namespace Azure.ResourceManager.MachineLearningServices.Models { @@ -15,22 +16,39 @@ public partial class ComputeResource : Resource /// Initializes a new instance of ComputeResource. public ComputeResource() { + Tags = new ChangeTrackingDictionary(); } /// Initializes a new instance of ComputeResource. - /// Specifies the resource ID. - /// Specifies the name of the resource. + /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + /// The name of the resource. + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". /// The identity of the resource. /// Specifies the location of the resource. - /// Specifies the type of the resource. /// Contains resource tags defined as key/value pairs. /// The sku of the workspace. + /// System data. /// Compute properties. - internal ComputeResource(string id, string name, Identity identity, string location, string type, IDictionary tags, Sku sku, Compute properties) : base(id, name, identity, location, type, tags, sku) + internal ComputeResource(string id, string name, string type, Identity identity, string location, IDictionary tags, Sku sku, SystemData systemData, Compute properties) : base(id, name, type) { + Identity = identity; + Location = location; + Tags = tags; + Sku = sku; + SystemData = systemData; Properties = properties; } + /// The identity of the resource. + public Identity Identity { get; set; } + /// Specifies the location of the resource. + public string Location { get; set; } + /// Contains resource tags defined as key/value pairs. + public IDictionary Tags { get; } + /// The sku of the workspace. + public Sku Sku { get; set; } + /// System data. + public SystemData SystemData { get; } /// Compute properties. public Compute Properties { get; set; } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeType.cs index 536a007a707d4..e4cb31beab6f2 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeType.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeType.cs @@ -23,6 +23,7 @@ public ComputeType(string value) } private const string AKSValue = "AKS"; + private const string KubernetesValue = "Kubernetes"; private const string AmlComputeValue = "AmlCompute"; private const string ComputeInstanceValue = "ComputeInstance"; private const string DataFactoryValue = "DataFactory"; @@ -30,9 +31,12 @@ public ComputeType(string value) private const string HDInsightValue = "HDInsight"; private const string DatabricksValue = "Databricks"; private const string DataLakeAnalyticsValue = "DataLakeAnalytics"; + private const string SynapseSparkValue = "SynapseSpark"; /// AKS. public static ComputeType AKS { get; } = new ComputeType(AKSValue); + /// Kubernetes. + public static ComputeType Kubernetes { get; } = new ComputeType(KubernetesValue); /// AmlCompute. public static ComputeType AmlCompute { get; } = new ComputeType(AmlComputeValue); /// ComputeInstance. @@ -47,6 +51,8 @@ public ComputeType(string value) public static ComputeType Databricks { get; } = new ComputeType(DatabricksValue); /// DataLakeAnalytics. public static ComputeType DataLakeAnalytics { get; } = new ComputeType(DataLakeAnalyticsValue); + /// SynapseSpark. + public static ComputeType SynapseSpark { get; } = new ComputeType(SynapseSparkValue); /// Determines if two values are the same. public static bool operator ==(ComputeType left, ComputeType right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ContainerRegistry.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ContainerRegistry.Serialization.cs deleted file mode 100644 index e41dcc54c67bf..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ContainerRegistry.Serialization.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class ContainerRegistry : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Address)) - { - writer.WritePropertyName("address"); - writer.WriteStringValue(Address); - } - if (Optional.IsDefined(Username)) - { - writer.WritePropertyName("username"); - writer.WriteStringValue(Username); - } - if (Optional.IsDefined(Password)) - { - writer.WritePropertyName("password"); - writer.WriteStringValue(Password); - } - writer.WriteEndObject(); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ContainerRegistry.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ContainerRegistry.cs deleted file mode 100644 index 1948f5487a158..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ContainerRegistry.cs +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// The ContainerRegistry. - public partial class ContainerRegistry - { - /// Initializes a new instance of ContainerRegistry. - public ContainerRegistry() - { - } - - public string Address { get; set; } - public string Username { get; set; } - public string Password { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ContainerRegistryResponse.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ContainerRegistryResponse.Serialization.cs deleted file mode 100644 index 531df16af65fa..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ContainerRegistryResponse.Serialization.cs +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class ContainerRegistryResponse : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Address)) - { - writer.WritePropertyName("address"); - writer.WriteStringValue(Address); - } - writer.WriteEndObject(); - } - - internal static ContainerRegistryResponse DeserializeContainerRegistryResponse(JsonElement element) - { - Optional address = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("address")) - { - address = property.Value.GetString(); - continue; - } - } - return new ContainerRegistryResponse(address.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ContainerRegistryResponse.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ContainerRegistryResponse.cs deleted file mode 100644 index 1df496d497230..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ContainerRegistryResponse.cs +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// The ContainerRegistryResponse. - public partial class ContainerRegistryResponse - { - /// Initializes a new instance of ContainerRegistryResponse. - public ContainerRegistryResponse() - { - } - - /// Initializes a new instance of ContainerRegistryResponse. - /// . - internal ContainerRegistryResponse(string address) - { - Address = address; - } - - public string Address { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ContainerResourceRequirements.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ContainerResourceRequirements.Serialization.cs deleted file mode 100644 index 9be736206454a..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ContainerResourceRequirements.Serialization.cs +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class ContainerResourceRequirements : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Cpu)) - { - writer.WritePropertyName("cpu"); - writer.WriteNumberValue(Cpu.Value); - } - if (Optional.IsDefined(MemoryInGB)) - { - writer.WritePropertyName("memoryInGB"); - writer.WriteNumberValue(MemoryInGB.Value); - } - if (Optional.IsDefined(Gpu)) - { - writer.WritePropertyName("gpu"); - writer.WriteNumberValue(Gpu.Value); - } - if (Optional.IsDefined(Fpga)) - { - writer.WritePropertyName("fpga"); - writer.WriteNumberValue(Fpga.Value); - } - writer.WriteEndObject(); - } - - internal static ContainerResourceRequirements DeserializeContainerResourceRequirements(JsonElement element) - { - Optional cpu = default; - Optional memoryInGB = default; - Optional gpu = default; - Optional fpga = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("cpu")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - cpu = property.Value.GetDouble(); - continue; - } - if (property.NameEquals("memoryInGB")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - memoryInGB = property.Value.GetDouble(); - continue; - } - if (property.NameEquals("gpu")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - gpu = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("fpga")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - fpga = property.Value.GetInt32(); - continue; - } - } - return new ContainerResourceRequirements(Optional.ToNullable(cpu), Optional.ToNullable(memoryInGB), Optional.ToNullable(gpu), Optional.ToNullable(fpga)); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ContainerResourceRequirements.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ContainerResourceRequirements.cs index 1b833823d879d..978909c154b03 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ContainerResourceRequirements.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ContainerResourceRequirements.cs @@ -8,33 +8,36 @@ namespace Azure.ResourceManager.MachineLearningServices.Models { /// The resource requirements for the container (cpu and memory). - public partial class ContainerResourceRequirements + internal partial class ContainerResourceRequirements { /// Initializes a new instance of ContainerResourceRequirements. - public ContainerResourceRequirements() + internal ContainerResourceRequirements() { } - /// Initializes a new instance of ContainerResourceRequirements. - /// The number of CPU cores on the container. - /// The amount of memory on the container in GB. - /// The number of GPU cores in the container. - /// The number of FPGA PCIE devices exposed to the container. Must be multiple of 2. - internal ContainerResourceRequirements(double? cpu, double? memoryInGB, int? gpu, int? fpga) - { - Cpu = cpu; - MemoryInGB = memoryInGB; - Gpu = gpu; - Fpga = fpga; - } - - /// The number of CPU cores on the container. - public double? Cpu { get; set; } - /// The amount of memory on the container in GB. - public double? MemoryInGB { get; set; } + /// + /// The minimum amount of CPU cores to be used by the container. More info: + /// https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/. + /// + public double? Cpu { get; } + /// + /// The maximum amount of CPU cores allowed to be used by the container. More info: + /// https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/. + /// + public double? CpuLimit { get; } + /// + /// The minimum amount of memory (in GB) to be used by the container. More info: + /// https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/. + /// + public double? MemoryInGB { get; } + /// + /// The maximum amount of memory (in GB) allowed to be used by the container. More info: + /// https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/. + /// + public double? MemoryInGBLimit { get; } /// The number of GPU cores in the container. - public int? Gpu { get; set; } + public int? Gpu { get; } /// The number of FPGA PCIE devices exposed to the container. Must be multiple of 2. - public int? Fpga { get; set; } + public int? Fpga { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ContentsType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ContentsType.cs deleted file mode 100644 index 52cc2a09374d2..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ContentsType.cs +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// Storage type backing the datastore. - public readonly partial struct ContentsType : IEquatable - { - private readonly string _value; - - /// Determines if two values are the same. - /// is null. - public ContentsType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string AzureBlobValue = "AzureBlob"; - private const string AzureDataLakeValue = "AzureDataLake"; - private const string AzureDataLakeGen2Value = "AzureDataLakeGen2"; - private const string AzureFileValue = "AzureFile"; - private const string AzureMySqlValue = "AzureMySql"; - private const string AzurePostgreSqlValue = "AzurePostgreSql"; - private const string AzureSqlDatabaseValue = "AzureSqlDatabase"; - private const string GlusterFsValue = "GlusterFs"; - - /// AzureBlob. - public static ContentsType AzureBlob { get; } = new ContentsType(AzureBlobValue); - /// AzureDataLake. - public static ContentsType AzureDataLake { get; } = new ContentsType(AzureDataLakeValue); - /// AzureDataLakeGen2. - public static ContentsType AzureDataLakeGen2 { get; } = new ContentsType(AzureDataLakeGen2Value); - /// AzureFile. - public static ContentsType AzureFile { get; } = new ContentsType(AzureFileValue); - /// AzureMySql. - public static ContentsType AzureMySql { get; } = new ContentsType(AzureMySqlValue); - /// AzurePostgreSql. - public static ContentsType AzurePostgreSql { get; } = new ContentsType(AzurePostgreSqlValue); - /// AzureSqlDatabase. - public static ContentsType AzureSqlDatabase { get; } = new ContentsType(AzureSqlDatabaseValue); - /// GlusterFs. - public static ContentsType GlusterFs { get; } = new ContentsType(GlusterFsValue); - /// Determines if two values are the same. - public static bool operator ==(ContentsType left, ContentsType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(ContentsType left, ContentsType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator ContentsType(string value) => new ContentsType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is ContentsType other && Equals(other); - /// - public bool Equals(ContentsType 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/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CosmosDbSettings.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CosmosDbSettings.Serialization.cs new file mode 100644 index 0000000000000..f4579e398e72b --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CosmosDbSettings.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.ResourceManager.MachineLearningServices.Models +{ + public partial class CosmosDbSettings : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(CollectionsThroughput)) + { + writer.WritePropertyName("collectionsThroughput"); + writer.WriteNumberValue(CollectionsThroughput.Value); + } + writer.WriteEndObject(); + } + + internal static CosmosDbSettings DeserializeCosmosDbSettings(JsonElement element) + { + Optional collectionsThroughput = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("collectionsThroughput")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + collectionsThroughput = property.Value.GetInt32(); + continue; + } + } + return new CosmosDbSettings(Optional.ToNullable(collectionsThroughput)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CosmosDbSettings.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CosmosDbSettings.cs new file mode 100644 index 0000000000000..9d7f216d0de2e --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CosmosDbSettings.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The CosmosDbSettings. + public partial class CosmosDbSettings + { + /// Initializes a new instance of CosmosDbSettings. + public CosmosDbSettings() + { + } + + /// Initializes a new instance of CosmosDbSettings. + /// The throughput of the collections in cosmosdb database. + internal CosmosDbSettings(int? collectionsThroughput) + { + CollectionsThroughput = collectionsThroughput; + } + + /// The throughput of the collections in cosmosdb database. + public int? CollectionsThroughput { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CreateEndpointVariantRequest.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CreateEndpointVariantRequest.Serialization.cs deleted file mode 100644 index 999c685ff1fbb..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CreateEndpointVariantRequest.Serialization.cs +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class CreateEndpointVariantRequest : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(IsDefault)) - { - writer.WritePropertyName("isDefault"); - writer.WriteBooleanValue(IsDefault.Value); - } - if (Optional.IsDefined(TrafficPercentile)) - { - writer.WritePropertyName("trafficPercentile"); - writer.WriteNumberValue(TrafficPercentile.Value); - } - if (Optional.IsDefined(Type)) - { - writer.WritePropertyName("type"); - writer.WriteStringValue(Type.Value.ToString()); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(KvTags)) - { - writer.WritePropertyName("kvTags"); - writer.WriteStartObject(); - foreach (var item in KvTags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Properties)) - { - writer.WritePropertyName("properties"); - writer.WriteStartObject(); - foreach (var item in Properties) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsDefined(Keys)) - { - writer.WritePropertyName("keys"); - writer.WriteObjectValue(Keys); - } - writer.WritePropertyName("computeType"); - writer.WriteStringValue(ComputeType.ToString()); - if (Optional.IsDefined(EnvironmentImageRequest)) - { - writer.WritePropertyName("environmentImageRequest"); - writer.WriteObjectValue(EnvironmentImageRequest); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"); - writer.WriteStringValue(Location); - } - writer.WriteEndObject(); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CreateEndpointVariantRequest.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CreateEndpointVariantRequest.cs deleted file mode 100644 index 7d5f741397347..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CreateEndpointVariantRequest.cs +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// The Variant properties. - public partial class CreateEndpointVariantRequest : CreateServiceRequest - { - /// Initializes a new instance of CreateEndpointVariantRequest. - public CreateEndpointVariantRequest() - { - ComputeType = new ComputeEnvironmentType("Custom"); - } - - /// Is this the default variant. - public bool? IsDefault { get; set; } - /// The amount of traffic variant receives. - public float? TrafficPercentile { get; set; } - /// The type of the variant. - public VariantType? Type { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CreateServiceRequest.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CreateServiceRequest.Serialization.cs deleted file mode 100644 index cf323c0076291..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CreateServiceRequest.Serialization.cs +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class CreateServiceRequest : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(KvTags)) - { - writer.WritePropertyName("kvTags"); - writer.WriteStartObject(); - foreach (var item in KvTags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Properties)) - { - writer.WritePropertyName("properties"); - writer.WriteStartObject(); - foreach (var item in Properties) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsDefined(Keys)) - { - writer.WritePropertyName("keys"); - writer.WriteObjectValue(Keys); - } - writer.WritePropertyName("computeType"); - writer.WriteStringValue(ComputeType.ToString()); - if (Optional.IsDefined(EnvironmentImageRequest)) - { - writer.WritePropertyName("environmentImageRequest"); - writer.WriteObjectValue(EnvironmentImageRequest); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"); - writer.WriteStringValue(Location); - } - writer.WriteEndObject(); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CreateServiceRequest.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CreateServiceRequest.cs deleted file mode 100644 index 669f2fcb84c88..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CreateServiceRequest.cs +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// The base class for creating a service. - public partial class CreateServiceRequest - { - /// Initializes a new instance of CreateServiceRequest. - public CreateServiceRequest() - { - KvTags = new ChangeTrackingDictionary(); - Properties = new ChangeTrackingDictionary(); - } - - /// The description of the service. - public string Description { get; set; } - /// The service tag dictionary. Tags are mutable. - public IDictionary KvTags { get; } - /// The service properties dictionary. Properties are immutable. - public IDictionary Properties { get; } - /// The authentication keys. - public CreateServiceRequestKeys Keys { get; set; } - /// The compute environment type for the service. - internal ComputeEnvironmentType ComputeType { get; set; } - /// The Environment, models and assets needed for inferencing. - public CreateServiceRequestEnvironmentImageRequest EnvironmentImageRequest { get; set; } - /// The name of the Azure location/region. - public string Location { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CreateServiceRequestEnvironmentImageRequest.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CreateServiceRequestEnvironmentImageRequest.Serialization.cs deleted file mode 100644 index 1ca3e8ac60be8..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CreateServiceRequestEnvironmentImageRequest.Serialization.cs +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class CreateServiceRequestEnvironmentImageRequest : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(DriverProgram)) - { - writer.WritePropertyName("driverProgram"); - writer.WriteStringValue(DriverProgram); - } - if (Optional.IsCollectionDefined(Assets)) - { - writer.WritePropertyName("assets"); - writer.WriteStartArray(); - foreach (var item in Assets) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(ModelIds)) - { - writer.WritePropertyName("modelIds"); - writer.WriteStartArray(); - foreach (var item in ModelIds) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(Models)) - { - writer.WritePropertyName("models"); - writer.WriteStartArray(); - foreach (var item in Models) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Environment)) - { - writer.WritePropertyName("environment"); - writer.WriteObjectValue(Environment); - } - if (Optional.IsDefined(EnvironmentReference)) - { - writer.WritePropertyName("environmentReference"); - writer.WriteObjectValue(EnvironmentReference); - } - writer.WriteEndObject(); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CreateServiceRequestEnvironmentImageRequest.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CreateServiceRequestEnvironmentImageRequest.cs deleted file mode 100644 index c66ce1ddfe6e1..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CreateServiceRequestEnvironmentImageRequest.cs +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// The Environment, models and assets needed for inferencing. - public partial class CreateServiceRequestEnvironmentImageRequest : EnvironmentImageRequest - { - /// Initializes a new instance of CreateServiceRequestEnvironmentImageRequest. - public CreateServiceRequestEnvironmentImageRequest() - { - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CreateServiceRequestKeys.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CreateServiceRequestKeys.cs deleted file mode 100644 index d7ef4b5e541bf..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CreateServiceRequestKeys.cs +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// The authentication keys. - public partial class CreateServiceRequestKeys : AuthKeys - { - /// Initializes a new instance of CreateServiceRequestKeys. - public CreateServiceRequestKeys() - { - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CredentialsType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CredentialsType.cs deleted file mode 100644 index 43ad06205b90f..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CredentialsType.cs +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// Credential type used to authentication with storage. - public readonly partial struct CredentialsType : IEquatable - { - private readonly string _value; - - /// Determines if two values are the same. - /// is null. - public CredentialsType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string AccountKeyValue = "AccountKey"; - private const string CertificateValue = "Certificate"; - private const string NoneValue = "None"; - private const string SasValue = "Sas"; - private const string ServicePrincipalValue = "ServicePrincipal"; - private const string SqlAdminValue = "SqlAdmin"; - - /// AccountKey. - public static CredentialsType AccountKey { get; } = new CredentialsType(AccountKeyValue); - /// Certificate. - public static CredentialsType Certificate { get; } = new CredentialsType(CertificateValue); - /// None. - public static CredentialsType None { get; } = new CredentialsType(NoneValue); - /// Sas. - public static CredentialsType Sas { get; } = new CredentialsType(SasValue); - /// ServicePrincipal. - public static CredentialsType ServicePrincipal { get; } = new CredentialsType(ServicePrincipalValue); - /// SqlAdmin. - public static CredentialsType SqlAdmin { get; } = new CredentialsType(SqlAdminValue); - /// Determines if two values are the same. - public static bool operator ==(CredentialsType left, CredentialsType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(CredentialsType left, CredentialsType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator CredentialsType(string value) => new CredentialsType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is CredentialsType other && Equals(other); - /// - public bool Equals(CredentialsType 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/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataBinding.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataBinding.Serialization.cs deleted file mode 100644 index 3feb675e165ca..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataBinding.Serialization.cs +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class DataBinding : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(SourceDataReference)) - { - writer.WritePropertyName("sourceDataReference"); - writer.WriteStringValue(SourceDataReference); - } - if (Optional.IsDefined(LocalReference)) - { - writer.WritePropertyName("localReference"); - writer.WriteStringValue(LocalReference); - } - if (Optional.IsDefined(Mode)) - { - writer.WritePropertyName("mode"); - writer.WriteStringValue(Mode.Value.ToString()); - } - writer.WriteEndObject(); - } - - internal static DataBinding DeserializeDataBinding(JsonElement element) - { - Optional sourceDataReference = default; - Optional localReference = default; - Optional mode = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("sourceDataReference")) - { - sourceDataReference = property.Value.GetString(); - continue; - } - if (property.NameEquals("localReference")) - { - localReference = property.Value.GetString(); - continue; - } - if (property.NameEquals("mode")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - mode = new DataBindingMode(property.Value.GetString()); - continue; - } - } - return new DataBinding(sourceDataReference.Value, localReference.Value, Optional.ToNullable(mode)); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataBinding.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataBinding.cs deleted file mode 100644 index c79848ca5d4e2..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataBinding.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// Data binding definition. - public partial class DataBinding - { - /// Initializes a new instance of DataBinding. - public DataBinding() - { - } - - /// Initializes a new instance of DataBinding. - /// Reference to source data artifact. - /// Location of data inside the container process. - /// Mechanism for accessing the data artifact. - internal DataBinding(string sourceDataReference, string localReference, DataBindingMode? mode) - { - SourceDataReference = sourceDataReference; - LocalReference = localReference; - Mode = mode; - } - - /// Reference to source data artifact. - public string SourceDataReference { get; set; } - /// Location of data inside the container process. - public string LocalReference { get; set; } - /// Mechanism for accessing the data artifact. - public DataBindingMode? Mode { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataBindingMode.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataBindingMode.cs deleted file mode 100644 index 4b480697e18b3..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataBindingMode.cs +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// Mechanism for accessing the data artifact. - public readonly partial struct DataBindingMode : IEquatable - { - private readonly string _value; - - /// Determines if two values are the same. - /// is null. - public DataBindingMode(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string MountValue = "Mount"; - private const string DownloadValue = "Download"; - private const string UploadValue = "Upload"; - - /// Mount. - public static DataBindingMode Mount { get; } = new DataBindingMode(MountValue); - /// Download. - public static DataBindingMode Download { get; } = new DataBindingMode(DownloadValue); - /// Upload. - public static DataBindingMode Upload { get; } = new DataBindingMode(UploadValue); - /// Determines if two values are the same. - public static bool operator ==(DataBindingMode left, DataBindingMode right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(DataBindingMode left, DataBindingMode right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator DataBindingMode(string value) => new DataBindingMode(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is DataBindingMode other && Equals(other); - /// - public bool Equals(DataBindingMode 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/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataContainer.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataContainer.Serialization.cs deleted file mode 100644 index 85160ab2ece09..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataContainer.Serialization.cs +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class DataContainer : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Properties)) - { - writer.WritePropertyName("properties"); - writer.WriteStartObject(); - foreach (var item in Properties) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(Description); - } - writer.WriteEndObject(); - } - - internal static DataContainer DeserializeDataContainer(JsonElement element) - { - Optional> properties = default; - Optional> tags = default; - Optional description = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("properties")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - properties = dictionary; - continue; - } - if (property.NameEquals("tags")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - tags = dictionary; - continue; - } - if (property.NameEquals("description")) - { - description = property.Value.GetString(); - continue; - } - } - return new DataContainer(Optional.ToDictionary(properties), Optional.ToDictionary(tags), description.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataContainer.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataContainer.cs deleted file mode 100644 index 463d939f465f7..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataContainer.cs +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// The DataContainer. - public partial class DataContainer - { - /// Initializes a new instance of DataContainer. - public DataContainer() - { - Properties = new ChangeTrackingDictionary(); - Tags = new ChangeTrackingDictionary(); - } - - /// Initializes a new instance of DataContainer. - /// Dictionary of <string>. - /// Dictionary of <string>. - /// . - internal DataContainer(IDictionary properties, IDictionary tags, string description) - { - Properties = properties; - Tags = tags; - Description = description; - } - - /// Dictionary of <string>. - public IDictionary Properties { get; } - /// Dictionary of <string>. - public IDictionary Tags { get; } - public string Description { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataContainerResource.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataContainerResource.Serialization.cs deleted file mode 100644 index f9695df457d87..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataContainerResource.Serialization.cs +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class DataContainerResource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("properties"); - writer.WriteObjectValue(Properties); - writer.WriteEndObject(); - } - - internal static DataContainerResource DeserializeDataContainerResource(JsonElement element) - { - Optional id = default; - Optional name = default; - Optional type = default; - DataContainer properties = default; - Optional systemData = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("id")) - { - id = property.Value.GetString(); - continue; - } - if (property.NameEquals("name")) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type")) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("properties")) - { - properties = DataContainer.DeserializeDataContainer(property.Value); - continue; - } - if (property.NameEquals("systemData")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - systemData = SystemData.DeserializeSystemData(property.Value); - continue; - } - } - return new DataContainerResource(id.Value, name.Value, type.Value, properties, systemData.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataContainerResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataContainerResource.cs deleted file mode 100644 index c9623322c2c4f..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataContainerResource.cs +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// Azure Resource Manager resource envelope. - public partial class DataContainerResource - { - /// Initializes a new instance of DataContainerResource. - /// . - /// is null. - public DataContainerResource(DataContainer properties) - { - if (properties == null) - { - throw new ArgumentNullException(nameof(properties)); - } - - Properties = properties; - } - - /// Initializes a new instance of DataContainerResource. - /// The resource URL of the entity (not URL encoded). - /// The name of the resource entity. - /// The resource provider and type. - /// . - /// Metadata pertaining to creation and last modification of the resource. - internal DataContainerResource(string id, string name, string type, DataContainer properties, SystemData systemData) - { - Id = id; - Name = name; - Type = type; - Properties = properties; - SystemData = systemData; - } - - /// The resource URL of the entity (not URL encoded). - public string Id { get; } - /// The name of the resource entity. - public string Name { get; } - /// The resource provider and type. - public string Type { get; } - public DataContainer Properties { get; set; } - /// Metadata pertaining to creation and last modification of the resource. - public SystemData SystemData { get; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataContainerResourceArmPaginatedResult.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataContainerResourceArmPaginatedResult.Serialization.cs deleted file mode 100644 index 749437967a6ff..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataContainerResourceArmPaginatedResult.Serialization.cs +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - internal partial class DataContainerResourceArmPaginatedResult - { - internal static DataContainerResourceArmPaginatedResult DeserializeDataContainerResourceArmPaginatedResult(JsonElement element) - { - Optional> value = default; - Optional nextLink = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("value")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(DataContainerResource.DeserializeDataContainerResource(item)); - } - value = array; - continue; - } - if (property.NameEquals("nextLink")) - { - nextLink = property.Value.GetString(); - continue; - } - } - return new DataContainerResourceArmPaginatedResult(Optional.ToList(value), nextLink.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataContainerResourceArmPaginatedResult.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataContainerResourceArmPaginatedResult.cs deleted file mode 100644 index b9e11e30b64bc..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataContainerResourceArmPaginatedResult.cs +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// A paginated list of DataContainer entities. - internal partial class DataContainerResourceArmPaginatedResult - { - /// Initializes a new instance of DataContainerResourceArmPaginatedResult. - internal DataContainerResourceArmPaginatedResult() - { - Value = new ChangeTrackingList(); - } - - /// Initializes a new instance of DataContainerResourceArmPaginatedResult. - /// An array of objects of type DataContainer. - /// . - internal DataContainerResourceArmPaginatedResult(IReadOnlyList value, string nextLink) - { - Value = value; - NextLink = nextLink; - } - - /// An array of objects of type DataContainer. - public IReadOnlyList Value { get; } - public string NextLink { get; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataFactory.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataFactory.Serialization.cs index f49aa358dd5af..0cc1c16ac59af 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataFactory.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataFactory.Serialization.cs @@ -34,6 +34,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("resourceId"); writer.WriteStringValue(ResourceId); } + if (Optional.IsDefined(DisableLocalAuth)) + { + writer.WritePropertyName("disableLocalAuth"); + writer.WriteBooleanValue(DisableLocalAuth.Value); + } writer.WriteEndObject(); } @@ -46,8 +51,9 @@ internal static DataFactory DeserializeDataFactory(JsonElement element) Optional createdOn = default; Optional modifiedOn = default; Optional resourceId = default; - Optional> provisioningErrors = default; + Optional> provisioningErrors = default; Optional isAttachedCompute = default; + Optional disableLocalAuth = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("computeType")) @@ -107,10 +113,10 @@ internal static DataFactory DeserializeDataFactory(JsonElement element) property.ThrowNonNullablePropertyIsNull(); continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(MachineLearningServiceError.DeserializeMachineLearningServiceError(item)); + array.Add(ErrorResponse.DeserializeErrorResponse(item)); } provisioningErrors = array; continue; @@ -125,8 +131,18 @@ internal static DataFactory DeserializeDataFactory(JsonElement element) isAttachedCompute = property.Value.GetBoolean(); continue; } + if (property.NameEquals("disableLocalAuth")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + disableLocalAuth = property.Value.GetBoolean(); + continue; + } } - return new DataFactory(computeType, computeLocation.Value, Optional.ToNullable(provisioningState), description.Value, Optional.ToNullable(createdOn), Optional.ToNullable(modifiedOn), resourceId.Value, Optional.ToList(provisioningErrors), Optional.ToNullable(isAttachedCompute)); + return new DataFactory(computeType, computeLocation.Value, Optional.ToNullable(provisioningState), description.Value, Optional.ToNullable(createdOn), Optional.ToNullable(modifiedOn), resourceId.Value, Optional.ToList(provisioningErrors), Optional.ToNullable(isAttachedCompute), Optional.ToNullable(disableLocalAuth)); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataFactory.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataFactory.cs index 191615ae8cc91..d145e5603f727 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataFactory.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataFactory.cs @@ -24,12 +24,13 @@ public DataFactory() /// Location for the underlying compute. /// The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. /// The description of the Machine Learning compute. - /// The date and time when the compute was created. - /// The date and time when the compute was last modified. + /// The time at which the compute was created. + /// The time at which the compute was last modified. /// ARM resource id of the underlying compute. /// Errors during provisioning. /// Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning service provisioned it if false. - internal DataFactory(ComputeType computeType, string computeLocation, ProvisioningState? provisioningState, string description, DateTimeOffset? createdOn, DateTimeOffset? modifiedOn, string resourceId, IReadOnlyList provisioningErrors, bool? isAttachedCompute) : base(computeType, computeLocation, provisioningState, description, createdOn, modifiedOn, resourceId, provisioningErrors, isAttachedCompute) + /// Opt-out of local authentication and ensure customers can use only MSI and AAD exclusively for authentication. + internal DataFactory(ComputeType computeType, string computeLocation, ProvisioningState? provisioningState, string description, DateTimeOffset? createdOn, DateTimeOffset? modifiedOn, string resourceId, IReadOnlyList provisioningErrors, bool? isAttachedCompute, bool? disableLocalAuth) : base(computeType, computeLocation, provisioningState, description, createdOn, modifiedOn, resourceId, provisioningErrors, isAttachedCompute, disableLocalAuth) { ComputeType = computeType; } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataLakeAnalytics.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataLakeAnalytics.Serialization.cs index 7f13ac18209b4..20c0fab17aad7 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataLakeAnalytics.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataLakeAnalytics.Serialization.cs @@ -39,6 +39,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("resourceId"); writer.WriteStringValue(ResourceId); } + if (Optional.IsDefined(DisableLocalAuth)) + { + writer.WritePropertyName("disableLocalAuth"); + writer.WriteBooleanValue(DisableLocalAuth.Value); + } writer.WriteEndObject(); } @@ -52,8 +57,9 @@ internal static DataLakeAnalytics DeserializeDataLakeAnalytics(JsonElement eleme Optional createdOn = default; Optional modifiedOn = default; Optional resourceId = default; - Optional> provisioningErrors = default; + Optional> provisioningErrors = default; Optional isAttachedCompute = default; + Optional disableLocalAuth = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("properties")) @@ -123,10 +129,10 @@ internal static DataLakeAnalytics DeserializeDataLakeAnalytics(JsonElement eleme property.ThrowNonNullablePropertyIsNull(); continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(MachineLearningServiceError.DeserializeMachineLearningServiceError(item)); + array.Add(ErrorResponse.DeserializeErrorResponse(item)); } provisioningErrors = array; continue; @@ -141,8 +147,18 @@ internal static DataLakeAnalytics DeserializeDataLakeAnalytics(JsonElement eleme isAttachedCompute = property.Value.GetBoolean(); continue; } + if (property.NameEquals("disableLocalAuth")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + disableLocalAuth = property.Value.GetBoolean(); + continue; + } } - return new DataLakeAnalytics(computeType, computeLocation.Value, Optional.ToNullable(provisioningState), description.Value, Optional.ToNullable(createdOn), Optional.ToNullable(modifiedOn), resourceId.Value, Optional.ToList(provisioningErrors), Optional.ToNullable(isAttachedCompute), properties.Value); + return new DataLakeAnalytics(computeType, computeLocation.Value, Optional.ToNullable(provisioningState), description.Value, Optional.ToNullable(createdOn), Optional.ToNullable(modifiedOn), resourceId.Value, Optional.ToList(provisioningErrors), Optional.ToNullable(isAttachedCompute), Optional.ToNullable(disableLocalAuth), properties.Value); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataLakeAnalytics.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataLakeAnalytics.cs index 23e6a7f20e6b5..ea498585c7382 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataLakeAnalytics.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataLakeAnalytics.cs @@ -24,13 +24,14 @@ public DataLakeAnalytics() /// Location for the underlying compute. /// The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. /// The description of the Machine Learning compute. - /// The date and time when the compute was created. - /// The date and time when the compute was last modified. + /// The time at which the compute was created. + /// The time at which the compute was last modified. /// ARM resource id of the underlying compute. /// Errors during provisioning. /// Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning service provisioned it if false. + /// Opt-out of local authentication and ensure customers can use only MSI and AAD exclusively for authentication. /// . - internal DataLakeAnalytics(ComputeType computeType, string computeLocation, ProvisioningState? provisioningState, string description, DateTimeOffset? createdOn, DateTimeOffset? modifiedOn, string resourceId, IReadOnlyList provisioningErrors, bool? isAttachedCompute, DataLakeAnalyticsProperties properties) : base(computeType, computeLocation, provisioningState, description, createdOn, modifiedOn, resourceId, provisioningErrors, isAttachedCompute) + internal DataLakeAnalytics(ComputeType computeType, string computeLocation, ProvisioningState? provisioningState, string description, DateTimeOffset? createdOn, DateTimeOffset? modifiedOn, string resourceId, IReadOnlyList provisioningErrors, bool? isAttachedCompute, bool? disableLocalAuth, DataLakeAnalyticsProperties properties) : base(computeType, computeLocation, provisioningState, description, createdOn, modifiedOn, resourceId, provisioningErrors, isAttachedCompute, disableLocalAuth) { Properties = properties; ComputeType = computeType; diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataVersion.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataVersion.Serialization.cs deleted file mode 100644 index 698e352fe95ce..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataVersion.Serialization.cs +++ /dev/null @@ -1,138 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class DataVersion : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(DatasetType)) - { - writer.WritePropertyName("datasetType"); - writer.WriteStringValue(DatasetType.Value.ToString()); - } - if (Optional.IsDefined(DatastoreId)) - { - writer.WritePropertyName("datastoreId"); - writer.WriteStringValue(DatastoreId); - } - if (Optional.IsDefined(AssetPath)) - { - writer.WritePropertyName("assetPath"); - writer.WriteObjectValue(AssetPath); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Properties)) - { - writer.WritePropertyName("properties"); - writer.WriteStartObject(); - foreach (var item in Properties) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WriteEndObject(); - } - - internal static DataVersion DeserializeDataVersion(JsonElement element) - { - Optional datasetType = default; - Optional datastoreId = default; - Optional assetPath = default; - Optional description = default; - Optional> tags = default; - Optional> properties = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("datasetType")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - datasetType = new DatasetType(property.Value.GetString()); - continue; - } - if (property.NameEquals("datastoreId")) - { - datastoreId = property.Value.GetString(); - continue; - } - if (property.NameEquals("assetPath")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - assetPath = AssetPath.DeserializeAssetPath(property.Value); - continue; - } - if (property.NameEquals("description")) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("tags")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - tags = dictionary; - continue; - } - if (property.NameEquals("properties")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - properties = dictionary; - continue; - } - } - return new DataVersion(Optional.ToNullable(datasetType), datastoreId.Value, assetPath.Value, description.Value, Optional.ToDictionary(tags), Optional.ToDictionary(properties)); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataVersion.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataVersion.cs deleted file mode 100644 index f6ae79970cb84..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataVersion.cs +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// Details of an DatasetDto. - public partial class DataVersion - { - /// Initializes a new instance of DataVersion. - public DataVersion() - { - Tags = new ChangeTrackingDictionary(); - Properties = new ChangeTrackingDictionary(); - } - - /// Initializes a new instance of DataVersion. - /// The Format of dataset. - /// The asset datastoreId. - /// Details of an AssetUri. - /// The asset description text. - /// Tag dictionary. Tags can be added, removed, and updated. - /// The asset property dictionary. - internal DataVersion(DatasetType? datasetType, string datastoreId, AssetPath assetPath, string description, IDictionary tags, IDictionary properties) - { - DatasetType = datasetType; - DatastoreId = datastoreId; - AssetPath = assetPath; - Description = description; - Tags = tags; - Properties = properties; - } - - /// The Format of dataset. - public DatasetType? DatasetType { get; set; } - /// The asset datastoreId. - public string DatastoreId { get; set; } - /// Details of an AssetUri. - public AssetPath AssetPath { get; set; } - /// The asset description text. - public string Description { get; set; } - /// Tag dictionary. Tags can be added, removed, and updated. - public IDictionary Tags { get; } - /// The asset property dictionary. - public IDictionary Properties { get; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataVersionResource.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataVersionResource.Serialization.cs deleted file mode 100644 index 94066591d3652..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataVersionResource.Serialization.cs +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class DataVersionResource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("properties"); - writer.WriteObjectValue(Properties); - writer.WriteEndObject(); - } - - internal static DataVersionResource DeserializeDataVersionResource(JsonElement element) - { - Optional id = default; - Optional name = default; - Optional type = default; - DataVersion properties = default; - Optional systemData = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("id")) - { - id = property.Value.GetString(); - continue; - } - if (property.NameEquals("name")) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type")) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("properties")) - { - properties = DataVersion.DeserializeDataVersion(property.Value); - continue; - } - if (property.NameEquals("systemData")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - systemData = SystemData.DeserializeSystemData(property.Value); - continue; - } - } - return new DataVersionResource(id.Value, name.Value, type.Value, properties, systemData.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataVersionResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataVersionResource.cs deleted file mode 100644 index 8357ba940ecbb..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataVersionResource.cs +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// Azure Resource Manager resource envelope. - public partial class DataVersionResource - { - /// Initializes a new instance of DataVersionResource. - /// Details of an DatasetDto. - /// is null. - public DataVersionResource(DataVersion properties) - { - if (properties == null) - { - throw new ArgumentNullException(nameof(properties)); - } - - Properties = properties; - } - - /// Initializes a new instance of DataVersionResource. - /// The resource URL of the entity (not URL encoded). - /// The name of the resource entity. - /// The resource provider and type. - /// Details of an DatasetDto. - /// Metadata pertaining to creation and last modification of the resource. - internal DataVersionResource(string id, string name, string type, DataVersion properties, SystemData systemData) - { - Id = id; - Name = name; - Type = type; - Properties = properties; - SystemData = systemData; - } - - /// The resource URL of the entity (not URL encoded). - public string Id { get; } - /// The name of the resource entity. - public string Name { get; } - /// The resource provider and type. - public string Type { get; } - /// Details of an DatasetDto. - public DataVersion Properties { get; set; } - /// Metadata pertaining to creation and last modification of the resource. - public SystemData SystemData { get; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataVersionResourceArmPaginatedResult.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataVersionResourceArmPaginatedResult.Serialization.cs deleted file mode 100644 index a0693ac6bd9b9..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataVersionResourceArmPaginatedResult.Serialization.cs +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - internal partial class DataVersionResourceArmPaginatedResult - { - internal static DataVersionResourceArmPaginatedResult DeserializeDataVersionResourceArmPaginatedResult(JsonElement element) - { - Optional> value = default; - Optional nextLink = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("value")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(DataVersionResource.DeserializeDataVersionResource(item)); - } - value = array; - continue; - } - if (property.NameEquals("nextLink")) - { - nextLink = property.Value.GetString(); - continue; - } - } - return new DataVersionResourceArmPaginatedResult(Optional.ToList(value), nextLink.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataVersionResourceArmPaginatedResult.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataVersionResourceArmPaginatedResult.cs deleted file mode 100644 index a6658a2f18cb9..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataVersionResourceArmPaginatedResult.cs +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// A paginated list of DataVersion entities. - internal partial class DataVersionResourceArmPaginatedResult - { - /// Initializes a new instance of DataVersionResourceArmPaginatedResult. - internal DataVersionResourceArmPaginatedResult() - { - Value = new ChangeTrackingList(); - } - - /// Initializes a new instance of DataVersionResourceArmPaginatedResult. - /// An array of objects of type DataVersion. - /// . - internal DataVersionResourceArmPaginatedResult(IReadOnlyList value, string nextLink) - { - Value = value; - NextLink = nextLink; - } - - /// An array of objects of type DataVersion. - public IReadOnlyList Value { get; } - public string NextLink { get; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Databricks.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Databricks.Serialization.cs index f8c11dd60b7d9..6ab97e1bcaf37 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Databricks.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Databricks.Serialization.cs @@ -39,6 +39,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("resourceId"); writer.WriteStringValue(ResourceId); } + if (Optional.IsDefined(DisableLocalAuth)) + { + writer.WritePropertyName("disableLocalAuth"); + writer.WriteBooleanValue(DisableLocalAuth.Value); + } writer.WriteEndObject(); } @@ -52,8 +57,9 @@ internal static Databricks DeserializeDatabricks(JsonElement element) Optional createdOn = default; Optional modifiedOn = default; Optional resourceId = default; - Optional> provisioningErrors = default; + Optional> provisioningErrors = default; Optional isAttachedCompute = default; + Optional disableLocalAuth = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("properties")) @@ -123,10 +129,10 @@ internal static Databricks DeserializeDatabricks(JsonElement element) property.ThrowNonNullablePropertyIsNull(); continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(MachineLearningServiceError.DeserializeMachineLearningServiceError(item)); + array.Add(ErrorResponse.DeserializeErrorResponse(item)); } provisioningErrors = array; continue; @@ -141,8 +147,18 @@ internal static Databricks DeserializeDatabricks(JsonElement element) isAttachedCompute = property.Value.GetBoolean(); continue; } + if (property.NameEquals("disableLocalAuth")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + disableLocalAuth = property.Value.GetBoolean(); + continue; + } } - return new Databricks(computeType, computeLocation.Value, Optional.ToNullable(provisioningState), description.Value, Optional.ToNullable(createdOn), Optional.ToNullable(modifiedOn), resourceId.Value, Optional.ToList(provisioningErrors), Optional.ToNullable(isAttachedCompute), properties.Value); + return new Databricks(computeType, computeLocation.Value, Optional.ToNullable(provisioningState), description.Value, Optional.ToNullable(createdOn), Optional.ToNullable(modifiedOn), resourceId.Value, Optional.ToList(provisioningErrors), Optional.ToNullable(isAttachedCompute), Optional.ToNullable(disableLocalAuth), properties.Value); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Databricks.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Databricks.cs index 70930969a62d3..72db748c946a4 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Databricks.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Databricks.cs @@ -24,18 +24,20 @@ public Databricks() /// Location for the underlying compute. /// The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. /// The description of the Machine Learning compute. - /// The date and time when the compute was created. - /// The date and time when the compute was last modified. + /// The time at which the compute was created. + /// The time at which the compute was last modified. /// ARM resource id of the underlying compute. /// Errors during provisioning. /// Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning service provisioned it if false. - /// . - internal Databricks(ComputeType computeType, string computeLocation, ProvisioningState? provisioningState, string description, DateTimeOffset? createdOn, DateTimeOffset? modifiedOn, string resourceId, IReadOnlyList provisioningErrors, bool? isAttachedCompute, DatabricksProperties properties) : base(computeType, computeLocation, provisioningState, description, createdOn, modifiedOn, resourceId, provisioningErrors, isAttachedCompute) + /// Opt-out of local authentication and ensure customers can use only MSI and AAD exclusively for authentication. + /// Properties of Databricks. + internal Databricks(ComputeType computeType, string computeLocation, ProvisioningState? provisioningState, string description, DateTimeOffset? createdOn, DateTimeOffset? modifiedOn, string resourceId, IReadOnlyList provisioningErrors, bool? isAttachedCompute, bool? disableLocalAuth, DatabricksProperties properties) : base(computeType, computeLocation, provisioningState, description, createdOn, modifiedOn, resourceId, provisioningErrors, isAttachedCompute, disableLocalAuth) { Properties = properties; ComputeType = computeType; } + /// Properties of Databricks. public DatabricksProperties Properties { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatabricksComputeSecretsProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatabricksComputeSecretsProperties.Serialization.cs new file mode 100644 index 0000000000000..d0371eb77a96d --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatabricksComputeSecretsProperties.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.ResourceManager.MachineLearningServices.Models +{ + public partial class DatabricksComputeSecretsProperties + { + internal static DatabricksComputeSecretsProperties DeserializeDatabricksComputeSecretsProperties(JsonElement element) + { + Optional databricksAccessToken = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("databricksAccessToken")) + { + databricksAccessToken = property.Value.GetString(); + continue; + } + } + return new DatabricksComputeSecretsProperties(databricksAccessToken.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatabricksComputeSecretsProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatabricksComputeSecretsProperties.cs new file mode 100644 index 0000000000000..932fc84669874 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatabricksComputeSecretsProperties.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Properties of Databricks Compute Secrets. + public partial class DatabricksComputeSecretsProperties + { + /// Initializes a new instance of DatabricksComputeSecretsProperties. + internal DatabricksComputeSecretsProperties() + { + } + + /// Initializes a new instance of DatabricksComputeSecretsProperties. + /// access token for databricks account. + internal DatabricksComputeSecretsProperties(string databricksAccessToken) + { + DatabricksAccessToken = databricksAccessToken; + } + + /// access token for databricks account. + public string DatabricksAccessToken { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatabricksProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatabricksProperties.Serialization.cs index 234e25e38c332..5593dcf0771cd 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatabricksProperties.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatabricksProperties.Serialization.cs @@ -20,12 +20,18 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("databricksAccessToken"); writer.WriteStringValue(DatabricksAccessToken); } + if (Optional.IsDefined(WorkspaceUrl)) + { + writer.WritePropertyName("workspaceUrl"); + writer.WriteStringValue(WorkspaceUrl); + } writer.WriteEndObject(); } internal static DatabricksProperties DeserializeDatabricksProperties(JsonElement element) { Optional databricksAccessToken = default; + Optional workspaceUrl = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("databricksAccessToken")) @@ -33,8 +39,13 @@ internal static DatabricksProperties DeserializeDatabricksProperties(JsonElement databricksAccessToken = property.Value.GetString(); continue; } + if (property.NameEquals("workspaceUrl")) + { + workspaceUrl = property.Value.GetString(); + continue; + } } - return new DatabricksProperties(databricksAccessToken.Value); + return new DatabricksProperties(databricksAccessToken.Value, workspaceUrl.Value); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatabricksProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatabricksProperties.cs index 708fdab7ae82b..2db67e7f296b8 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatabricksProperties.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatabricksProperties.cs @@ -7,7 +7,7 @@ namespace Azure.ResourceManager.MachineLearningServices.Models { - /// The DatabricksProperties. + /// Properties of Databricks. public partial class DatabricksProperties { /// Initializes a new instance of DatabricksProperties. @@ -17,12 +17,16 @@ public DatabricksProperties() /// Initializes a new instance of DatabricksProperties. /// Databricks access token. - internal DatabricksProperties(string databricksAccessToken) + /// Workspace Url. + internal DatabricksProperties(string databricksAccessToken, string workspaceUrl) { DatabricksAccessToken = databricksAccessToken; + WorkspaceUrl = workspaceUrl; } /// Databricks access token. public string DatabricksAccessToken { get; set; } + /// Workspace Url. + public string WorkspaceUrl { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatasetReference.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatasetReference.Serialization.cs deleted file mode 100644 index 71b901ed510ea..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatasetReference.Serialization.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class DatasetReference : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(Name); - } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"); - writer.WriteStringValue(Id); - } - writer.WriteEndObject(); - } - - internal static DatasetReference DeserializeDatasetReference(JsonElement element) - { - Optional name = default; - Optional id = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("name")) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("id")) - { - id = property.Value.GetString(); - continue; - } - } - return new DatasetReference(name.Value, id.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatasetReference.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatasetReference.cs deleted file mode 100644 index 105fa0f59fd01..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatasetReference.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// The dataset reference object. - public partial class DatasetReference - { - /// Initializes a new instance of DatasetReference. - public DatasetReference() - { - } - - /// Initializes a new instance of DatasetReference. - /// The name of the dataset reference. - /// The id of the dataset reference. - internal DatasetReference(string name, string id) - { - Name = name; - Id = id; - } - - /// The name of the dataset reference. - public string Name { get; set; } - /// The id of the dataset reference. - public string Id { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatasetType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatasetType.cs deleted file mode 100644 index 6f819b1970874..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatasetType.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// The Format of dataset. - public readonly partial struct DatasetType : IEquatable - { - private readonly string _value; - - /// Determines if two values are the same. - /// is null. - public DatasetType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string SimpleValue = "Simple"; - private const string DataflowValue = "Dataflow"; - - /// Simple. - public static DatasetType Simple { get; } = new DatasetType(SimpleValue); - /// Dataflow. - public static DatasetType Dataflow { get; } = new DatasetType(DataflowValue); - /// Determines if two values are the same. - public static bool operator ==(DatasetType left, DatasetType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(DatasetType left, DatasetType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator DatasetType(string value) => new DatasetType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is DatasetType other && Equals(other); - /// - public bool Equals(DatasetType 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/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatastoreContents.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatastoreContents.Serialization.cs deleted file mode 100644 index 5ea586c4af6e2..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatastoreContents.Serialization.cs +++ /dev/null @@ -1,133 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class DatastoreContents : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"); - writer.WriteStringValue(Type.ToString()); - if (Optional.IsDefined(AzureDataLake)) - { - writer.WritePropertyName("azureDataLake"); - writer.WriteObjectValue(AzureDataLake); - } - if (Optional.IsDefined(AzureMySql)) - { - writer.WritePropertyName("azureMySql"); - writer.WriteObjectValue(AzureMySql); - } - if (Optional.IsDefined(AzurePostgreSql)) - { - writer.WritePropertyName("azurePostgreSql"); - writer.WriteObjectValue(AzurePostgreSql); - } - if (Optional.IsDefined(AzureSqlDatabase)) - { - writer.WritePropertyName("azureSqlDatabase"); - writer.WriteObjectValue(AzureSqlDatabase); - } - if (Optional.IsDefined(AzureStorage)) - { - writer.WritePropertyName("azureStorage"); - writer.WriteObjectValue(AzureStorage); - } - if (Optional.IsDefined(GlusterFs)) - { - writer.WritePropertyName("glusterFs"); - writer.WriteObjectValue(GlusterFs); - } - writer.WriteEndObject(); - } - - internal static DatastoreContents DeserializeDatastoreContents(JsonElement element) - { - ContentsType type = default; - Optional azureDataLake = default; - Optional azureMySql = default; - Optional azurePostgreSql = default; - Optional azureSqlDatabase = default; - Optional azureStorage = default; - Optional glusterFs = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type")) - { - type = new ContentsType(property.Value.GetString()); - continue; - } - if (property.NameEquals("azureDataLake")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - azureDataLake = AzureDataLakeSection.DeserializeAzureDataLakeSection(property.Value); - continue; - } - if (property.NameEquals("azureMySql")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - azureMySql = AzureMySqlSection.DeserializeAzureMySqlSection(property.Value); - continue; - } - if (property.NameEquals("azurePostgreSql")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - azurePostgreSql = AzurePostgreSqlSection.DeserializeAzurePostgreSqlSection(property.Value); - continue; - } - if (property.NameEquals("azureSqlDatabase")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - azureSqlDatabase = AzureSqlDatabaseSection.DeserializeAzureSqlDatabaseSection(property.Value); - continue; - } - if (property.NameEquals("azureStorage")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - azureStorage = AzureStorageSection.DeserializeAzureStorageSection(property.Value); - continue; - } - if (property.NameEquals("glusterFs")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - glusterFs = GlusterFsSection.DeserializeGlusterFsSection(property.Value); - continue; - } - } - return new DatastoreContents(type, azureDataLake.Value, azureMySql.Value, azurePostgreSql.Value, azureSqlDatabase.Value, azureStorage.Value, glusterFs.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatastoreContents.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatastoreContents.cs deleted file mode 100644 index b739d355dd036..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatastoreContents.cs +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// The DatastoreContents. - public partial class DatastoreContents - { - /// Initializes a new instance of DatastoreContents. - /// Storage type backing the datastore. - public DatastoreContents(ContentsType type) - { - Type = type; - } - - /// Initializes a new instance of DatastoreContents. - /// Storage type backing the datastore. - /// . - /// . - /// . - /// . - /// . - /// . - internal DatastoreContents(ContentsType type, AzureDataLakeSection azureDataLake, AzureMySqlSection azureMySql, AzurePostgreSqlSection azurePostgreSql, AzureSqlDatabaseSection azureSqlDatabase, AzureStorageSection azureStorage, GlusterFsSection glusterFs) - { - Type = type; - AzureDataLake = azureDataLake; - AzureMySql = azureMySql; - AzurePostgreSql = azurePostgreSql; - AzureSqlDatabase = azureSqlDatabase; - AzureStorage = azureStorage; - GlusterFs = glusterFs; - } - - /// Storage type backing the datastore. - public ContentsType Type { get; set; } - public AzureDataLakeSection AzureDataLake { get; set; } - public AzureMySqlSection AzureMySql { get; set; } - public AzurePostgreSqlSection AzurePostgreSql { get; set; } - public AzureSqlDatabaseSection AzureSqlDatabase { get; set; } - public AzureStorageSection AzureStorage { get; set; } - public GlusterFsSection GlusterFs { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatastoreCredentials.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatastoreCredentials.Serialization.cs deleted file mode 100644 index 91e75d4f54326..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatastoreCredentials.Serialization.cs +++ /dev/null @@ -1,117 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class DatastoreCredentials : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"); - writer.WriteStringValue(Type.ToString()); - if (Optional.IsDefined(AccountKey)) - { - writer.WritePropertyName("accountKey"); - writer.WriteObjectValue(AccountKey); - } - if (Optional.IsDefined(Certificate)) - { - writer.WritePropertyName("certificate"); - writer.WriteObjectValue(Certificate); - } - if (Optional.IsDefined(Sas)) - { - writer.WritePropertyName("sas"); - writer.WriteObjectValue(Sas); - } - if (Optional.IsDefined(ServicePrincipal)) - { - writer.WritePropertyName("servicePrincipal"); - writer.WriteObjectValue(ServicePrincipal); - } - if (Optional.IsDefined(SqlAdmin)) - { - writer.WritePropertyName("sqlAdmin"); - writer.WriteObjectValue(SqlAdmin); - } - writer.WriteEndObject(); - } - - internal static DatastoreCredentials DeserializeDatastoreCredentials(JsonElement element) - { - CredentialsType type = default; - Optional accountKey = default; - Optional certificate = default; - Optional sas = default; - Optional servicePrincipal = default; - Optional sqlAdmin = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type")) - { - type = new CredentialsType(property.Value.GetString()); - continue; - } - if (property.NameEquals("accountKey")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - accountKey = AccountKeySection.DeserializeAccountKeySection(property.Value); - continue; - } - if (property.NameEquals("certificate")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - certificate = CertificateSection.DeserializeCertificateSection(property.Value); - continue; - } - if (property.NameEquals("sas")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - sas = SasSection.DeserializeSasSection(property.Value); - continue; - } - if (property.NameEquals("servicePrincipal")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - servicePrincipal = ServicePrincipalSection.DeserializeServicePrincipalSection(property.Value); - continue; - } - if (property.NameEquals("sqlAdmin")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - sqlAdmin = SqlAdminSection.DeserializeSqlAdminSection(property.Value); - continue; - } - } - return new DatastoreCredentials(type, accountKey.Value, certificate.Value, sas.Value, servicePrincipal.Value, sqlAdmin.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatastoreCredentials.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatastoreCredentials.cs deleted file mode 100644 index 9f0526e71f571..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatastoreCredentials.cs +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// The DatastoreCredentials. - public partial class DatastoreCredentials - { - /// Initializes a new instance of DatastoreCredentials. - /// Credential type used to authentication with storage. - public DatastoreCredentials(CredentialsType type) - { - Type = type; - } - - /// Initializes a new instance of DatastoreCredentials. - /// Credential type used to authentication with storage. - /// . - /// . - /// . - /// . - /// . - internal DatastoreCredentials(CredentialsType type, AccountKeySection accountKey, CertificateSection certificate, SasSection sas, ServicePrincipalSection servicePrincipal, SqlAdminSection sqlAdmin) - { - Type = type; - AccountKey = accountKey; - Certificate = certificate; - Sas = sas; - ServicePrincipal = servicePrincipal; - SqlAdmin = sqlAdmin; - } - - /// Credential type used to authentication with storage. - public CredentialsType Type { get; set; } - public AccountKeySection AccountKey { get; set; } - public CertificateSection Certificate { get; set; } - public SasSection Sas { get; set; } - public ServicePrincipalSection ServicePrincipal { get; set; } - public SqlAdminSection SqlAdmin { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatastoreProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatastoreProperties.Serialization.cs deleted file mode 100644 index fe39cc06879ac..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatastoreProperties.Serialization.cs +++ /dev/null @@ -1,146 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class DatastoreProperties : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("contents"); - writer.WriteObjectValue(Contents); - if (Optional.IsDefined(IsDefault)) - { - writer.WritePropertyName("isDefault"); - writer.WriteBooleanValue(IsDefault.Value); - } - if (Optional.IsDefined(LinkedInfo)) - { - writer.WritePropertyName("linkedInfo"); - writer.WriteObjectValue(LinkedInfo); - } - if (Optional.IsCollectionDefined(Properties)) - { - writer.WritePropertyName("properties"); - writer.WriteStartObject(); - foreach (var item in Properties) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WriteEndObject(); - } - - internal static DatastoreProperties DeserializeDatastoreProperties(JsonElement element) - { - DatastoreContents contents = default; - Optional hasBeenValidated = default; - Optional isDefault = default; - Optional linkedInfo = default; - Optional> properties = default; - Optional description = default; - Optional> tags = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("contents")) - { - contents = DatastoreContents.DeserializeDatastoreContents(property.Value); - continue; - } - if (property.NameEquals("hasBeenValidated")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - hasBeenValidated = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("isDefault")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - isDefault = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("linkedInfo")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - linkedInfo = LinkedInfo.DeserializeLinkedInfo(property.Value); - continue; - } - if (property.NameEquals("properties")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - properties = dictionary; - continue; - } - if (property.NameEquals("description")) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("tags")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - tags = dictionary; - continue; - } - } - return new DatastoreProperties(contents, Optional.ToNullable(hasBeenValidated), Optional.ToNullable(isDefault), linkedInfo.Value, Optional.ToDictionary(properties), description.Value, Optional.ToDictionary(tags)); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatastoreProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatastoreProperties.cs deleted file mode 100644 index 0424d364f9f02..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatastoreProperties.cs +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// The DatastoreProperties. - public partial class DatastoreProperties - { - /// Initializes a new instance of DatastoreProperties. - /// . - /// is null. - public DatastoreProperties(DatastoreContents contents) - { - if (contents == null) - { - throw new ArgumentNullException(nameof(contents)); - } - - Contents = contents; - Properties = new ChangeTrackingDictionary(); - Tags = new ChangeTrackingDictionary(); - } - - /// Initializes a new instance of DatastoreProperties. - /// . - /// Whether the service has validated access to the datastore with the provided credentials. - /// Whether this datastore is the default for the workspace. - /// . - /// Dictionary of <string>. - /// The asset description text. - /// Tag dictionary. Tags can be added, removed, and updated. - internal DatastoreProperties(DatastoreContents contents, bool? hasBeenValidated, bool? isDefault, LinkedInfo linkedInfo, IDictionary properties, string description, IDictionary tags) - { - Contents = contents; - HasBeenValidated = hasBeenValidated; - IsDefault = isDefault; - LinkedInfo = linkedInfo; - Properties = properties; - Description = description; - Tags = tags; - } - - public DatastoreContents Contents { get; set; } - /// Whether the service has validated access to the datastore with the provided credentials. - public bool? HasBeenValidated { get; } - /// Whether this datastore is the default for the workspace. - public bool? IsDefault { get; set; } - public LinkedInfo LinkedInfo { get; set; } - /// Dictionary of <string>. - public IDictionary Properties { get; } - /// The asset description text. - public string Description { get; set; } - /// Tag dictionary. Tags can be added, removed, and updated. - public IDictionary Tags { get; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatastorePropertiesResource.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatastorePropertiesResource.Serialization.cs deleted file mode 100644 index 15142b30ab3dd..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatastorePropertiesResource.Serialization.cs +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class DatastorePropertiesResource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("properties"); - writer.WriteObjectValue(Properties); - writer.WriteEndObject(); - } - - internal static DatastorePropertiesResource DeserializeDatastorePropertiesResource(JsonElement element) - { - Optional id = default; - Optional name = default; - Optional type = default; - DatastoreProperties properties = default; - Optional systemData = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("id")) - { - id = property.Value.GetString(); - continue; - } - if (property.NameEquals("name")) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type")) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("properties")) - { - properties = DatastoreProperties.DeserializeDatastoreProperties(property.Value); - continue; - } - if (property.NameEquals("systemData")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - systemData = SystemData.DeserializeSystemData(property.Value); - continue; - } - } - return new DatastorePropertiesResource(id.Value, name.Value, type.Value, properties, systemData.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatastorePropertiesResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatastorePropertiesResource.cs deleted file mode 100644 index c13d2d9c24aeb..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatastorePropertiesResource.cs +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// Azure Resource Manager resource envelope. - public partial class DatastorePropertiesResource - { - /// Initializes a new instance of DatastorePropertiesResource. - /// . - /// is null. - public DatastorePropertiesResource(DatastoreProperties properties) - { - if (properties == null) - { - throw new ArgumentNullException(nameof(properties)); - } - - Properties = properties; - } - - /// Initializes a new instance of DatastorePropertiesResource. - /// The resource URL of the entity (not URL encoded). - /// The name of the resource entity. - /// The resource provider and type. - /// . - /// Metadata pertaining to creation and last modification of the resource. - internal DatastorePropertiesResource(string id, string name, string type, DatastoreProperties properties, SystemData systemData) - { - Id = id; - Name = name; - Type = type; - Properties = properties; - SystemData = systemData; - } - - /// The resource URL of the entity (not URL encoded). - public string Id { get; } - /// The name of the resource entity. - public string Name { get; } - /// The resource provider and type. - public string Type { get; } - public DatastoreProperties Properties { get; set; } - /// Metadata pertaining to creation and last modification of the resource. - public SystemData SystemData { get; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatastorePropertiesResourceArmPaginatedResult.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatastorePropertiesResourceArmPaginatedResult.Serialization.cs deleted file mode 100644 index 7c9fc93356b51..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatastorePropertiesResourceArmPaginatedResult.Serialization.cs +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - internal partial class DatastorePropertiesResourceArmPaginatedResult - { - internal static DatastorePropertiesResourceArmPaginatedResult DeserializeDatastorePropertiesResourceArmPaginatedResult(JsonElement element) - { - Optional> value = default; - Optional nextLink = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("value")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(DatastorePropertiesResource.DeserializeDatastorePropertiesResource(item)); - } - value = array; - continue; - } - if (property.NameEquals("nextLink")) - { - nextLink = property.Value.GetString(); - continue; - } - } - return new DatastorePropertiesResourceArmPaginatedResult(Optional.ToList(value), nextLink.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatastorePropertiesResourceArmPaginatedResult.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatastorePropertiesResourceArmPaginatedResult.cs deleted file mode 100644 index 6787cadce6cfd..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatastorePropertiesResourceArmPaginatedResult.cs +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// A paginated list of DatastoreProperties entities. - internal partial class DatastorePropertiesResourceArmPaginatedResult - { - /// Initializes a new instance of DatastorePropertiesResourceArmPaginatedResult. - internal DatastorePropertiesResourceArmPaginatedResult() - { - Value = new ChangeTrackingList(); - } - - /// Initializes a new instance of DatastorePropertiesResourceArmPaginatedResult. - /// An array of objects of type DatastoreProperties. - /// . - internal DatastorePropertiesResourceArmPaginatedResult(IReadOnlyList value, string nextLink) - { - Value = value; - NextLink = nextLink; - } - - /// An array of objects of type DatastoreProperties. - public IReadOnlyList Value { get; } - public string NextLink { get; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DeploymentType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DeploymentType.cs deleted file mode 100644 index f0b70f17cbb2b..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DeploymentType.cs +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// The deployment type for the service. - public readonly partial struct DeploymentType : IEquatable - { - private readonly string _value; - - /// Determines if two values are the same. - /// is null. - public DeploymentType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string GrpcRealtimeEndpointValue = "GRPCRealtimeEndpoint"; - private const string HttpRealtimeEndpointValue = "HttpRealtimeEndpoint"; - private const string BatchValue = "Batch"; - - /// GRPCRealtimeEndpoint. - public static DeploymentType GrpcRealtimeEndpoint { get; } = new DeploymentType(GrpcRealtimeEndpointValue); - /// HttpRealtimeEndpoint. - public static DeploymentType HttpRealtimeEndpoint { get; } = new DeploymentType(HttpRealtimeEndpointValue); - /// Batch. - public static DeploymentType Batch { get; } = new DeploymentType(BatchValue); - /// Determines if two values are the same. - public static bool operator ==(DeploymentType left, DeploymentType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(DeploymentType left, DeploymentType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator DeploymentType(string value) => new DeploymentType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is DeploymentType other && Equals(other); - /// - public bool Equals(DeploymentType 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/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DiagnoseRequestProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DiagnoseRequestProperties.Serialization.cs new file mode 100644 index 0000000000000..72b2f210ecfb6 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DiagnoseRequestProperties.Serialization.cs @@ -0,0 +1,120 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class DiagnoseRequestProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Udr)) + { + writer.WritePropertyName("udr"); + writer.WriteStartObject(); + foreach (var item in Udr) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsCollectionDefined(Nsg)) + { + writer.WritePropertyName("nsg"); + writer.WriteStartObject(); + foreach (var item in Nsg) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsCollectionDefined(ResourceLock)) + { + writer.WritePropertyName("resourceLock"); + writer.WriteStartObject(); + foreach (var item in ResourceLock) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsCollectionDefined(DnsResolution)) + { + writer.WritePropertyName("dnsResolution"); + writer.WriteStartObject(); + foreach (var item in DnsResolution) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsCollectionDefined(StorageAccount)) + { + writer.WritePropertyName("storageAccount"); + writer.WriteStartObject(); + foreach (var item in StorageAccount) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsCollectionDefined(KeyVault)) + { + writer.WritePropertyName("keyVault"); + writer.WriteStartObject(); + foreach (var item in KeyVault) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsCollectionDefined(ContainerRegistry)) + { + writer.WritePropertyName("containerRegistry"); + writer.WriteStartObject(); + foreach (var item in ContainerRegistry) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsCollectionDefined(ApplicationInsights)) + { + writer.WritePropertyName("applicationInsights"); + writer.WriteStartObject(); + foreach (var item in ApplicationInsights) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsCollectionDefined(Others)) + { + writer.WritePropertyName("others"); + writer.WriteStartObject(); + foreach (var item in Others) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WriteEndObject(); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DiagnoseRequestProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DiagnoseRequestProperties.cs new file mode 100644 index 0000000000000..804736ee3006a --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DiagnoseRequestProperties.cs @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The DiagnoseRequestProperties. + public partial class DiagnoseRequestProperties + { + /// Initializes a new instance of DiagnoseRequestProperties. + public DiagnoseRequestProperties() + { + Udr = new ChangeTrackingDictionary(); + Nsg = new ChangeTrackingDictionary(); + ResourceLock = new ChangeTrackingDictionary(); + DnsResolution = new ChangeTrackingDictionary(); + StorageAccount = new ChangeTrackingDictionary(); + KeyVault = new ChangeTrackingDictionary(); + ContainerRegistry = new ChangeTrackingDictionary(); + ApplicationInsights = new ChangeTrackingDictionary(); + Others = new ChangeTrackingDictionary(); + } + + /// Setting for diagnosing user defined routing. + public IDictionary Udr { get; } + /// Setting for diagnosing network security group. + public IDictionary Nsg { get; } + /// Setting for diagnosing resource lock. + public IDictionary ResourceLock { get; } + /// Setting for diagnosing dns resolution. + public IDictionary DnsResolution { get; } + /// Setting for diagnosing dependent storage account. + public IDictionary StorageAccount { get; } + /// Setting for diagnosing dependent key vault. + public IDictionary KeyVault { get; } + /// Setting for diagnosing dependent container registry. + public IDictionary ContainerRegistry { get; } + /// Setting for diagnosing dependent application insights. + public IDictionary ApplicationInsights { get; } + /// Setting for diagnosing unclassified category of problems. + public IDictionary Others { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DiagnoseResponseResult.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DiagnoseResponseResult.Serialization.cs new file mode 100644 index 0000000000000..1a5d244a784e5 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DiagnoseResponseResult.Serialization.cs @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class DiagnoseResponseResult + { + internal static DiagnoseResponseResult DeserializeDiagnoseResponseResult(JsonElement element) + { + Optional value = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + value = DiagnoseResponseResultValue.DeserializeDiagnoseResponseResultValue(property.Value); + continue; + } + } + return new DiagnoseResponseResult(value.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DiagnoseResponseResult.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DiagnoseResponseResult.cs new file mode 100644 index 0000000000000..df7cd0bd5f4f6 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DiagnoseResponseResult.cs @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The DiagnoseResponseResult. + public partial class DiagnoseResponseResult + { + /// Initializes a new instance of DiagnoseResponseResult. + internal DiagnoseResponseResult() + { + } + + /// Initializes a new instance of DiagnoseResponseResult. + /// . + internal DiagnoseResponseResult(DiagnoseResponseResultValue value) + { + Value = value; + } + + public DiagnoseResponseResultValue Value { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DiagnoseResponseResultValue.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DiagnoseResponseResultValue.Serialization.cs new file mode 100644 index 0000000000000..0313ceeb469b8 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DiagnoseResponseResultValue.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.ResourceManager.MachineLearningServices.Models +{ + public partial class DiagnoseResponseResultValue + { + internal static DiagnoseResponseResultValue DeserializeDiagnoseResponseResultValue(JsonElement element) + { + Optional> userDefinedRouteResults = default; + Optional> networkSecurityRuleResults = default; + Optional> resourceLockResults = default; + Optional> dnsResolutionResults = default; + Optional> storageAccountResults = default; + Optional> keyVaultResults = default; + Optional> containerRegistryResults = default; + Optional> applicationInsightsResults = default; + Optional> otherResults = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("userDefinedRouteResults")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DiagnoseResult.DeserializeDiagnoseResult(item)); + } + userDefinedRouteResults = array; + continue; + } + if (property.NameEquals("networkSecurityRuleResults")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DiagnoseResult.DeserializeDiagnoseResult(item)); + } + networkSecurityRuleResults = array; + continue; + } + if (property.NameEquals("resourceLockResults")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DiagnoseResult.DeserializeDiagnoseResult(item)); + } + resourceLockResults = array; + continue; + } + if (property.NameEquals("dnsResolutionResults")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DiagnoseResult.DeserializeDiagnoseResult(item)); + } + dnsResolutionResults = array; + continue; + } + if (property.NameEquals("storageAccountResults")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DiagnoseResult.DeserializeDiagnoseResult(item)); + } + storageAccountResults = array; + continue; + } + if (property.NameEquals("keyVaultResults")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DiagnoseResult.DeserializeDiagnoseResult(item)); + } + keyVaultResults = array; + continue; + } + if (property.NameEquals("containerRegistryResults")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DiagnoseResult.DeserializeDiagnoseResult(item)); + } + containerRegistryResults = array; + continue; + } + if (property.NameEquals("applicationInsightsResults")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DiagnoseResult.DeserializeDiagnoseResult(item)); + } + applicationInsightsResults = array; + continue; + } + if (property.NameEquals("otherResults")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DiagnoseResult.DeserializeDiagnoseResult(item)); + } + otherResults = array; + continue; + } + } + return new DiagnoseResponseResultValue(Optional.ToList(userDefinedRouteResults), Optional.ToList(networkSecurityRuleResults), Optional.ToList(resourceLockResults), Optional.ToList(dnsResolutionResults), Optional.ToList(storageAccountResults), Optional.ToList(keyVaultResults), Optional.ToList(containerRegistryResults), Optional.ToList(applicationInsightsResults), Optional.ToList(otherResults)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DiagnoseResponseResultValue.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DiagnoseResponseResultValue.cs new file mode 100644 index 0000000000000..1ef3388688a23 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DiagnoseResponseResultValue.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The DiagnoseResponseResultValue. + public partial class DiagnoseResponseResultValue + { + /// Initializes a new instance of DiagnoseResponseResultValue. + internal DiagnoseResponseResultValue() + { + UserDefinedRouteResults = new ChangeTrackingList(); + NetworkSecurityRuleResults = new ChangeTrackingList(); + ResourceLockResults = new ChangeTrackingList(); + DnsResolutionResults = new ChangeTrackingList(); + StorageAccountResults = new ChangeTrackingList(); + KeyVaultResults = new ChangeTrackingList(); + ContainerRegistryResults = new ChangeTrackingList(); + ApplicationInsightsResults = new ChangeTrackingList(); + OtherResults = new ChangeTrackingList(); + } + + /// Initializes a new instance of DiagnoseResponseResultValue. + /// . + /// . + /// . + /// . + /// . + /// . + /// . + /// . + /// . + internal DiagnoseResponseResultValue(IReadOnlyList userDefinedRouteResults, IReadOnlyList networkSecurityRuleResults, IReadOnlyList resourceLockResults, IReadOnlyList dnsResolutionResults, IReadOnlyList storageAccountResults, IReadOnlyList keyVaultResults, IReadOnlyList containerRegistryResults, IReadOnlyList applicationInsightsResults, IReadOnlyList otherResults) + { + UserDefinedRouteResults = userDefinedRouteResults; + NetworkSecurityRuleResults = networkSecurityRuleResults; + ResourceLockResults = resourceLockResults; + DnsResolutionResults = dnsResolutionResults; + StorageAccountResults = storageAccountResults; + KeyVaultResults = keyVaultResults; + ContainerRegistryResults = containerRegistryResults; + ApplicationInsightsResults = applicationInsightsResults; + OtherResults = otherResults; + } + + public IReadOnlyList UserDefinedRouteResults { get; } + public IReadOnlyList NetworkSecurityRuleResults { get; } + public IReadOnlyList ResourceLockResults { get; } + public IReadOnlyList DnsResolutionResults { get; } + public IReadOnlyList StorageAccountResults { get; } + public IReadOnlyList KeyVaultResults { get; } + public IReadOnlyList ContainerRegistryResults { get; } + public IReadOnlyList ApplicationInsightsResults { get; } + public IReadOnlyList OtherResults { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSReplicaStatusError.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DiagnoseResult.Serialization.cs similarity index 60% rename from sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSReplicaStatusError.Serialization.cs rename to sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DiagnoseResult.Serialization.cs index 41da2069b7202..365986f6302cc 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSReplicaStatusError.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DiagnoseResult.Serialization.cs @@ -5,19 +5,18 @@ #nullable disable -using System.Collections.Generic; using System.Text.Json; using Azure.Core; namespace Azure.ResourceManager.MachineLearningServices.Models { - public partial class AKSReplicaStatusError + public partial class DiagnoseResult { - internal static AKSReplicaStatusError DeserializeAKSReplicaStatusError(JsonElement element) + internal static DiagnoseResult DeserializeDiagnoseResult(JsonElement element) { Optional code = default; + Optional level = default; Optional message = default; - Optional> details = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("code")) @@ -25,28 +24,23 @@ internal static AKSReplicaStatusError DeserializeAKSReplicaStatusError(JsonEleme code = property.Value.GetString(); continue; } - if (property.NameEquals("message")) - { - message = property.Value.GetString(); - continue; - } - if (property.NameEquals("details")) + if (property.NameEquals("level")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(ErrorDetail.DeserializeErrorDetail(item)); - } - details = array; + level = new DiagnoseResultLevel(property.Value.GetString()); + continue; + } + if (property.NameEquals("message")) + { + message = property.Value.GetString(); continue; } } - return new AKSReplicaStatusError(code.Value, message.Value, Optional.ToList(details)); + return new DiagnoseResult(code.Value, Optional.ToNullable(level), message.Value); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DiagnoseResult.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DiagnoseResult.cs new file mode 100644 index 0000000000000..c08fd251fde87 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DiagnoseResult.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Result of Diagnose. + public partial class DiagnoseResult + { + /// Initializes a new instance of DiagnoseResult. + internal DiagnoseResult() + { + } + + /// Initializes a new instance of DiagnoseResult. + /// Code for workspace setup error. + /// Level of workspace setup error. + /// Message of workspace setup error. + internal DiagnoseResult(string code, DiagnoseResultLevel? level, string message) + { + Code = code; + Level = level; + Message = message; + } + + /// Code for workspace setup error. + public string Code { get; } + /// Level of workspace setup error. + public DiagnoseResultLevel? Level { get; } + /// Message of workspace setup error. + public string Message { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DiagnoseResultLevel.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DiagnoseResultLevel.cs new file mode 100644 index 0000000000000..afae3e8ea777a --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DiagnoseResultLevel.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Level of workspace setup error. + public readonly partial struct DiagnoseResultLevel : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + /// is null. + public DiagnoseResultLevel(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string WarningValue = "Warning"; + private const string ErrorValue = "Error"; + private const string InformationValue = "Information"; + + /// Warning. + public static DiagnoseResultLevel Warning { get; } = new DiagnoseResultLevel(WarningValue); + /// Error. + public static DiagnoseResultLevel Error { get; } = new DiagnoseResultLevel(ErrorValue); + /// Information. + public static DiagnoseResultLevel Information { get; } = new DiagnoseResultLevel(InformationValue); + /// Determines if two values are the same. + public static bool operator ==(DiagnoseResultLevel left, DiagnoseResultLevel right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DiagnoseResultLevel left, DiagnoseResultLevel right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator DiagnoseResultLevel(string value) => new DiagnoseResultLevel(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DiagnoseResultLevel other && Equals(other); + /// + public bool Equals(DiagnoseResultLevel 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/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/RGitHubPackage.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DiagnoseWorkspaceParameters.Serialization.cs similarity index 52% rename from sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/RGitHubPackage.Serialization.cs rename to sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DiagnoseWorkspaceParameters.Serialization.cs index 7cd72ad890bde..d93e7e366528f 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/RGitHubPackage.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DiagnoseWorkspaceParameters.Serialization.cs @@ -10,20 +10,15 @@ namespace Azure.ResourceManager.MachineLearningServices.Models { - public partial class RGitHubPackage : IUtf8JsonSerializable + public partial class DiagnoseWorkspaceParameters : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); - if (Optional.IsDefined(Repository)) + if (Optional.IsDefined(Value)) { - writer.WritePropertyName("repository"); - writer.WriteStringValue(Repository); - } - if (Optional.IsDefined(AuthToken)) - { - writer.WritePropertyName("authToken"); - writer.WriteStringValue(AuthToken); + writer.WritePropertyName("value"); + writer.WriteObjectValue(Value); } writer.WriteEndObject(); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DiagnoseWorkspaceParameters.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DiagnoseWorkspaceParameters.cs new file mode 100644 index 0000000000000..f49f22487410c --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DiagnoseWorkspaceParameters.cs @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Parameters to diagnose a workspace. + public partial class DiagnoseWorkspaceParameters + { + /// Initializes a new instance of DiagnoseWorkspaceParameters. + public DiagnoseWorkspaceParameters() + { + } + + /// Value of Parameters. + public DiagnoseRequestProperties Value { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DistributionConfiguration.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DistributionConfiguration.Serialization.cs deleted file mode 100644 index 3907ad55c2f92..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DistributionConfiguration.Serialization.cs +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class DistributionConfiguration : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("distributionType"); - writer.WriteStringValue(DistributionType.ToString()); - writer.WriteEndObject(); - } - - internal static DistributionConfiguration DeserializeDistributionConfiguration(JsonElement element) - { - DistributionType distributionType = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("distributionType")) - { - distributionType = new DistributionType(property.Value.GetString()); - continue; - } - } - return new DistributionConfiguration(distributionType); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DistributionConfiguration.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DistributionConfiguration.cs deleted file mode 100644 index d91fe4cf19e32..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DistributionConfiguration.cs +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// The DistributionConfiguration. - public partial class DistributionConfiguration - { - /// Initializes a new instance of DistributionConfiguration. - public DistributionConfiguration() - { - } - - /// Initializes a new instance of DistributionConfiguration. - /// Specifies the type of distribution framework. - internal DistributionConfiguration(DistributionType distributionType) - { - DistributionType = distributionType; - } - - /// Specifies the type of distribution framework. - internal DistributionType DistributionType { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DistributionType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DistributionType.cs deleted file mode 100644 index befd7f748a3cb..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DistributionType.cs +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// Specifies the type of distribution framework. - public readonly partial struct DistributionType : IEquatable - { - private readonly string _value; - - /// Determines if two values are the same. - /// is null. - public DistributionType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string PyTorchValue = "PyTorch"; - private const string TensorFlowValue = "TensorFlow"; - private const string MpiValue = "Mpi"; - - /// PyTorch. - public static DistributionType PyTorch { get; } = new DistributionType(PyTorchValue); - /// TensorFlow. - public static DistributionType TensorFlow { get; } = new DistributionType(TensorFlowValue); - /// Mpi. - public static DistributionType Mpi { get; } = new DistributionType(MpiValue); - /// Determines if two values are the same. - public static bool operator ==(DistributionType left, DistributionType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(DistributionType left, DistributionType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator DistributionType(string value) => new DistributionType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is DistributionType other && Equals(other); - /// - public bool Equals(DistributionType 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/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DockerSpecification.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DockerSpecification.Serialization.cs deleted file mode 100644 index af9ce631df3f5..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DockerSpecification.Serialization.cs +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class DockerSpecification : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"); - writer.WriteStringValue(Type.ToString()); - writer.WriteEndObject(); - } - - internal static DockerSpecification DeserializeDockerSpecification(JsonElement element) - { - DockerSpecificationType type = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type")) - { - type = new DockerSpecificationType(property.Value.GetString()); - continue; - } - } - return new DockerSpecification(type); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DockerSpecification.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DockerSpecification.cs deleted file mode 100644 index 64a8af4e574e4..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DockerSpecification.cs +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// Class to represent configuration settings for Docker. - public partial class DockerSpecification - { - /// Initializes a new instance of DockerSpecification. - public DockerSpecification() - { - } - - /// Initializes a new instance of DockerSpecification. - /// Docker specification must be either Build or Image. - internal DockerSpecification(DockerSpecificationType type) - { - Type = type; - } - - /// Docker specification must be either Build or Image. - internal DockerSpecificationType Type { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DockerSpecificationType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DockerSpecificationType.cs deleted file mode 100644 index b1160e2d49d9f..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DockerSpecificationType.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// Docker specification must be either Build or Image. - public readonly partial struct DockerSpecificationType : IEquatable - { - private readonly string _value; - - /// Determines if two values are the same. - /// is null. - public DockerSpecificationType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string BuildValue = "Build"; - private const string ImageValue = "Image"; - - /// Build. - public static DockerSpecificationType Build { get; } = new DockerSpecificationType(BuildValue); - /// Image. - public static DockerSpecificationType Image { get; } = new DockerSpecificationType(ImageValue); - /// Determines if two values are the same. - public static bool operator ==(DockerSpecificationType left, DockerSpecificationType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(DockerSpecificationType left, DockerSpecificationType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator DockerSpecificationType(string value) => new DockerSpecificationType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is DockerSpecificationType other && Equals(other); - /// - public bool Equals(DockerSpecificationType 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/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EarlyTerminationPolicyConfiguration.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EarlyTerminationPolicyConfiguration.Serialization.cs deleted file mode 100644 index 8d51696ac4f8a..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EarlyTerminationPolicyConfiguration.Serialization.cs +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class EarlyTerminationPolicyConfiguration : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("policyType"); - writer.WriteStringValue(PolicyType.ToString()); - if (Optional.IsDefined(EvaluationInterval)) - { - writer.WritePropertyName("evaluationInterval"); - writer.WriteNumberValue(EvaluationInterval.Value); - } - if (Optional.IsDefined(DelayEvaluation)) - { - writer.WritePropertyName("delayEvaluation"); - writer.WriteNumberValue(DelayEvaluation.Value); - } - writer.WriteEndObject(); - } - - internal static EarlyTerminationPolicyConfiguration DeserializeEarlyTerminationPolicyConfiguration(JsonElement element) - { - EarlyTerminationPolicyType policyType = default; - Optional evaluationInterval = default; - Optional delayEvaluation = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("policyType")) - { - policyType = new EarlyTerminationPolicyType(property.Value.GetString()); - continue; - } - if (property.NameEquals("evaluationInterval")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - evaluationInterval = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("delayEvaluation")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - delayEvaluation = property.Value.GetInt32(); - continue; - } - } - return new EarlyTerminationPolicyConfiguration(policyType, Optional.ToNullable(evaluationInterval), Optional.ToNullable(delayEvaluation)); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EarlyTerminationPolicyConfiguration.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EarlyTerminationPolicyConfiguration.cs deleted file mode 100644 index 532e902005a98..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EarlyTerminationPolicyConfiguration.cs +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// Early termination policies enable canceling poor-performing runs before they complete. - public partial class EarlyTerminationPolicyConfiguration - { - /// Initializes a new instance of EarlyTerminationPolicyConfiguration. - public EarlyTerminationPolicyConfiguration() - { - } - - /// Initializes a new instance of EarlyTerminationPolicyConfiguration. - /// Name of policy configuration. - /// . - /// . - internal EarlyTerminationPolicyConfiguration(EarlyTerminationPolicyType policyType, int? evaluationInterval, int? delayEvaluation) - { - PolicyType = policyType; - EvaluationInterval = evaluationInterval; - DelayEvaluation = delayEvaluation; - } - - /// Name of policy configuration. - internal EarlyTerminationPolicyType PolicyType { get; set; } - public int? EvaluationInterval { get; set; } - public int? DelayEvaluation { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EarlyTerminationPolicyType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EarlyTerminationPolicyType.cs deleted file mode 100644 index 3725f55e0318e..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EarlyTerminationPolicyType.cs +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// Name of policy configuration. - public readonly partial struct EarlyTerminationPolicyType : IEquatable - { - private readonly string _value; - - /// Determines if two values are the same. - /// is null. - public EarlyTerminationPolicyType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string BanditValue = "Bandit"; - private const string MedianStoppingValue = "MedianStopping"; - private const string TruncationSelectionValue = "TruncationSelection"; - - /// Bandit. - public static EarlyTerminationPolicyType Bandit { get; } = new EarlyTerminationPolicyType(BanditValue); - /// MedianStopping. - public static EarlyTerminationPolicyType MedianStopping { get; } = new EarlyTerminationPolicyType(MedianStoppingValue); - /// TruncationSelection. - public static EarlyTerminationPolicyType TruncationSelection { get; } = new EarlyTerminationPolicyType(TruncationSelectionValue); - /// Determines if two values are the same. - public static bool operator ==(EarlyTerminationPolicyType left, EarlyTerminationPolicyType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(EarlyTerminationPolicyType left, EarlyTerminationPolicyType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator EarlyTerminationPolicyType(string value) => new EarlyTerminationPolicyType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is EarlyTerminationPolicyType other && Equals(other); - /// - public bool Equals(EarlyTerminationPolicyType 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/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EncryptionProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EncryptionProperties.Serialization.cs deleted file mode 100644 index 8eea605b95ce0..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EncryptionProperties.Serialization.cs +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class EncryptionProperties : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("vaultBaseUrl"); - writer.WriteStringValue(VaultBaseUrl); - writer.WritePropertyName("keyName"); - writer.WriteStringValue(KeyName); - writer.WritePropertyName("keyVersion"); - writer.WriteStringValue(KeyVersion); - writer.WriteEndObject(); - } - - internal static EncryptionProperties DeserializeEncryptionProperties(JsonElement element) - { - string vaultBaseUrl = default; - string keyName = default; - string keyVersion = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("vaultBaseUrl")) - { - vaultBaseUrl = property.Value.GetString(); - continue; - } - if (property.NameEquals("keyName")) - { - keyName = property.Value.GetString(); - continue; - } - if (property.NameEquals("keyVersion")) - { - keyVersion = property.Value.GetString(); - continue; - } - } - return new EncryptionProperties(vaultBaseUrl, keyName, keyVersion); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EncryptionProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EncryptionProperties.cs deleted file mode 100644 index b851a92a1516b..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EncryptionProperties.cs +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// The EncryptionProperties. - public partial class EncryptionProperties - { - /// Initializes a new instance of EncryptionProperties. - /// vault base Url. - /// Encryption Key name. - /// Encryption Key Version. - /// , , or is null. - public EncryptionProperties(string vaultBaseUrl, string keyName, string keyVersion) - { - if (vaultBaseUrl == null) - { - throw new ArgumentNullException(nameof(vaultBaseUrl)); - } - if (keyName == null) - { - throw new ArgumentNullException(nameof(keyName)); - } - if (keyVersion == null) - { - throw new ArgumentNullException(nameof(keyVersion)); - } - - VaultBaseUrl = vaultBaseUrl; - KeyName = keyName; - KeyVersion = keyVersion; - } - - /// vault base Url. - public string VaultBaseUrl { get; set; } - /// Encryption Key name. - public string KeyName { get; set; } - /// Encryption Key Version. - public string KeyVersion { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EncryptionProperty.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EncryptionProperty.Serialization.cs index de7adee04b8b9..5260d37668a9e 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EncryptionProperty.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EncryptionProperty.Serialization.cs @@ -17,6 +17,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteStartObject(); writer.WritePropertyName("status"); writer.WriteStringValue(Status.ToString()); + if (Optional.IsDefined(Identity)) + { + writer.WritePropertyName("identity"); + writer.WriteObjectValue(Identity); + } writer.WritePropertyName("keyVaultProperties"); writer.WriteObjectValue(KeyVaultProperties); writer.WriteEndObject(); @@ -25,6 +30,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) internal static EncryptionProperty DeserializeEncryptionProperty(JsonElement element) { EncryptionStatus status = default; + Optional identity = default; KeyVaultProperties keyVaultProperties = default; foreach (var property in element.EnumerateObject()) { @@ -33,13 +39,23 @@ internal static EncryptionProperty DeserializeEncryptionProperty(JsonElement ele status = new EncryptionStatus(property.Value.GetString()); continue; } + if (property.NameEquals("identity")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + identity = IdentityForCmk.DeserializeIdentityForCmk(property.Value); + continue; + } if (property.NameEquals("keyVaultProperties")) { keyVaultProperties = KeyVaultProperties.DeserializeKeyVaultProperties(property.Value); continue; } } - return new EncryptionProperty(status, keyVaultProperties); + return new EncryptionProperty(status, identity.Value, keyVaultProperties); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EncryptionProperty.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EncryptionProperty.cs index b638e50713bf0..34a3b1e8015f1 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EncryptionProperty.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EncryptionProperty.cs @@ -27,8 +27,21 @@ public EncryptionProperty(EncryptionStatus status, KeyVaultProperties keyVaultPr KeyVaultProperties = keyVaultProperties; } + /// Initializes a new instance of EncryptionProperty. + /// Indicates whether or not the encryption is enabled for the workspace. + /// The identity that will be used to access the key vault for encryption at rest. + /// Customer Key vault properties. + internal EncryptionProperty(EncryptionStatus status, IdentityForCmk identity, KeyVaultProperties keyVaultProperties) + { + Status = status; + Identity = identity; + KeyVaultProperties = keyVaultProperties; + } + /// Indicates whether or not the encryption is enabled for the workspace. public EncryptionStatus Status { get; set; } + /// The identity that will be used to access the key vault for encryption at rest. + public IdentityForCmk Identity { get; set; } /// Customer Key vault properties. public KeyVaultProperties KeyVaultProperties { get; set; } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentContainer.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentContainer.Serialization.cs deleted file mode 100644 index 2779b3e8809b9..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentContainer.Serialization.cs +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class EnvironmentContainer : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Properties)) - { - writer.WritePropertyName("properties"); - writer.WriteStartObject(); - foreach (var item in Properties) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(Description); - } - writer.WriteEndObject(); - } - - internal static EnvironmentContainer DeserializeEnvironmentContainer(JsonElement element) - { - Optional> properties = default; - Optional> tags = default; - Optional description = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("properties")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - properties = dictionary; - continue; - } - if (property.NameEquals("tags")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - tags = dictionary; - continue; - } - if (property.NameEquals("description")) - { - description = property.Value.GetString(); - continue; - } - } - return new EnvironmentContainer(Optional.ToDictionary(properties), Optional.ToDictionary(tags), description.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentContainer.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentContainer.cs deleted file mode 100644 index f4d6b4aee460a..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentContainer.cs +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// The EnvironmentContainer. - public partial class EnvironmentContainer - { - /// Initializes a new instance of EnvironmentContainer. - public EnvironmentContainer() - { - Properties = new ChangeTrackingDictionary(); - Tags = new ChangeTrackingDictionary(); - } - - /// Initializes a new instance of EnvironmentContainer. - /// Dictionary of <string>. - /// Dictionary of <string>. - /// . - internal EnvironmentContainer(IDictionary properties, IDictionary tags, string description) - { - Properties = properties; - Tags = tags; - Description = description; - } - - /// Dictionary of <string>. - public IDictionary Properties { get; } - /// Dictionary of <string>. - public IDictionary Tags { get; } - public string Description { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentContainerResource.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentContainerResource.Serialization.cs deleted file mode 100644 index f2563b90015a7..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentContainerResource.Serialization.cs +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class EnvironmentContainerResource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("properties"); - writer.WriteObjectValue(Properties); - writer.WriteEndObject(); - } - - internal static EnvironmentContainerResource DeserializeEnvironmentContainerResource(JsonElement element) - { - Optional id = default; - Optional name = default; - Optional type = default; - EnvironmentContainer properties = default; - Optional systemData = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("id")) - { - id = property.Value.GetString(); - continue; - } - if (property.NameEquals("name")) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type")) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("properties")) - { - properties = EnvironmentContainer.DeserializeEnvironmentContainer(property.Value); - continue; - } - if (property.NameEquals("systemData")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - systemData = SystemData.DeserializeSystemData(property.Value); - continue; - } - } - return new EnvironmentContainerResource(id.Value, name.Value, type.Value, properties, systemData.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentContainerResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentContainerResource.cs deleted file mode 100644 index 6ccaaebda2a60..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentContainerResource.cs +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// Azure Resource Manager resource envelope. - public partial class EnvironmentContainerResource - { - /// Initializes a new instance of EnvironmentContainerResource. - /// . - /// is null. - public EnvironmentContainerResource(EnvironmentContainer properties) - { - if (properties == null) - { - throw new ArgumentNullException(nameof(properties)); - } - - Properties = properties; - } - - /// Initializes a new instance of EnvironmentContainerResource. - /// The resource URL of the entity (not URL encoded). - /// The name of the resource entity. - /// The resource provider and type. - /// . - /// Metadata pertaining to creation and last modification of the resource. - internal EnvironmentContainerResource(string id, string name, string type, EnvironmentContainer properties, SystemData systemData) - { - Id = id; - Name = name; - Type = type; - Properties = properties; - SystemData = systemData; - } - - /// The resource URL of the entity (not URL encoded). - public string Id { get; } - /// The name of the resource entity. - public string Name { get; } - /// The resource provider and type. - public string Type { get; } - public EnvironmentContainer Properties { get; set; } - /// Metadata pertaining to creation and last modification of the resource. - public SystemData SystemData { get; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentContainerResourceArmPaginatedResult.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentContainerResourceArmPaginatedResult.Serialization.cs deleted file mode 100644 index 8fd3719541eb5..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentContainerResourceArmPaginatedResult.Serialization.cs +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - internal partial class EnvironmentContainerResourceArmPaginatedResult - { - internal static EnvironmentContainerResourceArmPaginatedResult DeserializeEnvironmentContainerResourceArmPaginatedResult(JsonElement element) - { - Optional> value = default; - Optional nextLink = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("value")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(EnvironmentContainerResource.DeserializeEnvironmentContainerResource(item)); - } - value = array; - continue; - } - if (property.NameEquals("nextLink")) - { - nextLink = property.Value.GetString(); - continue; - } - } - return new EnvironmentContainerResourceArmPaginatedResult(Optional.ToList(value), nextLink.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentContainerResourceArmPaginatedResult.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentContainerResourceArmPaginatedResult.cs deleted file mode 100644 index b03a26b19507e..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentContainerResourceArmPaginatedResult.cs +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// A paginated list of EnvironmentContainer entities. - internal partial class EnvironmentContainerResourceArmPaginatedResult - { - /// Initializes a new instance of EnvironmentContainerResourceArmPaginatedResult. - internal EnvironmentContainerResourceArmPaginatedResult() - { - Value = new ChangeTrackingList(); - } - - /// Initializes a new instance of EnvironmentContainerResourceArmPaginatedResult. - /// An array of objects of type EnvironmentContainer. - /// . - internal EnvironmentContainerResourceArmPaginatedResult(IReadOnlyList value, string nextLink) - { - Value = value; - NextLink = nextLink; - } - - /// An array of objects of type EnvironmentContainer. - public IReadOnlyList Value { get; } - public string NextLink { get; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentImageRequest.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentImageRequest.Serialization.cs deleted file mode 100644 index f0942229e3bd8..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentImageRequest.Serialization.cs +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class EnvironmentImageRequest : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(DriverProgram)) - { - writer.WritePropertyName("driverProgram"); - writer.WriteStringValue(DriverProgram); - } - if (Optional.IsCollectionDefined(Assets)) - { - writer.WritePropertyName("assets"); - writer.WriteStartArray(); - foreach (var item in Assets) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(ModelIds)) - { - writer.WritePropertyName("modelIds"); - writer.WriteStartArray(); - foreach (var item in ModelIds) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(Models)) - { - writer.WritePropertyName("models"); - writer.WriteStartArray(); - foreach (var item in Models) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Environment)) - { - writer.WritePropertyName("environment"); - writer.WriteObjectValue(Environment); - } - if (Optional.IsDefined(EnvironmentReference)) - { - writer.WritePropertyName("environmentReference"); - writer.WriteObjectValue(EnvironmentReference); - } - writer.WriteEndObject(); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentImageRequest.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentImageRequest.cs deleted file mode 100644 index 9577e04b37950..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentImageRequest.cs +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// Request to create a Docker image based on Environment. - public partial class EnvironmentImageRequest - { - /// Initializes a new instance of EnvironmentImageRequest. - public EnvironmentImageRequest() - { - Assets = new ChangeTrackingList(); - ModelIds = new ChangeTrackingList(); - Models = new ChangeTrackingList(); - } - - /// The name of the driver file. - public string DriverProgram { get; set; } - /// The list of assets. - public IList Assets { get; } - /// The list of model Ids. - public IList ModelIds { get; } - /// The list of models. - public IList Models { get; } - /// The details of the AZURE ML environment. - public EnvironmentImageRequestEnvironment Environment { get; set; } - /// The unique identifying details of the AZURE ML environment. - public EnvironmentImageRequestEnvironmentReference EnvironmentReference { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentImageRequestEnvironment.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentImageRequestEnvironment.Serialization.cs deleted file mode 100644 index 8f9a0638d0253..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentImageRequestEnvironment.Serialization.cs +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class EnvironmentImageRequestEnvironment : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(Name); - } - if (Optional.IsDefined(Version)) - { - writer.WritePropertyName("version"); - writer.WriteStringValue(Version); - } - if (Optional.IsDefined(Python)) - { - writer.WritePropertyName("python"); - writer.WriteObjectValue(Python); - } - if (Optional.IsCollectionDefined(EnvironmentVariables)) - { - writer.WritePropertyName("environmentVariables"); - writer.WriteStartObject(); - foreach (var item in EnvironmentVariables) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsDefined(Docker)) - { - writer.WritePropertyName("docker"); - writer.WriteObjectValue(Docker); - } - if (Optional.IsDefined(Spark)) - { - writer.WritePropertyName("spark"); - writer.WriteObjectValue(Spark); - } - if (Optional.IsDefined(R)) - { - writer.WritePropertyName("r"); - writer.WriteObjectValue(R); - } - if (Optional.IsDefined(InferencingStackVersion)) - { - writer.WritePropertyName("inferencingStackVersion"); - writer.WriteStringValue(InferencingStackVersion); - } - writer.WriteEndObject(); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentImageRequestEnvironment.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentImageRequestEnvironment.cs deleted file mode 100644 index c5bca29379bc0..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentImageRequestEnvironment.cs +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// The details of the AZURE ML environment. - public partial class EnvironmentImageRequestEnvironment : ModelEnvironmentDefinition - { - /// Initializes a new instance of EnvironmentImageRequestEnvironment. - public EnvironmentImageRequestEnvironment() - { - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentImageRequestEnvironmentReference.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentImageRequestEnvironmentReference.Serialization.cs deleted file mode 100644 index a124e42010172..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentImageRequestEnvironmentReference.Serialization.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class EnvironmentImageRequestEnvironmentReference : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(Name); - } - if (Optional.IsDefined(Version)) - { - writer.WritePropertyName("version"); - writer.WriteStringValue(Version); - } - writer.WriteEndObject(); - } - - internal static EnvironmentImageRequestEnvironmentReference DeserializeEnvironmentImageRequestEnvironmentReference(JsonElement element) - { - Optional name = default; - Optional version = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("name")) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("version")) - { - version = property.Value.GetString(); - continue; - } - } - return new EnvironmentImageRequestEnvironmentReference(name.Value, version.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentImageRequestEnvironmentReference.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentImageRequestEnvironmentReference.cs deleted file mode 100644 index f53c032587b81..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentImageRequestEnvironmentReference.cs +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// The unique identifying details of the AZURE ML environment. - public partial class EnvironmentImageRequestEnvironmentReference : EnvironmentReference - { - /// Initializes a new instance of EnvironmentImageRequestEnvironmentReference. - public EnvironmentImageRequestEnvironmentReference() - { - } - - /// Initializes a new instance of EnvironmentImageRequestEnvironmentReference. - /// Name of the environment. - /// Version of the environment. - internal EnvironmentImageRequestEnvironmentReference(string name, string version) : base(name, version) - { - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentImageResponse.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentImageResponse.Serialization.cs deleted file mode 100644 index bdb0a9d18c55a..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentImageResponse.Serialization.cs +++ /dev/null @@ -1,151 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class EnvironmentImageResponse : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(DriverProgram)) - { - writer.WritePropertyName("driverProgram"); - writer.WriteStringValue(DriverProgram); - } - if (Optional.IsCollectionDefined(Assets)) - { - writer.WritePropertyName("assets"); - writer.WriteStartArray(); - foreach (var item in Assets) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(ModelIds)) - { - writer.WritePropertyName("modelIds"); - writer.WriteStartArray(); - foreach (var item in ModelIds) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(Models)) - { - writer.WritePropertyName("models"); - writer.WriteStartArray(); - foreach (var item in Models) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Environment)) - { - writer.WritePropertyName("environment"); - writer.WriteObjectValue(Environment); - } - if (Optional.IsDefined(EnvironmentReference)) - { - writer.WritePropertyName("environmentReference"); - writer.WriteObjectValue(EnvironmentReference); - } - writer.WriteEndObject(); - } - - internal static EnvironmentImageResponse DeserializeEnvironmentImageResponse(JsonElement element) - { - Optional driverProgram = default; - Optional> assets = default; - Optional> modelIds = default; - Optional> models = default; - Optional environment = default; - Optional environmentReference = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("driverProgram")) - { - driverProgram = property.Value.GetString(); - continue; - } - if (property.NameEquals("assets")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(ImageAsset.DeserializeImageAsset(item)); - } - assets = array; - continue; - } - if (property.NameEquals("modelIds")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - modelIds = array; - continue; - } - if (property.NameEquals("models")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(Model.DeserializeModel(item)); - } - models = array; - continue; - } - if (property.NameEquals("environment")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - environment = EnvironmentImageResponseEnvironment.DeserializeEnvironmentImageResponseEnvironment(property.Value); - continue; - } - if (property.NameEquals("environmentReference")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - environmentReference = EnvironmentImageResponseEnvironmentReference.DeserializeEnvironmentImageResponseEnvironmentReference(property.Value); - continue; - } - } - return new EnvironmentImageResponse(driverProgram.Value, Optional.ToList(assets), Optional.ToList(modelIds), Optional.ToList(models), environment.Value, environmentReference.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentImageResponse.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentImageResponse.cs deleted file mode 100644 index d74bed6a555b6..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentImageResponse.cs +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// Request to create a Docker image based on Environment. - public partial class EnvironmentImageResponse - { - /// Initializes a new instance of EnvironmentImageResponse. - public EnvironmentImageResponse() - { - Assets = new ChangeTrackingList(); - ModelIds = new ChangeTrackingList(); - Models = new ChangeTrackingList(); - } - - /// Initializes a new instance of EnvironmentImageResponse. - /// The name of the driver file. - /// The list of assets. - /// The list of model Ids. - /// The list of models. - /// The details of the AZURE ML environment. - /// The unique identifying details of the AZURE ML environment. - internal EnvironmentImageResponse(string driverProgram, IList assets, IList modelIds, IList models, EnvironmentImageResponseEnvironment environment, EnvironmentImageResponseEnvironmentReference environmentReference) - { - DriverProgram = driverProgram; - Assets = assets; - ModelIds = modelIds; - Models = models; - Environment = environment; - EnvironmentReference = environmentReference; - } - - /// The name of the driver file. - public string DriverProgram { get; set; } - /// The list of assets. - public IList Assets { get; } - /// The list of model Ids. - public IList ModelIds { get; } - /// The list of models. - public IList Models { get; } - /// The details of the AZURE ML environment. - public EnvironmentImageResponseEnvironment Environment { get; set; } - /// The unique identifying details of the AZURE ML environment. - public EnvironmentImageResponseEnvironmentReference EnvironmentReference { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentImageResponseEnvironment.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentImageResponseEnvironment.Serialization.cs deleted file mode 100644 index fb436dc683827..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentImageResponseEnvironment.Serialization.cs +++ /dev/null @@ -1,154 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class EnvironmentImageResponseEnvironment : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(Name); - } - if (Optional.IsDefined(Version)) - { - writer.WritePropertyName("version"); - writer.WriteStringValue(Version); - } - if (Optional.IsDefined(Python)) - { - writer.WritePropertyName("python"); - writer.WriteObjectValue(Python); - } - if (Optional.IsCollectionDefined(EnvironmentVariables)) - { - writer.WritePropertyName("environmentVariables"); - writer.WriteStartObject(); - foreach (var item in EnvironmentVariables) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsDefined(Docker)) - { - writer.WritePropertyName("docker"); - writer.WriteObjectValue(Docker); - } - if (Optional.IsDefined(Spark)) - { - writer.WritePropertyName("spark"); - writer.WriteObjectValue(Spark); - } - if (Optional.IsDefined(R)) - { - writer.WritePropertyName("r"); - writer.WriteObjectValue(R); - } - if (Optional.IsDefined(InferencingStackVersion)) - { - writer.WritePropertyName("inferencingStackVersion"); - writer.WriteStringValue(InferencingStackVersion); - } - writer.WriteEndObject(); - } - - internal static EnvironmentImageResponseEnvironment DeserializeEnvironmentImageResponseEnvironment(JsonElement element) - { - Optional name = default; - Optional version = default; - Optional python = default; - Optional> environmentVariables = default; - Optional docker = default; - Optional spark = default; - Optional r = default; - Optional inferencingStackVersion = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("name")) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("version")) - { - version = property.Value.GetString(); - continue; - } - if (property.NameEquals("python")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - python = ModelEnvironmentDefinitionResponsePython.DeserializeModelEnvironmentDefinitionResponsePython(property.Value); - continue; - } - if (property.NameEquals("environmentVariables")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - environmentVariables = dictionary; - continue; - } - if (property.NameEquals("docker")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - docker = ModelEnvironmentDefinitionResponseDocker.DeserializeModelEnvironmentDefinitionResponseDocker(property.Value); - continue; - } - if (property.NameEquals("spark")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - spark = ModelEnvironmentDefinitionResponseSpark.DeserializeModelEnvironmentDefinitionResponseSpark(property.Value); - continue; - } - if (property.NameEquals("r")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - r = ModelEnvironmentDefinitionResponseR.DeserializeModelEnvironmentDefinitionResponseR(property.Value); - continue; - } - if (property.NameEquals("inferencingStackVersion")) - { - inferencingStackVersion = property.Value.GetString(); - continue; - } - } - return new EnvironmentImageResponseEnvironment(name.Value, version.Value, python.Value, Optional.ToDictionary(environmentVariables), docker.Value, spark.Value, r.Value, inferencingStackVersion.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentImageResponseEnvironment.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentImageResponseEnvironment.cs deleted file mode 100644 index 253f033b86759..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentImageResponseEnvironment.cs +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// The details of the AZURE ML environment. - public partial class EnvironmentImageResponseEnvironment : ModelEnvironmentDefinitionResponse - { - /// Initializes a new instance of EnvironmentImageResponseEnvironment. - public EnvironmentImageResponseEnvironment() - { - } - - /// Initializes a new instance of EnvironmentImageResponseEnvironment. - /// The name of the environment. - /// The environment version. - /// Settings for a Python environment. - /// Definition of environment variables to be defined in the environment. - /// The definition of a Docker container. - /// The configuration for a Spark environment. - /// Settings for a R environment. - /// The inferencing stack version added to the image. To avoid adding an inferencing stack, do not set this value. Valid values: "latest". - internal EnvironmentImageResponseEnvironment(string name, string version, ModelEnvironmentDefinitionResponsePython python, IDictionary environmentVariables, ModelEnvironmentDefinitionResponseDocker docker, ModelEnvironmentDefinitionResponseSpark spark, ModelEnvironmentDefinitionResponseR r, string inferencingStackVersion) : base(name, version, python, environmentVariables, docker, spark, r, inferencingStackVersion) - { - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentImageResponseEnvironmentReference.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentImageResponseEnvironmentReference.Serialization.cs deleted file mode 100644 index fbf1692a1339a..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentImageResponseEnvironmentReference.Serialization.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class EnvironmentImageResponseEnvironmentReference : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(Name); - } - if (Optional.IsDefined(Version)) - { - writer.WritePropertyName("version"); - writer.WriteStringValue(Version); - } - writer.WriteEndObject(); - } - - internal static EnvironmentImageResponseEnvironmentReference DeserializeEnvironmentImageResponseEnvironmentReference(JsonElement element) - { - Optional name = default; - Optional version = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("name")) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("version")) - { - version = property.Value.GetString(); - continue; - } - } - return new EnvironmentImageResponseEnvironmentReference(name.Value, version.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentImageResponseEnvironmentReference.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentImageResponseEnvironmentReference.cs deleted file mode 100644 index 2ce80236f6abb..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentImageResponseEnvironmentReference.cs +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// The unique identifying details of the AZURE ML environment. - public partial class EnvironmentImageResponseEnvironmentReference : EnvironmentReference - { - /// Initializes a new instance of EnvironmentImageResponseEnvironmentReference. - public EnvironmentImageResponseEnvironmentReference() - { - } - - /// Initializes a new instance of EnvironmentImageResponseEnvironmentReference. - /// Name of the environment. - /// Version of the environment. - internal EnvironmentImageResponseEnvironmentReference(string name, string version) : base(name, version) - { - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentReference.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentReference.Serialization.cs deleted file mode 100644 index 713907f5bd9dc..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentReference.Serialization.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class EnvironmentReference : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(Name); - } - if (Optional.IsDefined(Version)) - { - writer.WritePropertyName("version"); - writer.WriteStringValue(Version); - } - writer.WriteEndObject(); - } - - internal static EnvironmentReference DeserializeEnvironmentReference(JsonElement element) - { - Optional name = default; - Optional version = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("name")) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("version")) - { - version = property.Value.GetString(); - continue; - } - } - return new EnvironmentReference(name.Value, version.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentReference.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentReference.cs deleted file mode 100644 index 1456e6cd27773..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentReference.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// The EnvironmentReference. - public partial class EnvironmentReference - { - /// Initializes a new instance of EnvironmentReference. - public EnvironmentReference() - { - } - - /// Initializes a new instance of EnvironmentReference. - /// Name of the environment. - /// Version of the environment. - internal EnvironmentReference(string name, string version) - { - Name = name; - Version = version; - } - - /// Name of the environment. - public string Name { get; set; } - /// Version of the environment. - public string Version { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentSpecificationType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentSpecificationType.cs deleted file mode 100644 index 0659a2309d88a..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentSpecificationType.cs +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// - /// Environment specification is either user managed or curated by the Azure ML service - /// - /// <see href="https://docs.microsoft.com/en-us/azure/machine-learning/resource-curated-environments" />. - /// - public readonly partial struct EnvironmentSpecificationType : IEquatable - { - private readonly string _value; - - /// Determines if two values are the same. - /// is null. - public EnvironmentSpecificationType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string CuratedValue = "Curated"; - private const string UserCreatedValue = "UserCreated"; - - /// Curated. - public static EnvironmentSpecificationType Curated { get; } = new EnvironmentSpecificationType(CuratedValue); - /// UserCreated. - public static EnvironmentSpecificationType UserCreated { get; } = new EnvironmentSpecificationType(UserCreatedValue); - /// Determines if two values are the same. - public static bool operator ==(EnvironmentSpecificationType left, EnvironmentSpecificationType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(EnvironmentSpecificationType left, EnvironmentSpecificationType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator EnvironmentSpecificationType(string value) => new EnvironmentSpecificationType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is EnvironmentSpecificationType other && Equals(other); - /// - public bool Equals(EnvironmentSpecificationType 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/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentSpecificationVersion.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentSpecificationVersion.Serialization.cs deleted file mode 100644 index a1e9fdfdcf9cc..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentSpecificationVersion.Serialization.cs +++ /dev/null @@ -1,160 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class EnvironmentSpecificationVersion : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Docker)) - { - writer.WritePropertyName("docker"); - writer.WriteObjectValue(Docker); - } - if (Optional.IsDefined(CondaFile)) - { - writer.WritePropertyName("condaFile"); - writer.WriteStringValue(CondaFile); - } - if (Optional.IsDefined(DatastoreId)) - { - writer.WritePropertyName("datastoreId"); - writer.WriteStringValue(DatastoreId); - } - if (Optional.IsDefined(AssetPath)) - { - writer.WritePropertyName("assetPath"); - writer.WriteObjectValue(AssetPath); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Properties)) - { - writer.WritePropertyName("properties"); - writer.WriteStartObject(); - foreach (var item in Properties) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WriteEndObject(); - } - - internal static EnvironmentSpecificationVersion DeserializeEnvironmentSpecificationVersion(JsonElement element) - { - Optional type = default; - Optional docker = default; - Optional condaFile = default; - Optional datastoreId = default; - Optional assetPath = default; - Optional description = default; - Optional> tags = default; - Optional> properties = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - type = new EnvironmentSpecificationType(property.Value.GetString()); - continue; - } - if (property.NameEquals("docker")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - docker = DockerSpecification.DeserializeDockerSpecification(property.Value); - continue; - } - if (property.NameEquals("condaFile")) - { - condaFile = property.Value.GetString(); - continue; - } - if (property.NameEquals("datastoreId")) - { - datastoreId = property.Value.GetString(); - continue; - } - if (property.NameEquals("assetPath")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - assetPath = AssetPath.DeserializeAssetPath(property.Value); - continue; - } - if (property.NameEquals("description")) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("tags")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - tags = dictionary; - continue; - } - if (property.NameEquals("properties")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - properties = dictionary; - continue; - } - } - return new EnvironmentSpecificationVersion(Optional.ToNullable(type), docker.Value, condaFile.Value, datastoreId.Value, assetPath.Value, description.Value, Optional.ToDictionary(tags), Optional.ToDictionary(properties)); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentSpecificationVersion.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentSpecificationVersion.cs deleted file mode 100644 index 37d335900cd1b..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentSpecificationVersion.cs +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// - /// Data Transfer Object (DTO) for an Execution Environment Specification. Name and - /// - /// version should default to the AzureML-Minimal environment version tested with the - /// - /// current SDK client version as this is a main use-case. - /// - /// <see href="https://repo2docker.readthedocs.io/en/latest/specification.html" />. - /// - public partial class EnvironmentSpecificationVersion - { - /// Initializes a new instance of EnvironmentSpecificationVersion. - public EnvironmentSpecificationVersion() - { - Tags = new ChangeTrackingDictionary(); - Properties = new ChangeTrackingDictionary(); - } - - /// Initializes a new instance of EnvironmentSpecificationVersion. - /// - /// Environment specification is either user managed or curated by the Azure ML service - /// - /// <see href="https://docs.microsoft.com/en-us/azure/machine-learning/resource-curated-environments" />. - /// - /// Class to represent configuration settings for Docker. - /// - /// Standard configuration file used by conda that lets you install any kind of package, including Python, R, and C/C++ packages - /// - /// <see href="https://repo2docker.readthedocs.io/en/latest/config_files.html#environment-yml-install-a-conda-environment" />. - /// - /// The asset datastoreId. - /// Details of an AssetUri. - /// The asset description text. - /// Tag dictionary. Tags can be added, removed, and updated. - /// The asset property dictionary. - internal EnvironmentSpecificationVersion(EnvironmentSpecificationType? type, DockerSpecification docker, string condaFile, string datastoreId, AssetPath assetPath, string description, IDictionary tags, IDictionary properties) - { - Type = type; - Docker = docker; - CondaFile = condaFile; - DatastoreId = datastoreId; - AssetPath = assetPath; - Description = description; - Tags = tags; - Properties = properties; - } - - /// - /// Environment specification is either user managed or curated by the Azure ML service - /// - /// <see href="https://docs.microsoft.com/en-us/azure/machine-learning/resource-curated-environments" />. - /// - public EnvironmentSpecificationType? Type { get; } - /// Class to represent configuration settings for Docker. - public DockerSpecification Docker { get; set; } - /// - /// Standard configuration file used by conda that lets you install any kind of package, including Python, R, and C/C++ packages - /// - /// <see href="https://repo2docker.readthedocs.io/en/latest/config_files.html#environment-yml-install-a-conda-environment" />. - /// - public string CondaFile { get; set; } - /// The asset datastoreId. - public string DatastoreId { get; set; } - /// Details of an AssetUri. - public AssetPath AssetPath { get; set; } - /// The asset description text. - public string Description { get; set; } - /// Tag dictionary. Tags can be added, removed, and updated. - public IDictionary Tags { get; } - /// The asset property dictionary. - public IDictionary Properties { get; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentSpecificationVersionResource.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentSpecificationVersionResource.Serialization.cs deleted file mode 100644 index 1b03ff9e8704c..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentSpecificationVersionResource.Serialization.cs +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class EnvironmentSpecificationVersionResource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("properties"); - writer.WriteObjectValue(Properties); - writer.WriteEndObject(); - } - - internal static EnvironmentSpecificationVersionResource DeserializeEnvironmentSpecificationVersionResource(JsonElement element) - { - Optional id = default; - Optional name = default; - Optional type = default; - EnvironmentSpecificationVersion properties = default; - Optional systemData = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("id")) - { - id = property.Value.GetString(); - continue; - } - if (property.NameEquals("name")) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type")) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("properties")) - { - properties = EnvironmentSpecificationVersion.DeserializeEnvironmentSpecificationVersion(property.Value); - continue; - } - if (property.NameEquals("systemData")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - systemData = SystemData.DeserializeSystemData(property.Value); - continue; - } - } - return new EnvironmentSpecificationVersionResource(id.Value, name.Value, type.Value, properties, systemData.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentSpecificationVersionResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentSpecificationVersionResource.cs deleted file mode 100644 index a5ce597ebba5d..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentSpecificationVersionResource.cs +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// Azure Resource Manager resource envelope. - public partial class EnvironmentSpecificationVersionResource - { - /// Initializes a new instance of EnvironmentSpecificationVersionResource. - /// - /// Data Transfer Object (DTO) for an Execution Environment Specification. Name and - /// - /// version should default to the AzureML-Minimal environment version tested with the - /// - /// current SDK client version as this is a main use-case. - /// - /// <see href="https://repo2docker.readthedocs.io/en/latest/specification.html" />. - /// - /// is null. - public EnvironmentSpecificationVersionResource(EnvironmentSpecificationVersion properties) - { - if (properties == null) - { - throw new ArgumentNullException(nameof(properties)); - } - - Properties = properties; - } - - /// Initializes a new instance of EnvironmentSpecificationVersionResource. - /// The resource URL of the entity (not URL encoded). - /// The name of the resource entity. - /// The resource provider and type. - /// - /// Data Transfer Object (DTO) for an Execution Environment Specification. Name and - /// - /// version should default to the AzureML-Minimal environment version tested with the - /// - /// current SDK client version as this is a main use-case. - /// - /// <see href="https://repo2docker.readthedocs.io/en/latest/specification.html" />. - /// - /// Metadata pertaining to creation and last modification of the resource. - internal EnvironmentSpecificationVersionResource(string id, string name, string type, EnvironmentSpecificationVersion properties, SystemData systemData) - { - Id = id; - Name = name; - Type = type; - Properties = properties; - SystemData = systemData; - } - - /// The resource URL of the entity (not URL encoded). - public string Id { get; } - /// The name of the resource entity. - public string Name { get; } - /// The resource provider and type. - public string Type { get; } - /// - /// Data Transfer Object (DTO) for an Execution Environment Specification. Name and - /// - /// version should default to the AzureML-Minimal environment version tested with the - /// - /// current SDK client version as this is a main use-case. - /// - /// <see href="https://repo2docker.readthedocs.io/en/latest/specification.html" />. - /// - public EnvironmentSpecificationVersion Properties { get; set; } - /// Metadata pertaining to creation and last modification of the resource. - public SystemData SystemData { get; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentSpecificationVersionResourceArmPaginatedResult.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentSpecificationVersionResourceArmPaginatedResult.Serialization.cs deleted file mode 100644 index 849ae13cf955b..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentSpecificationVersionResourceArmPaginatedResult.Serialization.cs +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - internal partial class EnvironmentSpecificationVersionResourceArmPaginatedResult - { - internal static EnvironmentSpecificationVersionResourceArmPaginatedResult DeserializeEnvironmentSpecificationVersionResourceArmPaginatedResult(JsonElement element) - { - Optional> value = default; - Optional nextLink = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("value")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(EnvironmentSpecificationVersionResource.DeserializeEnvironmentSpecificationVersionResource(item)); - } - value = array; - continue; - } - if (property.NameEquals("nextLink")) - { - nextLink = property.Value.GetString(); - continue; - } - } - return new EnvironmentSpecificationVersionResourceArmPaginatedResult(Optional.ToList(value), nextLink.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentSpecificationVersionResourceArmPaginatedResult.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentSpecificationVersionResourceArmPaginatedResult.cs deleted file mode 100644 index a4b75f1fd096a..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentSpecificationVersionResourceArmPaginatedResult.cs +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// A paginated list of EnvironmentSpecificationVersion entities. - internal partial class EnvironmentSpecificationVersionResourceArmPaginatedResult - { - /// Initializes a new instance of EnvironmentSpecificationVersionResourceArmPaginatedResult. - internal EnvironmentSpecificationVersionResourceArmPaginatedResult() - { - Value = new ChangeTrackingList(); - } - - /// Initializes a new instance of EnvironmentSpecificationVersionResourceArmPaginatedResult. - /// An array of objects of type EnvironmentSpecificationVersion. - /// . - internal EnvironmentSpecificationVersionResourceArmPaginatedResult(IReadOnlyList value, string nextLink) - { - Value = value; - NextLink = nextLink; - } - - /// An array of objects of type EnvironmentSpecificationVersion. - public IReadOnlyList Value { get; } - public string NextLink { get; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ErrorAdditionalInfo.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ErrorAdditionalInfo.Serialization.cs new file mode 100644 index 0000000000000..d832972ecbcd8 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ErrorAdditionalInfo.Serialization.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class ErrorAdditionalInfo + { + internal static ErrorAdditionalInfo DeserializeErrorAdditionalInfo(JsonElement element) + { + Optional type = default; + Optional info = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("info")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + info = property.Value.GetObject(); + continue; + } + } + return new ErrorAdditionalInfo(type.Value, info.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ErrorAdditionalInfo.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ErrorAdditionalInfo.cs new file mode 100644 index 0000000000000..1300e7c1b7b64 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ErrorAdditionalInfo.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The resource management error additional info. + public partial class ErrorAdditionalInfo + { + /// Initializes a new instance of ErrorAdditionalInfo. + internal ErrorAdditionalInfo() + { + } + + /// Initializes a new instance of ErrorAdditionalInfo. + /// The additional info type. + /// The additional info. + internal ErrorAdditionalInfo(string type, object info) + { + Type = type; + Info = info; + } + + /// The additional info type. + public string Type { get; } + /// The additional info. + public object Info { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ErrorDetail.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ErrorDetail.Serialization.cs index f3b4e0745bf85..28a2ac9ad00c8 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ErrorDetail.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ErrorDetail.Serialization.cs @@ -5,6 +5,7 @@ #nullable disable +using System.Collections.Generic; using System.Text.Json; using Azure.Core; @@ -14,8 +15,11 @@ public partial class ErrorDetail { internal static ErrorDetail DeserializeErrorDetail(JsonElement element) { - string code = default; - string message = default; + Optional code = default; + Optional message = default; + Optional target = default; + Optional> details = default; + Optional> additionalInfo = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("code")) @@ -28,8 +32,43 @@ internal static ErrorDetail DeserializeErrorDetail(JsonElement element) message = property.Value.GetString(); continue; } + if (property.NameEquals("target")) + { + target = property.Value.GetString(); + continue; + } + if (property.NameEquals("details")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DeserializeErrorDetail(item)); + } + details = array; + continue; + } + if (property.NameEquals("additionalInfo")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ErrorAdditionalInfo.DeserializeErrorAdditionalInfo(item)); + } + additionalInfo = array; + continue; + } } - return new ErrorDetail(code, message); + return new ErrorDetail(code.Value, message.Value, target.Value, Optional.ToList(details), Optional.ToList(additionalInfo)); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ErrorDetail.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ErrorDetail.cs index 8952a20ce5b0f..e8a71e6a7c9ab 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ErrorDetail.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ErrorDetail.cs @@ -5,35 +5,45 @@ #nullable disable -using System; +using System.Collections.Generic; +using Azure.Core; namespace Azure.ResourceManager.MachineLearningServices.Models { - /// Error detail information. + /// The error detail. public partial class ErrorDetail { /// Initializes a new instance of ErrorDetail. - /// Error code. - /// Error message. - /// or is null. - internal ErrorDetail(string code, string message) + internal ErrorDetail() { - if (code == null) - { - throw new ArgumentNullException(nameof(code)); - } - if (message == null) - { - throw new ArgumentNullException(nameof(message)); - } + Details = new ChangeTrackingList(); + AdditionalInfo = new ChangeTrackingList(); + } + /// Initializes a new instance of ErrorDetail. + /// The error code. + /// The error message. + /// The error target. + /// The error details. + /// The error additional info. + internal ErrorDetail(string code, string message, string target, IReadOnlyList details, IReadOnlyList additionalInfo) + { Code = code; Message = message; + Target = target; + Details = details; + AdditionalInfo = additionalInfo; } - /// Error code. + /// The error code. public string Code { get; } - /// Error message. + /// The error message. public string Message { get; } + /// The error target. + public string Target { get; } + /// The error details. + public IReadOnlyList Details { get; } + /// The error additional info. + public IReadOnlyList AdditionalInfo { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ErrorResponse.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ErrorResponse.Serialization.cs index bb2d87c7d9560..58e3e03dd2a09 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ErrorResponse.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ErrorResponse.Serialization.cs @@ -5,7 +5,6 @@ #nullable disable -using System.Collections.Generic; using System.Text.Json; using Azure.Core; @@ -15,38 +14,21 @@ public partial class ErrorResponse { internal static ErrorResponse DeserializeErrorResponse(JsonElement element) { - Optional code = default; - Optional message = default; - Optional> details = default; + Optional error = 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("details")) + if (property.NameEquals("error")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(ErrorDetail.DeserializeErrorDetail(item)); - } - details = array; + error = ErrorDetail.DeserializeErrorDetail(property.Value); continue; } } - return new ErrorResponse(code.Value, message.Value, Optional.ToList(details)); + return new ErrorResponse(error.Value); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ErrorResponse.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ErrorResponse.cs index d7df3113bc616..9688226a58ef5 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ErrorResponse.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ErrorResponse.cs @@ -5,36 +5,24 @@ #nullable disable -using System.Collections.Generic; -using Azure.Core; - namespace Azure.ResourceManager.MachineLearningServices.Models { - /// Error response information. + /// Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). public partial class ErrorResponse { /// Initializes a new instance of ErrorResponse. internal ErrorResponse() { - Details = new ChangeTrackingList(); } /// Initializes a new instance of ErrorResponse. - /// Error code. - /// Error message. - /// An array of error detail objects. - internal ErrorResponse(string code, string message, IReadOnlyList details) + /// The error object. + internal ErrorResponse(ErrorDetail error) { - Code = code; - Message = message; - Details = details; + Error = error; } - /// Error code. - public string Code { get; } - /// Error message. - public string Message { get; } - /// An array of error detail objects. - public IReadOnlyList Details { get; } + /// The error object. + public ErrorDetail Error { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EvaluationConfiguration.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EvaluationConfiguration.Serialization.cs deleted file mode 100644 index 83272b8e6ef79..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EvaluationConfiguration.Serialization.cs +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class EvaluationConfiguration : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("primaryMetricName"); - writer.WriteStringValue(PrimaryMetricName); - writer.WritePropertyName("primaryMetricGoal"); - writer.WriteStringValue(PrimaryMetricGoal.ToString()); - writer.WriteEndObject(); - } - - internal static EvaluationConfiguration DeserializeEvaluationConfiguration(JsonElement element) - { - string primaryMetricName = default; - PrimaryMetricGoal primaryMetricGoal = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("primaryMetricName")) - { - primaryMetricName = property.Value.GetString(); - continue; - } - if (property.NameEquals("primaryMetricGoal")) - { - primaryMetricGoal = new PrimaryMetricGoal(property.Value.GetString()); - continue; - } - } - return new EvaluationConfiguration(primaryMetricName, primaryMetricGoal); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EvaluationConfiguration.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EvaluationConfiguration.cs deleted file mode 100644 index 9e98279496697..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EvaluationConfiguration.cs +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// The EvaluationConfiguration. - public partial class EvaluationConfiguration - { - /// Initializes a new instance of EvaluationConfiguration. - /// . - /// Defines supported metric goals for hyperparameter tuning. - /// is null. - public EvaluationConfiguration(string primaryMetricName, PrimaryMetricGoal primaryMetricGoal) - { - if (primaryMetricName == null) - { - throw new ArgumentNullException(nameof(primaryMetricName)); - } - - PrimaryMetricName = primaryMetricName; - PrimaryMetricGoal = primaryMetricGoal; - } - - public string PrimaryMetricName { get; set; } - /// Defines supported metric goals for hyperparameter tuning. - public PrimaryMetricGoal PrimaryMetricGoal { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ExportFormatType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ExportFormatType.cs deleted file mode 100644 index 65a5752d29391..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ExportFormatType.cs +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// The format of exported labels, also as the discriminator. - public readonly partial struct ExportFormatType : IEquatable - { - private readonly string _value; - - /// Determines if two values are the same. - /// is null. - public ExportFormatType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string DatasetValue = "Dataset"; - private const string CocoValue = "Coco"; - private const string CSVValue = "CSV"; - - /// Dataset. - public static ExportFormatType Dataset { get; } = new ExportFormatType(DatasetValue); - /// Coco. - public static ExportFormatType Coco { get; } = new ExportFormatType(CocoValue); - /// CSV. - public static ExportFormatType CSV { get; } = new ExportFormatType(CSVValue); - /// Determines if two values are the same. - public static bool operator ==(ExportFormatType left, ExportFormatType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(ExportFormatType left, ExportFormatType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator ExportFormatType(string value) => new ExportFormatType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is ExportFormatType other && Equals(other); - /// - public bool Equals(ExportFormatType 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/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ExportSummary.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ExportSummary.Serialization.cs deleted file mode 100644 index 79db3c1d590da..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ExportSummary.Serialization.cs +++ /dev/null @@ -1,91 +0,0 @@ -// 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.ResourceManager.MachineLearningServices.Models -{ - public partial class ExportSummary - { - internal static ExportSummary DeserializeExportSummary(JsonElement element) - { - ExportFormatType format = default; - Optional exportId = default; - Optional labelingJobId = default; - Optional exportedRowCount = default; - Optional startTimeUtc = default; - Optional endTimeUtc = default; - Optional state = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("format")) - { - format = new ExportFormatType(property.Value.GetString()); - continue; - } - if (property.NameEquals("exportId")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - exportId = property.Value.GetGuid(); - continue; - } - if (property.NameEquals("labelingJobId")) - { - labelingJobId = property.Value.GetString(); - continue; - } - if (property.NameEquals("exportedRowCount")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - exportedRowCount = property.Value.GetInt64(); - continue; - } - if (property.NameEquals("startTimeUtc")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - startTimeUtc = property.Value.GetDateTimeOffset("O"); - continue; - } - if (property.NameEquals("endTimeUtc")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - endTimeUtc = property.Value.GetDateTimeOffset("O"); - continue; - } - if (property.NameEquals("state")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - state = new LabelExportState(property.Value.GetString()); - continue; - } - } - return new ExportSummary(format, Optional.ToNullable(exportId), labelingJobId.Value, Optional.ToNullable(exportedRowCount), Optional.ToNullable(startTimeUtc), Optional.ToNullable(endTimeUtc), Optional.ToNullable(state)); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ExportSummary.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ExportSummary.cs deleted file mode 100644 index 686b53883fa9a..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ExportSummary.cs +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// The ExportSummary. - public partial class ExportSummary - { - /// Initializes a new instance of ExportSummary. - internal ExportSummary() - { - } - - /// Initializes a new instance of ExportSummary. - /// The format of exported labels, also as the discriminator. - /// The unique identifier of completed Export Labels operation. - /// Name and identifier of the job containing exported labels. - /// The total number of labeled datapoints exported. - /// The time when the export was requested. - /// The time when the export was completed. - /// The state of the Export Labels operation. - internal ExportSummary(ExportFormatType format, Guid? exportId, string labelingJobId, long? exportedRowCount, DateTimeOffset? startTimeUtc, DateTimeOffset? endTimeUtc, LabelExportState? state) - { - Format = format; - ExportId = exportId; - LabelingJobId = labelingJobId; - ExportedRowCount = exportedRowCount; - StartTimeUtc = startTimeUtc; - EndTimeUtc = endTimeUtc; - State = state; - } - - /// The format of exported labels, also as the discriminator. - internal ExportFormatType Format { get; set; } - /// The unique identifier of completed Export Labels operation. - public Guid? ExportId { get; } - /// Name and identifier of the job containing exported labels. - public string LabelingJobId { get; } - /// The total number of labeled datapoints exported. - public long? ExportedRowCount { get; } - /// The time when the export was requested. - public DateTimeOffset? StartTimeUtc { get; } - /// The time when the export was completed. - public DateTimeOffset? EndTimeUtc { get; } - /// The state of the Export Labels operation. - public LabelExportState? State { get; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ExportSummaryResource.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ExportSummaryResource.Serialization.cs deleted file mode 100644 index 4b597c0122914..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ExportSummaryResource.Serialization.cs +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class ExportSummaryResource - { - internal static ExportSummaryResource DeserializeExportSummaryResource(JsonElement element) - { - Optional id = default; - Optional name = default; - Optional type = default; - ExportSummary properties = default; - Optional systemData = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("id")) - { - id = property.Value.GetString(); - continue; - } - if (property.NameEquals("name")) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type")) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("properties")) - { - properties = ExportSummary.DeserializeExportSummary(property.Value); - continue; - } - if (property.NameEquals("systemData")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - systemData = SystemData.DeserializeSystemData(property.Value); - continue; - } - } - return new ExportSummaryResource(id.Value, name.Value, type.Value, properties, systemData.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ExportSummaryResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ExportSummaryResource.cs deleted file mode 100644 index 929c596282d0e..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ExportSummaryResource.cs +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// Azure Resource Manager resource envelope. - public partial class ExportSummaryResource - { - /// Initializes a new instance of ExportSummaryResource. - /// . - /// is null. - internal ExportSummaryResource(ExportSummary properties) - { - if (properties == null) - { - throw new ArgumentNullException(nameof(properties)); - } - - Properties = properties; - } - - /// Initializes a new instance of ExportSummaryResource. - /// The resource URL of the entity (not URL encoded). - /// The name of the resource entity. - /// The resource provider and type. - /// . - /// Metadata pertaining to creation and last modification of the resource. - internal ExportSummaryResource(string id, string name, string type, ExportSummary properties, SystemData systemData) - { - Id = id; - Name = name; - Type = type; - Properties = properties; - SystemData = systemData; - } - - /// The resource URL of the entity (not URL encoded). - public string Id { get; } - /// The name of the resource entity. - public string Name { get; } - /// The resource provider and type. - public string Type { get; } - public ExportSummary Properties { get; } - /// Metadata pertaining to creation and last modification of the resource. - public SystemData SystemData { get; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LinkedServiceList.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ExternalFqdnResponse.Serialization.cs similarity index 65% rename from sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LinkedServiceList.Serialization.cs rename to sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ExternalFqdnResponse.Serialization.cs index f47ba27b993bb..b1d11424ec679 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LinkedServiceList.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ExternalFqdnResponse.Serialization.cs @@ -11,11 +11,11 @@ namespace Azure.ResourceManager.MachineLearningServices.Models { - public partial class LinkedServiceList + public partial class ExternalFqdnResponse { - internal static LinkedServiceList DeserializeLinkedServiceList(JsonElement element) + internal static ExternalFqdnResponse DeserializeExternalFqdnResponse(JsonElement element) { - Optional> value = default; + Optional> value = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("value")) @@ -25,16 +25,16 @@ internal static LinkedServiceList DeserializeLinkedServiceList(JsonElement eleme property.ThrowNonNullablePropertyIsNull(); continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(LinkedServiceResponse.DeserializeLinkedServiceResponse(item)); + array.Add(FqdnEndpoints.DeserializeFqdnEndpoints(item)); } value = array; continue; } } - return new LinkedServiceList(Optional.ToList(value)); + return new ExternalFqdnResponse(Optional.ToList(value)); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ExternalFqdnResponse.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ExternalFqdnResponse.cs new file mode 100644 index 0000000000000..028680fb9636b --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ExternalFqdnResponse.cs @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The ExternalFqdnResponse. + public partial class ExternalFqdnResponse + { + /// Initializes a new instance of ExternalFqdnResponse. + internal ExternalFqdnResponse() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of ExternalFqdnResponse. + /// . + internal ExternalFqdnResponse(IReadOnlyList value) + { + Value = value; + } + + public IReadOnlyList Value { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/JobBaseResourceArmPaginatedResult.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/FqdnEndpoint.Serialization.cs similarity index 53% rename from sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/JobBaseResourceArmPaginatedResult.Serialization.cs rename to sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/FqdnEndpoint.Serialization.cs index 0455628d949af..13cd2c2ff91f6 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/JobBaseResourceArmPaginatedResult.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/FqdnEndpoint.Serialization.cs @@ -11,36 +11,36 @@ namespace Azure.ResourceManager.MachineLearningServices.Models { - internal partial class JobBaseResourceArmPaginatedResult + public partial class FqdnEndpoint { - internal static JobBaseResourceArmPaginatedResult DeserializeJobBaseResourceArmPaginatedResult(JsonElement element) + internal static FqdnEndpoint DeserializeFqdnEndpoint(JsonElement element) { - Optional> value = default; - Optional nextLink = default; + Optional domainName = default; + Optional> endpointDetails = default; foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("value")) + if (property.NameEquals("domainName")) + { + domainName = property.Value.GetString(); + continue; + } + if (property.NameEquals("endpointDetails")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(JobBaseResource.DeserializeJobBaseResource(item)); + array.Add(FqdnEndpointDetail.DeserializeFqdnEndpointDetail(item)); } - value = array; - continue; - } - if (property.NameEquals("nextLink")) - { - nextLink = property.Value.GetString(); + endpointDetails = array; continue; } } - return new JobBaseResourceArmPaginatedResult(Optional.ToList(value), nextLink.Value); + return new FqdnEndpoint(domainName.Value, Optional.ToList(endpointDetails)); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/FqdnEndpoint.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/FqdnEndpoint.cs new file mode 100644 index 0000000000000..a1f9122391fe4 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/FqdnEndpoint.cs @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The FqdnEndpoint. + public partial class FqdnEndpoint + { + /// Initializes a new instance of FqdnEndpoint. + internal FqdnEndpoint() + { + EndpointDetails = new ChangeTrackingList(); + } + + /// Initializes a new instance of FqdnEndpoint. + /// . + /// . + internal FqdnEndpoint(string domainName, IReadOnlyList endpointDetails) + { + DomainName = domainName; + EndpointDetails = endpointDetails; + } + + public string DomainName { get; } + public IReadOnlyList EndpointDetails { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/MachineLearningServiceError.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/FqdnEndpointDetail.Serialization.cs similarity index 61% rename from sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/MachineLearningServiceError.Serialization.cs rename to sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/FqdnEndpointDetail.Serialization.cs index 1f11c67b539bd..b72ceda3ee95b 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/MachineLearningServiceError.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/FqdnEndpointDetail.Serialization.cs @@ -10,25 +10,25 @@ namespace Azure.ResourceManager.MachineLearningServices.Models { - public partial class MachineLearningServiceError + public partial class FqdnEndpointDetail { - internal static MachineLearningServiceError DeserializeMachineLearningServiceError(JsonElement element) + internal static FqdnEndpointDetail DeserializeFqdnEndpointDetail(JsonElement element) { - Optional error = default; + Optional port = default; foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("error")) + if (property.NameEquals("port")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } - error = ErrorResponse.DeserializeErrorResponse(property.Value); + port = property.Value.GetInt32(); continue; } } - return new MachineLearningServiceError(error.Value); + return new FqdnEndpointDetail(Optional.ToNullable(port)); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/FqdnEndpointDetail.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/FqdnEndpointDetail.cs new file mode 100644 index 0000000000000..bfa68c70c1538 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/FqdnEndpointDetail.cs @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The FqdnEndpointDetail. + public partial class FqdnEndpointDetail + { + /// Initializes a new instance of FqdnEndpointDetail. + internal FqdnEndpointDetail() + { + } + + /// Initializes a new instance of FqdnEndpointDetail. + /// . + internal FqdnEndpointDetail(int? port) + { + Port = port; + } + + public int? Port { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/FqdnEndpoints.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/FqdnEndpoints.Serialization.cs new file mode 100644 index 0000000000000..53b32231819e9 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/FqdnEndpoints.Serialization.cs @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class FqdnEndpoints + { + internal static FqdnEndpoints DeserializeFqdnEndpoints(JsonElement element) + { + Optional properties = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + properties = FqdnEndpointsProperties.DeserializeFqdnEndpointsProperties(property.Value); + continue; + } + } + return new FqdnEndpoints(properties.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/FqdnEndpoints.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/FqdnEndpoints.cs new file mode 100644 index 0000000000000..14ba96187dfe2 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/FqdnEndpoints.cs @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The FqdnEndpoints. + public partial class FqdnEndpoints + { + /// Initializes a new instance of FqdnEndpoints. + internal FqdnEndpoints() + { + } + + /// Initializes a new instance of FqdnEndpoints. + /// . + internal FqdnEndpoints(FqdnEndpointsProperties properties) + { + Properties = properties; + } + + public FqdnEndpointsProperties Properties { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CodeVersionResourceArmPaginatedResult.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/FqdnEndpointsProperties.Serialization.cs similarity index 52% rename from sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CodeVersionResourceArmPaginatedResult.Serialization.cs rename to sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/FqdnEndpointsProperties.Serialization.cs index 77adb6ead3233..82880389f59f7 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CodeVersionResourceArmPaginatedResult.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/FqdnEndpointsProperties.Serialization.cs @@ -11,36 +11,36 @@ namespace Azure.ResourceManager.MachineLearningServices.Models { - internal partial class CodeVersionResourceArmPaginatedResult + public partial class FqdnEndpointsProperties { - internal static CodeVersionResourceArmPaginatedResult DeserializeCodeVersionResourceArmPaginatedResult(JsonElement element) + internal static FqdnEndpointsProperties DeserializeFqdnEndpointsProperties(JsonElement element) { - Optional> value = default; - Optional nextLink = default; + Optional category = default; + Optional> endpoints = default; foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("value")) + if (property.NameEquals("category")) + { + category = property.Value.GetString(); + continue; + } + if (property.NameEquals("endpoints")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(CodeVersionResource.DeserializeCodeVersionResource(item)); + array.Add(FqdnEndpoint.DeserializeFqdnEndpoint(item)); } - value = array; - continue; - } - if (property.NameEquals("nextLink")) - { - nextLink = property.Value.GetString(); + endpoints = array; continue; } } - return new CodeVersionResourceArmPaginatedResult(Optional.ToList(value), nextLink.Value); + return new FqdnEndpointsProperties(category.Value, Optional.ToList(endpoints)); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/FqdnEndpointsProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/FqdnEndpointsProperties.cs new file mode 100644 index 0000000000000..819df2eb70e2c --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/FqdnEndpointsProperties.cs @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The FqdnEndpointsProperties. + public partial class FqdnEndpointsProperties + { + /// Initializes a new instance of FqdnEndpointsProperties. + internal FqdnEndpointsProperties() + { + Endpoints = new ChangeTrackingList(); + } + + /// Initializes a new instance of FqdnEndpointsProperties. + /// . + /// . + internal FqdnEndpointsProperties(string category, IReadOnlyList endpoints) + { + Category = category; + Endpoints = endpoints; + } + + public string Category { get; } + public IReadOnlyList Endpoints { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/GlusterFsSection.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/GlusterFsSection.Serialization.cs deleted file mode 100644 index 834284ab5fb8d..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/GlusterFsSection.Serialization.cs +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class GlusterFsSection : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("serverAddress"); - writer.WriteStringValue(ServerAddress); - writer.WritePropertyName("volumeName"); - writer.WriteStringValue(VolumeName); - writer.WriteEndObject(); - } - - internal static GlusterFsSection DeserializeGlusterFsSection(JsonElement element) - { - string serverAddress = default; - string volumeName = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("serverAddress")) - { - serverAddress = property.Value.GetString(); - continue; - } - if (property.NameEquals("volumeName")) - { - volumeName = property.Value.GetString(); - continue; - } - } - return new GlusterFsSection(serverAddress, volumeName); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/GlusterFsSection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/GlusterFsSection.cs deleted file mode 100644 index 5dd2db495713d..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/GlusterFsSection.cs +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// The GlusterFsSection. - public partial class GlusterFsSection - { - /// Initializes a new instance of GlusterFsSection. - /// GlusterFS server address (can be the IP address or server name). - /// GlusterFS volume name. - /// or is null. - public GlusterFsSection(string serverAddress, string volumeName) - { - if (serverAddress == null) - { - throw new ArgumentNullException(nameof(serverAddress)); - } - if (volumeName == null) - { - throw new ArgumentNullException(nameof(volumeName)); - } - - ServerAddress = serverAddress; - VolumeName = volumeName; - } - - /// GlusterFS server address (can be the IP address or server name). - public string ServerAddress { get; set; } - /// GlusterFS volume name. - public string VolumeName { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/HDInsight.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/HDInsight.Serialization.cs index 271e83f651990..a9f5efac8baa6 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/HDInsight.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/HDInsight.Serialization.cs @@ -39,6 +39,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("resourceId"); writer.WriteStringValue(ResourceId); } + if (Optional.IsDefined(DisableLocalAuth)) + { + writer.WritePropertyName("disableLocalAuth"); + writer.WriteBooleanValue(DisableLocalAuth.Value); + } writer.WriteEndObject(); } @@ -52,8 +57,9 @@ internal static HDInsight DeserializeHDInsight(JsonElement element) Optional createdOn = default; Optional modifiedOn = default; Optional resourceId = default; - Optional> provisioningErrors = default; + Optional> provisioningErrors = default; Optional isAttachedCompute = default; + Optional disableLocalAuth = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("properties")) @@ -123,10 +129,10 @@ internal static HDInsight DeserializeHDInsight(JsonElement element) property.ThrowNonNullablePropertyIsNull(); continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(MachineLearningServiceError.DeserializeMachineLearningServiceError(item)); + array.Add(ErrorResponse.DeserializeErrorResponse(item)); } provisioningErrors = array; continue; @@ -141,8 +147,18 @@ internal static HDInsight DeserializeHDInsight(JsonElement element) isAttachedCompute = property.Value.GetBoolean(); continue; } + if (property.NameEquals("disableLocalAuth")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + disableLocalAuth = property.Value.GetBoolean(); + continue; + } } - return new HDInsight(computeType, computeLocation.Value, Optional.ToNullable(provisioningState), description.Value, Optional.ToNullable(createdOn), Optional.ToNullable(modifiedOn), resourceId.Value, Optional.ToList(provisioningErrors), Optional.ToNullable(isAttachedCompute), properties.Value); + return new HDInsight(computeType, computeLocation.Value, Optional.ToNullable(provisioningState), description.Value, Optional.ToNullable(createdOn), Optional.ToNullable(modifiedOn), resourceId.Value, Optional.ToList(provisioningErrors), Optional.ToNullable(isAttachedCompute), Optional.ToNullable(disableLocalAuth), properties.Value); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/HDInsight.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/HDInsight.cs index 66230a5dc6b3d..72cf158720f2b 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/HDInsight.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/HDInsight.cs @@ -24,18 +24,20 @@ public HDInsight() /// Location for the underlying compute. /// The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. /// The description of the Machine Learning compute. - /// The date and time when the compute was created. - /// The date and time when the compute was last modified. + /// The time at which the compute was created. + /// The time at which the compute was last modified. /// ARM resource id of the underlying compute. /// Errors during provisioning. /// Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning service provisioned it if false. - /// . - internal HDInsight(ComputeType computeType, string computeLocation, ProvisioningState? provisioningState, string description, DateTimeOffset? createdOn, DateTimeOffset? modifiedOn, string resourceId, IReadOnlyList provisioningErrors, bool? isAttachedCompute, HDInsightProperties properties) : base(computeType, computeLocation, provisioningState, description, createdOn, modifiedOn, resourceId, provisioningErrors, isAttachedCompute) + /// Opt-out of local authentication and ensure customers can use only MSI and AAD exclusively for authentication. + /// HDInsight compute properties. + internal HDInsight(ComputeType computeType, string computeLocation, ProvisioningState? provisioningState, string description, DateTimeOffset? createdOn, DateTimeOffset? modifiedOn, string resourceId, IReadOnlyList provisioningErrors, bool? isAttachedCompute, bool? disableLocalAuth, HDInsightProperties properties) : base(computeType, computeLocation, provisioningState, description, createdOn, modifiedOn, resourceId, provisioningErrors, isAttachedCompute, disableLocalAuth) { Properties = properties; ComputeType = computeType; } + /// HDInsight compute properties. public HDInsightProperties Properties { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/HDInsightProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/HDInsightProperties.cs index 8b35966f6b783..00c07afdd63f9 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/HDInsightProperties.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/HDInsightProperties.cs @@ -7,7 +7,7 @@ namespace Azure.ResourceManager.MachineLearningServices.Models { - /// The HDInsightProperties. + /// HDInsight compute properties. public partial class HDInsightProperties { /// Initializes a new instance of HDInsightProperties. diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/RGitHubPackageResponse.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/IdentityForCmk.Serialization.cs similarity index 51% rename from sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/RGitHubPackageResponse.Serialization.cs rename to sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/IdentityForCmk.Serialization.cs index 0f1248ffb60a1..9636f2b36a1ea 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/RGitHubPackageResponse.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/IdentityForCmk.Serialization.cs @@ -10,31 +10,31 @@ namespace Azure.ResourceManager.MachineLearningServices.Models { - public partial class RGitHubPackageResponse : IUtf8JsonSerializable + public partial class IdentityForCmk : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); - if (Optional.IsDefined(Repository)) + if (Optional.IsDefined(UserAssignedIdentity)) { - writer.WritePropertyName("repository"); - writer.WriteStringValue(Repository); + writer.WritePropertyName("userAssignedIdentity"); + writer.WriteStringValue(UserAssignedIdentity); } writer.WriteEndObject(); } - internal static RGitHubPackageResponse DeserializeRGitHubPackageResponse(JsonElement element) + internal static IdentityForCmk DeserializeIdentityForCmk(JsonElement element) { - Optional repository = default; + Optional userAssignedIdentity = default; foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("repository")) + if (property.NameEquals("userAssignedIdentity")) { - repository = property.Value.GetString(); + userAssignedIdentity = property.Value.GetString(); continue; } } - return new RGitHubPackageResponse(repository.Value); + return new IdentityForCmk(userAssignedIdentity.Value); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/IdentityForCmk.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/IdentityForCmk.cs new file mode 100644 index 0000000000000..94451365bb112 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/IdentityForCmk.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Identity that will be used to access key vault for encryption at rest. + public partial class IdentityForCmk + { + /// Initializes a new instance of IdentityForCmk. + public IdentityForCmk() + { + } + + /// Initializes a new instance of IdentityForCmk. + /// The ArmId of the user assigned identity that will be used to access the customer managed key vault. + internal IdentityForCmk(string userAssignedIdentity) + { + UserAssignedIdentity = userAssignedIdentity; + } + + /// The ArmId of the user assigned identity that will be used to access the customer managed key vault. + public string UserAssignedIdentity { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ImageAsset.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ImageAsset.Serialization.cs deleted file mode 100644 index bcb814dd6de6e..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ImageAsset.Serialization.cs +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class ImageAsset : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(MimeType)) - { - writer.WritePropertyName("mimeType"); - writer.WriteStringValue(MimeType); - } - if (Optional.IsDefined(Url)) - { - writer.WritePropertyName("url"); - writer.WriteStringValue(Url); - } - if (Optional.IsDefined(Unpack)) - { - writer.WritePropertyName("unpack"); - writer.WriteBooleanValue(Unpack.Value); - } - writer.WriteEndObject(); - } - - internal static ImageAsset DeserializeImageAsset(JsonElement element) - { - Optional id = default; - Optional mimeType = default; - Optional url = default; - Optional unpack = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("id")) - { - id = property.Value.GetString(); - continue; - } - if (property.NameEquals("mimeType")) - { - mimeType = property.Value.GetString(); - continue; - } - if (property.NameEquals("url")) - { - url = property.Value.GetString(); - continue; - } - if (property.NameEquals("unpack")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - unpack = property.Value.GetBoolean(); - continue; - } - } - return new ImageAsset(id.Value, mimeType.Value, url.Value, Optional.ToNullable(unpack)); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ImageAsset.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ImageAsset.cs deleted file mode 100644 index 534d0bc0676ed..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ImageAsset.cs +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// An Image asset. - public partial class ImageAsset - { - /// Initializes a new instance of ImageAsset. - public ImageAsset() - { - } - - /// Initializes a new instance of ImageAsset. - /// The Asset Id. - /// The mime type. - /// The Url of the Asset. - /// Whether the Asset is unpacked. - internal ImageAsset(string id, string mimeType, string url, bool? unpack) - { - Id = id; - MimeType = mimeType; - Url = url; - Unpack = unpack; - } - - /// The Asset Id. - public string Id { get; set; } - /// The mime type. - public string MimeType { get; set; } - /// The Url of the Asset. - public string Url { get; set; } - /// Whether the Asset is unpacked. - public bool? Unpack { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/InnerErrorResponse.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/InnerErrorResponse.cs deleted file mode 100644 index c98b9ad42f370..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/InnerErrorResponse.cs +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// The InnerErrorResponse. - internal partial class InnerErrorResponse - { - /// Initializes a new instance of InnerErrorResponse. - internal InnerErrorResponse() - { - } - - public string Code { get; } - public InnerErrorResponse InnerError { get; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/InstanceTypeSchema.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/InstanceTypeSchema.Serialization.cs new file mode 100644 index 0000000000000..e97c3249bd743 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/InstanceTypeSchema.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.ResourceManager.MachineLearningServices.Models +{ + public partial class InstanceTypeSchema : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(NodeSelector)) + { + writer.WritePropertyName("nodeSelector"); + writer.WriteStartObject(); + foreach (var item in NodeSelector) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsDefined(Resources)) + { + writer.WritePropertyName("resources"); + writer.WriteObjectValue(Resources); + } + writer.WriteEndObject(); + } + + internal static InstanceTypeSchema DeserializeInstanceTypeSchema(JsonElement element) + { + Optional> nodeSelector = default; + Optional resources = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("nodeSelector")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + nodeSelector = dictionary; + continue; + } + if (property.NameEquals("resources")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + resources = InstanceTypeSchemaResources.DeserializeInstanceTypeSchemaResources(property.Value); + continue; + } + } + return new InstanceTypeSchema(Optional.ToDictionary(nodeSelector), resources.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/InstanceTypeSchema.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/InstanceTypeSchema.cs new file mode 100644 index 0000000000000..7c0adf41ecb4a --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/InstanceTypeSchema.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Instance type schema. + public partial class InstanceTypeSchema + { + /// Initializes a new instance of InstanceTypeSchema. + public InstanceTypeSchema() + { + NodeSelector = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of InstanceTypeSchema. + /// Node Selector. + /// Resource requests/limits for this instance type. + internal InstanceTypeSchema(IDictionary nodeSelector, InstanceTypeSchemaResources resources) + { + NodeSelector = nodeSelector; + Resources = resources; + } + + /// Node Selector. + public IDictionary NodeSelector { get; } + /// Resource requests/limits for this instance type. + public InstanceTypeSchemaResources Resources { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CodeContainer.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/InstanceTypeSchemaResources.Serialization.cs similarity index 63% rename from sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CodeContainer.Serialization.cs rename to sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/InstanceTypeSchemaResources.Serialization.cs index 7127f550c7982..6409aa8e5ffd3 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CodeContainer.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/InstanceTypeSchemaResources.Serialization.cs @@ -11,49 +11,43 @@ namespace Azure.ResourceManager.MachineLearningServices.Models { - public partial class CodeContainer : IUtf8JsonSerializable + public partial class InstanceTypeSchemaResources : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Properties)) + if (Optional.IsCollectionDefined(Requests)) { - writer.WritePropertyName("properties"); + writer.WritePropertyName("requests"); writer.WriteStartObject(); - foreach (var item in Properties) + foreach (var item in Requests) { writer.WritePropertyName(item.Key); writer.WriteStringValue(item.Value); } writer.WriteEndObject(); } - if (Optional.IsCollectionDefined(Tags)) + if (Optional.IsCollectionDefined(Limits)) { - writer.WritePropertyName("tags"); + writer.WritePropertyName("limits"); writer.WriteStartObject(); - foreach (var item in Tags) + foreach (var item in Limits) { writer.WritePropertyName(item.Key); writer.WriteStringValue(item.Value); } writer.WriteEndObject(); } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(Description); - } writer.WriteEndObject(); } - internal static CodeContainer DeserializeCodeContainer(JsonElement element) + internal static InstanceTypeSchemaResources DeserializeInstanceTypeSchemaResources(JsonElement element) { - Optional> properties = default; - Optional> tags = default; - Optional description = default; + Optional> requests = default; + Optional> limits = default; foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("properties")) + if (property.NameEquals("requests")) { if (property.Value.ValueKind == JsonValueKind.Null) { @@ -65,10 +59,10 @@ internal static CodeContainer DeserializeCodeContainer(JsonElement element) { dictionary.Add(property0.Name, property0.Value.GetString()); } - properties = dictionary; + requests = dictionary; continue; } - if (property.NameEquals("tags")) + if (property.NameEquals("limits")) { if (property.Value.ValueKind == JsonValueKind.Null) { @@ -80,16 +74,11 @@ internal static CodeContainer DeserializeCodeContainer(JsonElement element) { dictionary.Add(property0.Name, property0.Value.GetString()); } - tags = dictionary; - continue; - } - if (property.NameEquals("description")) - { - description = property.Value.GetString(); + limits = dictionary; continue; } } - return new CodeContainer(Optional.ToDictionary(properties), Optional.ToDictionary(tags), description.Value); + return new InstanceTypeSchemaResources(Optional.ToDictionary(requests), Optional.ToDictionary(limits)); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/InstanceTypeSchemaResources.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/InstanceTypeSchemaResources.cs new file mode 100644 index 0000000000000..569702858d40b --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/InstanceTypeSchemaResources.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Resource requests/limits for this instance type. + public partial class InstanceTypeSchemaResources + { + /// Initializes a new instance of InstanceTypeSchemaResources. + public InstanceTypeSchemaResources() + { + Requests = new ChangeTrackingDictionary(); + Limits = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of InstanceTypeSchemaResources. + /// Resource requests for this instance type. + /// Resource limits for this instance type. + internal InstanceTypeSchemaResources(IDictionary requests, IDictionary limits) + { + Requests = requests; + Limits = limits; + } + + /// Resource requests for this instance type. + public IDictionary Requests { get; } + /// Resource limits for this instance type. + public IDictionary Limits { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/JobBase.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/JobBase.Serialization.cs deleted file mode 100644 index d1fe30792c792..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/JobBase.Serialization.cs +++ /dev/null @@ -1,124 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class JobBase : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("jobType"); - writer.WriteStringValue(JobType.ToString()); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Properties)) - { - writer.WritePropertyName("properties"); - writer.WriteStartObject(); - foreach (var item in Properties) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WriteEndObject(); - } - - internal static JobBase DeserializeJobBase(JsonElement element) - { - if (element.TryGetProperty("jobType", out JsonElement discriminator)) - { - switch (discriminator.GetString()) - { - case "Command": return CommandJob.DeserializeCommandJob(element); - case "ComputeJobBase": return ComputeJobBase.DeserializeComputeJobBase(element); - case "Labeling": return LabelingJob.DeserializeLabelingJob(element); - case "Sweep": return SweepJob.DeserializeSweepJob(element); - } - } - JobType jobType = default; - Optional interactionEndpoints = default; - Optional description = default; - Optional> tags = default; - Optional> properties = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("jobType")) - { - jobType = new JobType(property.Value.GetString()); - continue; - } - if (property.NameEquals("interactionEndpoints")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - interactionEndpoints = JobBaseInteractionEndpoints.DeserializeJobBaseInteractionEndpoints(property.Value); - continue; - } - if (property.NameEquals("description")) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("tags")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - tags = dictionary; - continue; - } - if (property.NameEquals("properties")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - properties = dictionary; - continue; - } - } - return new JobBase(jobType, interactionEndpoints.Value, description.Value, Optional.ToDictionary(tags), Optional.ToDictionary(properties)); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/JobBase.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/JobBase.cs deleted file mode 100644 index 24b7eb5ded892..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/JobBase.cs +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// Job base definition. - public partial class JobBase - { - /// Initializes a new instance of JobBase. - public JobBase() - { - Tags = new ChangeTrackingDictionary(); - Properties = new ChangeTrackingDictionary(); - } - - /// Initializes a new instance of JobBase. - /// Specifies the type of job. - /// - /// Dictonary of endpoint URIs, keyed by enumerated job endpoints. - /// - /// For local jobs, a job endpoint will have a value of FileStreamObject. - /// - /// The asset description text. - /// Tag dictionary. Tags can be added, removed, and updated. - /// The asset property dictionary. - internal JobBase(JobType jobType, JobBaseInteractionEndpoints interactionEndpoints, string description, IDictionary tags, IDictionary properties) - { - JobType = jobType; - InteractionEndpoints = interactionEndpoints; - Description = description; - Tags = tags; - Properties = properties; - } - - /// Specifies the type of job. - internal JobType JobType { get; set; } - /// - /// Dictonary of endpoint URIs, keyed by enumerated job endpoints. - /// - /// For local jobs, a job endpoint will have a value of FileStreamObject. - /// - public JobBaseInteractionEndpoints InteractionEndpoints { get; } - /// The asset description text. - public string Description { get; set; } - /// Tag dictionary. Tags can be added, removed, and updated. - public IDictionary Tags { get; } - /// The asset property dictionary. - public IDictionary Properties { get; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/JobBaseInteractionEndpoints.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/JobBaseInteractionEndpoints.Serialization.cs deleted file mode 100644 index 4bf8c39be3004..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/JobBaseInteractionEndpoints.Serialization.cs +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class JobBaseInteractionEndpoints - { - internal static JobBaseInteractionEndpoints DeserializeJobBaseInteractionEndpoints(JsonElement element) - { - Optional tracking = default; - Optional studio = default; - Optional grafana = default; - Optional tensorboard = default; - Optional local = default; - Optional localRequest = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("Tracking")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - tracking = property.Value.GetObject(); - continue; - } - if (property.NameEquals("Studio")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - studio = property.Value.GetObject(); - continue; - } - if (property.NameEquals("Grafana")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - grafana = property.Value.GetObject(); - continue; - } - if (property.NameEquals("Tensorboard")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - tensorboard = property.Value.GetObject(); - continue; - } - if (property.NameEquals("Local")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - local = property.Value.GetObject(); - continue; - } - if (property.NameEquals("LocalRequest")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - localRequest = property.Value.GetObject(); - continue; - } - } - return new JobBaseInteractionEndpoints(tracking.Value, studio.Value, grafana.Value, tensorboard.Value, local.Value, localRequest.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/JobBaseInteractionEndpoints.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/JobBaseInteractionEndpoints.cs deleted file mode 100644 index c43bee00b6baf..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/JobBaseInteractionEndpoints.cs +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// - /// Dictonary of endpoint URIs, keyed by enumerated job endpoints. - /// - /// For local jobs, a job endpoint will have a value of FileStreamObject. - /// - public partial class JobBaseInteractionEndpoints - { - /// Initializes a new instance of JobBaseInteractionEndpoints. - internal JobBaseInteractionEndpoints() - { - } - - /// Initializes a new instance of JobBaseInteractionEndpoints. - /// Any object. - /// Any object. - /// Any object. - /// Any object. - /// Any object. - /// Any object. - internal JobBaseInteractionEndpoints(object tracking, object studio, object grafana, object tensorboard, object local, object localRequest) - { - Tracking = tracking; - Studio = studio; - Grafana = grafana; - Tensorboard = tensorboard; - Local = local; - LocalRequest = localRequest; - } - - /// Any object. - public object Tracking { get; } - /// Any object. - public object Studio { get; } - /// Any object. - public object Grafana { get; } - /// Any object. - public object Tensorboard { get; } - /// Any object. - public object Local { get; } - /// Any object. - public object LocalRequest { get; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/JobBaseResource.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/JobBaseResource.Serialization.cs deleted file mode 100644 index ba17027360643..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/JobBaseResource.Serialization.cs +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class JobBaseResource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("properties"); - writer.WriteObjectValue(Properties); - writer.WriteEndObject(); - } - - internal static JobBaseResource DeserializeJobBaseResource(JsonElement element) - { - Optional id = default; - Optional name = default; - Optional type = default; - JobBase properties = default; - Optional systemData = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("id")) - { - id = property.Value.GetString(); - continue; - } - if (property.NameEquals("name")) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type")) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("properties")) - { - properties = JobBase.DeserializeJobBase(property.Value); - continue; - } - if (property.NameEquals("systemData")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - systemData = SystemData.DeserializeSystemData(property.Value); - continue; - } - } - return new JobBaseResource(id.Value, name.Value, type.Value, properties, systemData.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/JobBaseResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/JobBaseResource.cs deleted file mode 100644 index e5a5d008beadf..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/JobBaseResource.cs +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// Azure Resource Manager resource envelope. - public partial class JobBaseResource - { - /// Initializes a new instance of JobBaseResource. - /// Job base definition. - /// is null. - public JobBaseResource(JobBase properties) - { - if (properties == null) - { - throw new ArgumentNullException(nameof(properties)); - } - - Properties = properties; - } - - /// Initializes a new instance of JobBaseResource. - /// The resource URL of the entity (not URL encoded). - /// The name of the resource entity. - /// The resource provider and type. - /// Job base definition. - /// Metadata pertaining to creation and last modification of the resource. - internal JobBaseResource(string id, string name, string type, JobBase properties, SystemData systemData) - { - Id = id; - Name = name; - Type = type; - Properties = properties; - SystemData = systemData; - } - - /// The resource URL of the entity (not URL encoded). - public string Id { get; } - /// The name of the resource entity. - public string Name { get; } - /// The resource provider and type. - public string Type { get; } - /// Job base definition. - public JobBase Properties { get; set; } - /// Metadata pertaining to creation and last modification of the resource. - public SystemData SystemData { get; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/JobBaseResourceArmPaginatedResult.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/JobBaseResourceArmPaginatedResult.cs deleted file mode 100644 index e1fddda5b1761..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/JobBaseResourceArmPaginatedResult.cs +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// A paginated list of JobBase entities. - internal partial class JobBaseResourceArmPaginatedResult - { - /// Initializes a new instance of JobBaseResourceArmPaginatedResult. - internal JobBaseResourceArmPaginatedResult() - { - Value = new ChangeTrackingList(); - } - - /// Initializes a new instance of JobBaseResourceArmPaginatedResult. - /// An array of objects of type JobBase. - /// . - internal JobBaseResourceArmPaginatedResult(IReadOnlyList value, string nextLink) - { - Value = value; - NextLink = nextLink; - } - - /// An array of objects of type JobBase. - public IReadOnlyList Value { get; } - public string NextLink { get; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/JobOutput.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/JobOutput.Serialization.cs deleted file mode 100644 index 4d2f9a49f67df..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/JobOutput.Serialization.cs +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class JobOutput : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WriteEndObject(); - } - - internal static JobOutput DeserializeJobOutput(JsonElement element) - { - Optional datastoreId = default; - Optional path = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("datastoreId")) - { - datastoreId = property.Value.GetString(); - continue; - } - if (property.NameEquals("path")) - { - path = property.Value.GetString(); - continue; - } - } - return new JobOutput(datastoreId.Value, path.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/JobOutput.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/JobOutput.cs deleted file mode 100644 index 1d2146781fef6..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/JobOutput.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// The JobOutput. - public partial class JobOutput - { - /// Initializes a new instance of JobOutput. - public JobOutput() - { - } - - /// Initializes a new instance of JobOutput. - /// ARM ID of the datastore where the job logs and artifacts are stored, or null for the default container ("azureml") in the workspace's storage account. - /// Path within the datastore to the job logs and artifacts. - internal JobOutput(string datastoreId, string path) - { - DatastoreId = datastoreId; - Path = path; - } - - /// ARM ID of the datastore where the job logs and artifacts are stored, or null for the default container ("azureml") in the workspace's storage account. - public string DatastoreId { get; } - /// Path within the datastore to the job logs and artifacts. - public string Path { get; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/JobStatus.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/JobStatus.cs deleted file mode 100644 index 7989b83560012..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/JobStatus.cs +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// Status of the job. - public readonly partial struct JobStatus : IEquatable - { - private readonly string _value; - - /// Determines if two values are the same. - /// is null. - public JobStatus(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string NotStartedValue = "NotStarted"; - private const string StartingValue = "Starting"; - private const string ProvisioningValue = "Provisioning"; - private const string PreparingValue = "Preparing"; - private const string QueuedValue = "Queued"; - private const string RunningValue = "Running"; - private const string FinalizingValue = "Finalizing"; - private const string CancelRequestedValue = "CancelRequested"; - private const string CompletedValue = "Completed"; - private const string FailedValue = "Failed"; - private const string CanceledValue = "Canceled"; - private const string NotRespondingValue = "NotResponding"; - private const string PausedValue = "Paused"; - - /// NotStarted. - public static JobStatus NotStarted { get; } = new JobStatus(NotStartedValue); - /// Starting. - public static JobStatus Starting { get; } = new JobStatus(StartingValue); - /// Provisioning. - public static JobStatus Provisioning { get; } = new JobStatus(ProvisioningValue); - /// Preparing. - public static JobStatus Preparing { get; } = new JobStatus(PreparingValue); - /// Queued. - public static JobStatus Queued { get; } = new JobStatus(QueuedValue); - /// Running. - public static JobStatus Running { get; } = new JobStatus(RunningValue); - /// Finalizing. - public static JobStatus Finalizing { get; } = new JobStatus(FinalizingValue); - /// CancelRequested. - public static JobStatus CancelRequested { get; } = new JobStatus(CancelRequestedValue); - /// Completed. - public static JobStatus Completed { get; } = new JobStatus(CompletedValue); - /// Failed. - public static JobStatus Failed { get; } = new JobStatus(FailedValue); - /// Canceled. - public static JobStatus Canceled { get; } = new JobStatus(CanceledValue); - /// NotResponding. - public static JobStatus NotResponding { get; } = new JobStatus(NotRespondingValue); - /// Paused. - public static JobStatus Paused { get; } = new JobStatus(PausedValue); - /// Determines if two values are the same. - public static bool operator ==(JobStatus left, JobStatus right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(JobStatus left, JobStatus right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator JobStatus(string value) => new JobStatus(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is JobStatus other && Equals(other); - /// - public bool Equals(JobStatus 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/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/JobType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/JobType.cs deleted file mode 100644 index f938c39a19ff1..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/JobType.cs +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// Specifies the type of job. - public readonly partial struct JobType : IEquatable - { - private readonly string _value; - - /// Determines if two values are the same. - /// is null. - public JobType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string CommandValue = "Command"; - private const string SweepValue = "Sweep"; - private const string LabelingValue = "Labeling"; - private const string PipelineValue = "Pipeline"; - private const string DataValue = "Data"; - private const string AutoMLValue = "AutoML"; - - /// Command. - public static JobType Command { get; } = new JobType(CommandValue); - /// Sweep. - public static JobType Sweep { get; } = new JobType(SweepValue); - /// Labeling. - public static JobType Labeling { get; } = new JobType(LabelingValue); - /// Pipeline. - public static JobType Pipeline { get; } = new JobType(PipelineValue); - /// Data. - public static JobType Data { get; } = new JobType(DataValue); - /// AutoML. - public static JobType AutoML { get; } = new JobType(AutoMLValue); - /// Determines if two values are the same. - public static bool operator ==(JobType left, JobType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(JobType left, JobType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator JobType(string value) => new JobType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is JobType other && Equals(other); - /// - public bool Equals(JobType 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/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Kubernetes.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Kubernetes.Serialization.cs new file mode 100644 index 0000000000000..dbb06a5bb56c2 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Kubernetes.Serialization.cs @@ -0,0 +1,164 @@ +// 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.ResourceManager.MachineLearningServices.Models +{ + public partial class Kubernetes : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"); + writer.WriteObjectValue(Properties); + } + writer.WritePropertyName("computeType"); + writer.WriteStringValue(ComputeType.ToString()); + if (Optional.IsDefined(ComputeLocation)) + { + writer.WritePropertyName("computeLocation"); + writer.WriteStringValue(ComputeLocation); + } + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Optional.IsDefined(ResourceId)) + { + writer.WritePropertyName("resourceId"); + writer.WriteStringValue(ResourceId); + } + if (Optional.IsDefined(DisableLocalAuth)) + { + writer.WritePropertyName("disableLocalAuth"); + writer.WriteBooleanValue(DisableLocalAuth.Value); + } + writer.WriteEndObject(); + } + + internal static Kubernetes DeserializeKubernetes(JsonElement element) + { + Optional properties = default; + ComputeType computeType = default; + Optional computeLocation = default; + Optional provisioningState = default; + Optional description = default; + Optional createdOn = default; + Optional modifiedOn = default; + Optional resourceId = default; + Optional> provisioningErrors = default; + Optional isAttachedCompute = default; + Optional disableLocalAuth = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + properties = KubernetesProperties.DeserializeKubernetesProperties(property.Value); + continue; + } + if (property.NameEquals("computeType")) + { + computeType = new ComputeType(property.Value.GetString()); + continue; + } + if (property.NameEquals("computeLocation")) + { + computeLocation = property.Value.GetString(); + continue; + } + if (property.NameEquals("provisioningState")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + provisioningState = new ProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("description")) + { + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("createdOn")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + createdOn = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("modifiedOn")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + modifiedOn = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("resourceId")) + { + resourceId = property.Value.GetString(); + continue; + } + if (property.NameEquals("provisioningErrors")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ErrorResponse.DeserializeErrorResponse(item)); + } + provisioningErrors = array; + continue; + } + if (property.NameEquals("isAttachedCompute")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + isAttachedCompute = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("disableLocalAuth")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + disableLocalAuth = property.Value.GetBoolean(); + continue; + } + } + return new Kubernetes(computeType, computeLocation.Value, Optional.ToNullable(provisioningState), description.Value, Optional.ToNullable(createdOn), Optional.ToNullable(modifiedOn), resourceId.Value, Optional.ToList(provisioningErrors), Optional.ToNullable(isAttachedCompute), Optional.ToNullable(disableLocalAuth), properties.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Kubernetes.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Kubernetes.cs new file mode 100644 index 0000000000000..e61464ff99c97 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Kubernetes.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.ResourceManager.MachineLearningServices.Models +{ + /// A Machine Learning compute based on Kubernetes Compute. + public partial class Kubernetes : Compute + { + /// Initializes a new instance of Kubernetes. + public Kubernetes() + { + ComputeType = ComputeType.Kubernetes; + } + + /// Initializes a new instance of Kubernetes. + /// The type of compute. + /// Location for the underlying compute. + /// The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. + /// The description of the Machine Learning compute. + /// The time at which the compute was created. + /// The time at which the compute was last modified. + /// ARM resource id of the underlying compute. + /// Errors during provisioning. + /// Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning service provisioned it if false. + /// Opt-out of local authentication and ensure customers can use only MSI and AAD exclusively for authentication. + /// Properties of Kubernetes. + internal Kubernetes(ComputeType computeType, string computeLocation, ProvisioningState? provisioningState, string description, DateTimeOffset? createdOn, DateTimeOffset? modifiedOn, string resourceId, IReadOnlyList provisioningErrors, bool? isAttachedCompute, bool? disableLocalAuth, KubernetesProperties properties) : base(computeType, computeLocation, provisioningState, description, createdOn, modifiedOn, resourceId, provisioningErrors, isAttachedCompute, disableLocalAuth) + { + Properties = properties; + ComputeType = computeType; + } + + /// Properties of Kubernetes. + public KubernetesProperties Properties { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/KubernetesProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/KubernetesProperties.Serialization.cs new file mode 100644 index 0000000000000..df569d428c484 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/KubernetesProperties.Serialization.cs @@ -0,0 +1,134 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class KubernetesProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(RelayConnectionString)) + { + writer.WritePropertyName("relayConnectionString"); + writer.WriteStringValue(RelayConnectionString); + } + if (Optional.IsDefined(ServiceBusConnectionString)) + { + writer.WritePropertyName("serviceBusConnectionString"); + writer.WriteStringValue(ServiceBusConnectionString); + } + if (Optional.IsDefined(ExtensionPrincipalId)) + { + writer.WritePropertyName("extensionPrincipalId"); + writer.WriteStringValue(ExtensionPrincipalId); + } + if (Optional.IsDefined(ExtensionInstanceReleaseTrain)) + { + writer.WritePropertyName("extensionInstanceReleaseTrain"); + writer.WriteStringValue(ExtensionInstanceReleaseTrain); + } + if (Optional.IsDefined(VcName)) + { + writer.WritePropertyName("vcName"); + writer.WriteStringValue(VcName); + } + if (Optional.IsDefined(Namespace)) + { + writer.WritePropertyName("namespace"); + writer.WriteStringValue(Namespace); + } + if (Optional.IsDefined(DefaultInstanceType)) + { + writer.WritePropertyName("defaultInstanceType"); + writer.WriteStringValue(DefaultInstanceType); + } + if (Optional.IsCollectionDefined(InstanceTypes)) + { + writer.WritePropertyName("instanceTypes"); + writer.WriteStartObject(); + foreach (var item in InstanceTypes) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WriteEndObject(); + } + + internal static KubernetesProperties DeserializeKubernetesProperties(JsonElement element) + { + Optional relayConnectionString = default; + Optional serviceBusConnectionString = default; + Optional extensionPrincipalId = default; + Optional extensionInstanceReleaseTrain = default; + Optional vcName = default; + Optional @namespace = default; + Optional defaultInstanceType = default; + Optional> instanceTypes = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("relayConnectionString")) + { + relayConnectionString = property.Value.GetString(); + continue; + } + if (property.NameEquals("serviceBusConnectionString")) + { + serviceBusConnectionString = property.Value.GetString(); + continue; + } + if (property.NameEquals("extensionPrincipalId")) + { + extensionPrincipalId = property.Value.GetString(); + continue; + } + if (property.NameEquals("extensionInstanceReleaseTrain")) + { + extensionInstanceReleaseTrain = property.Value.GetString(); + continue; + } + if (property.NameEquals("vcName")) + { + vcName = property.Value.GetString(); + continue; + } + if (property.NameEquals("namespace")) + { + @namespace = property.Value.GetString(); + continue; + } + if (property.NameEquals("defaultInstanceType")) + { + defaultInstanceType = property.Value.GetString(); + continue; + } + if (property.NameEquals("instanceTypes")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, InstanceTypeSchema.DeserializeInstanceTypeSchema(property0.Value)); + } + instanceTypes = dictionary; + continue; + } + } + return new KubernetesProperties(relayConnectionString.Value, serviceBusConnectionString.Value, extensionPrincipalId.Value, extensionInstanceReleaseTrain.Value, vcName.Value, @namespace.Value, defaultInstanceType.Value, Optional.ToDictionary(instanceTypes)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/KubernetesProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/KubernetesProperties.cs new file mode 100644 index 0000000000000..c36bf0b30b1dc --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/KubernetesProperties.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Kubernetes properties. + public partial class KubernetesProperties + { + /// Initializes a new instance of KubernetesProperties. + public KubernetesProperties() + { + InstanceTypes = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of KubernetesProperties. + /// Relay connection string. + /// ServiceBus connection string. + /// Extension principal-id. + /// Extension instance release train. + /// VC name. + /// Compute namespace. + /// Default instance type. + /// Instance Type Schema. + internal KubernetesProperties(string relayConnectionString, string serviceBusConnectionString, string extensionPrincipalId, string extensionInstanceReleaseTrain, string vcName, string @namespace, string defaultInstanceType, IDictionary instanceTypes) + { + RelayConnectionString = relayConnectionString; + ServiceBusConnectionString = serviceBusConnectionString; + ExtensionPrincipalId = extensionPrincipalId; + ExtensionInstanceReleaseTrain = extensionInstanceReleaseTrain; + VcName = vcName; + Namespace = @namespace; + DefaultInstanceType = defaultInstanceType; + InstanceTypes = instanceTypes; + } + + /// Relay connection string. + public string RelayConnectionString { get; set; } + /// ServiceBus connection string. + public string ServiceBusConnectionString { get; set; } + /// Extension principal-id. + public string ExtensionPrincipalId { get; set; } + /// Extension instance release train. + public string ExtensionInstanceReleaseTrain { get; set; } + /// VC name. + public string VcName { get; set; } + /// Compute namespace. + public string Namespace { get; set; } + /// Default instance type. + public string DefaultInstanceType { get; set; } + /// Instance Type Schema. + public IDictionary InstanceTypes { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/KubernetesSchema.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/KubernetesSchema.Serialization.cs new file mode 100644 index 0000000000000..729bcbf185e6d --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/KubernetesSchema.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.ResourceManager.MachineLearningServices.Models +{ + public partial class KubernetesSchema : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"); + writer.WriteObjectValue(Properties); + } + writer.WriteEndObject(); + } + + internal static KubernetesSchema DeserializeKubernetesSchema(JsonElement element) + { + Optional properties = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + properties = KubernetesProperties.DeserializeKubernetesProperties(property.Value); + continue; + } + } + return new KubernetesSchema(properties.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/KubernetesSchema.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/KubernetesSchema.cs new file mode 100644 index 0000000000000..c990e6eae5567 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/KubernetesSchema.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Kubernetes Compute Schema. + public partial class KubernetesSchema + { + /// Initializes a new instance of KubernetesSchema. + public KubernetesSchema() + { + } + + /// Initializes a new instance of KubernetesSchema. + /// Properties of Kubernetes. + internal KubernetesSchema(KubernetesProperties properties) + { + Properties = properties; + } + + /// Properties of Kubernetes. + public KubernetesProperties Properties { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelCategory.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelCategory.Serialization.cs deleted file mode 100644 index 8639f75f12be0..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelCategory.Serialization.cs +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class LabelCategory : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(DisplayName)) - { - writer.WritePropertyName("displayName"); - writer.WriteStringValue(DisplayName); - } - if (Optional.IsDefined(AllowMultiSelect)) - { - writer.WritePropertyName("allowMultiSelect"); - writer.WriteBooleanValue(AllowMultiSelect.Value); - } - if (Optional.IsCollectionDefined(Classes)) - { - writer.WritePropertyName("classes"); - writer.WriteStartObject(); - foreach (var item in Classes) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WriteEndObject(); - } - - internal static LabelCategory DeserializeLabelCategory(JsonElement element) - { - Optional displayName = default; - Optional allowMultiSelect = default; - Optional> classes = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("displayName")) - { - displayName = property.Value.GetString(); - continue; - } - if (property.NameEquals("allowMultiSelect")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - allowMultiSelect = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("classes")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, LabelClass.DeserializeLabelClass(property0.Value)); - } - classes = dictionary; - continue; - } - } - return new LabelCategory(displayName.Value, Optional.ToNullable(allowMultiSelect), Optional.ToDictionary(classes)); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelCategory.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelCategory.cs deleted file mode 100644 index 579aa1a10736a..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelCategory.cs +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// Label category definition. - public partial class LabelCategory - { - /// Initializes a new instance of LabelCategory. - public LabelCategory() - { - Classes = new ChangeTrackingDictionary(); - } - - /// Initializes a new instance of LabelCategory. - /// Display name of the label category. - /// Indicates whether it is allowed to select multiple classes in this category. - /// Dictionary of label classes in this category. - internal LabelCategory(string displayName, bool? allowMultiSelect, IDictionary classes) - { - DisplayName = displayName; - AllowMultiSelect = allowMultiSelect; - Classes = classes; - } - - /// Display name of the label category. - public string DisplayName { get; set; } - /// Indicates whether it is allowed to select multiple classes in this category. - public bool? AllowMultiSelect { get; set; } - /// Dictionary of label classes in this category. - public IDictionary Classes { get; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelClass.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelClass.Serialization.cs deleted file mode 100644 index 9905282b74b1c..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelClass.Serialization.cs +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class LabelClass : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(DisplayName)) - { - writer.WritePropertyName("displayName"); - writer.WriteStringValue(DisplayName); - } - if (Optional.IsCollectionDefined(Subclasses)) - { - writer.WritePropertyName("subclasses"); - writer.WriteStartObject(); - foreach (var item in Subclasses) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WriteEndObject(); - } - - internal static LabelClass DeserializeLabelClass(JsonElement element) - { - Optional displayName = default; - Optional> subclasses = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("displayName")) - { - displayName = property.Value.GetString(); - continue; - } - if (property.NameEquals("subclasses")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, DeserializeLabelClass(property0.Value)); - } - subclasses = dictionary; - continue; - } - } - return new LabelClass(displayName.Value, Optional.ToDictionary(subclasses)); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelClass.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelClass.cs deleted file mode 100644 index 3191b0efd4db4..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelClass.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// Label class definition. - public partial class LabelClass - { - /// Initializes a new instance of LabelClass. - public LabelClass() - { - Subclasses = new ChangeTrackingDictionary(); - } - - /// Initializes a new instance of LabelClass. - /// Display name of the label class. - /// Dictionary of subclasses of the label class. - internal LabelClass(string displayName, IDictionary subclasses) - { - DisplayName = displayName; - Subclasses = subclasses; - } - - /// Display name of the label class. - public string DisplayName { get; set; } - /// Dictionary of subclasses of the label class. - public IDictionary Subclasses { get; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelExportState.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelExportState.cs deleted file mode 100644 index 553aaafcde4f3..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelExportState.cs +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// The state of the Export Labels operation. - public readonly partial struct LabelExportState : IEquatable - { - private readonly string _value; - - /// Determines if two values are the same. - /// is null. - public LabelExportState(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string RequestedValue = "Requested"; - private const string RunningValue = "Running"; - private const string FailedValue = "Failed"; - private const string CompletedValue = "Completed"; - - /// Requested. - public static LabelExportState Requested { get; } = new LabelExportState(RequestedValue); - /// Running. - public static LabelExportState Running { get; } = new LabelExportState(RunningValue); - /// Failed. - public static LabelExportState Failed { get; } = new LabelExportState(FailedValue); - /// Completed. - public static LabelExportState Completed { get; } = new LabelExportState(CompletedValue); - /// Determines if two values are the same. - public static bool operator ==(LabelExportState left, LabelExportState right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(LabelExportState left, LabelExportState right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator LabelExportState(string value) => new LabelExportState(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is LabelExportState other && Equals(other); - /// - public bool Equals(LabelExportState 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/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelingDatasetConfiguration.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelingDatasetConfiguration.Serialization.cs deleted file mode 100644 index b4818bb36bcb2..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelingDatasetConfiguration.Serialization.cs +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class LabelingDatasetConfiguration : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(AssetName)) - { - writer.WritePropertyName("assetName"); - writer.WriteStringValue(AssetName); - } - if (Optional.IsDefined(IncrementalDatasetRefreshEnabled)) - { - writer.WritePropertyName("incrementalDatasetRefreshEnabled"); - writer.WriteBooleanValue(IncrementalDatasetRefreshEnabled.Value); - } - if (Optional.IsDefined(DatasetVersion)) - { - writer.WritePropertyName("datasetVersion"); - writer.WriteStringValue(DatasetVersion); - } - writer.WriteEndObject(); - } - - internal static LabelingDatasetConfiguration DeserializeLabelingDatasetConfiguration(JsonElement element) - { - Optional assetName = default; - Optional incrementalDatasetRefreshEnabled = default; - Optional datasetVersion = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("assetName")) - { - assetName = property.Value.GetString(); - continue; - } - if (property.NameEquals("incrementalDatasetRefreshEnabled")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - incrementalDatasetRefreshEnabled = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("datasetVersion")) - { - datasetVersion = property.Value.GetString(); - continue; - } - } - return new LabelingDatasetConfiguration(assetName.Value, Optional.ToNullable(incrementalDatasetRefreshEnabled), datasetVersion.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelingDatasetConfiguration.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelingDatasetConfiguration.cs deleted file mode 100644 index 4a030fa993929..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelingDatasetConfiguration.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// Labeling dataset configuration definition. - public partial class LabelingDatasetConfiguration - { - /// Initializes a new instance of LabelingDatasetConfiguration. - public LabelingDatasetConfiguration() - { - } - - /// Initializes a new instance of LabelingDatasetConfiguration. - /// Name of the data asset to perform labeling. - /// Indicates whether to enable incremental dataset refresh. - /// AML dataset version. - internal LabelingDatasetConfiguration(string assetName, bool? incrementalDatasetRefreshEnabled, string datasetVersion) - { - AssetName = assetName; - IncrementalDatasetRefreshEnabled = incrementalDatasetRefreshEnabled; - DatasetVersion = datasetVersion; - } - - /// Name of the data asset to perform labeling. - public string AssetName { get; set; } - /// Indicates whether to enable incremental dataset refresh. - public bool? IncrementalDatasetRefreshEnabled { get; set; } - /// AML dataset version. - public string DatasetVersion { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelingJob.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelingJob.Serialization.cs deleted file mode 100644 index 85fe8a54a0021..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelingJob.Serialization.cs +++ /dev/null @@ -1,296 +0,0 @@ -// 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.ResourceManager.MachineLearningServices.Models -{ - public partial class LabelingJob : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(LabelCategories)) - { - writer.WritePropertyName("labelCategories"); - writer.WriteStartObject(); - foreach (var item in LabelCategories) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsDefined(JobInstructions)) - { - writer.WritePropertyName("jobInstructions"); - writer.WriteObjectValue(JobInstructions); - } - if (Optional.IsDefined(DatasetConfiguration)) - { - writer.WritePropertyName("datasetConfiguration"); - writer.WriteObjectValue(DatasetConfiguration); - } - if (Optional.IsDefined(MlAssistConfiguration)) - { - writer.WritePropertyName("mlAssistConfiguration"); - writer.WriteObjectValue(MlAssistConfiguration); - } - if (Optional.IsDefined(LabelingJobMediaProperties)) - { - writer.WritePropertyName("labelingJobMediaProperties"); - writer.WriteObjectValue(LabelingJobMediaProperties); - } - if (Optional.IsDefined(ProjectId)) - { - writer.WritePropertyName("projectId"); - writer.WriteStringValue(ProjectId.Value); - } - if (Optional.IsDefined(Status)) - { - writer.WritePropertyName("status"); - writer.WriteStringValue(Status.Value.ToString()); - } - if (Optional.IsDefined(ProgressMetrics)) - { - writer.WritePropertyName("progressMetrics"); - writer.WriteObjectValue(ProgressMetrics); - } - if (Optional.IsCollectionDefined(StatusMessages)) - { - writer.WritePropertyName("statusMessages"); - writer.WriteStartArray(); - foreach (var item in StatusMessages) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(CreatedTimeUtc)) - { - writer.WritePropertyName("createdTimeUtc"); - writer.WriteStringValue(CreatedTimeUtc.Value, "O"); - } - writer.WritePropertyName("jobType"); - writer.WriteStringValue(JobType.ToString()); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Properties)) - { - writer.WritePropertyName("properties"); - writer.WriteStartObject(); - foreach (var item in Properties) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WriteEndObject(); - } - - internal static LabelingJob DeserializeLabelingJob(JsonElement element) - { - Optional> labelCategories = default; - Optional jobInstructions = default; - Optional datasetConfiguration = default; - Optional mlAssistConfiguration = default; - Optional labelingJobMediaProperties = default; - Optional projectId = default; - Optional status = default; - Optional progressMetrics = default; - Optional> statusMessages = default; - Optional createdTimeUtc = default; - JobType jobType = default; - Optional interactionEndpoints = default; - Optional description = default; - Optional> tags = default; - Optional> properties = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("labelCategories")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, LabelCategory.DeserializeLabelCategory(property0.Value)); - } - labelCategories = dictionary; - continue; - } - if (property.NameEquals("jobInstructions")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - jobInstructions = LabelingJobInstructions.DeserializeLabelingJobInstructions(property.Value); - continue; - } - if (property.NameEquals("datasetConfiguration")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - datasetConfiguration = LabelingDatasetConfiguration.DeserializeLabelingDatasetConfiguration(property.Value); - continue; - } - if (property.NameEquals("mlAssistConfiguration")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - mlAssistConfiguration = MLAssistConfiguration.DeserializeMLAssistConfiguration(property.Value); - continue; - } - if (property.NameEquals("labelingJobMediaProperties")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - labelingJobMediaProperties = LabelingJobMediaProperties.DeserializeLabelingJobMediaProperties(property.Value); - continue; - } - if (property.NameEquals("projectId")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - projectId = property.Value.GetGuid(); - continue; - } - if (property.NameEquals("status")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - status = new JobStatus(property.Value.GetString()); - continue; - } - if (property.NameEquals("progressMetrics")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - progressMetrics = ProgressMetrics.DeserializeProgressMetrics(property.Value); - continue; - } - if (property.NameEquals("statusMessages")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(StatusMessage.DeserializeStatusMessage(item)); - } - statusMessages = array; - continue; - } - if (property.NameEquals("createdTimeUtc")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - createdTimeUtc = property.Value.GetDateTimeOffset("O"); - continue; - } - if (property.NameEquals("jobType")) - { - jobType = new JobType(property.Value.GetString()); - continue; - } - if (property.NameEquals("interactionEndpoints")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - interactionEndpoints = JobBaseInteractionEndpoints.DeserializeJobBaseInteractionEndpoints(property.Value); - continue; - } - if (property.NameEquals("description")) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("tags")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - tags = dictionary; - continue; - } - if (property.NameEquals("properties")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - properties = dictionary; - continue; - } - } - return new LabelingJob(jobType, interactionEndpoints.Value, description.Value, Optional.ToDictionary(tags), Optional.ToDictionary(properties), Optional.ToDictionary(labelCategories), jobInstructions.Value, datasetConfiguration.Value, mlAssistConfiguration.Value, labelingJobMediaProperties.Value, Optional.ToNullable(projectId), Optional.ToNullable(status), progressMetrics.Value, Optional.ToList(statusMessages), Optional.ToNullable(createdTimeUtc)); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelingJob.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelingJob.cs deleted file mode 100644 index d69e82d31aaf8..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelingJob.cs +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// Labeling job definition. - public partial class LabelingJob : JobBase - { - /// Initializes a new instance of LabelingJob. - public LabelingJob() - { - LabelCategories = new ChangeTrackingDictionary(); - StatusMessages = new ChangeTrackingList(); - JobType = JobType.Labeling; - } - - /// Initializes a new instance of LabelingJob. - /// Specifies the type of job. - /// - /// Dictonary of endpoint URIs, keyed by enumerated job endpoints. - /// - /// For local jobs, a job endpoint will have a value of FileStreamObject. - /// - /// The asset description text. - /// Tag dictionary. Tags can be added, removed, and updated. - /// The asset property dictionary. - /// Label categories of the job. - /// Instructions for labeling job. - /// Labeling dataset configuration definition. - /// Labeling MLAssist configuration definition. - /// Properties of a labeling job. - /// Internal id of the job(Previously called project). - /// Status of the job. - /// Progress metrics definition. - /// Status messages of the job. - /// Created time of the job in UTC timezone. - internal LabelingJob(JobType jobType, JobBaseInteractionEndpoints interactionEndpoints, string description, IDictionary tags, IDictionary properties, IDictionary labelCategories, LabelingJobInstructions jobInstructions, LabelingDatasetConfiguration datasetConfiguration, MLAssistConfiguration mlAssistConfiguration, LabelingJobMediaProperties labelingJobMediaProperties, Guid? projectId, JobStatus? status, ProgressMetrics progressMetrics, IList statusMessages, DateTimeOffset? createdTimeUtc) : base(jobType, interactionEndpoints, description, tags, properties) - { - LabelCategories = labelCategories; - JobInstructions = jobInstructions; - DatasetConfiguration = datasetConfiguration; - MlAssistConfiguration = mlAssistConfiguration; - LabelingJobMediaProperties = labelingJobMediaProperties; - ProjectId = projectId; - Status = status; - ProgressMetrics = progressMetrics; - StatusMessages = statusMessages; - CreatedTimeUtc = createdTimeUtc; - JobType = jobType; - } - - /// Label categories of the job. - public IDictionary LabelCategories { get; } - /// Instructions for labeling job. - public LabelingJobInstructions JobInstructions { get; set; } - /// Labeling dataset configuration definition. - public LabelingDatasetConfiguration DatasetConfiguration { get; set; } - /// Labeling MLAssist configuration definition. - public MLAssistConfiguration MlAssistConfiguration { get; set; } - /// Properties of a labeling job. - public LabelingJobMediaProperties LabelingJobMediaProperties { get; set; } - /// Internal id of the job(Previously called project). - public Guid? ProjectId { get; set; } - /// Status of the job. - public JobStatus? Status { get; set; } - /// Progress metrics definition. - public ProgressMetrics ProgressMetrics { get; set; } - /// Status messages of the job. - public IList StatusMessages { get; } - /// Created time of the job in UTC timezone. - public DateTimeOffset? CreatedTimeUtc { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelingJobInstructions.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelingJobInstructions.Serialization.cs deleted file mode 100644 index a438b1c12f89f..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelingJobInstructions.Serialization.cs +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class LabelingJobInstructions : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Uri)) - { - writer.WritePropertyName("uri"); - writer.WriteStringValue(Uri); - } - writer.WriteEndObject(); - } - - internal static LabelingJobInstructions DeserializeLabelingJobInstructions(JsonElement element) - { - Optional uri = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("uri")) - { - uri = property.Value.GetString(); - continue; - } - } - return new LabelingJobInstructions(uri.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelingJobInstructions.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelingJobInstructions.cs deleted file mode 100644 index 1f1efe981d093..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelingJobInstructions.cs +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// Instructions for labeling job. - public partial class LabelingJobInstructions - { - /// Initializes a new instance of LabelingJobInstructions. - public LabelingJobInstructions() - { - } - - /// Initializes a new instance of LabelingJobInstructions. - /// The link to a page with detailed labeling instructions for labelers. - internal LabelingJobInstructions(string uri) - { - Uri = uri; - } - - /// The link to a page with detailed labeling instructions for labelers. - public string Uri { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelingJobMediaProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelingJobMediaProperties.Serialization.cs deleted file mode 100644 index 3b9437c7d8429..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelingJobMediaProperties.Serialization.cs +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class LabelingJobMediaProperties : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("mediaType"); - writer.WriteStringValue(MediaType.ToString()); - writer.WriteEndObject(); - } - - internal static LabelingJobMediaProperties DeserializeLabelingJobMediaProperties(JsonElement element) - { - MediaType mediaType = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("mediaType")) - { - mediaType = new MediaType(property.Value.GetString()); - continue; - } - } - return new LabelingJobMediaProperties(mediaType); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelingJobMediaProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelingJobMediaProperties.cs deleted file mode 100644 index 123a87b99747b..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelingJobMediaProperties.cs +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// Properties of a labeling job. - public partial class LabelingJobMediaProperties - { - /// Initializes a new instance of LabelingJobMediaProperties. - public LabelingJobMediaProperties() - { - } - - /// Initializes a new instance of LabelingJobMediaProperties. - /// Media type of the job. - internal LabelingJobMediaProperties(MediaType mediaType) - { - MediaType = mediaType; - } - - /// Media type of the job. - internal MediaType MediaType { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelingJobResource.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelingJobResource.Serialization.cs deleted file mode 100644 index ba685ab21f50a..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelingJobResource.Serialization.cs +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class LabelingJobResource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("properties"); - writer.WriteObjectValue(Properties); - writer.WriteEndObject(); - } - - internal static LabelingJobResource DeserializeLabelingJobResource(JsonElement element) - { - Optional id = default; - Optional name = default; - Optional type = default; - LabelingJob properties = default; - Optional systemData = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("id")) - { - id = property.Value.GetString(); - continue; - } - if (property.NameEquals("name")) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type")) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("properties")) - { - properties = LabelingJob.DeserializeLabelingJob(property.Value); - continue; - } - if (property.NameEquals("systemData")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - systemData = SystemData.DeserializeSystemData(property.Value); - continue; - } - } - return new LabelingJobResource(id.Value, name.Value, type.Value, properties, systemData.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelingJobResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelingJobResource.cs deleted file mode 100644 index dd33ed8da2e66..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelingJobResource.cs +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// Azure Resource Manager resource envelope. - public partial class LabelingJobResource - { - /// Initializes a new instance of LabelingJobResource. - /// Labeling job definition. - /// is null. - public LabelingJobResource(LabelingJob properties) - { - if (properties == null) - { - throw new ArgumentNullException(nameof(properties)); - } - - Properties = properties; - } - - /// Initializes a new instance of LabelingJobResource. - /// The resource URL of the entity (not URL encoded). - /// The name of the resource entity. - /// The resource provider and type. - /// Labeling job definition. - /// Metadata pertaining to creation and last modification of the resource. - internal LabelingJobResource(string id, string name, string type, LabelingJob properties, SystemData systemData) - { - Id = id; - Name = name; - Type = type; - Properties = properties; - SystemData = systemData; - } - - /// The resource URL of the entity (not URL encoded). - public string Id { get; } - /// The name of the resource entity. - public string Name { get; } - /// The resource provider and type. - public string Type { get; } - /// Labeling job definition. - public LabelingJob Properties { get; set; } - /// Metadata pertaining to creation and last modification of the resource. - public SystemData SystemData { get; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelingJobResourceArmPaginatedResult.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelingJobResourceArmPaginatedResult.Serialization.cs deleted file mode 100644 index 665ef4bec56f4..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelingJobResourceArmPaginatedResult.Serialization.cs +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - internal partial class LabelingJobResourceArmPaginatedResult - { - internal static LabelingJobResourceArmPaginatedResult DeserializeLabelingJobResourceArmPaginatedResult(JsonElement element) - { - Optional> value = default; - Optional nextLink = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("value")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(LabelingJobResource.DeserializeLabelingJobResource(item)); - } - value = array; - continue; - } - if (property.NameEquals("nextLink")) - { - nextLink = property.Value.GetString(); - continue; - } - } - return new LabelingJobResourceArmPaginatedResult(Optional.ToList(value), nextLink.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelingJobResourceArmPaginatedResult.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelingJobResourceArmPaginatedResult.cs deleted file mode 100644 index 3ac34af3073a0..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelingJobResourceArmPaginatedResult.cs +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// A paginated list of LabelingJob entities. - internal partial class LabelingJobResourceArmPaginatedResult - { - /// Initializes a new instance of LabelingJobResourceArmPaginatedResult. - internal LabelingJobResourceArmPaginatedResult() - { - Value = new ChangeTrackingList(); - } - - /// Initializes a new instance of LabelingJobResourceArmPaginatedResult. - /// An array of objects of type LabelingJob. - /// . - internal LabelingJobResourceArmPaginatedResult(IReadOnlyList value, string nextLink) - { - Value = value; - NextLink = nextLink; - } - - /// An array of objects of type LabelingJob. - public IReadOnlyList Value { get; } - public string NextLink { get; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LinkedInfo.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LinkedInfo.Serialization.cs deleted file mode 100644 index d90126c99d6b2..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LinkedInfo.Serialization.cs +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class LinkedInfo : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(LinkedId)) - { - writer.WritePropertyName("linkedId"); - writer.WriteStringValue(LinkedId); - } - if (Optional.IsDefined(LinkedResourceName)) - { - writer.WritePropertyName("linkedResourceName"); - writer.WriteStringValue(LinkedResourceName); - } - if (Optional.IsDefined(Origin)) - { - writer.WritePropertyName("origin"); - writer.WriteStringValue(Origin.Value.ToString()); - } - writer.WriteEndObject(); - } - - internal static LinkedInfo DeserializeLinkedInfo(JsonElement element) - { - Optional linkedId = default; - Optional linkedResourceName = default; - Optional origin = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("linkedId")) - { - linkedId = property.Value.GetString(); - continue; - } - if (property.NameEquals("linkedResourceName")) - { - linkedResourceName = property.Value.GetString(); - continue; - } - if (property.NameEquals("origin")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - origin = new OriginType(property.Value.GetString()); - continue; - } - } - return new LinkedInfo(linkedId.Value, linkedResourceName.Value, Optional.ToNullable(origin)); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LinkedInfo.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LinkedInfo.cs deleted file mode 100644 index f289c9b727177..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LinkedInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// The LinkedInfo. - public partial class LinkedInfo - { - /// Initializes a new instance of LinkedInfo. - public LinkedInfo() - { - } - - /// Initializes a new instance of LinkedInfo. - /// Linked service ID. - /// Linked service resource name. - /// Type of the linked service. - internal LinkedInfo(string linkedId, string linkedResourceName, OriginType? origin) - { - LinkedId = linkedId; - LinkedResourceName = linkedResourceName; - Origin = origin; - } - - /// Linked service ID. - public string LinkedId { get; set; } - /// Linked service resource name. - public string LinkedResourceName { get; set; } - /// Type of the linked service. - public OriginType? Origin { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LinkedServiceList.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LinkedServiceList.cs deleted file mode 100644 index 05ea3d1195ff1..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LinkedServiceList.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// List response of linked service. - public partial class LinkedServiceList - { - /// Initializes a new instance of LinkedServiceList. - internal LinkedServiceList() - { - Value = new ChangeTrackingList(); - } - - /// Initializes a new instance of LinkedServiceList. - /// Array of linked service. - internal LinkedServiceList(IReadOnlyList value) - { - Value = value; - } - - /// Array of linked service. - public IReadOnlyList Value { get; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LinkedServiceProps.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LinkedServiceProps.Serialization.cs deleted file mode 100644 index 33c133a713018..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LinkedServiceProps.Serialization.cs +++ /dev/null @@ -1,81 +0,0 @@ -// 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.ResourceManager.MachineLearningServices.Models -{ - public partial class LinkedServiceProps : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("linkedServiceResourceId"); - writer.WriteStringValue(LinkedServiceResourceId); - if (Optional.IsDefined(LinkType)) - { - writer.WritePropertyName("linkType"); - writer.WriteStringValue(LinkType); - } - if (Optional.IsDefined(CreatedTime)) - { - writer.WritePropertyName("createdTime"); - writer.WriteStringValue(CreatedTime.Value, "O"); - } - if (Optional.IsDefined(ModifiedTime)) - { - writer.WritePropertyName("modifiedTime"); - writer.WriteStringValue(ModifiedTime.Value, "O"); - } - writer.WriteEndObject(); - } - - internal static LinkedServiceProps DeserializeLinkedServiceProps(JsonElement element) - { - string linkedServiceResourceId = default; - Optional linkType = default; - Optional createdTime = default; - Optional modifiedTime = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("linkedServiceResourceId")) - { - linkedServiceResourceId = property.Value.GetString(); - continue; - } - if (property.NameEquals("linkType")) - { - linkType = property.Value.GetString(); - continue; - } - if (property.NameEquals("createdTime")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - createdTime = property.Value.GetDateTimeOffset("O"); - continue; - } - if (property.NameEquals("modifiedTime")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - modifiedTime = property.Value.GetDateTimeOffset("O"); - continue; - } - } - return new LinkedServiceProps(linkedServiceResourceId, linkType.Value, Optional.ToNullable(createdTime), Optional.ToNullable(modifiedTime)); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LinkedServiceProps.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LinkedServiceProps.cs deleted file mode 100644 index 463e5e7a85b09..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LinkedServiceProps.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// LinkedService specific properties. - public partial class LinkedServiceProps - { - /// Initializes a new instance of LinkedServiceProps. - /// ResourceId of the link target of the linked service. - /// is null. - public LinkedServiceProps(string linkedServiceResourceId) - { - if (linkedServiceResourceId == null) - { - throw new ArgumentNullException(nameof(linkedServiceResourceId)); - } - - LinkedServiceResourceId = linkedServiceResourceId; - LinkType = "Synapse"; - } - - /// Initializes a new instance of LinkedServiceProps. - /// ResourceId of the link target of the linked service. - /// Type of the link target. - /// The creation time of the linked service. - /// The last modified time of the linked service. - internal LinkedServiceProps(string linkedServiceResourceId, string linkType, DateTimeOffset? createdTime, DateTimeOffset? modifiedTime) - { - LinkedServiceResourceId = linkedServiceResourceId; - LinkType = linkType; - CreatedTime = createdTime; - ModifiedTime = modifiedTime; - } - - /// ResourceId of the link target of the linked service. - public string LinkedServiceResourceId { get; set; } - /// Type of the link target. - public string LinkType { get; set; } - /// The creation time of the linked service. - public DateTimeOffset? CreatedTime { get; set; } - /// The last modified time of the linked service. - public DateTimeOffset? ModifiedTime { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LinkedServiceRequest.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LinkedServiceRequest.Serialization.cs deleted file mode 100644 index 2cb260b0730e4..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LinkedServiceRequest.Serialization.cs +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class LinkedServiceRequest : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(Name); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"); - writer.WriteStringValue(Location); - } - if (Optional.IsDefined(Identity)) - { - writer.WritePropertyName("identity"); - writer.WriteObjectValue(Identity); - } - if (Optional.IsDefined(Properties)) - { - writer.WritePropertyName("properties"); - writer.WriteObjectValue(Properties); - } - writer.WriteEndObject(); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LinkedServiceRequest.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LinkedServiceRequest.cs deleted file mode 100644 index e21e549790a00..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LinkedServiceRequest.cs +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// object used for creating linked service. - public partial class LinkedServiceRequest - { - /// Initializes a new instance of LinkedServiceRequest. - public LinkedServiceRequest() - { - } - - /// Friendly name of the linked service. - public string Name { get; set; } - /// location of the linked service. - public string Location { get; set; } - /// Identity for the resource. - public Identity Identity { get; set; } - /// LinkedService specific properties. - public LinkedServiceProps Properties { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LinkedServiceResponse.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LinkedServiceResponse.Serialization.cs deleted file mode 100644 index 95fe1e1e88f48..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LinkedServiceResponse.Serialization.cs +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class LinkedServiceResponse - { - internal static LinkedServiceResponse DeserializeLinkedServiceResponse(JsonElement element) - { - Optional id = default; - Optional name = default; - Optional type = default; - Optional location = default; - Optional identity = default; - Optional properties = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("id")) - { - id = property.Value.GetString(); - continue; - } - if (property.NameEquals("name")) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type")) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("location")) - { - location = property.Value.GetString(); - continue; - } - if (property.NameEquals("identity")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - identity = Identity.DeserializeIdentity(property.Value); - continue; - } - if (property.NameEquals("properties")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - properties = LinkedServiceProps.DeserializeLinkedServiceProps(property.Value); - continue; - } - } - return new LinkedServiceResponse(id.Value, name.Value, type.Value, location.Value, identity.Value, properties.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LinkedServiceResponse.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LinkedServiceResponse.cs deleted file mode 100644 index 02d96badb282b..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LinkedServiceResponse.cs +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// Linked service. - public partial class LinkedServiceResponse - { - /// Initializes a new instance of LinkedServiceResponse. - internal LinkedServiceResponse() - { - } - - /// Initializes a new instance of LinkedServiceResponse. - /// ResourceId of the link of the linked service. - /// Friendly name of the linked service. - /// Resource type of linked service. - /// location of the linked service. - /// Identity for the resource. - /// LinkedService specific properties. - internal LinkedServiceResponse(string id, string name, string type, string location, Identity identity, LinkedServiceProps properties) - { - Id = id; - Name = name; - Type = type; - Location = location; - Identity = identity; - Properties = properties; - } - - /// ResourceId of the link of the linked service. - public string Id { get; } - /// Friendly name of the linked service. - public string Name { get; } - /// Resource type of linked service. - public string Type { get; } - /// location of the linked service. - public string Location { get; } - /// Identity for the resource. - public Identity Identity { get; } - /// LinkedService specific properties. - public LinkedServiceProps Properties { get; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ListStorageAccountKeysResult.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ListStorageAccountKeysResult.Serialization.cs new file mode 100644 index 0000000000000..c767e4f1273bd --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ListStorageAccountKeysResult.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.ResourceManager.MachineLearningServices.Models +{ + public partial class ListStorageAccountKeysResult + { + internal static ListStorageAccountKeysResult DeserializeListStorageAccountKeysResult(JsonElement element) + { + Optional userStorageKey = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("userStorageKey")) + { + userStorageKey = property.Value.GetString(); + continue; + } + } + return new ListStorageAccountKeysResult(userStorageKey.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ListStorageAccountKeysResult.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ListStorageAccountKeysResult.cs new file mode 100644 index 0000000000000..2a5927d474f3c --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ListStorageAccountKeysResult.cs @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The ListStorageAccountKeysResult. + public partial class ListStorageAccountKeysResult + { + /// Initializes a new instance of ListStorageAccountKeysResult. + internal ListStorageAccountKeysResult() + { + } + + /// Initializes a new instance of ListStorageAccountKeysResult. + /// . + internal ListStorageAccountKeysResult(string userStorageKey) + { + UserStorageKey = userStorageKey; + } + + public string UserStorageKey { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ListWorkspaceKeysResult.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ListWorkspaceKeysResult.Serialization.cs index 7206377c4a830..9c84e4b43a9bc 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ListWorkspaceKeysResult.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ListWorkspaceKeysResult.Serialization.cs @@ -18,6 +18,7 @@ internal static ListWorkspaceKeysResult DeserializeListWorkspaceKeysResult(JsonE Optional userStorageResourceId = default; Optional appInsightsInstrumentationKey = default; Optional containerRegistryCredentials = default; + Optional notebookAccessKeys = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("userStorageKey")) @@ -45,8 +46,18 @@ internal static ListWorkspaceKeysResult DeserializeListWorkspaceKeysResult(JsonE containerRegistryCredentials = RegistryListCredentialsResult.DeserializeRegistryListCredentialsResult(property.Value); continue; } + if (property.NameEquals("notebookAccessKeys")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + notebookAccessKeys = ListNotebookKeysResult.DeserializeListNotebookKeysResult(property.Value); + continue; + } } - return new ListWorkspaceKeysResult(userStorageKey.Value, userStorageResourceId.Value, appInsightsInstrumentationKey.Value, containerRegistryCredentials.Value); + return new ListWorkspaceKeysResult(userStorageKey.Value, userStorageResourceId.Value, appInsightsInstrumentationKey.Value, containerRegistryCredentials.Value, notebookAccessKeys.Value); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ListWorkspaceKeysResult.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ListWorkspaceKeysResult.cs index b0e296c62acf9..542c3c14c25c5 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ListWorkspaceKeysResult.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ListWorkspaceKeysResult.cs @@ -20,17 +20,20 @@ internal ListWorkspaceKeysResult() /// . /// . /// . - internal ListWorkspaceKeysResult(string userStorageKey, string userStorageResourceId, string appInsightsInstrumentationKey, RegistryListCredentialsResult containerRegistryCredentials) + /// . + internal ListWorkspaceKeysResult(string userStorageKey, string userStorageResourceId, string appInsightsInstrumentationKey, RegistryListCredentialsResult containerRegistryCredentials, ListNotebookKeysResult notebookAccessKeys) { UserStorageKey = userStorageKey; UserStorageResourceId = userStorageResourceId; AppInsightsInstrumentationKey = appInsightsInstrumentationKey; ContainerRegistryCredentials = containerRegistryCredentials; + NotebookAccessKeys = notebookAccessKeys; } public string UserStorageKey { get; } public string UserStorageResourceId { get; } public string AppInsightsInstrumentationKey { get; } public RegistryListCredentialsResult ContainerRegistryCredentials { get; } + public ListNotebookKeysResult NotebookAccessKeys { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LivenessProbeRequirements.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LivenessProbeRequirements.Serialization.cs deleted file mode 100644 index 4e25464495bf9..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LivenessProbeRequirements.Serialization.cs +++ /dev/null @@ -1,109 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class LivenessProbeRequirements : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(FailureThreshold)) - { - writer.WritePropertyName("failureThreshold"); - writer.WriteNumberValue(FailureThreshold.Value); - } - if (Optional.IsDefined(SuccessThreshold)) - { - writer.WritePropertyName("successThreshold"); - writer.WriteNumberValue(SuccessThreshold.Value); - } - if (Optional.IsDefined(TimeoutSeconds)) - { - writer.WritePropertyName("timeoutSeconds"); - writer.WriteNumberValue(TimeoutSeconds.Value); - } - if (Optional.IsDefined(PeriodSeconds)) - { - writer.WritePropertyName("periodSeconds"); - writer.WriteNumberValue(PeriodSeconds.Value); - } - if (Optional.IsDefined(InitialDelaySeconds)) - { - writer.WritePropertyName("initialDelaySeconds"); - writer.WriteNumberValue(InitialDelaySeconds.Value); - } - writer.WriteEndObject(); - } - - internal static LivenessProbeRequirements DeserializeLivenessProbeRequirements(JsonElement element) - { - Optional failureThreshold = default; - Optional successThreshold = default; - Optional timeoutSeconds = default; - Optional periodSeconds = default; - Optional initialDelaySeconds = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("failureThreshold")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - failureThreshold = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("successThreshold")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - successThreshold = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("timeoutSeconds")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - timeoutSeconds = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("periodSeconds")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - periodSeconds = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("initialDelaySeconds")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - initialDelaySeconds = property.Value.GetInt32(); - continue; - } - } - return new LivenessProbeRequirements(Optional.ToNullable(failureThreshold), Optional.ToNullable(successThreshold), Optional.ToNullable(timeoutSeconds), Optional.ToNullable(periodSeconds), Optional.ToNullable(initialDelaySeconds)); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LivenessProbeRequirements.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LivenessProbeRequirements.cs deleted file mode 100644 index 73090509bd08b..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LivenessProbeRequirements.cs +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// The liveness probe requirements. - public partial class LivenessProbeRequirements - { - /// Initializes a new instance of LivenessProbeRequirements. - public LivenessProbeRequirements() - { - } - - /// Initializes a new instance of LivenessProbeRequirements. - /// The number of failures to allow before returning an unhealthy status. - /// The number of successful probes before returning a healthy status. - /// The probe timeout in seconds. - /// The length of time between probes in seconds. - /// The delay before the first probe in seconds. - internal LivenessProbeRequirements(int? failureThreshold, int? successThreshold, int? timeoutSeconds, int? periodSeconds, int? initialDelaySeconds) - { - FailureThreshold = failureThreshold; - SuccessThreshold = successThreshold; - TimeoutSeconds = timeoutSeconds; - PeriodSeconds = periodSeconds; - InitialDelaySeconds = initialDelaySeconds; - } - - /// The number of failures to allow before returning an unhealthy status. - public int? FailureThreshold { get; set; } - /// The number of successful probes before returning a healthy status. - public int? SuccessThreshold { get; set; } - /// The probe timeout in seconds. - public int? TimeoutSeconds { get; set; } - /// The length of time between probes in seconds. - public int? PeriodSeconds { get; set; } - /// The delay before the first probe in seconds. - public int? InitialDelaySeconds { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LoadBalancerType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LoadBalancerType.cs new file mode 100644 index 0000000000000..74d2a039599a5 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LoadBalancerType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Load Balancer Type. + public readonly partial struct LoadBalancerType : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + /// is null. + public LoadBalancerType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string PublicIpValue = "PublicIp"; + private const string InternalLoadBalancerValue = "InternalLoadBalancer"; + + /// PublicIp. + public static LoadBalancerType PublicIp { get; } = new LoadBalancerType(PublicIpValue); + /// InternalLoadBalancer. + public static LoadBalancerType InternalLoadBalancer { get; } = new LoadBalancerType(InternalLoadBalancerValue); + /// Determines if two values are the same. + public static bool operator ==(LoadBalancerType left, LoadBalancerType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(LoadBalancerType left, LoadBalancerType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator LoadBalancerType(string value) => new LoadBalancerType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is LoadBalancerType other && Equals(other); + /// + public bool Equals(LoadBalancerType 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/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/MLAssistConfiguration.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/MLAssistConfiguration.Serialization.cs deleted file mode 100644 index b0f80570a8ac1..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/MLAssistConfiguration.Serialization.cs +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class MLAssistConfiguration : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(InferencingComputeBinding)) - { - writer.WritePropertyName("inferencingComputeBinding"); - writer.WriteObjectValue(InferencingComputeBinding); - } - if (Optional.IsDefined(TrainingComputeBinding)) - { - writer.WritePropertyName("trainingComputeBinding"); - writer.WriteObjectValue(TrainingComputeBinding); - } - if (Optional.IsDefined(MlAssistEnabled)) - { - writer.WritePropertyName("mlAssistEnabled"); - writer.WriteBooleanValue(MlAssistEnabled.Value); - } - writer.WriteEndObject(); - } - - internal static MLAssistConfiguration DeserializeMLAssistConfiguration(JsonElement element) - { - Optional inferencingComputeBinding = default; - Optional trainingComputeBinding = default; - Optional mlAssistEnabled = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("inferencingComputeBinding")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - inferencingComputeBinding = ComputeBinding.DeserializeComputeBinding(property.Value); - continue; - } - if (property.NameEquals("trainingComputeBinding")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - trainingComputeBinding = ComputeBinding.DeserializeComputeBinding(property.Value); - continue; - } - if (property.NameEquals("mlAssistEnabled")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - mlAssistEnabled = property.Value.GetBoolean(); - continue; - } - } - return new MLAssistConfiguration(inferencingComputeBinding.Value, trainingComputeBinding.Value, Optional.ToNullable(mlAssistEnabled)); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/MLAssistConfiguration.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/MLAssistConfiguration.cs deleted file mode 100644 index fa1d5086bdca8..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/MLAssistConfiguration.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// Labeling MLAssist configuration definition. - public partial class MLAssistConfiguration - { - /// Initializes a new instance of MLAssistConfiguration. - public MLAssistConfiguration() - { - } - - /// Initializes a new instance of MLAssistConfiguration. - /// Compute binding definition. - /// Compute binding definition. - /// Indicates whether MLAssist feature is enabled. - internal MLAssistConfiguration(ComputeBinding inferencingComputeBinding, ComputeBinding trainingComputeBinding, bool? mlAssistEnabled) - { - InferencingComputeBinding = inferencingComputeBinding; - TrainingComputeBinding = trainingComputeBinding; - MlAssistEnabled = mlAssistEnabled; - } - - /// Compute binding definition. - public ComputeBinding InferencingComputeBinding { get; set; } - /// Compute binding definition. - public ComputeBinding TrainingComputeBinding { get; set; } - /// Indicates whether MLAssist feature is enabled. - public bool? MlAssistEnabled { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/MachineLearningServiceError.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/MachineLearningServiceError.cs deleted file mode 100644 index 99f154656e2cd..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/MachineLearningServiceError.cs +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// Wrapper for error response to follow ARM guidelines. - public partial class MachineLearningServiceError - { - /// Initializes a new instance of MachineLearningServiceError. - internal MachineLearningServiceError() - { - } - - /// Initializes a new instance of MachineLearningServiceError. - /// The error response. - internal MachineLearningServiceError(ErrorResponse error) - { - Error = error; - } - - /// The error response. - public ErrorResponse Error { get; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/MediaType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/MediaType.cs deleted file mode 100644 index 3f6b1e00e56b9..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/MediaType.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// Media type of the job. - public readonly partial struct MediaType : IEquatable - { - private readonly string _value; - - /// Determines if two values are the same. - /// is null. - public MediaType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string ImageValue = "Image"; - private const string TextValue = "Text"; - - /// Image. - public static MediaType Image { get; } = new MediaType(ImageValue); - /// Text. - public static MediaType Text { get; } = new MediaType(TextValue); - /// Determines if two values are the same. - public static bool operator ==(MediaType left, MediaType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(MediaType left, MediaType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator MediaType(string value) => new MediaType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is MediaType other && Equals(other); - /// - public bool Equals(MediaType 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/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Model.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Model.Serialization.cs deleted file mode 100644 index cdde334f5cbd3..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Model.Serialization.cs +++ /dev/null @@ -1,340 +0,0 @@ -// 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.ResourceManager.MachineLearningServices.Models -{ - public partial class Model : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"); - writer.WriteStringValue(Id); - } - writer.WritePropertyName("name"); - writer.WriteStringValue(Name); - if (Optional.IsDefined(Framework)) - { - writer.WritePropertyName("framework"); - writer.WriteStringValue(Framework); - } - if (Optional.IsDefined(FrameworkVersion)) - { - writer.WritePropertyName("frameworkVersion"); - writer.WriteStringValue(FrameworkVersion); - } - if (Optional.IsDefined(Version)) - { - writer.WritePropertyName("version"); - writer.WriteNumberValue(Version.Value); - } - if (Optional.IsCollectionDefined(Datasets)) - { - writer.WritePropertyName("datasets"); - writer.WriteStartArray(); - foreach (var item in Datasets) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - writer.WritePropertyName("url"); - writer.WriteStringValue(Url); - writer.WritePropertyName("mimeType"); - writer.WriteStringValue(MimeType); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(CreatedTime)) - { - writer.WritePropertyName("createdTime"); - writer.WriteStringValue(CreatedTime.Value, "O"); - } - if (Optional.IsDefined(ModifiedTime)) - { - writer.WritePropertyName("modifiedTime"); - writer.WriteStringValue(ModifiedTime.Value, "O"); - } - if (Optional.IsDefined(Unpack)) - { - writer.WritePropertyName("unpack"); - writer.WriteBooleanValue(Unpack.Value); - } - if (Optional.IsDefined(ParentModelId)) - { - writer.WritePropertyName("parentModelId"); - writer.WriteStringValue(ParentModelId); - } - if (Optional.IsDefined(RunId)) - { - writer.WritePropertyName("runId"); - writer.WriteStringValue(RunId); - } - if (Optional.IsDefined(ExperimentName)) - { - writer.WritePropertyName("experimentName"); - writer.WriteStringValue(ExperimentName); - } - if (Optional.IsCollectionDefined(KvTags)) - { - writer.WritePropertyName("kvTags"); - writer.WriteStartObject(); - foreach (var item in KvTags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Properties)) - { - writer.WritePropertyName("properties"); - writer.WriteStartObject(); - foreach (var item in Properties) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(DerivedModelIds)) - { - writer.WritePropertyName("derivedModelIds"); - writer.WriteStartArray(); - foreach (var item in DerivedModelIds) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(SampleInputData)) - { - writer.WritePropertyName("sampleInputData"); - writer.WriteStringValue(SampleInputData); - } - if (Optional.IsDefined(SampleOutputData)) - { - writer.WritePropertyName("sampleOutputData"); - writer.WriteStringValue(SampleOutputData); - } - if (Optional.IsDefined(ResourceRequirements)) - { - writer.WritePropertyName("resourceRequirements"); - writer.WriteObjectValue(ResourceRequirements); - } - writer.WriteEndObject(); - } - - internal static Model DeserializeModel(JsonElement element) - { - Optional id = default; - string name = default; - Optional framework = default; - Optional frameworkVersion = default; - Optional version = default; - Optional> datasets = default; - string url = default; - string mimeType = default; - Optional description = default; - Optional createdTime = default; - Optional modifiedTime = default; - Optional unpack = default; - Optional parentModelId = default; - Optional runId = default; - Optional experimentName = default; - Optional> kvTags = default; - Optional> properties = default; - Optional> derivedModelIds = default; - Optional sampleInputData = default; - Optional sampleOutputData = default; - Optional resourceRequirements = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("id")) - { - id = property.Value.GetString(); - continue; - } - if (property.NameEquals("name")) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("framework")) - { - framework = property.Value.GetString(); - continue; - } - if (property.NameEquals("frameworkVersion")) - { - frameworkVersion = property.Value.GetString(); - continue; - } - if (property.NameEquals("version")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - version = property.Value.GetInt64(); - continue; - } - if (property.NameEquals("datasets")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(DatasetReference.DeserializeDatasetReference(item)); - } - datasets = array; - continue; - } - if (property.NameEquals("url")) - { - url = property.Value.GetString(); - continue; - } - if (property.NameEquals("mimeType")) - { - mimeType = property.Value.GetString(); - continue; - } - if (property.NameEquals("description")) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("createdTime")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - createdTime = property.Value.GetDateTimeOffset("O"); - continue; - } - if (property.NameEquals("modifiedTime")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - modifiedTime = property.Value.GetDateTimeOffset("O"); - continue; - } - if (property.NameEquals("unpack")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - unpack = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("parentModelId")) - { - parentModelId = property.Value.GetString(); - continue; - } - if (property.NameEquals("runId")) - { - runId = property.Value.GetString(); - continue; - } - if (property.NameEquals("experimentName")) - { - experimentName = property.Value.GetString(); - continue; - } - if (property.NameEquals("kvTags")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - kvTags = dictionary; - continue; - } - if (property.NameEquals("properties")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - properties = dictionary; - continue; - } - if (property.NameEquals("derivedModelIds")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - derivedModelIds = array; - continue; - } - if (property.NameEquals("sampleInputData")) - { - sampleInputData = property.Value.GetString(); - continue; - } - if (property.NameEquals("sampleOutputData")) - { - sampleOutputData = property.Value.GetString(); - continue; - } - if (property.NameEquals("resourceRequirements")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - resourceRequirements = ContainerResourceRequirements.DeserializeContainerResourceRequirements(property.Value); - continue; - } - } - return new Model(id.Value, name, framework.Value, frameworkVersion.Value, Optional.ToNullable(version), Optional.ToList(datasets), url, mimeType, description.Value, Optional.ToNullable(createdTime), Optional.ToNullable(modifiedTime), Optional.ToNullable(unpack), parentModelId.Value, runId.Value, experimentName.Value, Optional.ToDictionary(kvTags), Optional.ToDictionary(properties), Optional.ToList(derivedModelIds), sampleInputData.Value, sampleOutputData.Value, resourceRequirements.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Model.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Model.cs deleted file mode 100644 index b438e75a07513..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Model.cs +++ /dev/null @@ -1,136 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// An Azure Machine Learning Model. - public partial class Model - { - /// Initializes a new instance of Model. - /// The Model name. - /// The URL of the Model. Usually a SAS URL. - /// The MIME type of Model content. For more details about MIME type, please open https://www.iana.org/assignments/media-types/media-types.xhtml. - /// , , or is null. - public Model(string name, string url, string mimeType) - { - if (name == null) - { - throw new ArgumentNullException(nameof(name)); - } - if (url == null) - { - throw new ArgumentNullException(nameof(url)); - } - if (mimeType == null) - { - throw new ArgumentNullException(nameof(mimeType)); - } - - Name = name; - Datasets = new ChangeTrackingList(); - Url = url; - MimeType = mimeType; - KvTags = new ChangeTrackingDictionary(); - Properties = new ChangeTrackingDictionary(); - DerivedModelIds = new ChangeTrackingList(); - } - - /// Initializes a new instance of Model. - /// The Model Id. - /// The Model name. - /// The Model framework. - /// The Model framework version. - /// The Model version assigned by Model Management Service. - /// The list of datasets associated with the model. - /// The URL of the Model. Usually a SAS URL. - /// The MIME type of Model content. For more details about MIME type, please open https://www.iana.org/assignments/media-types/media-types.xhtml. - /// The Model description text. - /// The Model creation time (UTC). - /// The Model last modified time (UTC). - /// Indicates whether we need to unpack the Model during docker Image creation. - /// The Parent Model Id. - /// The RunId that created this model. - /// The name of the experiment where this model was created. - /// The Model tag dictionary. Items are mutable. - /// The Model property dictionary. Properties are immutable. - /// Models derived from this model. - /// Sample Input Data for the Model. A reference to a dataset in the workspace in the format aml://dataset/{datasetId}. - /// Sample Output Data for the Model. A reference to a dataset in the workspace in the format aml://dataset/{datasetId}. - /// Resource requirements for the model. - internal Model(string id, string name, string framework, string frameworkVersion, long? version, IList datasets, string url, string mimeType, string description, DateTimeOffset? createdTime, DateTimeOffset? modifiedTime, bool? unpack, string parentModelId, string runId, string experimentName, IDictionary kvTags, IDictionary properties, IList derivedModelIds, string sampleInputData, string sampleOutputData, ContainerResourceRequirements resourceRequirements) - { - Id = id; - Name = name; - Framework = framework; - FrameworkVersion = frameworkVersion; - Version = version; - Datasets = datasets; - Url = url; - MimeType = mimeType; - Description = description; - CreatedTime = createdTime; - ModifiedTime = modifiedTime; - Unpack = unpack; - ParentModelId = parentModelId; - RunId = runId; - ExperimentName = experimentName; - KvTags = kvTags; - Properties = properties; - DerivedModelIds = derivedModelIds; - SampleInputData = sampleInputData; - SampleOutputData = sampleOutputData; - ResourceRequirements = resourceRequirements; - } - - /// The Model Id. - public string Id { get; set; } - /// The Model name. - public string Name { get; set; } - /// The Model framework. - public string Framework { get; set; } - /// The Model framework version. - public string FrameworkVersion { get; set; } - /// The Model version assigned by Model Management Service. - public long? Version { get; set; } - /// The list of datasets associated with the model. - public IList Datasets { get; } - /// The URL of the Model. Usually a SAS URL. - public string Url { get; set; } - /// The MIME type of Model content. For more details about MIME type, please open https://www.iana.org/assignments/media-types/media-types.xhtml. - public string MimeType { get; set; } - /// The Model description text. - public string Description { get; set; } - /// The Model creation time (UTC). - public DateTimeOffset? CreatedTime { get; set; } - /// The Model last modified time (UTC). - public DateTimeOffset? ModifiedTime { get; set; } - /// Indicates whether we need to unpack the Model during docker Image creation. - public bool? Unpack { get; set; } - /// The Parent Model Id. - public string ParentModelId { get; set; } - /// The RunId that created this model. - public string RunId { get; set; } - /// The name of the experiment where this model was created. - public string ExperimentName { get; set; } - /// The Model tag dictionary. Items are mutable. - public IDictionary KvTags { get; } - /// The Model property dictionary. Properties are immutable. - public IDictionary Properties { get; } - /// Models derived from this model. - public IList DerivedModelIds { get; } - /// Sample Input Data for the Model. A reference to a dataset in the workspace in the format aml://dataset/{datasetId}. - public string SampleInputData { get; set; } - /// Sample Output Data for the Model. A reference to a dataset in the workspace in the format aml://dataset/{datasetId}. - public string SampleOutputData { get; set; } - /// Resource requirements for the model. - public ContainerResourceRequirements ResourceRequirements { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelContainer.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelContainer.Serialization.cs deleted file mode 100644 index 044762e289fed..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelContainer.Serialization.cs +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class ModelContainer : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(LatestVersions)) - { - writer.WritePropertyName("latestVersions"); - writer.WriteStartArray(); - foreach (var item in LatestVersions) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Properties)) - { - writer.WritePropertyName("properties"); - writer.WriteStartObject(); - foreach (var item in Properties) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WriteEndObject(); - } - - internal static ModelContainer DeserializeModelContainer(JsonElement element) - { - Optional> latestVersions = default; - Optional description = default; - Optional> tags = default; - Optional> properties = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("latestVersions")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(ModelVersionResource.DeserializeModelVersionResource(item)); - } - latestVersions = array; - continue; - } - if (property.NameEquals("description")) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("tags")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - tags = dictionary; - continue; - } - if (property.NameEquals("properties")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - properties = dictionary; - continue; - } - } - return new ModelContainer(Optional.ToList(latestVersions), description.Value, Optional.ToDictionary(tags), Optional.ToDictionary(properties)); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelContainer.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelContainer.cs deleted file mode 100644 index 9aadb0fdd5c27..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelContainer.cs +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// The ModelContainer. - public partial class ModelContainer - { - /// Initializes a new instance of ModelContainer. - public ModelContainer() - { - LatestVersions = new ChangeTrackingList(); - Tags = new ChangeTrackingDictionary(); - Properties = new ChangeTrackingDictionary(); - } - - /// Initializes a new instance of ModelContainer. - /// Latest model versions for each stage. - /// The asset description text. - /// Tag dictionary. Tags can be added, removed, and updated. - /// The asset property dictionary. - internal ModelContainer(IList latestVersions, string description, IDictionary tags, IDictionary properties) - { - LatestVersions = latestVersions; - Description = description; - Tags = tags; - Properties = properties; - } - - /// Latest model versions for each stage. - public IList LatestVersions { get; } - /// The asset description text. - public string Description { get; set; } - /// Tag dictionary. Tags can be added, removed, and updated. - public IDictionary Tags { get; } - /// The asset property dictionary. - public IDictionary Properties { get; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelContainerResource.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelContainerResource.Serialization.cs deleted file mode 100644 index def6d6cbfb4db..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelContainerResource.Serialization.cs +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class ModelContainerResource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("properties"); - writer.WriteObjectValue(Properties); - writer.WriteEndObject(); - } - - internal static ModelContainerResource DeserializeModelContainerResource(JsonElement element) - { - Optional id = default; - Optional name = default; - Optional type = default; - ModelContainer properties = default; - Optional systemData = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("id")) - { - id = property.Value.GetString(); - continue; - } - if (property.NameEquals("name")) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type")) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("properties")) - { - properties = ModelContainer.DeserializeModelContainer(property.Value); - continue; - } - if (property.NameEquals("systemData")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - systemData = SystemData.DeserializeSystemData(property.Value); - continue; - } - } - return new ModelContainerResource(id.Value, name.Value, type.Value, properties, systemData.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelContainerResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelContainerResource.cs deleted file mode 100644 index fec2f35f7cf2f..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelContainerResource.cs +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// Azure Resource Manager resource envelope. - public partial class ModelContainerResource - { - /// Initializes a new instance of ModelContainerResource. - /// . - /// is null. - public ModelContainerResource(ModelContainer properties) - { - if (properties == null) - { - throw new ArgumentNullException(nameof(properties)); - } - - Properties = properties; - } - - /// Initializes a new instance of ModelContainerResource. - /// The resource URL of the entity (not URL encoded). - /// The name of the resource entity. - /// The resource provider and type. - /// . - /// Metadata pertaining to creation and last modification of the resource. - internal ModelContainerResource(string id, string name, string type, ModelContainer properties, SystemData systemData) - { - Id = id; - Name = name; - Type = type; - Properties = properties; - SystemData = systemData; - } - - /// The resource URL of the entity (not URL encoded). - public string Id { get; } - /// The name of the resource entity. - public string Name { get; } - /// The resource provider and type. - public string Type { get; } - public ModelContainer Properties { get; set; } - /// Metadata pertaining to creation and last modification of the resource. - public SystemData SystemData { get; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelContainerResourceArmPaginatedResult.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelContainerResourceArmPaginatedResult.Serialization.cs deleted file mode 100644 index ea8073a4cc5b5..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelContainerResourceArmPaginatedResult.Serialization.cs +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - internal partial class ModelContainerResourceArmPaginatedResult - { - internal static ModelContainerResourceArmPaginatedResult DeserializeModelContainerResourceArmPaginatedResult(JsonElement element) - { - Optional> value = default; - Optional nextLink = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("value")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(ModelContainerResource.DeserializeModelContainerResource(item)); - } - value = array; - continue; - } - if (property.NameEquals("nextLink")) - { - nextLink = property.Value.GetString(); - continue; - } - } - return new ModelContainerResourceArmPaginatedResult(Optional.ToList(value), nextLink.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelContainerResourceArmPaginatedResult.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelContainerResourceArmPaginatedResult.cs deleted file mode 100644 index 28351f6906d90..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelContainerResourceArmPaginatedResult.cs +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// A paginated list of ModelContainer entities. - internal partial class ModelContainerResourceArmPaginatedResult - { - /// Initializes a new instance of ModelContainerResourceArmPaginatedResult. - internal ModelContainerResourceArmPaginatedResult() - { - Value = new ChangeTrackingList(); - } - - /// Initializes a new instance of ModelContainerResourceArmPaginatedResult. - /// An array of objects of type ModelContainer. - /// . - internal ModelContainerResourceArmPaginatedResult(IReadOnlyList value, string nextLink) - { - Value = value; - NextLink = nextLink; - } - - /// An array of objects of type ModelContainer. - public IReadOnlyList Value { get; } - public string NextLink { get; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelDataCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelDataCollection.cs deleted file mode 100644 index 0d3262553f459..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelDataCollection.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// The Model data collection properties. - public partial class ModelDataCollection - { - /// Initializes a new instance of ModelDataCollection. - public ModelDataCollection() - { - } - - /// Initializes a new instance of ModelDataCollection. - /// Option for enabling/disabling Event Hub. - /// Option for enabling/disabling storage. - internal ModelDataCollection(bool? eventHubEnabled, bool? storageEnabled) - { - EventHubEnabled = eventHubEnabled; - StorageEnabled = storageEnabled; - } - - /// Option for enabling/disabling Event Hub. - public bool? EventHubEnabled { get; set; } - /// Option for enabling/disabling storage. - public bool? StorageEnabled { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelDockerSection.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelDockerSection.Serialization.cs deleted file mode 100644 index e07bb88689d6f..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelDockerSection.Serialization.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class ModelDockerSection : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(BaseImage)) - { - writer.WritePropertyName("baseImage"); - writer.WriteStringValue(BaseImage); - } - if (Optional.IsDefined(BaseDockerfile)) - { - writer.WritePropertyName("baseDockerfile"); - writer.WriteStringValue(BaseDockerfile); - } - if (Optional.IsDefined(BaseImageRegistry)) - { - writer.WritePropertyName("baseImageRegistry"); - writer.WriteObjectValue(BaseImageRegistry); - } - writer.WriteEndObject(); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelDockerSection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelDockerSection.cs deleted file mode 100644 index bb394d1424c63..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelDockerSection.cs +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// The ModelDockerSection. - public partial class ModelDockerSection - { - /// Initializes a new instance of ModelDockerSection. - public ModelDockerSection() - { - } - - /// Base image used for Docker-based runs. Mutually exclusive with BaseDockerfile. - public string BaseImage { get; set; } - /// Base Dockerfile used for Docker-based runs. Mutually exclusive with BaseImage. - public string BaseDockerfile { get; set; } - /// Image registry that contains the base image. - public ModelDockerSectionBaseImageRegistry BaseImageRegistry { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelDockerSectionBaseImageRegistry.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelDockerSectionBaseImageRegistry.Serialization.cs deleted file mode 100644 index 5229018c15a0a..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelDockerSectionBaseImageRegistry.Serialization.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class ModelDockerSectionBaseImageRegistry : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Address)) - { - writer.WritePropertyName("address"); - writer.WriteStringValue(Address); - } - if (Optional.IsDefined(Username)) - { - writer.WritePropertyName("username"); - writer.WriteStringValue(Username); - } - if (Optional.IsDefined(Password)) - { - writer.WritePropertyName("password"); - writer.WriteStringValue(Password); - } - writer.WriteEndObject(); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelDockerSectionBaseImageRegistry.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelDockerSectionBaseImageRegistry.cs deleted file mode 100644 index 59c33b777a634..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelDockerSectionBaseImageRegistry.cs +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// Image registry that contains the base image. - public partial class ModelDockerSectionBaseImageRegistry : ContainerRegistry - { - /// Initializes a new instance of ModelDockerSectionBaseImageRegistry. - public ModelDockerSectionBaseImageRegistry() - { - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelDockerSectionResponse.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelDockerSectionResponse.Serialization.cs deleted file mode 100644 index c34e3e3acb1db..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelDockerSectionResponse.Serialization.cs +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class ModelDockerSectionResponse : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(BaseImage)) - { - writer.WritePropertyName("baseImage"); - writer.WriteStringValue(BaseImage); - } - if (Optional.IsDefined(BaseDockerfile)) - { - writer.WritePropertyName("baseDockerfile"); - writer.WriteStringValue(BaseDockerfile); - } - if (Optional.IsDefined(BaseImageRegistry)) - { - writer.WritePropertyName("baseImageRegistry"); - writer.WriteObjectValue(BaseImageRegistry); - } - writer.WriteEndObject(); - } - - internal static ModelDockerSectionResponse DeserializeModelDockerSectionResponse(JsonElement element) - { - Optional baseImage = default; - Optional baseDockerfile = default; - Optional baseImageRegistry = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("baseImage")) - { - baseImage = property.Value.GetString(); - continue; - } - if (property.NameEquals("baseDockerfile")) - { - baseDockerfile = property.Value.GetString(); - continue; - } - if (property.NameEquals("baseImageRegistry")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - baseImageRegistry = ModelDockerSectionResponseBaseImageRegistry.DeserializeModelDockerSectionResponseBaseImageRegistry(property.Value); - continue; - } - } - return new ModelDockerSectionResponse(baseImage.Value, baseDockerfile.Value, baseImageRegistry.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelDockerSectionResponse.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelDockerSectionResponse.cs deleted file mode 100644 index 02ca15e74b27d..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelDockerSectionResponse.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// The ModelDockerSectionResponse. - public partial class ModelDockerSectionResponse - { - /// Initializes a new instance of ModelDockerSectionResponse. - public ModelDockerSectionResponse() - { - } - - /// Initializes a new instance of ModelDockerSectionResponse. - /// Base image used for Docker-based runs. Mutually exclusive with BaseDockerfile. - /// Base Dockerfile used for Docker-based runs. Mutually exclusive with BaseImage. - /// Image registry that contains the base image. - internal ModelDockerSectionResponse(string baseImage, string baseDockerfile, ModelDockerSectionResponseBaseImageRegistry baseImageRegistry) - { - BaseImage = baseImage; - BaseDockerfile = baseDockerfile; - BaseImageRegistry = baseImageRegistry; - } - - /// Base image used for Docker-based runs. Mutually exclusive with BaseDockerfile. - public string BaseImage { get; set; } - /// Base Dockerfile used for Docker-based runs. Mutually exclusive with BaseImage. - public string BaseDockerfile { get; set; } - /// Image registry that contains the base image. - public ModelDockerSectionResponseBaseImageRegistry BaseImageRegistry { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelDockerSectionResponseBaseImageRegistry.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelDockerSectionResponseBaseImageRegistry.Serialization.cs deleted file mode 100644 index 1760c6694e49b..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelDockerSectionResponseBaseImageRegistry.Serialization.cs +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class ModelDockerSectionResponseBaseImageRegistry : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Address)) - { - writer.WritePropertyName("address"); - writer.WriteStringValue(Address); - } - writer.WriteEndObject(); - } - - internal static ModelDockerSectionResponseBaseImageRegistry DeserializeModelDockerSectionResponseBaseImageRegistry(JsonElement element) - { - Optional address = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("address")) - { - address = property.Value.GetString(); - continue; - } - } - return new ModelDockerSectionResponseBaseImageRegistry(address.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelDockerSectionResponseBaseImageRegistry.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelDockerSectionResponseBaseImageRegistry.cs deleted file mode 100644 index 9894602384001..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelDockerSectionResponseBaseImageRegistry.cs +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// Image registry that contains the base image. - public partial class ModelDockerSectionResponseBaseImageRegistry : ContainerRegistryResponse - { - /// Initializes a new instance of ModelDockerSectionResponseBaseImageRegistry. - public ModelDockerSectionResponseBaseImageRegistry() - { - } - - /// Initializes a new instance of ModelDockerSectionResponseBaseImageRegistry. - /// . - internal ModelDockerSectionResponseBaseImageRegistry(string address) : base(address) - { - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinition.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinition.Serialization.cs deleted file mode 100644 index 08be83252f219..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinition.Serialization.cs +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class ModelEnvironmentDefinition : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(Name); - } - if (Optional.IsDefined(Version)) - { - writer.WritePropertyName("version"); - writer.WriteStringValue(Version); - } - if (Optional.IsDefined(Python)) - { - writer.WritePropertyName("python"); - writer.WriteObjectValue(Python); - } - if (Optional.IsCollectionDefined(EnvironmentVariables)) - { - writer.WritePropertyName("environmentVariables"); - writer.WriteStartObject(); - foreach (var item in EnvironmentVariables) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsDefined(Docker)) - { - writer.WritePropertyName("docker"); - writer.WriteObjectValue(Docker); - } - if (Optional.IsDefined(Spark)) - { - writer.WritePropertyName("spark"); - writer.WriteObjectValue(Spark); - } - if (Optional.IsDefined(R)) - { - writer.WritePropertyName("r"); - writer.WriteObjectValue(R); - } - if (Optional.IsDefined(InferencingStackVersion)) - { - writer.WritePropertyName("inferencingStackVersion"); - writer.WriteStringValue(InferencingStackVersion); - } - writer.WriteEndObject(); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinition.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinition.cs deleted file mode 100644 index 65a87d5c043e2..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinition.cs +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// The ModelEnvironmentDefinition. - public partial class ModelEnvironmentDefinition - { - /// Initializes a new instance of ModelEnvironmentDefinition. - public ModelEnvironmentDefinition() - { - EnvironmentVariables = new ChangeTrackingDictionary(); - } - - /// The name of the environment. - public string Name { get; set; } - /// The environment version. - public string Version { get; set; } - /// Settings for a Python environment. - public ModelEnvironmentDefinitionPython Python { get; set; } - /// Definition of environment variables to be defined in the environment. - public IDictionary EnvironmentVariables { get; } - /// The definition of a Docker container. - public ModelEnvironmentDefinitionDocker Docker { get; set; } - /// The configuration for a Spark environment. - public ModelEnvironmentDefinitionSpark Spark { get; set; } - /// Settings for a R environment. - public ModelEnvironmentDefinitionR R { get; set; } - /// The inferencing stack version added to the image. To avoid adding an inferencing stack, do not set this value. Valid values: "latest". - public string InferencingStackVersion { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionDocker.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionDocker.Serialization.cs deleted file mode 100644 index 3de61b72cd66f..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionDocker.Serialization.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class ModelEnvironmentDefinitionDocker : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(BaseImage)) - { - writer.WritePropertyName("baseImage"); - writer.WriteStringValue(BaseImage); - } - if (Optional.IsDefined(BaseDockerfile)) - { - writer.WritePropertyName("baseDockerfile"); - writer.WriteStringValue(BaseDockerfile); - } - if (Optional.IsDefined(BaseImageRegistry)) - { - writer.WritePropertyName("baseImageRegistry"); - writer.WriteObjectValue(BaseImageRegistry); - } - writer.WriteEndObject(); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionDocker.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionDocker.cs deleted file mode 100644 index cd5ffd68e1c3c..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionDocker.cs +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// The definition of a Docker container. - public partial class ModelEnvironmentDefinitionDocker : ModelDockerSection - { - /// Initializes a new instance of ModelEnvironmentDefinitionDocker. - public ModelEnvironmentDefinitionDocker() - { - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionPython.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionPython.Serialization.cs deleted file mode 100644 index c0ee99299fda2..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionPython.Serialization.cs +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class ModelEnvironmentDefinitionPython : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(InterpreterPath)) - { - writer.WritePropertyName("interpreterPath"); - writer.WriteStringValue(InterpreterPath); - } - if (Optional.IsDefined(UserManagedDependencies)) - { - writer.WritePropertyName("userManagedDependencies"); - writer.WriteBooleanValue(UserManagedDependencies.Value); - } - if (Optional.IsDefined(CondaDependencies)) - { - writer.WritePropertyName("condaDependencies"); - writer.WriteObjectValue(CondaDependencies); - } - if (Optional.IsDefined(BaseCondaEnvironment)) - { - writer.WritePropertyName("baseCondaEnvironment"); - writer.WriteStringValue(BaseCondaEnvironment); - } - writer.WriteEndObject(); - } - - internal static ModelEnvironmentDefinitionPython DeserializeModelEnvironmentDefinitionPython(JsonElement element) - { - Optional interpreterPath = default; - Optional userManagedDependencies = default; - Optional condaDependencies = default; - Optional baseCondaEnvironment = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("interpreterPath")) - { - interpreterPath = property.Value.GetString(); - continue; - } - if (property.NameEquals("userManagedDependencies")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - userManagedDependencies = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("condaDependencies")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - condaDependencies = property.Value.GetObject(); - continue; - } - if (property.NameEquals("baseCondaEnvironment")) - { - baseCondaEnvironment = property.Value.GetString(); - continue; - } - } - return new ModelEnvironmentDefinitionPython(interpreterPath.Value, Optional.ToNullable(userManagedDependencies), condaDependencies.Value, baseCondaEnvironment.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionPython.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionPython.cs deleted file mode 100644 index 1bfa548334116..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionPython.cs +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// Settings for a Python environment. - public partial class ModelEnvironmentDefinitionPython : ModelPythonSection - { - /// Initializes a new instance of ModelEnvironmentDefinitionPython. - public ModelEnvironmentDefinitionPython() - { - } - - /// Initializes a new instance of ModelEnvironmentDefinitionPython. - /// The python interpreter path to use if an environment build is not required. The path specified gets used to call the user script. - /// True means that AzureML reuses an existing python environment; False means that AzureML will create a python environment based on the Conda dependencies specification. - /// A JObject containing Conda dependencies. - /// . - internal ModelEnvironmentDefinitionPython(string interpreterPath, bool? userManagedDependencies, object condaDependencies, string baseCondaEnvironment) : base(interpreterPath, userManagedDependencies, condaDependencies, baseCondaEnvironment) - { - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionR.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionR.Serialization.cs deleted file mode 100644 index 439a891d34f40..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionR.Serialization.cs +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class ModelEnvironmentDefinitionR : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(RVersion)) - { - writer.WritePropertyName("rVersion"); - writer.WriteStringValue(RVersion); - } - if (Optional.IsDefined(UserManaged)) - { - writer.WritePropertyName("userManaged"); - writer.WriteBooleanValue(UserManaged.Value); - } - if (Optional.IsDefined(RscriptPath)) - { - writer.WritePropertyName("rscriptPath"); - writer.WriteStringValue(RscriptPath); - } - if (Optional.IsDefined(SnapshotDate)) - { - writer.WritePropertyName("snapshotDate"); - writer.WriteStringValue(SnapshotDate); - } - if (Optional.IsCollectionDefined(CranPackages)) - { - writer.WritePropertyName("cranPackages"); - writer.WriteStartArray(); - foreach (var item in CranPackages) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(GitHubPackages)) - { - writer.WritePropertyName("gitHubPackages"); - writer.WriteStartArray(); - foreach (var item in GitHubPackages) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(CustomUrlPackages)) - { - writer.WritePropertyName("customUrlPackages"); - writer.WriteStartArray(); - foreach (var item in CustomUrlPackages) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(BioConductorPackages)) - { - writer.WritePropertyName("bioConductorPackages"); - writer.WriteStartArray(); - foreach (var item in BioConductorPackages) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } - writer.WriteEndObject(); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionR.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionR.cs deleted file mode 100644 index ce3340d68c646..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionR.cs +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// Settings for a R environment. - public partial class ModelEnvironmentDefinitionR : RSection - { - /// Initializes a new instance of ModelEnvironmentDefinitionR. - public ModelEnvironmentDefinitionR() - { - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionResponse.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionResponse.Serialization.cs deleted file mode 100644 index 76c817e2bf626..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionResponse.Serialization.cs +++ /dev/null @@ -1,154 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class ModelEnvironmentDefinitionResponse : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(Name); - } - if (Optional.IsDefined(Version)) - { - writer.WritePropertyName("version"); - writer.WriteStringValue(Version); - } - if (Optional.IsDefined(Python)) - { - writer.WritePropertyName("python"); - writer.WriteObjectValue(Python); - } - if (Optional.IsCollectionDefined(EnvironmentVariables)) - { - writer.WritePropertyName("environmentVariables"); - writer.WriteStartObject(); - foreach (var item in EnvironmentVariables) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsDefined(Docker)) - { - writer.WritePropertyName("docker"); - writer.WriteObjectValue(Docker); - } - if (Optional.IsDefined(Spark)) - { - writer.WritePropertyName("spark"); - writer.WriteObjectValue(Spark); - } - if (Optional.IsDefined(R)) - { - writer.WritePropertyName("r"); - writer.WriteObjectValue(R); - } - if (Optional.IsDefined(InferencingStackVersion)) - { - writer.WritePropertyName("inferencingStackVersion"); - writer.WriteStringValue(InferencingStackVersion); - } - writer.WriteEndObject(); - } - - internal static ModelEnvironmentDefinitionResponse DeserializeModelEnvironmentDefinitionResponse(JsonElement element) - { - Optional name = default; - Optional version = default; - Optional python = default; - Optional> environmentVariables = default; - Optional docker = default; - Optional spark = default; - Optional r = default; - Optional inferencingStackVersion = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("name")) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("version")) - { - version = property.Value.GetString(); - continue; - } - if (property.NameEquals("python")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - python = ModelEnvironmentDefinitionResponsePython.DeserializeModelEnvironmentDefinitionResponsePython(property.Value); - continue; - } - if (property.NameEquals("environmentVariables")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - environmentVariables = dictionary; - continue; - } - if (property.NameEquals("docker")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - docker = ModelEnvironmentDefinitionResponseDocker.DeserializeModelEnvironmentDefinitionResponseDocker(property.Value); - continue; - } - if (property.NameEquals("spark")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - spark = ModelEnvironmentDefinitionResponseSpark.DeserializeModelEnvironmentDefinitionResponseSpark(property.Value); - continue; - } - if (property.NameEquals("r")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - r = ModelEnvironmentDefinitionResponseR.DeserializeModelEnvironmentDefinitionResponseR(property.Value); - continue; - } - if (property.NameEquals("inferencingStackVersion")) - { - inferencingStackVersion = property.Value.GetString(); - continue; - } - } - return new ModelEnvironmentDefinitionResponse(name.Value, version.Value, python.Value, Optional.ToDictionary(environmentVariables), docker.Value, spark.Value, r.Value, inferencingStackVersion.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionResponse.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionResponse.cs deleted file mode 100644 index a529ecdd80dad..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionResponse.cs +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// The ModelEnvironmentDefinitionResponse. - public partial class ModelEnvironmentDefinitionResponse - { - /// Initializes a new instance of ModelEnvironmentDefinitionResponse. - public ModelEnvironmentDefinitionResponse() - { - EnvironmentVariables = new ChangeTrackingDictionary(); - } - - /// Initializes a new instance of ModelEnvironmentDefinitionResponse. - /// The name of the environment. - /// The environment version. - /// Settings for a Python environment. - /// Definition of environment variables to be defined in the environment. - /// The definition of a Docker container. - /// The configuration for a Spark environment. - /// Settings for a R environment. - /// The inferencing stack version added to the image. To avoid adding an inferencing stack, do not set this value. Valid values: "latest". - internal ModelEnvironmentDefinitionResponse(string name, string version, ModelEnvironmentDefinitionResponsePython python, IDictionary environmentVariables, ModelEnvironmentDefinitionResponseDocker docker, ModelEnvironmentDefinitionResponseSpark spark, ModelEnvironmentDefinitionResponseR r, string inferencingStackVersion) - { - Name = name; - Version = version; - Python = python; - EnvironmentVariables = environmentVariables; - Docker = docker; - Spark = spark; - R = r; - InferencingStackVersion = inferencingStackVersion; - } - - /// The name of the environment. - public string Name { get; set; } - /// The environment version. - public string Version { get; set; } - /// Settings for a Python environment. - public ModelEnvironmentDefinitionResponsePython Python { get; set; } - /// Definition of environment variables to be defined in the environment. - public IDictionary EnvironmentVariables { get; } - /// The definition of a Docker container. - public ModelEnvironmentDefinitionResponseDocker Docker { get; set; } - /// The configuration for a Spark environment. - public ModelEnvironmentDefinitionResponseSpark Spark { get; set; } - /// Settings for a R environment. - public ModelEnvironmentDefinitionResponseR R { get; set; } - /// The inferencing stack version added to the image. To avoid adding an inferencing stack, do not set this value. Valid values: "latest". - public string InferencingStackVersion { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionResponseDocker.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionResponseDocker.Serialization.cs deleted file mode 100644 index 776e129551c74..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionResponseDocker.Serialization.cs +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class ModelEnvironmentDefinitionResponseDocker : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(BaseImage)) - { - writer.WritePropertyName("baseImage"); - writer.WriteStringValue(BaseImage); - } - if (Optional.IsDefined(BaseDockerfile)) - { - writer.WritePropertyName("baseDockerfile"); - writer.WriteStringValue(BaseDockerfile); - } - if (Optional.IsDefined(BaseImageRegistry)) - { - writer.WritePropertyName("baseImageRegistry"); - writer.WriteObjectValue(BaseImageRegistry); - } - writer.WriteEndObject(); - } - - internal static ModelEnvironmentDefinitionResponseDocker DeserializeModelEnvironmentDefinitionResponseDocker(JsonElement element) - { - Optional baseImage = default; - Optional baseDockerfile = default; - Optional baseImageRegistry = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("baseImage")) - { - baseImage = property.Value.GetString(); - continue; - } - if (property.NameEquals("baseDockerfile")) - { - baseDockerfile = property.Value.GetString(); - continue; - } - if (property.NameEquals("baseImageRegistry")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - baseImageRegistry = ModelDockerSectionResponseBaseImageRegistry.DeserializeModelDockerSectionResponseBaseImageRegistry(property.Value); - continue; - } - } - return new ModelEnvironmentDefinitionResponseDocker(baseImage.Value, baseDockerfile.Value, baseImageRegistry.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionResponseDocker.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionResponseDocker.cs deleted file mode 100644 index 9d06a5aa4625b..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionResponseDocker.cs +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// The definition of a Docker container. - public partial class ModelEnvironmentDefinitionResponseDocker : ModelDockerSectionResponse - { - /// Initializes a new instance of ModelEnvironmentDefinitionResponseDocker. - public ModelEnvironmentDefinitionResponseDocker() - { - } - - /// Initializes a new instance of ModelEnvironmentDefinitionResponseDocker. - /// Base image used for Docker-based runs. Mutually exclusive with BaseDockerfile. - /// Base Dockerfile used for Docker-based runs. Mutually exclusive with BaseImage. - /// Image registry that contains the base image. - internal ModelEnvironmentDefinitionResponseDocker(string baseImage, string baseDockerfile, ModelDockerSectionResponseBaseImageRegistry baseImageRegistry) : base(baseImage, baseDockerfile, baseImageRegistry) - { - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionResponsePython.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionResponsePython.Serialization.cs deleted file mode 100644 index 7b27d767104c9..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionResponsePython.Serialization.cs +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class ModelEnvironmentDefinitionResponsePython : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(InterpreterPath)) - { - writer.WritePropertyName("interpreterPath"); - writer.WriteStringValue(InterpreterPath); - } - if (Optional.IsDefined(UserManagedDependencies)) - { - writer.WritePropertyName("userManagedDependencies"); - writer.WriteBooleanValue(UserManagedDependencies.Value); - } - if (Optional.IsDefined(CondaDependencies)) - { - writer.WritePropertyName("condaDependencies"); - writer.WriteObjectValue(CondaDependencies); - } - if (Optional.IsDefined(BaseCondaEnvironment)) - { - writer.WritePropertyName("baseCondaEnvironment"); - writer.WriteStringValue(BaseCondaEnvironment); - } - writer.WriteEndObject(); - } - - internal static ModelEnvironmentDefinitionResponsePython DeserializeModelEnvironmentDefinitionResponsePython(JsonElement element) - { - Optional interpreterPath = default; - Optional userManagedDependencies = default; - Optional condaDependencies = default; - Optional baseCondaEnvironment = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("interpreterPath")) - { - interpreterPath = property.Value.GetString(); - continue; - } - if (property.NameEquals("userManagedDependencies")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - userManagedDependencies = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("condaDependencies")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - condaDependencies = property.Value.GetObject(); - continue; - } - if (property.NameEquals("baseCondaEnvironment")) - { - baseCondaEnvironment = property.Value.GetString(); - continue; - } - } - return new ModelEnvironmentDefinitionResponsePython(interpreterPath.Value, Optional.ToNullable(userManagedDependencies), condaDependencies.Value, baseCondaEnvironment.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionResponsePython.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionResponsePython.cs deleted file mode 100644 index e4403d5c57369..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionResponsePython.cs +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// Settings for a Python environment. - public partial class ModelEnvironmentDefinitionResponsePython : ModelPythonSection - { - /// Initializes a new instance of ModelEnvironmentDefinitionResponsePython. - public ModelEnvironmentDefinitionResponsePython() - { - } - - /// Initializes a new instance of ModelEnvironmentDefinitionResponsePython. - /// The python interpreter path to use if an environment build is not required. The path specified gets used to call the user script. - /// True means that AzureML reuses an existing python environment; False means that AzureML will create a python environment based on the Conda dependencies specification. - /// A JObject containing Conda dependencies. - /// . - internal ModelEnvironmentDefinitionResponsePython(string interpreterPath, bool? userManagedDependencies, object condaDependencies, string baseCondaEnvironment) : base(interpreterPath, userManagedDependencies, condaDependencies, baseCondaEnvironment) - { - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionResponseR.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionResponseR.Serialization.cs deleted file mode 100644 index c963aa32f082a..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionResponseR.Serialization.cs +++ /dev/null @@ -1,183 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class ModelEnvironmentDefinitionResponseR : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(RVersion)) - { - writer.WritePropertyName("rVersion"); - writer.WriteStringValue(RVersion); - } - if (Optional.IsDefined(UserManaged)) - { - writer.WritePropertyName("userManaged"); - writer.WriteBooleanValue(UserManaged.Value); - } - if (Optional.IsDefined(RscriptPath)) - { - writer.WritePropertyName("rscriptPath"); - writer.WriteStringValue(RscriptPath); - } - if (Optional.IsDefined(SnapshotDate)) - { - writer.WritePropertyName("snapshotDate"); - writer.WriteStringValue(SnapshotDate); - } - if (Optional.IsCollectionDefined(CranPackages)) - { - writer.WritePropertyName("cranPackages"); - writer.WriteStartArray(); - foreach (var item in CranPackages) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(GitHubPackages)) - { - writer.WritePropertyName("gitHubPackages"); - writer.WriteStartArray(); - foreach (var item in GitHubPackages) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(CustomUrlPackages)) - { - writer.WritePropertyName("customUrlPackages"); - writer.WriteStartArray(); - foreach (var item in CustomUrlPackages) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(BioConductorPackages)) - { - writer.WritePropertyName("bioConductorPackages"); - writer.WriteStartArray(); - foreach (var item in BioConductorPackages) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } - writer.WriteEndObject(); - } - - internal static ModelEnvironmentDefinitionResponseR DeserializeModelEnvironmentDefinitionResponseR(JsonElement element) - { - Optional rVersion = default; - Optional userManaged = default; - Optional rscriptPath = default; - Optional snapshotDate = default; - Optional> cranPackages = default; - Optional> gitHubPackages = default; - Optional> customUrlPackages = default; - Optional> bioConductorPackages = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("rVersion")) - { - rVersion = property.Value.GetString(); - continue; - } - if (property.NameEquals("userManaged")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - userManaged = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("rscriptPath")) - { - rscriptPath = property.Value.GetString(); - continue; - } - if (property.NameEquals("snapshotDate")) - { - snapshotDate = property.Value.GetString(); - continue; - } - if (property.NameEquals("cranPackages")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(RCranPackage.DeserializeRCranPackage(item)); - } - cranPackages = array; - continue; - } - if (property.NameEquals("gitHubPackages")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(RGitHubPackageResponse.DeserializeRGitHubPackageResponse(item)); - } - gitHubPackages = array; - continue; - } - if (property.NameEquals("customUrlPackages")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - customUrlPackages = array; - continue; - } - if (property.NameEquals("bioConductorPackages")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - bioConductorPackages = array; - continue; - } - } - return new ModelEnvironmentDefinitionResponseR(rVersion.Value, Optional.ToNullable(userManaged), rscriptPath.Value, snapshotDate.Value, Optional.ToList(cranPackages), Optional.ToList(gitHubPackages), Optional.ToList(customUrlPackages), Optional.ToList(bioConductorPackages)); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionResponseR.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionResponseR.cs deleted file mode 100644 index e288b4d1dc826..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionResponseR.cs +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// Settings for a R environment. - public partial class ModelEnvironmentDefinitionResponseR : RSectionResponse - { - /// Initializes a new instance of ModelEnvironmentDefinitionResponseR. - public ModelEnvironmentDefinitionResponseR() - { - } - - /// Initializes a new instance of ModelEnvironmentDefinitionResponseR. - /// The version of R to be installed. - /// Indicates whether the environment is managed by user or by AzureML. - /// - /// The Rscript path to use if an environment build is not required. - /// - /// The path specified gets used to call the user script. - /// - /// Date of MRAN snapshot to use in YYYY-MM-DD format, e.g. "2019-04-17". - /// The CRAN packages to use. - /// The packages directly from GitHub. - /// The packages from custom urls. - /// The packages from Bioconductor. - internal ModelEnvironmentDefinitionResponseR(string rVersion, bool? userManaged, string rscriptPath, string snapshotDate, IList cranPackages, IList gitHubPackages, IList customUrlPackages, IList bioConductorPackages) : base(rVersion, userManaged, rscriptPath, snapshotDate, cranPackages, gitHubPackages, customUrlPackages, bioConductorPackages) - { - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionResponseSpark.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionResponseSpark.Serialization.cs deleted file mode 100644 index 90b2e23af52d3..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionResponseSpark.Serialization.cs +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class ModelEnvironmentDefinitionResponseSpark : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Repositories)) - { - writer.WritePropertyName("repositories"); - writer.WriteStartArray(); - foreach (var item in Repositories) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(Packages)) - { - writer.WritePropertyName("packages"); - writer.WriteStartArray(); - foreach (var item in Packages) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(PrecachePackages)) - { - writer.WritePropertyName("precachePackages"); - writer.WriteBooleanValue(PrecachePackages.Value); - } - writer.WriteEndObject(); - } - - internal static ModelEnvironmentDefinitionResponseSpark DeserializeModelEnvironmentDefinitionResponseSpark(JsonElement element) - { - Optional> repositories = default; - Optional> packages = default; - Optional precachePackages = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("repositories")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - repositories = array; - continue; - } - if (property.NameEquals("packages")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(SparkMavenPackage.DeserializeSparkMavenPackage(item)); - } - packages = array; - continue; - } - if (property.NameEquals("precachePackages")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - precachePackages = property.Value.GetBoolean(); - continue; - } - } - return new ModelEnvironmentDefinitionResponseSpark(Optional.ToList(repositories), Optional.ToList(packages), Optional.ToNullable(precachePackages)); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionResponseSpark.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionResponseSpark.cs deleted file mode 100644 index 138e4a9834adf..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionResponseSpark.cs +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// The configuration for a Spark environment. - public partial class ModelEnvironmentDefinitionResponseSpark : ModelSparkSection - { - /// Initializes a new instance of ModelEnvironmentDefinitionResponseSpark. - public ModelEnvironmentDefinitionResponseSpark() - { - } - - /// Initializes a new instance of ModelEnvironmentDefinitionResponseSpark. - /// The list of spark repositories. - /// The Spark packages to use. - /// Whether to precache the packages. - internal ModelEnvironmentDefinitionResponseSpark(IList repositories, IList packages, bool? precachePackages) : base(repositories, packages, precachePackages) - { - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionSpark.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionSpark.Serialization.cs deleted file mode 100644 index bd0ea9b00cf86..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionSpark.Serialization.cs +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class ModelEnvironmentDefinitionSpark : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Repositories)) - { - writer.WritePropertyName("repositories"); - writer.WriteStartArray(); - foreach (var item in Repositories) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(Packages)) - { - writer.WritePropertyName("packages"); - writer.WriteStartArray(); - foreach (var item in Packages) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(PrecachePackages)) - { - writer.WritePropertyName("precachePackages"); - writer.WriteBooleanValue(PrecachePackages.Value); - } - writer.WriteEndObject(); - } - - internal static ModelEnvironmentDefinitionSpark DeserializeModelEnvironmentDefinitionSpark(JsonElement element) - { - Optional> repositories = default; - Optional> packages = default; - Optional precachePackages = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("repositories")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - repositories = array; - continue; - } - if (property.NameEquals("packages")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(SparkMavenPackage.DeserializeSparkMavenPackage(item)); - } - packages = array; - continue; - } - if (property.NameEquals("precachePackages")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - precachePackages = property.Value.GetBoolean(); - continue; - } - } - return new ModelEnvironmentDefinitionSpark(Optional.ToList(repositories), Optional.ToList(packages), Optional.ToNullable(precachePackages)); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionSpark.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionSpark.cs deleted file mode 100644 index 2976d68c1a34c..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionSpark.cs +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// The configuration for a Spark environment. - public partial class ModelEnvironmentDefinitionSpark : ModelSparkSection - { - /// Initializes a new instance of ModelEnvironmentDefinitionSpark. - public ModelEnvironmentDefinitionSpark() - { - } - - /// Initializes a new instance of ModelEnvironmentDefinitionSpark. - /// The list of spark repositories. - /// The Spark packages to use. - /// Whether to precache the packages. - internal ModelEnvironmentDefinitionSpark(IList repositories, IList packages, bool? precachePackages) : base(repositories, packages, precachePackages) - { - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelPythonSection.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelPythonSection.Serialization.cs deleted file mode 100644 index 4bfc3fb026a52..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelPythonSection.Serialization.cs +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class ModelPythonSection : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(InterpreterPath)) - { - writer.WritePropertyName("interpreterPath"); - writer.WriteStringValue(InterpreterPath); - } - if (Optional.IsDefined(UserManagedDependencies)) - { - writer.WritePropertyName("userManagedDependencies"); - writer.WriteBooleanValue(UserManagedDependencies.Value); - } - if (Optional.IsDefined(CondaDependencies)) - { - writer.WritePropertyName("condaDependencies"); - writer.WriteObjectValue(CondaDependencies); - } - if (Optional.IsDefined(BaseCondaEnvironment)) - { - writer.WritePropertyName("baseCondaEnvironment"); - writer.WriteStringValue(BaseCondaEnvironment); - } - writer.WriteEndObject(); - } - - internal static ModelPythonSection DeserializeModelPythonSection(JsonElement element) - { - Optional interpreterPath = default; - Optional userManagedDependencies = default; - Optional condaDependencies = default; - Optional baseCondaEnvironment = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("interpreterPath")) - { - interpreterPath = property.Value.GetString(); - continue; - } - if (property.NameEquals("userManagedDependencies")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - userManagedDependencies = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("condaDependencies")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - condaDependencies = property.Value.GetObject(); - continue; - } - if (property.NameEquals("baseCondaEnvironment")) - { - baseCondaEnvironment = property.Value.GetString(); - continue; - } - } - return new ModelPythonSection(interpreterPath.Value, Optional.ToNullable(userManagedDependencies), condaDependencies.Value, baseCondaEnvironment.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelPythonSection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelPythonSection.cs deleted file mode 100644 index e546f8a7ef9d2..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelPythonSection.cs +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// The ModelPythonSection. - public partial class ModelPythonSection - { - /// Initializes a new instance of ModelPythonSection. - public ModelPythonSection() - { - } - - /// Initializes a new instance of ModelPythonSection. - /// The python interpreter path to use if an environment build is not required. The path specified gets used to call the user script. - /// True means that AzureML reuses an existing python environment; False means that AzureML will create a python environment based on the Conda dependencies specification. - /// A JObject containing Conda dependencies. - /// . - internal ModelPythonSection(string interpreterPath, bool? userManagedDependencies, object condaDependencies, string baseCondaEnvironment) - { - InterpreterPath = interpreterPath; - UserManagedDependencies = userManagedDependencies; - CondaDependencies = condaDependencies; - BaseCondaEnvironment = baseCondaEnvironment; - } - - /// The python interpreter path to use if an environment build is not required. The path specified gets used to call the user script. - public string InterpreterPath { get; set; } - /// True means that AzureML reuses an existing python environment; False means that AzureML will create a python environment based on the Conda dependencies specification. - public bool? UserManagedDependencies { get; set; } - /// A JObject containing Conda dependencies. - public object CondaDependencies { get; set; } - public string BaseCondaEnvironment { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelSparkSection.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelSparkSection.Serialization.cs deleted file mode 100644 index 8d9e032f714ce..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelSparkSection.Serialization.cs +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class ModelSparkSection : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Repositories)) - { - writer.WritePropertyName("repositories"); - writer.WriteStartArray(); - foreach (var item in Repositories) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(Packages)) - { - writer.WritePropertyName("packages"); - writer.WriteStartArray(); - foreach (var item in Packages) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(PrecachePackages)) - { - writer.WritePropertyName("precachePackages"); - writer.WriteBooleanValue(PrecachePackages.Value); - } - writer.WriteEndObject(); - } - - internal static ModelSparkSection DeserializeModelSparkSection(JsonElement element) - { - Optional> repositories = default; - Optional> packages = default; - Optional precachePackages = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("repositories")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - repositories = array; - continue; - } - if (property.NameEquals("packages")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(SparkMavenPackage.DeserializeSparkMavenPackage(item)); - } - packages = array; - continue; - } - if (property.NameEquals("precachePackages")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - precachePackages = property.Value.GetBoolean(); - continue; - } - } - return new ModelSparkSection(Optional.ToList(repositories), Optional.ToList(packages), Optional.ToNullable(precachePackages)); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelSparkSection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelSparkSection.cs deleted file mode 100644 index a9a730bf01120..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelSparkSection.cs +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// The ModelSparkSection. - public partial class ModelSparkSection - { - /// Initializes a new instance of ModelSparkSection. - public ModelSparkSection() - { - Repositories = new ChangeTrackingList(); - Packages = new ChangeTrackingList(); - } - - /// Initializes a new instance of ModelSparkSection. - /// The list of spark repositories. - /// The Spark packages to use. - /// Whether to precache the packages. - internal ModelSparkSection(IList repositories, IList packages, bool? precachePackages) - { - Repositories = repositories; - Packages = packages; - PrecachePackages = precachePackages; - } - - /// The list of spark repositories. - public IList Repositories { get; } - /// The Spark packages to use. - public IList Packages { get; } - /// Whether to precache the packages. - public bool? PrecachePackages { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelVersion.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelVersion.Serialization.cs deleted file mode 100644 index c335b48e8be9e..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelVersion.Serialization.cs +++ /dev/null @@ -1,133 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class ModelVersion : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Stage)) - { - writer.WritePropertyName("stage"); - writer.WriteStringValue(Stage); - } - if (Optional.IsDefined(DatastoreId)) - { - writer.WritePropertyName("datastoreId"); - writer.WriteStringValue(DatastoreId); - } - if (Optional.IsDefined(AssetPath)) - { - writer.WritePropertyName("assetPath"); - writer.WriteObjectValue(AssetPath); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Properties)) - { - writer.WritePropertyName("properties"); - writer.WriteStartObject(); - foreach (var item in Properties) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WriteEndObject(); - } - - internal static ModelVersion DeserializeModelVersion(JsonElement element) - { - Optional stage = default; - Optional datastoreId = default; - Optional assetPath = default; - Optional description = default; - Optional> tags = default; - Optional> properties = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("stage")) - { - stage = property.Value.GetString(); - continue; - } - if (property.NameEquals("datastoreId")) - { - datastoreId = property.Value.GetString(); - continue; - } - if (property.NameEquals("assetPath")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - assetPath = AssetPath.DeserializeAssetPath(property.Value); - continue; - } - if (property.NameEquals("description")) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("tags")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - tags = dictionary; - continue; - } - if (property.NameEquals("properties")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - properties = dictionary; - continue; - } - } - return new ModelVersion(stage.Value, datastoreId.Value, assetPath.Value, description.Value, Optional.ToDictionary(tags), Optional.ToDictionary(properties)); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelVersion.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelVersion.cs deleted file mode 100644 index bef488ff547c9..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelVersion.cs +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// Details of an ModelDto. - public partial class ModelVersion - { - /// Initializes a new instance of ModelVersion. - public ModelVersion() - { - Tags = new ChangeTrackingDictionary(); - Properties = new ChangeTrackingDictionary(); - } - - /// Initializes a new instance of ModelVersion. - /// Model asset stage. - /// The asset datastoreId. - /// Details of an AssetUri. - /// The asset description text. - /// Tag dictionary. Tags can be added, removed, and updated. - /// The asset property dictionary. - internal ModelVersion(string stage, string datastoreId, AssetPath assetPath, string description, IDictionary tags, IDictionary properties) - { - Stage = stage; - DatastoreId = datastoreId; - AssetPath = assetPath; - Description = description; - Tags = tags; - Properties = properties; - } - - /// Model asset stage. - public string Stage { get; set; } - /// The asset datastoreId. - public string DatastoreId { get; set; } - /// Details of an AssetUri. - public AssetPath AssetPath { get; set; } - /// The asset description text. - public string Description { get; set; } - /// Tag dictionary. Tags can be added, removed, and updated. - public IDictionary Tags { get; } - /// The asset property dictionary. - public IDictionary Properties { get; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelVersionResource.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelVersionResource.Serialization.cs deleted file mode 100644 index 91a9ef43189be..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelVersionResource.Serialization.cs +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class ModelVersionResource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("properties"); - writer.WriteObjectValue(Properties); - writer.WriteEndObject(); - } - - internal static ModelVersionResource DeserializeModelVersionResource(JsonElement element) - { - Optional id = default; - Optional name = default; - Optional type = default; - ModelVersion properties = default; - Optional systemData = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("id")) - { - id = property.Value.GetString(); - continue; - } - if (property.NameEquals("name")) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type")) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("properties")) - { - properties = ModelVersion.DeserializeModelVersion(property.Value); - continue; - } - if (property.NameEquals("systemData")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - systemData = SystemData.DeserializeSystemData(property.Value); - continue; - } - } - return new ModelVersionResource(id.Value, name.Value, type.Value, properties, systemData.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelVersionResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelVersionResource.cs deleted file mode 100644 index 7d0a47729558e..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelVersionResource.cs +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// Azure Resource Manager resource envelope. - public partial class ModelVersionResource - { - /// Initializes a new instance of ModelVersionResource. - /// Details of an ModelDto. - /// is null. - public ModelVersionResource(ModelVersion properties) - { - if (properties == null) - { - throw new ArgumentNullException(nameof(properties)); - } - - Properties = properties; - } - - /// Initializes a new instance of ModelVersionResource. - /// The resource URL of the entity (not URL encoded). - /// The name of the resource entity. - /// The resource provider and type. - /// Details of an ModelDto. - /// Metadata pertaining to creation and last modification of the resource. - internal ModelVersionResource(string id, string name, string type, ModelVersion properties, SystemData systemData) - { - Id = id; - Name = name; - Type = type; - Properties = properties; - SystemData = systemData; - } - - /// The resource URL of the entity (not URL encoded). - public string Id { get; } - /// The name of the resource entity. - public string Name { get; } - /// The resource provider and type. - public string Type { get; } - /// Details of an ModelDto. - public ModelVersion Properties { get; set; } - /// Metadata pertaining to creation and last modification of the resource. - public SystemData SystemData { get; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelVersionResourceArmPaginatedResult.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelVersionResourceArmPaginatedResult.Serialization.cs deleted file mode 100644 index 0013c44f49870..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelVersionResourceArmPaginatedResult.Serialization.cs +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - internal partial class ModelVersionResourceArmPaginatedResult - { - internal static ModelVersionResourceArmPaginatedResult DeserializeModelVersionResourceArmPaginatedResult(JsonElement element) - { - Optional> value = default; - Optional nextLink = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("value")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(ModelVersionResource.DeserializeModelVersionResource(item)); - } - value = array; - continue; - } - if (property.NameEquals("nextLink")) - { - nextLink = property.Value.GetString(); - continue; - } - } - return new ModelVersionResourceArmPaginatedResult(Optional.ToList(value), nextLink.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelVersionResourceArmPaginatedResult.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelVersionResourceArmPaginatedResult.cs deleted file mode 100644 index 5ba3c5f5d818d..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelVersionResourceArmPaginatedResult.cs +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// A paginated list of ModelVersion entities. - internal partial class ModelVersionResourceArmPaginatedResult - { - /// Initializes a new instance of ModelVersionResourceArmPaginatedResult. - internal ModelVersionResourceArmPaginatedResult() - { - Value = new ChangeTrackingList(); - } - - /// Initializes a new instance of ModelVersionResourceArmPaginatedResult. - /// An array of objects of type ModelVersion. - /// . - internal ModelVersionResourceArmPaginatedResult(IReadOnlyList value, string nextLink) - { - Value = value; - NextLink = nextLink; - } - - /// An array of objects of type ModelVersion. - public IReadOnlyList Value { get; } - public string NextLink { get; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/NotebookAccessTokenResult.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/NotebookAccessTokenResult.Serialization.cs new file mode 100644 index 0000000000000..7a6b2eafbe696 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/NotebookAccessTokenResult.Serialization.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class NotebookAccessTokenResult + { + internal static NotebookAccessTokenResult DeserializeNotebookAccessTokenResult(JsonElement element) + { + Optional notebookResourceId = default; + Optional hostName = default; + Optional publicDns = default; + Optional accessToken = default; + Optional tokenType = default; + Optional expiresIn = default; + Optional refreshToken = default; + Optional scope = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("notebookResourceId")) + { + notebookResourceId = property.Value.GetString(); + continue; + } + if (property.NameEquals("hostName")) + { + hostName = property.Value.GetString(); + continue; + } + if (property.NameEquals("publicDns")) + { + publicDns = property.Value.GetString(); + continue; + } + if (property.NameEquals("accessToken")) + { + accessToken = property.Value.GetString(); + continue; + } + if (property.NameEquals("tokenType")) + { + tokenType = property.Value.GetString(); + continue; + } + if (property.NameEquals("expiresIn")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + expiresIn = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("refreshToken")) + { + refreshToken = property.Value.GetString(); + continue; + } + if (property.NameEquals("scope")) + { + scope = property.Value.GetString(); + continue; + } + } + return new NotebookAccessTokenResult(notebookResourceId.Value, hostName.Value, publicDns.Value, accessToken.Value, tokenType.Value, Optional.ToNullable(expiresIn), refreshToken.Value, scope.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/NotebookAccessTokenResult.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/NotebookAccessTokenResult.cs new file mode 100644 index 0000000000000..1dbf7b88de51b --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/NotebookAccessTokenResult.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The NotebookAccessTokenResult. + public partial class NotebookAccessTokenResult + { + /// Initializes a new instance of NotebookAccessTokenResult. + internal NotebookAccessTokenResult() + { + } + + /// Initializes a new instance of NotebookAccessTokenResult. + /// . + /// . + /// . + /// . + /// . + /// . + /// . + /// . + internal NotebookAccessTokenResult(string notebookResourceId, string hostName, string publicDns, string accessToken, string tokenType, int? expiresIn, string refreshToken, string scope) + { + NotebookResourceId = notebookResourceId; + HostName = hostName; + PublicDns = publicDns; + AccessToken = accessToken; + TokenType = tokenType; + ExpiresIn = expiresIn; + RefreshToken = refreshToken; + Scope = scope; + } + + public string NotebookResourceId { get; } + public string HostName { get; } + public string PublicDns { get; } + public string AccessToken { get; } + public string TokenType { get; } + public int? ExpiresIn { get; } + public string RefreshToken { get; } + public string Scope { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/NotebookListCredentialsResult.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/NotebookListCredentialsResult.cs deleted file mode 100644 index efb21b7d7ec4c..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/NotebookListCredentialsResult.cs +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// The NotebookListCredentialsResult. - internal partial class NotebookListCredentialsResult - { - /// Initializes a new instance of NotebookListCredentialsResult. - internal NotebookListCredentialsResult() - { - } - - public string PrimaryAccessKey { get; } - public string SecondaryAccessKey { get; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/NotebookResourceInfo.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/NotebookResourceInfo.Serialization.cs index c61e4d91a2b9e..700dc776bb41f 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/NotebookResourceInfo.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/NotebookResourceInfo.Serialization.cs @@ -33,7 +33,7 @@ internal static NotebookResourceInfo DeserializeNotebookResourceInfo(JsonElement { if (property.Value.ValueKind == JsonValueKind.Null) { - property.ThrowNonNullablePropertyIsNull(); + notebookPreparationError = null; continue; } notebookPreparationError = NotebookPreparationError.DeserializeNotebookPreparationError(property.Value); diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/OrderString.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/OrderString.cs deleted file mode 100644 index c54c012334bca..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/OrderString.cs +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// The OrderString. - public readonly partial struct OrderString : IEquatable - { - private readonly string _value; - - /// Determines if two values are the same. - /// is null. - public OrderString(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string CreatedAtDescValue = "CreatedAtDesc"; - private const string CreatedAtAscValue = "CreatedAtAsc"; - private const string UpdatedAtDescValue = "UpdatedAtDesc"; - private const string UpdatedAtAscValue = "UpdatedAtAsc"; - - /// CreatedAtDesc. - public static OrderString CreatedAtDesc { get; } = new OrderString(CreatedAtDescValue); - /// CreatedAtAsc. - public static OrderString CreatedAtAsc { get; } = new OrderString(CreatedAtAscValue); - /// UpdatedAtDesc. - public static OrderString UpdatedAtDesc { get; } = new OrderString(UpdatedAtDescValue); - /// UpdatedAtAsc. - public static OrderString UpdatedAtAsc { get; } = new OrderString(UpdatedAtAscValue); - /// Determines if two values are the same. - public static bool operator ==(OrderString left, OrderString right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(OrderString left, OrderString right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator OrderString(string value) => new OrderString(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is OrderString other && Equals(other); - /// - public bool Equals(OrderString 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/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/OriginType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/OriginType.cs deleted file mode 100644 index 9c934681e8d72..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/OriginType.cs +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// Type of the linked service. - public readonly partial struct OriginType : IEquatable - { - private readonly string _value; - - /// Determines if two values are the same. - /// is null. - public OriginType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string SynapseValue = "Synapse"; - - /// Synapse. - public static OriginType Synapse { get; } = new OriginType(SynapseValue); - /// Determines if two values are the same. - public static bool operator ==(OriginType left, OriginType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(OriginType left, OriginType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator OriginType(string value) => new OriginType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is OriginType other && Equals(other); - /// - public bool Equals(OriginType 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/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PaginatedServiceList.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PaginatedServiceList.cs deleted file mode 100644 index 9d7af83e73424..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PaginatedServiceList.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// Paginated list of Machine Learning service objects wrapped in ARM resource envelope. - internal partial class PaginatedServiceList - { - /// Initializes a new instance of PaginatedServiceList. - internal PaginatedServiceList() - { - Value = new ChangeTrackingList(); - } - - /// Initializes a new instance of PaginatedServiceList. - /// An array of Machine Learning compute objects wrapped in ARM resource envelope. - /// A continuation link (absolute URI) to the next page of results in the list. - internal PaginatedServiceList(IReadOnlyList value, string nextLink) - { - Value = value; - NextLink = nextLink; - } - - /// An array of Machine Learning compute objects wrapped in ARM resource envelope. - public IReadOnlyList Value { get; } - /// A continuation link (absolute URI) to the next page of results in the list. - public string NextLink { get; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ParameterSamplingConfiguration.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ParameterSamplingConfiguration.Serialization.cs deleted file mode 100644 index 3a95dfbb9dd93..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ParameterSamplingConfiguration.Serialization.cs +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class ParameterSamplingConfiguration : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("parameterSpace"); - writer.WriteObjectValue(ParameterSpace); - writer.WritePropertyName("samplingType"); - writer.WriteStringValue(SamplingType.ToString()); - writer.WriteEndObject(); - } - - internal static ParameterSamplingConfiguration DeserializeParameterSamplingConfiguration(JsonElement element) - { - object parameterSpace = default; - ParameterSamplingType samplingType = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("parameterSpace")) - { - parameterSpace = property.Value.GetObject(); - continue; - } - if (property.NameEquals("samplingType")) - { - samplingType = new ParameterSamplingType(property.Value.GetString()); - continue; - } - } - return new ParameterSamplingConfiguration(parameterSpace, samplingType); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ParameterSamplingConfiguration.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ParameterSamplingConfiguration.cs deleted file mode 100644 index d2a2c8d2d129f..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ParameterSamplingConfiguration.cs +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// class for all hyperparameter sampling algorithms. - public partial class ParameterSamplingConfiguration - { - /// Initializes a new instance of ParameterSamplingConfiguration. - /// A dictionary containing each parameter and its distribution. The dictionary key is the name of the parameter. - /// Type of the hyperparameter sampling algorithms. - /// is null. - public ParameterSamplingConfiguration(object parameterSpace, ParameterSamplingType samplingType) - { - if (parameterSpace == null) - { - throw new ArgumentNullException(nameof(parameterSpace)); - } - - ParameterSpace = parameterSpace; - SamplingType = samplingType; - } - - /// A dictionary containing each parameter and its distribution. The dictionary key is the name of the parameter. - public object ParameterSpace { get; set; } - /// Type of the hyperparameter sampling algorithms. - public ParameterSamplingType SamplingType { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ParameterSamplingType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ParameterSamplingType.cs deleted file mode 100644 index 88e26d6ab6a33..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ParameterSamplingType.cs +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// Type of the hyperparameter sampling algorithms. - public readonly partial struct ParameterSamplingType : IEquatable - { - private readonly string _value; - - /// Determines if two values are the same. - /// is null. - public ParameterSamplingType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string GridValue = "Grid"; - private const string RandomValue = "Random"; - private const string BayesianValue = "Bayesian"; - - /// Grid. - public static ParameterSamplingType Grid { get; } = new ParameterSamplingType(GridValue); - /// Random. - public static ParameterSamplingType Random { get; } = new ParameterSamplingType(RandomValue); - /// Bayesian. - public static ParameterSamplingType Bayesian { get; } = new ParameterSamplingType(BayesianValue); - /// Determines if two values are the same. - public static bool operator ==(ParameterSamplingType left, ParameterSamplingType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(ParameterSamplingType left, ParameterSamplingType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator ParameterSamplingType(string value) => new ParameterSamplingType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is ParameterSamplingType other && Equals(other); - /// - public bool Equals(ParameterSamplingType 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/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PrimaryMetricGoal.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PrimaryMetricGoal.cs deleted file mode 100644 index 019f722b35681..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PrimaryMetricGoal.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// Defines supported metric goals for hyperparameter tuning. - public readonly partial struct PrimaryMetricGoal : IEquatable - { - private readonly string _value; - - /// Determines if two values are the same. - /// is null. - public PrimaryMetricGoal(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string MinimizeValue = "Minimize"; - private const string MaximizeValue = "Maximize"; - - /// Minimize. - public static PrimaryMetricGoal Minimize { get; } = new PrimaryMetricGoal(MinimizeValue); - /// Maximize. - public static PrimaryMetricGoal Maximize { get; } = new PrimaryMetricGoal(MaximizeValue); - /// Determines if two values are the same. - public static bool operator ==(PrimaryMetricGoal left, PrimaryMetricGoal right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(PrimaryMetricGoal left, PrimaryMetricGoal right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator PrimaryMetricGoal(string value) => new PrimaryMetricGoal(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is PrimaryMetricGoal other && Equals(other); - /// - public bool Equals(PrimaryMetricGoal 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/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PrivateEndpoint.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PrivateEndpoint.Serialization.cs index 876049d1bad32..3891cba079533 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PrivateEndpoint.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PrivateEndpoint.Serialization.cs @@ -21,6 +21,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) internal static PrivateEndpoint DeserializePrivateEndpoint(JsonElement element) { Optional id = default; + Optional subnetArmId = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("id")) @@ -28,8 +29,13 @@ internal static PrivateEndpoint DeserializePrivateEndpoint(JsonElement element) id = property.Value.GetString(); continue; } + if (property.NameEquals("subnetArmId")) + { + subnetArmId = property.Value.GetString(); + continue; + } } - return new PrivateEndpoint(id.Value); + return new PrivateEndpoint(id.Value, subnetArmId.Value); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PrivateEndpoint.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PrivateEndpoint.cs index 8e8788bf324d5..77734c3d15349 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PrivateEndpoint.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PrivateEndpoint.cs @@ -17,12 +17,16 @@ public PrivateEndpoint() /// Initializes a new instance of PrivateEndpoint. /// The ARM identifier for Private Endpoint. - internal PrivateEndpoint(string id) + /// The ARM identifier for Subnet resource that private endpoint links to. + internal PrivateEndpoint(string id, string subnetArmId) { Id = id; + SubnetArmId = subnetArmId; } /// The ARM identifier for Private Endpoint. public string Id { get; } + /// The ARM identifier for Subnet resource that private endpoint links to. + public string SubnetArmId { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PrivateEndpointConnection.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PrivateEndpointConnection.Serialization.cs index c51dd5d671c8a..94ed2598a602f 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PrivateEndpointConnection.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PrivateEndpointConnection.Serialization.cs @@ -60,28 +60,19 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) internal static PrivateEndpointConnection DeserializePrivateEndpointConnection(JsonElement element) { - Optional id = default; - Optional name = default; Optional identity = default; Optional location = default; - Optional type = default; Optional> tags = default; Optional sku = default; + Optional systemData = default; + Optional id = default; + Optional name = default; + Optional type = default; Optional privateEndpoint = default; Optional privateLinkServiceConnectionState = default; Optional provisioningState = default; foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("id")) - { - id = property.Value.GetString(); - continue; - } - if (property.NameEquals("name")) - { - name = property.Value.GetString(); - continue; - } if (property.NameEquals("identity")) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -97,11 +88,6 @@ internal static PrivateEndpointConnection DeserializePrivateEndpointConnection(J location = property.Value.GetString(); continue; } - if (property.NameEquals("type")) - { - type = property.Value.GetString(); - continue; - } if (property.NameEquals("tags")) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -127,6 +113,31 @@ internal static PrivateEndpointConnection DeserializePrivateEndpointConnection(J sku = Sku.DeserializeSku(property.Value); continue; } + if (property.NameEquals("systemData")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + systemData = SystemData.DeserializeSystemData(property.Value); + continue; + } + if (property.NameEquals("id")) + { + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } if (property.NameEquals("properties")) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -170,7 +181,7 @@ internal static PrivateEndpointConnection DeserializePrivateEndpointConnection(J continue; } } - return new PrivateEndpointConnection(id.Value, name.Value, identity.Value, location.Value, type.Value, Optional.ToDictionary(tags), sku.Value, privateEndpoint.Value, privateLinkServiceConnectionState.Value, Optional.ToNullable(provisioningState)); + return new PrivateEndpointConnection(id.Value, name.Value, type.Value, identity.Value, location.Value, Optional.ToDictionary(tags), sku.Value, systemData.Value, privateEndpoint.Value, privateLinkServiceConnectionState.Value, Optional.ToNullable(provisioningState)); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PrivateEndpointConnection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PrivateEndpointConnection.cs index 7b3fc9392233b..c97afb2312a53 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PrivateEndpointConnection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PrivateEndpointConnection.cs @@ -6,6 +6,7 @@ #nullable disable using System.Collections.Generic; +using Azure.Core; namespace Azure.ResourceManager.MachineLearningServices.Models { @@ -15,26 +16,43 @@ public partial class PrivateEndpointConnection : Resource /// Initializes a new instance of PrivateEndpointConnection. public PrivateEndpointConnection() { + Tags = new ChangeTrackingDictionary(); } /// Initializes a new instance of PrivateEndpointConnection. - /// Specifies the resource ID. - /// Specifies the name of the resource. + /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + /// The name of the resource. + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". /// The identity of the resource. /// Specifies the location of the resource. - /// Specifies the type of the resource. /// Contains resource tags defined as key/value pairs. /// The sku of the workspace. + /// System data. /// The resource of private end point. /// A collection of information about the state of the connection between service consumer and provider. /// The provisioning state of the private endpoint connection resource. - internal PrivateEndpointConnection(string id, string name, Identity identity, string location, string type, IDictionary tags, Sku sku, PrivateEndpoint privateEndpoint, PrivateLinkServiceConnectionState privateLinkServiceConnectionState, PrivateEndpointConnectionProvisioningState? provisioningState) : base(id, name, identity, location, type, tags, sku) + internal PrivateEndpointConnection(string id, string name, string type, Identity identity, string location, IDictionary tags, Sku sku, SystemData systemData, PrivateEndpoint privateEndpoint, PrivateLinkServiceConnectionState privateLinkServiceConnectionState, PrivateEndpointConnectionProvisioningState? provisioningState) : base(id, name, type) { + Identity = identity; + Location = location; + Tags = tags; + Sku = sku; + SystemData = systemData; PrivateEndpoint = privateEndpoint; PrivateLinkServiceConnectionState = privateLinkServiceConnectionState; ProvisioningState = provisioningState; } + /// The identity of the resource. + public Identity Identity { get; set; } + /// Specifies the location of the resource. + public string Location { get; set; } + /// Contains resource tags defined as key/value pairs. + public IDictionary Tags { get; } + /// The sku of the workspace. + public Sku Sku { get; set; } + /// System data. + public SystemData SystemData { get; } /// The resource of private end point. public PrivateEndpoint PrivateEndpoint { get; set; } /// A collection of information about the state of the connection between service consumer and provider. diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PaginatedServiceList.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PrivateEndpointConnectionListResult.Serialization.cs similarity index 56% rename from sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PaginatedServiceList.Serialization.cs rename to sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PrivateEndpointConnectionListResult.Serialization.cs index 513a86f8397aa..bebc73594c1c9 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PaginatedServiceList.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PrivateEndpointConnectionListResult.Serialization.cs @@ -11,12 +11,11 @@ namespace Azure.ResourceManager.MachineLearningServices.Models { - internal partial class PaginatedServiceList + internal partial class PrivateEndpointConnectionListResult { - internal static PaginatedServiceList DeserializePaginatedServiceList(JsonElement element) + internal static PrivateEndpointConnectionListResult DeserializePrivateEndpointConnectionListResult(JsonElement element) { - Optional> value = default; - Optional nextLink = default; + Optional> value = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("value")) @@ -26,21 +25,16 @@ internal static PaginatedServiceList DeserializePaginatedServiceList(JsonElement property.ThrowNonNullablePropertyIsNull(); continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(ServiceResource.DeserializeServiceResource(item)); + array.Add(PrivateEndpointConnection.DeserializePrivateEndpointConnection(item)); } value = array; continue; } - if (property.NameEquals("nextLink")) - { - nextLink = property.Value.GetString(); - continue; - } } - return new PaginatedServiceList(Optional.ToList(value), nextLink.Value); + return new PrivateEndpointConnectionListResult(Optional.ToList(value)); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PrivateEndpointConnectionListResult.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PrivateEndpointConnectionListResult.cs new file mode 100644 index 0000000000000..298225ae9a611 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PrivateEndpointConnectionListResult.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// List of private endpoint connection associated with the specified workspace. + internal partial class PrivateEndpointConnectionListResult + { + /// Initializes a new instance of PrivateEndpointConnectionListResult. + internal PrivateEndpointConnectionListResult() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of PrivateEndpointConnectionListResult. + /// Array of private endpoint connections. + internal PrivateEndpointConnectionListResult(IReadOnlyList value) + { + Value = value; + } + + /// Array of private endpoint connections. + public IReadOnlyList Value { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PrivateLinkResource.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PrivateLinkResource.Serialization.cs index d11e9d85eac27..5515732b8697b 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PrivateLinkResource.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PrivateLinkResource.Serialization.cs @@ -60,28 +60,19 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) internal static PrivateLinkResource DeserializePrivateLinkResource(JsonElement element) { - Optional id = default; - Optional name = default; Optional identity = default; Optional location = default; - Optional type = default; Optional> tags = default; Optional sku = default; + Optional systemData = default; + Optional id = default; + Optional name = default; + Optional type = default; Optional groupId = default; Optional> requiredMembers = default; Optional> requiredZoneNames = default; foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("id")) - { - id = property.Value.GetString(); - continue; - } - if (property.NameEquals("name")) - { - name = property.Value.GetString(); - continue; - } if (property.NameEquals("identity")) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -97,11 +88,6 @@ internal static PrivateLinkResource DeserializePrivateLinkResource(JsonElement e location = property.Value.GetString(); continue; } - if (property.NameEquals("type")) - { - type = property.Value.GetString(); - continue; - } if (property.NameEquals("tags")) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -127,6 +113,31 @@ internal static PrivateLinkResource DeserializePrivateLinkResource(JsonElement e sku = Sku.DeserializeSku(property.Value); continue; } + if (property.NameEquals("systemData")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + systemData = SystemData.DeserializeSystemData(property.Value); + continue; + } + if (property.NameEquals("id")) + { + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } if (property.NameEquals("properties")) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -175,7 +186,7 @@ internal static PrivateLinkResource DeserializePrivateLinkResource(JsonElement e continue; } } - return new PrivateLinkResource(id.Value, name.Value, identity.Value, location.Value, type.Value, Optional.ToDictionary(tags), sku.Value, groupId.Value, Optional.ToList(requiredMembers), Optional.ToList(requiredZoneNames)); + return new PrivateLinkResource(id.Value, name.Value, type.Value, identity.Value, location.Value, Optional.ToDictionary(tags), sku.Value, systemData.Value, groupId.Value, Optional.ToList(requiredMembers), Optional.ToList(requiredZoneNames)); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PrivateLinkResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PrivateLinkResource.cs index d64fb70647382..f5eb1ea4ad82d 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PrivateLinkResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PrivateLinkResource.cs @@ -16,28 +16,45 @@ public partial class PrivateLinkResource : Resource /// Initializes a new instance of PrivateLinkResource. public PrivateLinkResource() { + Tags = new ChangeTrackingDictionary(); RequiredMembers = new ChangeTrackingList(); RequiredZoneNames = new ChangeTrackingList(); } /// Initializes a new instance of PrivateLinkResource. - /// Specifies the resource ID. - /// Specifies the name of the resource. + /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + /// The name of the resource. + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". /// The identity of the resource. /// Specifies the location of the resource. - /// Specifies the type of the resource. /// Contains resource tags defined as key/value pairs. /// The sku of the workspace. + /// System data. /// The private link resource group id. /// The private link resource required member names. /// The private link resource Private link DNS zone name. - internal PrivateLinkResource(string id, string name, Identity identity, string location, string type, IDictionary tags, Sku sku, string groupId, IReadOnlyList requiredMembers, IList requiredZoneNames) : base(id, name, identity, location, type, tags, sku) + internal PrivateLinkResource(string id, string name, string type, Identity identity, string location, IDictionary tags, Sku sku, SystemData systemData, string groupId, IReadOnlyList requiredMembers, IList requiredZoneNames) : base(id, name, type) { + Identity = identity; + Location = location; + Tags = tags; + Sku = sku; + SystemData = systemData; GroupId = groupId; RequiredMembers = requiredMembers; RequiredZoneNames = requiredZoneNames; } + /// The identity of the resource. + public Identity Identity { get; set; } + /// Specifies the location of the resource. + public string Location { get; set; } + /// Contains resource tags defined as key/value pairs. + public IDictionary Tags { get; } + /// The sku of the workspace. + public Sku Sku { get; set; } + /// System data. + public SystemData SystemData { get; } /// The private link resource group id. public string GroupId { get; } /// The private link resource required member names. diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ProgressMetrics.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ProgressMetrics.Serialization.cs deleted file mode 100644 index a815b31dd22e8..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ProgressMetrics.Serialization.cs +++ /dev/null @@ -1,74 +0,0 @@ -// 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.ResourceManager.MachineLearningServices.Models -{ - public partial class ProgressMetrics : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WriteEndObject(); - } - - internal static ProgressMetrics DeserializeProgressMetrics(JsonElement element) - { - Optional totalDatapointCount = default; - Optional completedDatapointCount = default; - Optional skippedDatapointCount = default; - Optional incrementalDatasetLastRefreshTime = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("totalDatapointCount")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - totalDatapointCount = property.Value.GetInt64(); - continue; - } - if (property.NameEquals("completedDatapointCount")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - completedDatapointCount = property.Value.GetInt64(); - continue; - } - if (property.NameEquals("skippedDatapointCount")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - skippedDatapointCount = property.Value.GetInt64(); - continue; - } - if (property.NameEquals("incrementalDatasetLastRefreshTime")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - incrementalDatasetLastRefreshTime = property.Value.GetDateTimeOffset("O"); - continue; - } - } - return new ProgressMetrics(Optional.ToNullable(totalDatapointCount), Optional.ToNullable(completedDatapointCount), Optional.ToNullable(skippedDatapointCount), Optional.ToNullable(incrementalDatasetLastRefreshTime)); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ProgressMetrics.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ProgressMetrics.cs deleted file mode 100644 index a541e3bbc3b72..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ProgressMetrics.cs +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// Progress metrics definition. - public partial class ProgressMetrics - { - /// Initializes a new instance of ProgressMetrics. - public ProgressMetrics() - { - } - - /// Initializes a new instance of ProgressMetrics. - /// The total datapoint count. - /// The completed datapoint count. - /// The skipped datapoint count. - /// The time of last successful incremental dataset refresh in UTC. - internal ProgressMetrics(long? totalDatapointCount, long? completedDatapointCount, long? skippedDatapointCount, DateTimeOffset? incrementalDatasetLastRefreshTime) - { - TotalDatapointCount = totalDatapointCount; - CompletedDatapointCount = completedDatapointCount; - SkippedDatapointCount = skippedDatapointCount; - IncrementalDatasetLastRefreshTime = incrementalDatasetLastRefreshTime; - } - - /// The total datapoint count. - public long? TotalDatapointCount { get; } - /// The completed datapoint count. - public long? CompletedDatapointCount { get; } - /// The skipped datapoint count. - public long? SkippedDatapointCount { get; } - /// The time of last successful incremental dataset refresh in UTC. - public DateTimeOffset? IncrementalDatasetLastRefreshTime { get; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PublicNetworkAccess.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PublicNetworkAccess.cs new file mode 100644 index 0000000000000..0caf24c062511 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PublicNetworkAccess.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Whether requests from Public Network are allowed. + public readonly partial struct PublicNetworkAccess : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + /// is null. + public PublicNetworkAccess(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string EnabledValue = "Enabled"; + private const string DisabledValue = "Disabled"; + + /// Enabled. + public static PublicNetworkAccess Enabled { get; } = new PublicNetworkAccess(EnabledValue); + /// Disabled. + public static PublicNetworkAccess Disabled { get; } = new PublicNetworkAccess(DisabledValue); + /// Determines if two values are the same. + public static bool operator ==(PublicNetworkAccess left, PublicNetworkAccess right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(PublicNetworkAccess left, PublicNetworkAccess right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator PublicNetworkAccess(string value) => new PublicNetworkAccess(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is PublicNetworkAccess other && Equals(other); + /// + public bool Equals(PublicNetworkAccess 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/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/RCranPackage.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/RCranPackage.Serialization.cs deleted file mode 100644 index 8260538525bfd..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/RCranPackage.Serialization.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class RCranPackage : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(Name); - } - if (Optional.IsDefined(Repository)) - { - writer.WritePropertyName("repository"); - writer.WriteStringValue(Repository); - } - writer.WriteEndObject(); - } - - internal static RCranPackage DeserializeRCranPackage(JsonElement element) - { - Optional name = default; - Optional repository = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("name")) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("repository")) - { - repository = property.Value.GetString(); - continue; - } - } - return new RCranPackage(name.Value, repository.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/RCranPackage.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/RCranPackage.cs deleted file mode 100644 index e0056b62d101b..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/RCranPackage.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// The RCranPackage. - public partial class RCranPackage - { - /// Initializes a new instance of RCranPackage. - public RCranPackage() - { - } - - /// Initializes a new instance of RCranPackage. - /// The package name. - /// The repository name. - internal RCranPackage(string name, string repository) - { - Name = name; - Repository = repository; - } - - /// The package name. - public string Name { get; set; } - /// The repository name. - public string Repository { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/RGitHubPackage.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/RGitHubPackage.cs deleted file mode 100644 index 335557330c9cf..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/RGitHubPackage.cs +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// The RGitHubPackage. - public partial class RGitHubPackage - { - /// Initializes a new instance of RGitHubPackage. - public RGitHubPackage() - { - } - - /// Repository address in the format username/repo[/subdir][@ref|#pull]. - public string Repository { get; set; } - /// Personal access token to install from a private repo. - public string AuthToken { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/RGitHubPackageResponse.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/RGitHubPackageResponse.cs deleted file mode 100644 index e84b50dd34adc..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/RGitHubPackageResponse.cs +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// The RGitHubPackageResponse. - public partial class RGitHubPackageResponse - { - /// Initializes a new instance of RGitHubPackageResponse. - public RGitHubPackageResponse() - { - } - - /// Initializes a new instance of RGitHubPackageResponse. - /// Repository address in the format username/repo[/subdir][@ref|#pull]. - internal RGitHubPackageResponse(string repository) - { - Repository = repository; - } - - /// Repository address in the format username/repo[/subdir][@ref|#pull]. - public string Repository { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/RSection.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/RSection.Serialization.cs deleted file mode 100644 index d9b2991e36304..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/RSection.Serialization.cs +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class RSection : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(RVersion)) - { - writer.WritePropertyName("rVersion"); - writer.WriteStringValue(RVersion); - } - if (Optional.IsDefined(UserManaged)) - { - writer.WritePropertyName("userManaged"); - writer.WriteBooleanValue(UserManaged.Value); - } - if (Optional.IsDefined(RscriptPath)) - { - writer.WritePropertyName("rscriptPath"); - writer.WriteStringValue(RscriptPath); - } - if (Optional.IsDefined(SnapshotDate)) - { - writer.WritePropertyName("snapshotDate"); - writer.WriteStringValue(SnapshotDate); - } - if (Optional.IsCollectionDefined(CranPackages)) - { - writer.WritePropertyName("cranPackages"); - writer.WriteStartArray(); - foreach (var item in CranPackages) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(GitHubPackages)) - { - writer.WritePropertyName("gitHubPackages"); - writer.WriteStartArray(); - foreach (var item in GitHubPackages) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(CustomUrlPackages)) - { - writer.WritePropertyName("customUrlPackages"); - writer.WriteStartArray(); - foreach (var item in CustomUrlPackages) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(BioConductorPackages)) - { - writer.WritePropertyName("bioConductorPackages"); - writer.WriteStartArray(); - foreach (var item in BioConductorPackages) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } - writer.WriteEndObject(); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/RSection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/RSection.cs deleted file mode 100644 index 8d7109762f4de..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/RSection.cs +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// The RSection. - public partial class RSection - { - /// Initializes a new instance of RSection. - public RSection() - { - CranPackages = new ChangeTrackingList(); - GitHubPackages = new ChangeTrackingList(); - CustomUrlPackages = new ChangeTrackingList(); - BioConductorPackages = new ChangeTrackingList(); - } - - /// The version of R to be installed. - public string RVersion { get; set; } - /// Indicates whether the environment is managed by user or by AzureML. - public bool? UserManaged { get; set; } - /// - /// The Rscript path to use if an environment build is not required. - /// - /// The path specified gets used to call the user script. - /// - public string RscriptPath { get; set; } - /// Date of MRAN snapshot to use in YYYY-MM-DD format, e.g. "2019-04-17". - public string SnapshotDate { get; set; } - /// The CRAN packages to use. - public IList CranPackages { get; } - /// The packages directly from GitHub. - public IList GitHubPackages { get; } - /// The packages from custom urls. - public IList CustomUrlPackages { get; } - /// The packages from Bioconductor. - public IList BioConductorPackages { get; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/RSectionResponse.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/RSectionResponse.Serialization.cs deleted file mode 100644 index 02a6ef2074170..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/RSectionResponse.Serialization.cs +++ /dev/null @@ -1,183 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class RSectionResponse : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(RVersion)) - { - writer.WritePropertyName("rVersion"); - writer.WriteStringValue(RVersion); - } - if (Optional.IsDefined(UserManaged)) - { - writer.WritePropertyName("userManaged"); - writer.WriteBooleanValue(UserManaged.Value); - } - if (Optional.IsDefined(RscriptPath)) - { - writer.WritePropertyName("rscriptPath"); - writer.WriteStringValue(RscriptPath); - } - if (Optional.IsDefined(SnapshotDate)) - { - writer.WritePropertyName("snapshotDate"); - writer.WriteStringValue(SnapshotDate); - } - if (Optional.IsCollectionDefined(CranPackages)) - { - writer.WritePropertyName("cranPackages"); - writer.WriteStartArray(); - foreach (var item in CranPackages) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(GitHubPackages)) - { - writer.WritePropertyName("gitHubPackages"); - writer.WriteStartArray(); - foreach (var item in GitHubPackages) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(CustomUrlPackages)) - { - writer.WritePropertyName("customUrlPackages"); - writer.WriteStartArray(); - foreach (var item in CustomUrlPackages) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(BioConductorPackages)) - { - writer.WritePropertyName("bioConductorPackages"); - writer.WriteStartArray(); - foreach (var item in BioConductorPackages) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } - writer.WriteEndObject(); - } - - internal static RSectionResponse DeserializeRSectionResponse(JsonElement element) - { - Optional rVersion = default; - Optional userManaged = default; - Optional rscriptPath = default; - Optional snapshotDate = default; - Optional> cranPackages = default; - Optional> gitHubPackages = default; - Optional> customUrlPackages = default; - Optional> bioConductorPackages = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("rVersion")) - { - rVersion = property.Value.GetString(); - continue; - } - if (property.NameEquals("userManaged")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - userManaged = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("rscriptPath")) - { - rscriptPath = property.Value.GetString(); - continue; - } - if (property.NameEquals("snapshotDate")) - { - snapshotDate = property.Value.GetString(); - continue; - } - if (property.NameEquals("cranPackages")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(RCranPackage.DeserializeRCranPackage(item)); - } - cranPackages = array; - continue; - } - if (property.NameEquals("gitHubPackages")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(RGitHubPackageResponse.DeserializeRGitHubPackageResponse(item)); - } - gitHubPackages = array; - continue; - } - if (property.NameEquals("customUrlPackages")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - customUrlPackages = array; - continue; - } - if (property.NameEquals("bioConductorPackages")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - bioConductorPackages = array; - continue; - } - } - return new RSectionResponse(rVersion.Value, Optional.ToNullable(userManaged), rscriptPath.Value, snapshotDate.Value, Optional.ToList(cranPackages), Optional.ToList(gitHubPackages), Optional.ToList(customUrlPackages), Optional.ToList(bioConductorPackages)); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/RSectionResponse.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/RSectionResponse.cs deleted file mode 100644 index d3d12896f588f..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/RSectionResponse.cs +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// The RSectionResponse. - public partial class RSectionResponse - { - /// Initializes a new instance of RSectionResponse. - public RSectionResponse() - { - CranPackages = new ChangeTrackingList(); - GitHubPackages = new ChangeTrackingList(); - CustomUrlPackages = new ChangeTrackingList(); - BioConductorPackages = new ChangeTrackingList(); - } - - /// Initializes a new instance of RSectionResponse. - /// The version of R to be installed. - /// Indicates whether the environment is managed by user or by AzureML. - /// - /// The Rscript path to use if an environment build is not required. - /// - /// The path specified gets used to call the user script. - /// - /// Date of MRAN snapshot to use in YYYY-MM-DD format, e.g. "2019-04-17". - /// The CRAN packages to use. - /// The packages directly from GitHub. - /// The packages from custom urls. - /// The packages from Bioconductor. - internal RSectionResponse(string rVersion, bool? userManaged, string rscriptPath, string snapshotDate, IList cranPackages, IList gitHubPackages, IList customUrlPackages, IList bioConductorPackages) - { - RVersion = rVersion; - UserManaged = userManaged; - RscriptPath = rscriptPath; - SnapshotDate = snapshotDate; - CranPackages = cranPackages; - GitHubPackages = gitHubPackages; - CustomUrlPackages = customUrlPackages; - BioConductorPackages = bioConductorPackages; - } - - /// The version of R to be installed. - public string RVersion { get; set; } - /// Indicates whether the environment is managed by user or by AzureML. - public bool? UserManaged { get; set; } - /// - /// The Rscript path to use if an environment build is not required. - /// - /// The path specified gets used to call the user script. - /// - public string RscriptPath { get; set; } - /// Date of MRAN snapshot to use in YYYY-MM-DD format, e.g. "2019-04-17". - public string SnapshotDate { get; set; } - /// The CRAN packages to use. - public IList CranPackages { get; } - /// The packages directly from GitHub. - public IList GitHubPackages { get; } - /// The packages from custom urls. - public IList CustomUrlPackages { get; } - /// The packages from Bioconductor. - public IList BioConductorPackages { get; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Resource.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Resource.Serialization.cs index d3e6c55295525..04772523f03e4 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Resource.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Resource.Serialization.cs @@ -5,7 +5,6 @@ #nullable disable -using System.Collections.Generic; using System.Text.Json; using Azure.Core; @@ -16,32 +15,6 @@ public partial class Resource : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); - if (Optional.IsDefined(Identity)) - { - writer.WritePropertyName("identity"); - writer.WriteObjectValue(Identity); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"); - writer.WriteStringValue(Location); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsDefined(Sku)) - { - writer.WritePropertyName("sku"); - writer.WriteObjectValue(Sku); - } writer.WriteEndObject(); } @@ -49,11 +22,7 @@ internal static Resource DeserializeResource(JsonElement element) { Optional id = default; Optional name = default; - Optional identity = default; - Optional location = default; Optional type = default; - Optional> tags = default; - Optional sku = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("id")) @@ -66,53 +35,13 @@ internal static Resource DeserializeResource(JsonElement element) name = property.Value.GetString(); continue; } - if (property.NameEquals("identity")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - identity = Identity.DeserializeIdentity(property.Value); - continue; - } - if (property.NameEquals("location")) - { - location = property.Value.GetString(); - continue; - } if (property.NameEquals("type")) { type = property.Value.GetString(); continue; } - if (property.NameEquals("tags")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - tags = dictionary; - continue; - } - if (property.NameEquals("sku")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - sku = Sku.DeserializeSku(property.Value); - continue; - } } - return new Resource(id.Value, name.Value, identity.Value, location.Value, type.Value, Optional.ToDictionary(tags), sku.Value); + return new Resource(id.Value, name.Value, type.Value); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Resource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Resource.cs index 309b2da5db953..a11c6a29e5568 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Resource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Resource.cs @@ -5,52 +5,32 @@ #nullable disable -using System.Collections.Generic; -using Azure.Core; - namespace Azure.ResourceManager.MachineLearningServices.Models { - /// Azure Resource Manager resource envelope. + /// Common fields that are returned in the response for all Azure Resource Manager resources. public partial class Resource { /// Initializes a new instance of Resource. public Resource() { - Tags = new ChangeTrackingDictionary(); } /// Initializes a new instance of Resource. - /// Specifies the resource ID. - /// Specifies the name of the resource. - /// The identity of the resource. - /// Specifies the location of the resource. - /// Specifies the type of the resource. - /// Contains resource tags defined as key/value pairs. - /// The sku of the workspace. - internal Resource(string id, string name, Identity identity, string location, string type, IDictionary tags, Sku sku) + /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + /// The name of the resource. + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". + internal Resource(string id, string name, string type) { Id = id; Name = name; - Identity = identity; - Location = location; Type = type; - Tags = tags; - Sku = sku; } - /// Specifies the resource ID. + /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. public string Id { get; } - /// Specifies the name of the resource. + /// The name of the resource. public string Name { get; } - /// The identity of the resource. - public Identity Identity { get; set; } - /// Specifies the location of the resource. - public string Location { get; set; } - /// Specifies the type of the resource. + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". public string Type { get; } - /// Contains resource tags defined as key/value pairs. - public IDictionary Tags { get; } - /// The sku of the workspace. - public Sku Sku { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/RootError.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/RootError.cs deleted file mode 100644 index fb4fa5d16ec64..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/RootError.cs +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// The RootError. - internal partial class RootError - { - /// Initializes a new instance of RootError. - internal RootError() - { - MessageParameters = new ChangeTrackingDictionary(); - Details = new ChangeTrackingList(); - } - - public string Code { get; } - public int? Severity { get; } - public string Message { get; } - public string MessageFormat { get; } - /// Dictionary of <string>. - public IReadOnlyDictionary MessageParameters { get; } - public string ReferenceCode { get; } - public string DetailsUri { get; } - public string Target { get; } - public IReadOnlyList Details { get; } - public InnerErrorResponse InnerError { get; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SasSection.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SasSection.Serialization.cs deleted file mode 100644 index 6919f35907ebd..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SasSection.Serialization.cs +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class SasSection : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(SasToken)) - { - writer.WritePropertyName("sasToken"); - writer.WriteStringValue(SasToken); - } - writer.WriteEndObject(); - } - - internal static SasSection DeserializeSasSection(JsonElement element) - { - Optional sasToken = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("sasToken")) - { - sasToken = property.Value.GetString(); - continue; - } - } - return new SasSection(sasToken.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SasSection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SasSection.cs deleted file mode 100644 index ac29b73e528a7..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SasSection.cs +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// The SasSection. - public partial class SasSection - { - /// Initializes a new instance of SasSection. - public SasSection() - { - } - - /// Initializes a new instance of SasSection. - /// Storage container SAS token. - internal SasSection(string sasToken) - { - SasToken = sasToken; - } - - /// Storage container SAS token. - public string SasToken { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CreateServiceRequestKeys.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ScaleSettingsInformation.Serialization.cs similarity index 52% rename from sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CreateServiceRequestKeys.Serialization.cs rename to sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ScaleSettingsInformation.Serialization.cs index 1bb8c60b50000..0dd5dcbccbf34 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CreateServiceRequestKeys.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ScaleSettingsInformation.Serialization.cs @@ -10,20 +10,15 @@ namespace Azure.ResourceManager.MachineLearningServices.Models { - public partial class CreateServiceRequestKeys : IUtf8JsonSerializable + public partial class ScaleSettingsInformation : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); - if (Optional.IsDefined(PrimaryKey)) + if (Optional.IsDefined(ScaleSettings)) { - writer.WritePropertyName("primaryKey"); - writer.WriteStringValue(PrimaryKey); - } - if (Optional.IsDefined(SecondaryKey)) - { - writer.WritePropertyName("secondaryKey"); - writer.WriteStringValue(SecondaryKey); + writer.WritePropertyName("scaleSettings"); + writer.WriteObjectValue(ScaleSettings); } writer.WriteEndObject(); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ScaleSettingsInformation.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ScaleSettingsInformation.cs new file mode 100644 index 0000000000000..50e3fbffbe9a2 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ScaleSettingsInformation.cs @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Desired scale settings for the amlCompute. + public partial class ScaleSettingsInformation + { + /// Initializes a new instance of ScaleSettingsInformation. + public ScaleSettingsInformation() + { + } + + /// scale settings for AML Compute. + public ScaleSettings ScaleSettings { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ScriptReference.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ScriptReference.Serialization.cs new file mode 100644 index 0000000000000..65515837d071a --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ScriptReference.Serialization.cs @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class ScriptReference : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(ScriptSource)) + { + writer.WritePropertyName("scriptSource"); + writer.WriteStringValue(ScriptSource); + } + if (Optional.IsDefined(ScriptData)) + { + writer.WritePropertyName("scriptData"); + writer.WriteStringValue(ScriptData); + } + if (Optional.IsDefined(ScriptArguments)) + { + writer.WritePropertyName("scriptArguments"); + writer.WriteStringValue(ScriptArguments); + } + if (Optional.IsDefined(Timeout)) + { + writer.WritePropertyName("timeout"); + writer.WriteStringValue(Timeout); + } + writer.WriteEndObject(); + } + + internal static ScriptReference DeserializeScriptReference(JsonElement element) + { + Optional scriptSource = default; + Optional scriptData = default; + Optional scriptArguments = default; + Optional timeout = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("scriptSource")) + { + scriptSource = property.Value.GetString(); + continue; + } + if (property.NameEquals("scriptData")) + { + scriptData = property.Value.GetString(); + continue; + } + if (property.NameEquals("scriptArguments")) + { + scriptArguments = property.Value.GetString(); + continue; + } + if (property.NameEquals("timeout")) + { + timeout = property.Value.GetString(); + continue; + } + } + return new ScriptReference(scriptSource.Value, scriptData.Value, scriptArguments.Value, timeout.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ScriptReference.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ScriptReference.cs new file mode 100644 index 0000000000000..5cce40c4e5dab --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ScriptReference.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Script reference. + public partial class ScriptReference + { + /// Initializes a new instance of ScriptReference. + public ScriptReference() + { + } + + /// Initializes a new instance of ScriptReference. + /// The storage source of the script: inline, workspace. + /// The location of scripts in the mounted volume. + /// Optional command line arguments passed to the script to run. + /// Optional time period passed to timeout command. + internal ScriptReference(string scriptSource, string scriptData, string scriptArguments, string timeout) + { + ScriptSource = scriptSource; + ScriptData = scriptData; + ScriptArguments = scriptArguments; + Timeout = timeout; + } + + /// The storage source of the script: inline, workspace. + public string ScriptSource { get; set; } + /// The location of scripts in the mounted volume. + public string ScriptData { get; set; } + /// Optional command line arguments passed to the script to run. + public string ScriptArguments { get; set; } + /// Optional time period passed to timeout command. + public string Timeout { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceResponseDataCollection.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ScriptsToExecute.Serialization.cs similarity index 52% rename from sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceResponseDataCollection.Serialization.cs rename to sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ScriptsToExecute.Serialization.cs index f64299c4b30c8..e7ddec9b88b51 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceResponseDataCollection.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ScriptsToExecute.Serialization.cs @@ -10,52 +10,52 @@ namespace Azure.ResourceManager.MachineLearningServices.Models { - public partial class AKSServiceResponseDataCollection : IUtf8JsonSerializable + public partial class ScriptsToExecute : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); - if (Optional.IsDefined(EventHubEnabled)) + if (Optional.IsDefined(StartupScript)) { - writer.WritePropertyName("eventHubEnabled"); - writer.WriteBooleanValue(EventHubEnabled.Value); + writer.WritePropertyName("startupScript"); + writer.WriteObjectValue(StartupScript); } - if (Optional.IsDefined(StorageEnabled)) + if (Optional.IsDefined(CreationScript)) { - writer.WritePropertyName("storageEnabled"); - writer.WriteBooleanValue(StorageEnabled.Value); + writer.WritePropertyName("creationScript"); + writer.WriteObjectValue(CreationScript); } writer.WriteEndObject(); } - internal static AKSServiceResponseDataCollection DeserializeAKSServiceResponseDataCollection(JsonElement element) + internal static ScriptsToExecute DeserializeScriptsToExecute(JsonElement element) { - Optional eventHubEnabled = default; - Optional storageEnabled = default; + Optional startupScript = default; + Optional creationScript = default; foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("eventHubEnabled")) + if (property.NameEquals("startupScript")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } - eventHubEnabled = property.Value.GetBoolean(); + startupScript = ScriptReference.DeserializeScriptReference(property.Value); continue; } - if (property.NameEquals("storageEnabled")) + if (property.NameEquals("creationScript")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } - storageEnabled = property.Value.GetBoolean(); + creationScript = ScriptReference.DeserializeScriptReference(property.Value); continue; } } - return new AKSServiceResponseDataCollection(Optional.ToNullable(eventHubEnabled), Optional.ToNullable(storageEnabled)); + return new ScriptsToExecute(startupScript.Value, creationScript.Value); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ScriptsToExecute.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ScriptsToExecute.cs new file mode 100644 index 0000000000000..7fa6a4f40922b --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ScriptsToExecute.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Customized setup scripts. + public partial class ScriptsToExecute + { + /// Initializes a new instance of ScriptsToExecute. + public ScriptsToExecute() + { + } + + /// Initializes a new instance of ScriptsToExecute. + /// Script that's run every time the machine starts. + /// Script that's run only once during provision of the compute. + internal ScriptsToExecute(ScriptReference startupScript, ScriptReference creationScript) + { + StartupScript = startupScript; + CreationScript = creationScript; + } + + /// Script that's run every time the machine starts. + public ScriptReference StartupScript { get; set; } + /// Script that's run only once during provision of the compute. + public ScriptReference CreationScript { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ServiceManagedResourcesSettings.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ServiceManagedResourcesSettings.Serialization.cs new file mode 100644 index 0000000000000..cfa7f21beeb36 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ServiceManagedResourcesSettings.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.ResourceManager.MachineLearningServices.Models +{ + public partial class ServiceManagedResourcesSettings : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(CosmosDb)) + { + writer.WritePropertyName("cosmosDb"); + writer.WriteObjectValue(CosmosDb); + } + writer.WriteEndObject(); + } + + internal static ServiceManagedResourcesSettings DeserializeServiceManagedResourcesSettings(JsonElement element) + { + Optional cosmosDb = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("cosmosDb")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + cosmosDb = CosmosDbSettings.DeserializeCosmosDbSettings(property.Value); + continue; + } + } + return new ServiceManagedResourcesSettings(cosmosDb.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ServiceManagedResourcesSettings.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ServiceManagedResourcesSettings.cs new file mode 100644 index 0000000000000..72bdc520586b7 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ServiceManagedResourcesSettings.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The ServiceManagedResourcesSettings. + public partial class ServiceManagedResourcesSettings + { + /// Initializes a new instance of ServiceManagedResourcesSettings. + public ServiceManagedResourcesSettings() + { + } + + /// Initializes a new instance of ServiceManagedResourcesSettings. + /// The settings for the service managed cosmosdb account. + internal ServiceManagedResourcesSettings(CosmosDbSettings cosmosDb) + { + CosmosDb = cosmosDb; + } + + /// The settings for the service managed cosmosdb account. + public CosmosDbSettings CosmosDb { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ServicePrincipalSection.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ServicePrincipalSection.Serialization.cs deleted file mode 100644 index d60441316353a..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ServicePrincipalSection.Serialization.cs +++ /dev/null @@ -1,79 +0,0 @@ -// 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.ResourceManager.MachineLearningServices.Models -{ - public partial class ServicePrincipalSection : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(AuthorityUrl)) - { - writer.WritePropertyName("authorityUrl"); - writer.WriteStringValue(AuthorityUrl); - } - if (Optional.IsDefined(ResourceUri)) - { - writer.WritePropertyName("resourceUri"); - writer.WriteStringValue(ResourceUri); - } - writer.WritePropertyName("tenantId"); - writer.WriteStringValue(TenantId); - writer.WritePropertyName("clientId"); - writer.WriteStringValue(ClientId); - if (Optional.IsDefined(ClientSecret)) - { - writer.WritePropertyName("clientSecret"); - writer.WriteStringValue(ClientSecret); - } - writer.WriteEndObject(); - } - - internal static ServicePrincipalSection DeserializeServicePrincipalSection(JsonElement element) - { - Optional authorityUrl = default; - Optional resourceUri = default; - Guid tenantId = default; - Guid clientId = default; - Optional clientSecret = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("authorityUrl")) - { - authorityUrl = property.Value.GetString(); - continue; - } - if (property.NameEquals("resourceUri")) - { - resourceUri = property.Value.GetString(); - continue; - } - if (property.NameEquals("tenantId")) - { - tenantId = property.Value.GetGuid(); - continue; - } - if (property.NameEquals("clientId")) - { - clientId = property.Value.GetGuid(); - continue; - } - if (property.NameEquals("clientSecret")) - { - clientSecret = property.Value.GetString(); - continue; - } - } - return new ServicePrincipalSection(authorityUrl.Value, resourceUri.Value, tenantId, clientId, clientSecret.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ServicePrincipalSection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ServicePrincipalSection.cs deleted file mode 100644 index 0921056711e3b..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ServicePrincipalSection.cs +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// The ServicePrincipalSection. - public partial class ServicePrincipalSection - { - /// Initializes a new instance of ServicePrincipalSection. - /// ID of the tenant to which the service principal belongs. - /// Service principal client ID. - public ServicePrincipalSection(Guid tenantId, Guid clientId) - { - TenantId = tenantId; - ClientId = clientId; - } - - /// Initializes a new instance of ServicePrincipalSection. - /// Authority URL used for authentication. - /// Resource the service principal has access to. - /// ID of the tenant to which the service principal belongs. - /// Service principal client ID. - /// Service principal secret. - internal ServicePrincipalSection(string authorityUrl, string resourceUri, Guid tenantId, Guid clientId, string clientSecret) - { - AuthorityUrl = authorityUrl; - ResourceUri = resourceUri; - TenantId = tenantId; - ClientId = clientId; - ClientSecret = clientSecret; - } - - /// Authority URL used for authentication. - public string AuthorityUrl { get; set; } - /// Resource the service principal has access to. - public string ResourceUri { get; set; } - /// ID of the tenant to which the service principal belongs. - public Guid TenantId { get; set; } - /// Service principal client ID. - public Guid ClientId { get; set; } - /// Service principal secret. - public string ClientSecret { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ServiceResource.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ServiceResource.Serialization.cs deleted file mode 100644 index e27d89631dcab..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ServiceResource.Serialization.cs +++ /dev/null @@ -1,134 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class ServiceResource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Properties)) - { - writer.WritePropertyName("properties"); - writer.WriteObjectValue(Properties); - } - if (Optional.IsDefined(Identity)) - { - writer.WritePropertyName("identity"); - writer.WriteObjectValue(Identity); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"); - writer.WriteStringValue(Location); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsDefined(Sku)) - { - writer.WritePropertyName("sku"); - writer.WriteObjectValue(Sku); - } - writer.WriteEndObject(); - } - - internal static ServiceResource DeserializeServiceResource(JsonElement element) - { - Optional properties = default; - Optional id = default; - Optional name = default; - Optional identity = default; - Optional location = default; - Optional type = default; - Optional> tags = default; - Optional sku = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("properties")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - properties = ServiceResponseBase.DeserializeServiceResponseBase(property.Value); - continue; - } - if (property.NameEquals("id")) - { - id = property.Value.GetString(); - continue; - } - if (property.NameEquals("name")) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("identity")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - identity = Identity.DeserializeIdentity(property.Value); - continue; - } - if (property.NameEquals("location")) - { - location = property.Value.GetString(); - continue; - } - if (property.NameEquals("type")) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("tags")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - tags = dictionary; - continue; - } - if (property.NameEquals("sku")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - sku = Sku.DeserializeSku(property.Value); - continue; - } - } - return new ServiceResource(id.Value, name.Value, identity.Value, location.Value, type.Value, Optional.ToDictionary(tags), sku.Value, properties.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ServiceResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ServiceResource.cs deleted file mode 100644 index c95e657f95f67..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ServiceResource.cs +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// Machine Learning service object wrapped into ARM resource envelope. - public partial class ServiceResource : Resource - { - /// Initializes a new instance of ServiceResource. - public ServiceResource() - { - } - - /// Initializes a new instance of ServiceResource. - /// Specifies the resource ID. - /// Specifies the name of the resource. - /// The identity of the resource. - /// Specifies the location of the resource. - /// Specifies the type of the resource. - /// Contains resource tags defined as key/value pairs. - /// The sku of the workspace. - /// Service properties. - internal ServiceResource(string id, string name, Identity identity, string location, string type, IDictionary tags, Sku sku, ServiceResponseBase properties) : base(id, name, identity, location, type, tags, sku) - { - Properties = properties; - } - - /// Service properties. - public ServiceResponseBase Properties { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ServiceResponseBase.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ServiceResponseBase.Serialization.cs deleted file mode 100644 index 0e8584abff528..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ServiceResponseBase.Serialization.cs +++ /dev/null @@ -1,150 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class ServiceResponseBase : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(KvTags)) - { - writer.WritePropertyName("kvTags"); - writer.WriteStartObject(); - foreach (var item in KvTags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Properties)) - { - writer.WritePropertyName("properties"); - writer.WriteStartObject(); - foreach (var item in Properties) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("computeType"); - writer.WriteStringValue(ComputeType.ToString()); - if (Optional.IsDefined(DeploymentType)) - { - writer.WritePropertyName("deploymentType"); - writer.WriteStringValue(DeploymentType.Value.ToString()); - } - writer.WriteEndObject(); - } - - internal static ServiceResponseBase DeserializeServiceResponseBase(JsonElement element) - { - if (element.TryGetProperty("computeType", out JsonElement discriminator)) - { - switch (discriminator.GetString()) - { - case "ACI": return ACIServiceResponse.DeserializeACIServiceResponse(element); - case "AKS": return AKSServiceResponse.DeserializeAKSServiceResponse(element); - case "Custom": return AKSVariantResponse.DeserializeAKSVariantResponse(element); - } - } - Optional description = default; - Optional> kvTags = default; - Optional> properties = default; - Optional state = default; - Optional error = default; - ComputeEnvironmentType computeType = default; - Optional deploymentType = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("description")) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("kvTags")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - kvTags = dictionary; - continue; - } - if (property.NameEquals("properties")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - properties = dictionary; - continue; - } - if (property.NameEquals("state")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - state = new WebServiceState(property.Value.GetString()); - continue; - } - if (property.NameEquals("error")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - error = ServiceResponseBaseError.DeserializeServiceResponseBaseError(property.Value); - continue; - } - if (property.NameEquals("computeType")) - { - computeType = new ComputeEnvironmentType(property.Value.GetString()); - continue; - } - if (property.NameEquals("deploymentType")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - deploymentType = new DeploymentType(property.Value.GetString()); - continue; - } - } - return new ServiceResponseBase(description.Value, Optional.ToDictionary(kvTags), Optional.ToDictionary(properties), Optional.ToNullable(state), error.Value, computeType, Optional.ToNullable(deploymentType)); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ServiceResponseBase.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ServiceResponseBase.cs deleted file mode 100644 index 75a7588e09be3..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ServiceResponseBase.cs +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// The base service response. The correct inherited response based on computeType will be returned (ex. ACIServiceResponse). - public partial class ServiceResponseBase - { - /// Initializes a new instance of ServiceResponseBase. - public ServiceResponseBase() - { - KvTags = new ChangeTrackingDictionary(); - Properties = new ChangeTrackingDictionary(); - } - - /// Initializes a new instance of ServiceResponseBase. - /// The service description. - /// The service tag dictionary. Tags are mutable. - /// The service property dictionary. Properties are immutable. - /// The current state of the service. - /// The error details. - /// The compute environment type for the service. - /// The deployment type for the service. - internal ServiceResponseBase(string description, IDictionary kvTags, IDictionary properties, WebServiceState? state, ServiceResponseBaseError error, ComputeEnvironmentType computeType, DeploymentType? deploymentType) - { - Description = description; - KvTags = kvTags; - Properties = properties; - State = state; - Error = error; - ComputeType = computeType; - DeploymentType = deploymentType; - } - - /// The service description. - public string Description { get; set; } - /// The service tag dictionary. Tags are mutable. - public IDictionary KvTags { get; } - /// The service property dictionary. Properties are immutable. - public IDictionary Properties { get; } - /// The current state of the service. - public WebServiceState? State { get; } - /// The error details. - public ServiceResponseBaseError Error { get; } - /// The compute environment type for the service. - internal ComputeEnvironmentType ComputeType { get; set; } - /// The deployment type for the service. - public DeploymentType? DeploymentType { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ServiceResponseBaseError.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ServiceResponseBaseError.Serialization.cs deleted file mode 100644 index 5a1ae32820d87..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ServiceResponseBaseError.Serialization.cs +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class ServiceResponseBaseError - { - internal static ServiceResponseBaseError DeserializeServiceResponseBaseError(JsonElement element) - { - Optional code = default; - Optional message = default; - Optional> 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("details")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(ErrorDetail.DeserializeErrorDetail(item)); - } - details = array; - continue; - } - } - return new ServiceResponseBaseError(code.Value, message.Value, Optional.ToList(details)); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ServiceResponseBaseError.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ServiceResponseBaseError.cs deleted file mode 100644 index 171a688500e32..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ServiceResponseBaseError.cs +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// The error details. - public partial class ServiceResponseBaseError : ErrorResponse - { - /// Initializes a new instance of ServiceResponseBaseError. - internal ServiceResponseBaseError() - { - } - - /// Initializes a new instance of ServiceResponseBaseError. - /// Error code. - /// Error message. - /// An array of error detail objects. - internal ServiceResponseBaseError(string code, string message, IReadOnlyList details) : base(code, message, details) - { - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SetupScripts.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SetupScripts.Serialization.cs new file mode 100644 index 0000000000000..c54fe2e3798f6 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SetupScripts.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.ResourceManager.MachineLearningServices.Models +{ + public partial class SetupScripts : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Scripts)) + { + writer.WritePropertyName("scripts"); + writer.WriteObjectValue(Scripts); + } + writer.WriteEndObject(); + } + + internal static SetupScripts DeserializeSetupScripts(JsonElement element) + { + Optional scripts = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("scripts")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + scripts = ScriptsToExecute.DeserializeScriptsToExecute(property.Value); + continue; + } + } + return new SetupScripts(scripts.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SetupScripts.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SetupScripts.cs new file mode 100644 index 0000000000000..0fc11f99257e7 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SetupScripts.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Details of customized scripts to execute for setting up the cluster. + public partial class SetupScripts + { + /// Initializes a new instance of SetupScripts. + public SetupScripts() + { + } + + /// Initializes a new instance of SetupScripts. + /// Customized setup scripts. + internal SetupScripts(ScriptsToExecute scripts) + { + Scripts = scripts; + } + + /// Customized setup scripts. + public ScriptsToExecute Scripts { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SparkMavenPackage.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SparkMavenPackage.Serialization.cs deleted file mode 100644 index 26c2a2f3cd8ee..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SparkMavenPackage.Serialization.cs +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class SparkMavenPackage : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Group)) - { - writer.WritePropertyName("group"); - writer.WriteStringValue(Group); - } - if (Optional.IsDefined(Artifact)) - { - writer.WritePropertyName("artifact"); - writer.WriteStringValue(Artifact); - } - if (Optional.IsDefined(Version)) - { - writer.WritePropertyName("version"); - writer.WriteStringValue(Version); - } - writer.WriteEndObject(); - } - - internal static SparkMavenPackage DeserializeSparkMavenPackage(JsonElement element) - { - Optional group = default; - Optional artifact = default; - Optional version = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("group")) - { - group = property.Value.GetString(); - continue; - } - if (property.NameEquals("artifact")) - { - artifact = property.Value.GetString(); - continue; - } - if (property.NameEquals("version")) - { - version = property.Value.GetString(); - continue; - } - } - return new SparkMavenPackage(group.Value, artifact.Value, version.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SparkMavenPackage.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SparkMavenPackage.cs deleted file mode 100644 index 70233a0b29b02..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SparkMavenPackage.cs +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// The SparkMavenPackage. - public partial class SparkMavenPackage - { - /// Initializes a new instance of SparkMavenPackage. - public SparkMavenPackage() - { - } - - /// Initializes a new instance of SparkMavenPackage. - /// . - /// . - /// . - internal SparkMavenPackage(string group, string artifact, string version) - { - Group = group; - Artifact = artifact; - Version = version; - } - - public string Group { get; set; } - public string Artifact { get; set; } - public string Version { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SqlAdminSection.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SqlAdminSection.Serialization.cs deleted file mode 100644 index 9ca413fd8cf42..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SqlAdminSection.Serialization.cs +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class SqlAdminSection : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("userId"); - writer.WriteStringValue(UserId); - if (Optional.IsDefined(Password)) - { - writer.WritePropertyName("password"); - writer.WriteStringValue(Password); - } - writer.WriteEndObject(); - } - - internal static SqlAdminSection DeserializeSqlAdminSection(JsonElement element) - { - string userId = default; - Optional password = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("userId")) - { - userId = property.Value.GetString(); - continue; - } - if (property.NameEquals("password")) - { - password = property.Value.GetString(); - continue; - } - } - return new SqlAdminSection(userId, password.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SqlAdminSection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SqlAdminSection.cs deleted file mode 100644 index 935ba2e74c80d..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SqlAdminSection.cs +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// The SqlAdminSection. - public partial class SqlAdminSection - { - /// Initializes a new instance of SqlAdminSection. - /// SQL database user name. - /// is null. - public SqlAdminSection(string userId) - { - if (userId == null) - { - throw new ArgumentNullException(nameof(userId)); - } - - UserId = userId; - } - - /// Initializes a new instance of SqlAdminSection. - /// SQL database user name. - /// SQL database password. - internal SqlAdminSection(string userId, string password) - { - UserId = userId; - Password = password; - } - - /// SQL database user name. - public string UserId { get; set; } - /// SQL database password. - public string Password { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SslConfiguration.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SslConfiguration.Serialization.cs index 83e5ce6e941d5..76076657a50f6 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SslConfiguration.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SslConfiguration.Serialization.cs @@ -35,6 +35,16 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("cname"); writer.WriteStringValue(Cname); } + if (Optional.IsDefined(LeafDomainLabel)) + { + writer.WritePropertyName("leafDomainLabel"); + writer.WriteStringValue(LeafDomainLabel); + } + if (Optional.IsDefined(OverwriteExistingDomain)) + { + writer.WritePropertyName("overwriteExistingDomain"); + writer.WriteBooleanValue(OverwriteExistingDomain.Value); + } writer.WriteEndObject(); } @@ -44,6 +54,8 @@ internal static SslConfiguration DeserializeSslConfiguration(JsonElement element Optional cert = default; Optional key = default; Optional cname = default; + Optional leafDomainLabel = default; + Optional overwriteExistingDomain = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("status")) @@ -71,8 +83,23 @@ internal static SslConfiguration DeserializeSslConfiguration(JsonElement element cname = property.Value.GetString(); continue; } + if (property.NameEquals("leafDomainLabel")) + { + leafDomainLabel = property.Value.GetString(); + continue; + } + if (property.NameEquals("overwriteExistingDomain")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + overwriteExistingDomain = property.Value.GetBoolean(); + continue; + } } - return new SslConfiguration(Optional.ToNullable(status), cert.Value, key.Value, cname.Value); + return new SslConfiguration(Optional.ToNullable(status), cert.Value, key.Value, cname.Value, leafDomainLabel.Value, Optional.ToNullable(overwriteExistingDomain)); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SslConfiguration.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SslConfiguration.cs index 8a6bf8cef6963..1ad366fbee44e 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SslConfiguration.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SslConfiguration.cs @@ -20,12 +20,16 @@ public SslConfiguration() /// Cert data. /// Key data. /// CNAME of the cert. - internal SslConfiguration(SslConfigurationStatus? status, string cert, string key, string cname) + /// Leaf domain label of public endpoint. + /// Indicates whether to overwrite existing domain label. + internal SslConfiguration(SslConfigurationStatus? status, string cert, string key, string cname, string leafDomainLabel, bool? overwriteExistingDomain) { Status = status; Cert = cert; Key = key; Cname = cname; + LeafDomainLabel = leafDomainLabel; + OverwriteExistingDomain = overwriteExistingDomain; } /// Enable or disable ssl for scoring. @@ -36,5 +40,9 @@ internal SslConfiguration(SslConfigurationStatus? status, string cert, string ke public string Key { get; set; } /// CNAME of the cert. public string Cname { get; set; } + /// Leaf domain label of public endpoint. + public string LeafDomainLabel { get; set; } + /// Indicates whether to overwrite existing domain label. + public bool? OverwriteExistingDomain { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SslConfigurationStatus.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SslConfigurationStatus.cs index 088e9129d66a8..a5648497a6920 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SslConfigurationStatus.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SslConfigurationStatus.cs @@ -24,11 +24,14 @@ public SslConfigurationStatus(string value) private const string DisabledValue = "Disabled"; private const string EnabledValue = "Enabled"; + private const string AutoValue = "Auto"; /// Disabled. public static SslConfigurationStatus Disabled { get; } = new SslConfigurationStatus(DisabledValue); /// Enabled. public static SslConfigurationStatus Enabled { get; } = new SslConfigurationStatus(EnabledValue); + /// Auto. + public static SslConfigurationStatus Auto { get; } = new SslConfigurationStatus(AutoValue); /// Determines if two values are the same. public static bool operator ==(SslConfigurationStatus left, SslConfigurationStatus right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/StatusMessage.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/StatusMessage.Serialization.cs deleted file mode 100644 index 63e40bf8b389f..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/StatusMessage.Serialization.cs +++ /dev/null @@ -1,64 +0,0 @@ -// 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.ResourceManager.MachineLearningServices.Models -{ - public partial class StatusMessage : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WriteEndObject(); - } - - internal static StatusMessage DeserializeStatusMessage(JsonElement element) - { - Optional level = default; - Optional code = default; - Optional message = default; - Optional createdTimeUtc = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("level")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - level = new StatusMessageLevel(property.Value.GetString()); - continue; - } - if (property.NameEquals("code")) - { - code = property.Value.GetString(); - continue; - } - if (property.NameEquals("message")) - { - message = property.Value.GetString(); - continue; - } - if (property.NameEquals("createdTimeUtc")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - createdTimeUtc = property.Value.GetDateTimeOffset("O"); - continue; - } - } - return new StatusMessage(Optional.ToNullable(level), code.Value, message.Value, Optional.ToNullable(createdTimeUtc)); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/StatusMessage.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/StatusMessage.cs deleted file mode 100644 index b456dfdb39b85..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/StatusMessage.cs +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// Active message associated with project. - public partial class StatusMessage - { - /// Initializes a new instance of StatusMessage. - public StatusMessage() - { - } - - /// Initializes a new instance of StatusMessage. - /// Severity level of message. - /// Service-defined message code. - /// A human-readable representation of the message code. - /// Time in UTC at which the message was created. - internal StatusMessage(StatusMessageLevel? level, string code, string message, DateTimeOffset? createdTimeUtc) - { - Level = level; - Code = code; - Message = message; - CreatedTimeUtc = createdTimeUtc; - } - - /// Severity level of message. - public StatusMessageLevel? Level { get; } - /// Service-defined message code. - public string Code { get; } - /// A human-readable representation of the message code. - public string Message { get; } - /// Time in UTC at which the message was created. - public DateTimeOffset? CreatedTimeUtc { get; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/StatusMessageLevel.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/StatusMessageLevel.cs deleted file mode 100644 index b1f1624dafc83..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/StatusMessageLevel.cs +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// Severity level of message. - public readonly partial struct StatusMessageLevel : IEquatable - { - private readonly string _value; - - /// Determines if two values are the same. - /// is null. - public StatusMessageLevel(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string ErrorValue = "Error"; - private const string InformationValue = "Information"; - private const string WarningValue = "Warning"; - - /// Error. - public static StatusMessageLevel Error { get; } = new StatusMessageLevel(ErrorValue); - /// Information. - public static StatusMessageLevel Information { get; } = new StatusMessageLevel(InformationValue); - /// Warning. - public static StatusMessageLevel Warning { get; } = new StatusMessageLevel(WarningValue); - /// Determines if two values are the same. - public static bool operator ==(StatusMessageLevel left, StatusMessageLevel right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(StatusMessageLevel left, StatusMessageLevel right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator StatusMessageLevel(string value) => new StatusMessageLevel(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is StatusMessageLevel other && Equals(other); - /// - public bool Equals(StatusMessageLevel 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/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SweepJob.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SweepJob.Serialization.cs deleted file mode 100644 index 838bf72ad4852..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SweepJob.Serialization.cs +++ /dev/null @@ -1,213 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class SweepJob : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Status)) - { - writer.WritePropertyName("status"); - writer.WriteStringValue(Status.Value.ToString()); - } - writer.WritePropertyName("parameterSamplingConfiguration"); - writer.WriteObjectValue(ParameterSamplingConfiguration); - if (Optional.IsDefined(TerminationConfiguration)) - { - writer.WritePropertyName("terminationConfiguration"); - writer.WriteObjectValue(TerminationConfiguration); - } - writer.WritePropertyName("evaluationConfiguration"); - writer.WriteObjectValue(EvaluationConfiguration); - if (Optional.IsDefined(TrialComponent)) - { - writer.WritePropertyName("trialComponent"); - writer.WriteObjectValue(TrialComponent); - } - if (Optional.IsDefined(ExperimentName)) - { - writer.WritePropertyName("experimentName"); - writer.WriteStringValue(ExperimentName); - } - writer.WritePropertyName("computeBinding"); - writer.WriteObjectValue(ComputeBinding); - if (Optional.IsDefined(Output)) - { - writer.WritePropertyName("output"); - writer.WriteObjectValue(Output); - } - writer.WritePropertyName("jobType"); - writer.WriteStringValue(JobType.ToString()); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Properties)) - { - writer.WritePropertyName("properties"); - writer.WriteStartObject(); - foreach (var item in Properties) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WriteEndObject(); - } - - internal static SweepJob DeserializeSweepJob(JsonElement element) - { - Optional status = default; - ParameterSamplingConfiguration parameterSamplingConfiguration = default; - Optional terminationConfiguration = default; - EvaluationConfiguration evaluationConfiguration = default; - Optional trialComponent = default; - Optional experimentName = default; - ComputeBinding computeBinding = default; - Optional output = default; - JobType jobType = default; - Optional interactionEndpoints = default; - Optional description = default; - Optional> tags = default; - Optional> properties = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("status")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - status = new JobStatus(property.Value.GetString()); - continue; - } - if (property.NameEquals("parameterSamplingConfiguration")) - { - parameterSamplingConfiguration = ParameterSamplingConfiguration.DeserializeParameterSamplingConfiguration(property.Value); - continue; - } - if (property.NameEquals("terminationConfiguration")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - terminationConfiguration = TerminationConfiguration.DeserializeTerminationConfiguration(property.Value); - continue; - } - if (property.NameEquals("evaluationConfiguration")) - { - evaluationConfiguration = EvaluationConfiguration.DeserializeEvaluationConfiguration(property.Value); - continue; - } - if (property.NameEquals("trialComponent")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - trialComponent = TrialComponent.DeserializeTrialComponent(property.Value); - continue; - } - if (property.NameEquals("experimentName")) - { - experimentName = property.Value.GetString(); - continue; - } - if (property.NameEquals("computeBinding")) - { - computeBinding = ComputeBinding.DeserializeComputeBinding(property.Value); - continue; - } - if (property.NameEquals("output")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - output = JobOutput.DeserializeJobOutput(property.Value); - continue; - } - if (property.NameEquals("jobType")) - { - jobType = new JobType(property.Value.GetString()); - continue; - } - if (property.NameEquals("interactionEndpoints")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - interactionEndpoints = JobBaseInteractionEndpoints.DeserializeJobBaseInteractionEndpoints(property.Value); - continue; - } - if (property.NameEquals("description")) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("tags")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - tags = dictionary; - continue; - } - if (property.NameEquals("properties")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - properties = dictionary; - continue; - } - } - return new SweepJob(jobType, interactionEndpoints.Value, description.Value, Optional.ToDictionary(tags), Optional.ToDictionary(properties), experimentName.Value, computeBinding, output.Value, Optional.ToNullable(status), parameterSamplingConfiguration, terminationConfiguration.Value, evaluationConfiguration, trialComponent.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SweepJob.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SweepJob.cs deleted file mode 100644 index d0b477584b691..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SweepJob.cs +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// The SweepJob. - public partial class SweepJob : ComputeJobBase - { - /// Initializes a new instance of SweepJob. - /// Compute binding definition. - /// class for all hyperparameter sampling algorithms. - /// . - /// , , or is null. - public SweepJob(ComputeBinding computeBinding, ParameterSamplingConfiguration parameterSamplingConfiguration, EvaluationConfiguration evaluationConfiguration) : base(computeBinding) - { - if (computeBinding == null) - { - throw new ArgumentNullException(nameof(computeBinding)); - } - if (parameterSamplingConfiguration == null) - { - throw new ArgumentNullException(nameof(parameterSamplingConfiguration)); - } - if (evaluationConfiguration == null) - { - throw new ArgumentNullException(nameof(evaluationConfiguration)); - } - - ParameterSamplingConfiguration = parameterSamplingConfiguration; - EvaluationConfiguration = evaluationConfiguration; - JobType = JobType.Sweep; - } - - /// Initializes a new instance of SweepJob. - /// Specifies the type of job. - /// - /// Dictonary of endpoint URIs, keyed by enumerated job endpoints. - /// - /// For local jobs, a job endpoint will have a value of FileStreamObject. - /// - /// The asset description text. - /// Tag dictionary. Tags can be added, removed, and updated. - /// The asset property dictionary. - /// The name of the experiment the job belongs to. If not set, the job is placed in the "Default" experiment. - /// Compute binding definition. - /// . - /// The status of a job. - /// class for all hyperparameter sampling algorithms. - /// . - /// . - /// . - internal SweepJob(JobType jobType, JobBaseInteractionEndpoints interactionEndpoints, string description, IDictionary tags, IDictionary properties, string experimentName, ComputeBinding computeBinding, JobOutput output, JobStatus? status, ParameterSamplingConfiguration parameterSamplingConfiguration, TerminationConfiguration terminationConfiguration, EvaluationConfiguration evaluationConfiguration, TrialComponent trialComponent) : base(jobType, interactionEndpoints, description, tags, properties, experimentName, computeBinding, output) - { - Status = status; - ParameterSamplingConfiguration = parameterSamplingConfiguration; - TerminationConfiguration = terminationConfiguration; - EvaluationConfiguration = evaluationConfiguration; - TrialComponent = trialComponent; - JobType = jobType; - } - - /// The status of a job. - public JobStatus? Status { get; set; } - /// class for all hyperparameter sampling algorithms. - public ParameterSamplingConfiguration ParameterSamplingConfiguration { get; set; } - public TerminationConfiguration TerminationConfiguration { get; set; } - public EvaluationConfiguration EvaluationConfiguration { get; set; } - public TrialComponent TrialComponent { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SynapseSpark.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SynapseSpark.Serialization.cs new file mode 100644 index 0000000000000..e2f7cc2785570 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SynapseSpark.Serialization.cs @@ -0,0 +1,164 @@ +// 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.ResourceManager.MachineLearningServices.Models +{ + public partial class SynapseSpark : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"); + writer.WriteObjectValue(Properties); + } + writer.WritePropertyName("computeType"); + writer.WriteStringValue(ComputeType.ToString()); + if (Optional.IsDefined(ComputeLocation)) + { + writer.WritePropertyName("computeLocation"); + writer.WriteStringValue(ComputeLocation); + } + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Optional.IsDefined(ResourceId)) + { + writer.WritePropertyName("resourceId"); + writer.WriteStringValue(ResourceId); + } + if (Optional.IsDefined(DisableLocalAuth)) + { + writer.WritePropertyName("disableLocalAuth"); + writer.WriteBooleanValue(DisableLocalAuth.Value); + } + writer.WriteEndObject(); + } + + internal static SynapseSpark DeserializeSynapseSpark(JsonElement element) + { + Optional properties = default; + ComputeType computeType = default; + Optional computeLocation = default; + Optional provisioningState = default; + Optional description = default; + Optional createdOn = default; + Optional modifiedOn = default; + Optional resourceId = default; + Optional> provisioningErrors = default; + Optional isAttachedCompute = default; + Optional disableLocalAuth = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + properties = SynapseSparkProperties.DeserializeSynapseSparkProperties(property.Value); + continue; + } + if (property.NameEquals("computeType")) + { + computeType = new ComputeType(property.Value.GetString()); + continue; + } + if (property.NameEquals("computeLocation")) + { + computeLocation = property.Value.GetString(); + continue; + } + if (property.NameEquals("provisioningState")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + provisioningState = new ProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("description")) + { + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("createdOn")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + createdOn = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("modifiedOn")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + modifiedOn = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("resourceId")) + { + resourceId = property.Value.GetString(); + continue; + } + if (property.NameEquals("provisioningErrors")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ErrorResponse.DeserializeErrorResponse(item)); + } + provisioningErrors = array; + continue; + } + if (property.NameEquals("isAttachedCompute")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + isAttachedCompute = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("disableLocalAuth")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + disableLocalAuth = property.Value.GetBoolean(); + continue; + } + } + return new SynapseSpark(computeType, computeLocation.Value, Optional.ToNullable(provisioningState), description.Value, Optional.ToNullable(createdOn), Optional.ToNullable(modifiedOn), resourceId.Value, Optional.ToList(provisioningErrors), Optional.ToNullable(isAttachedCompute), Optional.ToNullable(disableLocalAuth), properties.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SynapseSpark.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SynapseSpark.cs new file mode 100644 index 0000000000000..abe915cd483dd --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SynapseSpark.cs @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// A SynapseSpark compute. + public partial class SynapseSpark : Compute + { + /// Initializes a new instance of SynapseSpark. + public SynapseSpark() + { + ComputeType = ComputeType.SynapseSpark; + } + + /// Initializes a new instance of SynapseSpark. + /// The type of compute. + /// Location for the underlying compute. + /// The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. + /// The description of the Machine Learning compute. + /// The time at which the compute was created. + /// The time at which the compute was last modified. + /// ARM resource id of the underlying compute. + /// Errors during provisioning. + /// Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning service provisioned it if false. + /// Opt-out of local authentication and ensure customers can use only MSI and AAD exclusively for authentication. + /// . + internal SynapseSpark(ComputeType computeType, string computeLocation, ProvisioningState? provisioningState, string description, DateTimeOffset? createdOn, DateTimeOffset? modifiedOn, string resourceId, IReadOnlyList provisioningErrors, bool? isAttachedCompute, bool? disableLocalAuth, SynapseSparkProperties properties) : base(computeType, computeLocation, provisioningState, description, createdOn, modifiedOn, resourceId, provisioningErrors, isAttachedCompute, disableLocalAuth) + { + Properties = properties; + ComputeType = computeType; + } + + public SynapseSparkProperties Properties { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SynapseSparkProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SynapseSparkProperties.Serialization.cs new file mode 100644 index 0000000000000..dc000757ed10c --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SynapseSparkProperties.Serialization.cs @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class SynapseSparkProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(AutoScaleProperties)) + { + writer.WritePropertyName("autoScaleProperties"); + writer.WriteObjectValue(AutoScaleProperties); + } + if (Optional.IsDefined(AutoPauseProperties)) + { + writer.WritePropertyName("autoPauseProperties"); + writer.WriteObjectValue(AutoPauseProperties); + } + if (Optional.IsDefined(SparkVersion)) + { + writer.WritePropertyName("sparkVersion"); + writer.WriteStringValue(SparkVersion); + } + if (Optional.IsDefined(NodeCount)) + { + writer.WritePropertyName("nodeCount"); + writer.WriteNumberValue(NodeCount.Value); + } + if (Optional.IsDefined(NodeSize)) + { + writer.WritePropertyName("nodeSize"); + writer.WriteStringValue(NodeSize); + } + if (Optional.IsDefined(NodeSizeFamily)) + { + writer.WritePropertyName("nodeSizeFamily"); + writer.WriteStringValue(NodeSizeFamily); + } + if (Optional.IsDefined(SubscriptionId)) + { + writer.WritePropertyName("subscriptionId"); + writer.WriteStringValue(SubscriptionId); + } + if (Optional.IsDefined(ResourceGroup)) + { + writer.WritePropertyName("resourceGroup"); + writer.WriteStringValue(ResourceGroup); + } + if (Optional.IsDefined(WorkspaceName)) + { + writer.WritePropertyName("workspaceName"); + writer.WriteStringValue(WorkspaceName); + } + if (Optional.IsDefined(PoolName)) + { + writer.WritePropertyName("poolName"); + writer.WriteStringValue(PoolName); + } + writer.WriteEndObject(); + } + + internal static SynapseSparkProperties DeserializeSynapseSparkProperties(JsonElement element) + { + Optional autoScaleProperties = default; + Optional autoPauseProperties = default; + Optional sparkVersion = default; + Optional nodeCount = default; + Optional nodeSize = default; + Optional nodeSizeFamily = default; + Optional subscriptionId = default; + Optional resourceGroup = default; + Optional workspaceName = default; + Optional poolName = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("autoScaleProperties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + autoScaleProperties = AutoScaleProperties.DeserializeAutoScaleProperties(property.Value); + continue; + } + if (property.NameEquals("autoPauseProperties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + autoPauseProperties = AutoPauseProperties.DeserializeAutoPauseProperties(property.Value); + continue; + } + if (property.NameEquals("sparkVersion")) + { + sparkVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("nodeCount")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + nodeCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("nodeSize")) + { + nodeSize = property.Value.GetString(); + continue; + } + if (property.NameEquals("nodeSizeFamily")) + { + nodeSizeFamily = property.Value.GetString(); + continue; + } + if (property.NameEquals("subscriptionId")) + { + subscriptionId = property.Value.GetString(); + continue; + } + if (property.NameEquals("resourceGroup")) + { + resourceGroup = property.Value.GetString(); + continue; + } + if (property.NameEquals("workspaceName")) + { + workspaceName = property.Value.GetString(); + continue; + } + if (property.NameEquals("poolName")) + { + poolName = property.Value.GetString(); + continue; + } + } + return new SynapseSparkProperties(autoScaleProperties.Value, autoPauseProperties.Value, sparkVersion.Value, Optional.ToNullable(nodeCount), nodeSize.Value, nodeSizeFamily.Value, subscriptionId.Value, resourceGroup.Value, workspaceName.Value, poolName.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SynapseSparkProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SynapseSparkProperties.cs new file mode 100644 index 0000000000000..1c7fe2ce1cbaa --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SynapseSparkProperties.cs @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The SynapseSparkProperties. + public partial class SynapseSparkProperties + { + /// Initializes a new instance of SynapseSparkProperties. + public SynapseSparkProperties() + { + } + + /// Initializes a new instance of SynapseSparkProperties. + /// Auto scale properties. + /// Auto pause properties. + /// Spark version. + /// The number of compute nodes currently assigned to the compute. + /// Node size. + /// Node size family. + /// Azure subscription identifier. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Pool name. + internal SynapseSparkProperties(AutoScaleProperties autoScaleProperties, AutoPauseProperties autoPauseProperties, string sparkVersion, int? nodeCount, string nodeSize, string nodeSizeFamily, string subscriptionId, string resourceGroup, string workspaceName, string poolName) + { + AutoScaleProperties = autoScaleProperties; + AutoPauseProperties = autoPauseProperties; + SparkVersion = sparkVersion; + NodeCount = nodeCount; + NodeSize = nodeSize; + NodeSizeFamily = nodeSizeFamily; + SubscriptionId = subscriptionId; + ResourceGroup = resourceGroup; + WorkspaceName = workspaceName; + PoolName = poolName; + } + + /// Auto scale properties. + public AutoScaleProperties AutoScaleProperties { get; set; } + /// Auto pause properties. + public AutoPauseProperties AutoPauseProperties { get; set; } + /// Spark version. + public string SparkVersion { get; set; } + /// The number of compute nodes currently assigned to the compute. + public int? NodeCount { get; set; } + /// Node size. + public string NodeSize { get; set; } + /// Node size family. + public string NodeSizeFamily { get; set; } + /// Azure subscription identifier. + public string SubscriptionId { get; set; } + /// Name of the resource group in which workspace is located. + public string ResourceGroup { get; set; } + /// Name of Azure Machine Learning workspace. + public string WorkspaceName { get; set; } + /// Pool name. + public string PoolName { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SystemData.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SystemData.cs index 11953ee436865..07fa6de1f94ad 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SystemData.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SystemData.cs @@ -23,7 +23,7 @@ internal SystemData() /// The timestamp of resource creation (UTC). /// The identity that last modified the resource. /// The type of identity that last modified the resource. - /// The type of identity that last modified the resource. + /// The timestamp of resource last modification (UTC). internal SystemData(string createdBy, CreatedByType? createdByType, DateTimeOffset? createdAt, string lastModifiedBy, CreatedByType? lastModifiedByType, DateTimeOffset? lastModifiedAt) { CreatedBy = createdBy; @@ -44,7 +44,7 @@ internal SystemData(string createdBy, CreatedByType? createdByType, DateTimeOffs public string LastModifiedBy { get; } /// The type of identity that last modified the resource. public CreatedByType? LastModifiedByType { get; } - /// The type of identity that last modified the resource. + /// The timestamp of resource last modification (UTC). public DateTimeOffset? LastModifiedAt { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/TerminationConfiguration.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/TerminationConfiguration.Serialization.cs deleted file mode 100644 index e7f0ac1ac1d02..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/TerminationConfiguration.Serialization.cs +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class TerminationConfiguration : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(MaxTotalRuns)) - { - writer.WritePropertyName("maxTotalRuns"); - writer.WriteNumberValue(MaxTotalRuns.Value); - } - if (Optional.IsDefined(MaxConcurrentRuns)) - { - writer.WritePropertyName("maxConcurrentRuns"); - writer.WriteNumberValue(MaxConcurrentRuns.Value); - } - if (Optional.IsDefined(MaxDurationMinutes)) - { - writer.WritePropertyName("maxDurationMinutes"); - writer.WriteNumberValue(MaxDurationMinutes.Value); - } - if (Optional.IsDefined(EarlyTerminationPolicyConfiguration)) - { - writer.WritePropertyName("earlyTerminationPolicyConfiguration"); - writer.WriteObjectValue(EarlyTerminationPolicyConfiguration); - } - writer.WriteEndObject(); - } - - internal static TerminationConfiguration DeserializeTerminationConfiguration(JsonElement element) - { - Optional maxTotalRuns = default; - Optional maxConcurrentRuns = default; - Optional maxDurationMinutes = default; - Optional earlyTerminationPolicyConfiguration = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("maxTotalRuns")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - maxTotalRuns = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("maxConcurrentRuns")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - maxConcurrentRuns = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("maxDurationMinutes")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - maxDurationMinutes = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("earlyTerminationPolicyConfiguration")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - earlyTerminationPolicyConfiguration = EarlyTerminationPolicyConfiguration.DeserializeEarlyTerminationPolicyConfiguration(property.Value); - continue; - } - } - return new TerminationConfiguration(Optional.ToNullable(maxTotalRuns), Optional.ToNullable(maxConcurrentRuns), Optional.ToNullable(maxDurationMinutes), earlyTerminationPolicyConfiguration.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/TerminationConfiguration.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/TerminationConfiguration.cs deleted file mode 100644 index c93294419e615..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/TerminationConfiguration.cs +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// The TerminationConfiguration. - public partial class TerminationConfiguration - { - /// Initializes a new instance of TerminationConfiguration. - public TerminationConfiguration() - { - } - - /// Initializes a new instance of TerminationConfiguration. - /// . - /// . - /// . - /// Early termination policies enable canceling poor-performing runs before they complete. - internal TerminationConfiguration(int? maxTotalRuns, int? maxConcurrentRuns, int? maxDurationMinutes, EarlyTerminationPolicyConfiguration earlyTerminationPolicyConfiguration) - { - MaxTotalRuns = maxTotalRuns; - MaxConcurrentRuns = maxConcurrentRuns; - MaxDurationMinutes = maxDurationMinutes; - EarlyTerminationPolicyConfiguration = earlyTerminationPolicyConfiguration; - } - - public int? MaxTotalRuns { get; set; } - public int? MaxConcurrentRuns { get; set; } - public int? MaxDurationMinutes { get; set; } - /// Early termination policies enable canceling poor-performing runs before they complete. - public EarlyTerminationPolicyConfiguration EarlyTerminationPolicyConfiguration { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/TrialComponent.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/TrialComponent.Serialization.cs deleted file mode 100644 index bc6b166c876a7..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/TrialComponent.Serialization.cs +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class TrialComponent : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(CodeConfiguration)) - { - writer.WritePropertyName("codeConfiguration"); - writer.WriteObjectValue(CodeConfiguration); - } - if (Optional.IsDefined(EnvironmentId)) - { - writer.WritePropertyName("environmentId"); - writer.WriteStringValue(EnvironmentId); - } - if (Optional.IsCollectionDefined(DataBindings)) - { - writer.WritePropertyName("dataBindings"); - writer.WriteStartObject(); - foreach (var item in DataBindings) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsDefined(DistributionConfiguration)) - { - writer.WritePropertyName("distributionConfiguration"); - writer.WriteObjectValue(DistributionConfiguration); - } - writer.WriteEndObject(); - } - - internal static TrialComponent DeserializeTrialComponent(JsonElement element) - { - Optional codeConfiguration = default; - Optional environmentId = default; - Optional> dataBindings = default; - Optional distributionConfiguration = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("codeConfiguration")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - codeConfiguration = CodeConfiguration.DeserializeCodeConfiguration(property.Value); - continue; - } - if (property.NameEquals("environmentId")) - { - environmentId = property.Value.GetString(); - continue; - } - if (property.NameEquals("dataBindings")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, DataBinding.DeserializeDataBinding(property0.Value)); - } - dataBindings = dictionary; - continue; - } - if (property.NameEquals("distributionConfiguration")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - distributionConfiguration = DistributionConfiguration.DeserializeDistributionConfiguration(property.Value); - continue; - } - } - return new TrialComponent(codeConfiguration.Value, environmentId.Value, Optional.ToDictionary(dataBindings), distributionConfiguration.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/TrialComponent.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/TrialComponent.cs deleted file mode 100644 index 1fcdaa452fecc..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/TrialComponent.cs +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// The TrialComponent. - public partial class TrialComponent - { - /// Initializes a new instance of TrialComponent. - public TrialComponent() - { - DataBindings = new ChangeTrackingDictionary(); - } - - /// Initializes a new instance of TrialComponent. - /// . - /// Environment id of the job. - /// Mapping of data bindings used in the job. - /// . - internal TrialComponent(CodeConfiguration codeConfiguration, string environmentId, IDictionary dataBindings, DistributionConfiguration distributionConfiguration) - { - CodeConfiguration = codeConfiguration; - EnvironmentId = environmentId; - DataBindings = dataBindings; - DistributionConfiguration = distributionConfiguration; - } - - public CodeConfiguration CodeConfiguration { get; set; } - /// Environment id of the job. - public string EnvironmentId { get; set; } - /// Mapping of data bindings used in the job. - public IDictionary DataBindings { get; } - public DistributionConfiguration DistributionConfiguration { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ValueFormat.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ValueFormat.cs new file mode 100644 index 0000000000000..956ec39ec0219 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ValueFormat.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// format for the workspace connection value. + public readonly partial struct ValueFormat : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + /// is null. + public ValueFormat(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string JsonValue = "JSON"; + + /// JSON. + public static ValueFormat Json { get; } = new ValueFormat(JsonValue); + /// Determines if two values are the same. + public static bool operator ==(ValueFormat left, ValueFormat right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ValueFormat left, ValueFormat right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator ValueFormat(string value) => new ValueFormat(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ValueFormat other && Equals(other); + /// + public bool Equals(ValueFormat 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/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VariantType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VariantType.cs deleted file mode 100644 index a09c6affe15b9..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VariantType.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// The type of the variant. - public readonly partial struct VariantType : IEquatable - { - private readonly string _value; - - /// Determines if two values are the same. - /// is null. - public VariantType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string ControlValue = "Control"; - private const string TreatmentValue = "Treatment"; - - /// Control. - public static VariantType Control { get; } = new VariantType(ControlValue); - /// Treatment. - public static VariantType Treatment { get; } = new VariantType(TreatmentValue); - /// Determines if two values are the same. - public static bool operator ==(VariantType left, VariantType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(VariantType left, VariantType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator VariantType(string value) => new VariantType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is VariantType other && Equals(other); - /// - public bool Equals(VariantType 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/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VirtualMachine.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VirtualMachine.Serialization.cs index 973566fbab31d..5cace6e41fa25 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VirtualMachine.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VirtualMachine.Serialization.cs @@ -39,6 +39,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("resourceId"); writer.WriteStringValue(ResourceId); } + if (Optional.IsDefined(DisableLocalAuth)) + { + writer.WritePropertyName("disableLocalAuth"); + writer.WriteBooleanValue(DisableLocalAuth.Value); + } writer.WriteEndObject(); } @@ -52,8 +57,9 @@ internal static VirtualMachine DeserializeVirtualMachine(JsonElement element) Optional createdOn = default; Optional modifiedOn = default; Optional resourceId = default; - Optional> provisioningErrors = default; + Optional> provisioningErrors = default; Optional isAttachedCompute = default; + Optional disableLocalAuth = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("properties")) @@ -123,10 +129,10 @@ internal static VirtualMachine DeserializeVirtualMachine(JsonElement element) property.ThrowNonNullablePropertyIsNull(); continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(MachineLearningServiceError.DeserializeMachineLearningServiceError(item)); + array.Add(ErrorResponse.DeserializeErrorResponse(item)); } provisioningErrors = array; continue; @@ -141,8 +147,18 @@ internal static VirtualMachine DeserializeVirtualMachine(JsonElement element) isAttachedCompute = property.Value.GetBoolean(); continue; } + if (property.NameEquals("disableLocalAuth")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + disableLocalAuth = property.Value.GetBoolean(); + continue; + } } - return new VirtualMachine(computeType, computeLocation.Value, Optional.ToNullable(provisioningState), description.Value, Optional.ToNullable(createdOn), Optional.ToNullable(modifiedOn), resourceId.Value, Optional.ToList(provisioningErrors), Optional.ToNullable(isAttachedCompute), properties.Value); + return new VirtualMachine(computeType, computeLocation.Value, Optional.ToNullable(provisioningState), description.Value, Optional.ToNullable(createdOn), Optional.ToNullable(modifiedOn), resourceId.Value, Optional.ToList(provisioningErrors), Optional.ToNullable(isAttachedCompute), Optional.ToNullable(disableLocalAuth), properties.Value); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VirtualMachine.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VirtualMachine.cs index 7a1debe2faa77..3513225a992d6 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VirtualMachine.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VirtualMachine.cs @@ -24,13 +24,14 @@ public VirtualMachine() /// Location for the underlying compute. /// The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. /// The description of the Machine Learning compute. - /// The date and time when the compute was created. - /// The date and time when the compute was last modified. + /// The time at which the compute was created. + /// The time at which the compute was last modified. /// ARM resource id of the underlying compute. /// Errors during provisioning. /// Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning service provisioned it if false. + /// Opt-out of local authentication and ensure customers can use only MSI and AAD exclusively for authentication. /// . - internal VirtualMachine(ComputeType computeType, string computeLocation, ProvisioningState? provisioningState, string description, DateTimeOffset? createdOn, DateTimeOffset? modifiedOn, string resourceId, IReadOnlyList provisioningErrors, bool? isAttachedCompute, VirtualMachineProperties properties) : base(computeType, computeLocation, provisioningState, description, createdOn, modifiedOn, resourceId, provisioningErrors, isAttachedCompute) + internal VirtualMachine(ComputeType computeType, string computeLocation, ProvisioningState? provisioningState, string description, DateTimeOffset? createdOn, DateTimeOffset? modifiedOn, string resourceId, IReadOnlyList provisioningErrors, bool? isAttachedCompute, bool? disableLocalAuth, VirtualMachineProperties properties) : base(computeType, computeLocation, provisioningState, description, createdOn, modifiedOn, resourceId, provisioningErrors, isAttachedCompute, disableLocalAuth) { Properties = properties; ComputeType = computeType; diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VirtualMachineProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VirtualMachineProperties.Serialization.cs index dcffc5fbf4be6..51abb2855188b 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VirtualMachineProperties.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VirtualMachineProperties.Serialization.cs @@ -35,6 +35,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("administratorAccount"); writer.WriteObjectValue(AdministratorAccount); } + if (Optional.IsDefined(IsNotebookInstanceCompute)) + { + writer.WritePropertyName("isNotebookInstanceCompute"); + writer.WriteBooleanValue(IsNotebookInstanceCompute.Value); + } writer.WriteEndObject(); } @@ -44,6 +49,7 @@ internal static VirtualMachineProperties DeserializeVirtualMachineProperties(Jso Optional sshPort = default; Optional address = default; Optional administratorAccount = default; + Optional isNotebookInstanceCompute = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("virtualMachineSize")) @@ -76,8 +82,18 @@ internal static VirtualMachineProperties DeserializeVirtualMachineProperties(Jso administratorAccount = VirtualMachineSshCredentials.DeserializeVirtualMachineSshCredentials(property.Value); continue; } + if (property.NameEquals("isNotebookInstanceCompute")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + isNotebookInstanceCompute = property.Value.GetBoolean(); + continue; + } } - return new VirtualMachineProperties(virtualMachineSize.Value, Optional.ToNullable(sshPort), address.Value, administratorAccount.Value); + return new VirtualMachineProperties(virtualMachineSize.Value, Optional.ToNullable(sshPort), address.Value, administratorAccount.Value, Optional.ToNullable(isNotebookInstanceCompute)); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VirtualMachineProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VirtualMachineProperties.cs index 2eee8a37ad13a..544599685ce0a 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VirtualMachineProperties.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VirtualMachineProperties.cs @@ -20,12 +20,14 @@ public VirtualMachineProperties() /// Port open for ssh connections. /// Public IP address of the virtual machine. /// Admin credentials for virtual machine. - internal VirtualMachineProperties(string virtualMachineSize, int? sshPort, string address, VirtualMachineSshCredentials administratorAccount) + /// Indicates whether this compute will be used for running notebooks. + internal VirtualMachineProperties(string virtualMachineSize, int? sshPort, string address, VirtualMachineSshCredentials administratorAccount, bool? isNotebookInstanceCompute) { VirtualMachineSize = virtualMachineSize; SshPort = sshPort; Address = address; AdministratorAccount = administratorAccount; + IsNotebookInstanceCompute = isNotebookInstanceCompute; } /// Virtual Machine size. @@ -36,5 +38,7 @@ internal VirtualMachineProperties(string virtualMachineSize, int? sshPort, strin public string Address { get; set; } /// Admin credentials for virtual machine. public VirtualMachineSshCredentials AdministratorAccount { get; set; } + /// Indicates whether this compute will be used for running notebooks. + public bool? IsNotebookInstanceCompute { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VirtualMachineSize.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VirtualMachineSize.Serialization.cs index ef55c0117812e..4f0fb25cdd40c 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VirtualMachineSize.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VirtualMachineSize.Serialization.cs @@ -5,6 +5,7 @@ #nullable disable +using System.Collections.Generic; using System.Text.Json; using Azure.Core; @@ -24,6 +25,7 @@ internal static VirtualMachineSize DeserializeVirtualMachineSize(JsonElement ele Optional lowPriorityCapable = default; Optional premiumIO = default; Optional estimatedVMPrices = default; + Optional> supportedComputeTypes = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("name")) @@ -116,8 +118,23 @@ internal static VirtualMachineSize DeserializeVirtualMachineSize(JsonElement ele estimatedVMPrices = EstimatedVMPrices.DeserializeEstimatedVMPrices(property.Value); continue; } + if (property.NameEquals("supportedComputeTypes")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + supportedComputeTypes = array; + continue; + } } - return new VirtualMachineSize(name.Value, family.Value, Optional.ToNullable(vCPUs), Optional.ToNullable(gpus), Optional.ToNullable(osVhdSizeMB), Optional.ToNullable(maxResourceVolumeMB), Optional.ToNullable(memoryGB), Optional.ToNullable(lowPriorityCapable), Optional.ToNullable(premiumIO), estimatedVMPrices.Value); + return new VirtualMachineSize(name.Value, family.Value, Optional.ToNullable(vCPUs), Optional.ToNullable(gpus), Optional.ToNullable(osVhdSizeMB), Optional.ToNullable(maxResourceVolumeMB), Optional.ToNullable(memoryGB), Optional.ToNullable(lowPriorityCapable), Optional.ToNullable(premiumIO), estimatedVMPrices.Value, Optional.ToList(supportedComputeTypes)); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VirtualMachineSize.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VirtualMachineSize.cs index cfceec2595afc..f80394aef4943 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VirtualMachineSize.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VirtualMachineSize.cs @@ -5,6 +5,9 @@ #nullable disable +using System.Collections.Generic; +using Azure.Core; + namespace Azure.ResourceManager.MachineLearningServices.Models { /// Describes the properties of a VM size. @@ -13,6 +16,7 @@ public partial class VirtualMachineSize /// Initializes a new instance of VirtualMachineSize. internal VirtualMachineSize() { + SupportedComputeTypes = new ChangeTrackingList(); } /// Initializes a new instance of VirtualMachineSize. @@ -26,7 +30,8 @@ internal VirtualMachineSize() /// Specifies if the virtual machine size supports low priority VMs. /// Specifies if the virtual machine size supports premium IO. /// The estimated price information for using a VM. - internal VirtualMachineSize(string name, string family, int? vCPUs, int? gpus, int? osVhdSizeMB, int? maxResourceVolumeMB, double? memoryGB, bool? lowPriorityCapable, bool? premiumIO, EstimatedVMPrices estimatedVMPrices) + /// Specifies the compute types supported by the virtual machine size. + internal VirtualMachineSize(string name, string family, int? vCPUs, int? gpus, int? osVhdSizeMB, int? maxResourceVolumeMB, double? memoryGB, bool? lowPriorityCapable, bool? premiumIO, EstimatedVMPrices estimatedVMPrices, IReadOnlyList supportedComputeTypes) { Name = name; Family = family; @@ -38,6 +43,7 @@ internal VirtualMachineSize(string name, string family, int? vCPUs, int? gpus, i LowPriorityCapable = lowPriorityCapable; PremiumIO = premiumIO; EstimatedVMPrices = estimatedVMPrices; + SupportedComputeTypes = supportedComputeTypes; } /// The name of the virtual machine size. @@ -60,5 +66,7 @@ internal VirtualMachineSize(string name, string family, int? vCPUs, int? gpus, i public bool? PremiumIO { get; } /// The estimated price information for using a VM. public EstimatedVMPrices EstimatedVMPrices { get; } + /// Specifies the compute types supported by the virtual machine size. + public IReadOnlyList SupportedComputeTypes { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VirtualMachineSizeListResult.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VirtualMachineSizeListResult.Serialization.cs index 08d9388615960..5c86e4dc20e9c 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VirtualMachineSizeListResult.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VirtualMachineSizeListResult.Serialization.cs @@ -15,10 +15,10 @@ public partial class VirtualMachineSizeListResult { internal static VirtualMachineSizeListResult DeserializeVirtualMachineSizeListResult(JsonElement element) { - Optional> amlCompute = default; + Optional> value = default; foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("amlCompute")) + if (property.NameEquals("value")) { if (property.Value.ValueKind == JsonValueKind.Null) { @@ -30,11 +30,11 @@ internal static VirtualMachineSizeListResult DeserializeVirtualMachineSizeListRe { array.Add(VirtualMachineSize.DeserializeVirtualMachineSize(item)); } - amlCompute = array; + value = array; continue; } } - return new VirtualMachineSizeListResult(Optional.ToList(amlCompute)); + return new VirtualMachineSizeListResult(Optional.ToList(value)); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VirtualMachineSizeListResult.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VirtualMachineSizeListResult.cs index 445e54951871e..562bdb24f91a1 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VirtualMachineSizeListResult.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VirtualMachineSizeListResult.cs @@ -16,17 +16,17 @@ public partial class VirtualMachineSizeListResult /// Initializes a new instance of VirtualMachineSizeListResult. internal VirtualMachineSizeListResult() { - AmlCompute = new ChangeTrackingList(); + Value = new ChangeTrackingList(); } /// Initializes a new instance of VirtualMachineSizeListResult. - /// The list of virtual machine sizes supported by AmlCompute. - internal VirtualMachineSizeListResult(IReadOnlyList amlCompute) + /// The list of virtual machine sizes supported by AmlCompute. + internal VirtualMachineSizeListResult(IReadOnlyList value) { - AmlCompute = amlCompute; + Value = value; } /// The list of virtual machine sizes supported by AmlCompute. - public IReadOnlyList AmlCompute { get; } + public IReadOnlyList Value { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VnetConfiguration.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VnetConfiguration.Serialization.cs deleted file mode 100644 index 9fc21918e1e9d..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VnetConfiguration.Serialization.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class VnetConfiguration : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(VnetName)) - { - writer.WritePropertyName("vnetName"); - writer.WriteStringValue(VnetName); - } - if (Optional.IsDefined(SubnetName)) - { - writer.WritePropertyName("subnetName"); - writer.WriteStringValue(SubnetName); - } - writer.WriteEndObject(); - } - - internal static VnetConfiguration DeserializeVnetConfiguration(JsonElement element) - { - Optional vnetName = default; - Optional subnetName = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("vnetName")) - { - vnetName = property.Value.GetString(); - continue; - } - if (property.NameEquals("subnetName")) - { - subnetName = property.Value.GetString(); - continue; - } - } - return new VnetConfiguration(vnetName.Value, subnetName.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VnetConfiguration.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VnetConfiguration.cs deleted file mode 100644 index 55084829220d0..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VnetConfiguration.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// The VnetConfiguration. - public partial class VnetConfiguration - { - /// Initializes a new instance of VnetConfiguration. - public VnetConfiguration() - { - } - - /// Initializes a new instance of VnetConfiguration. - /// The name of the virtual network. - /// The name of the virtual network subnet. - internal VnetConfiguration(string vnetName, string subnetName) - { - VnetName = vnetName; - SubnetName = subnetName; - } - - /// The name of the virtual network. - public string VnetName { get; set; } - /// The name of the virtual network subnet. - public string SubnetName { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/WebServiceState.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/WebServiceState.cs deleted file mode 100644 index 00e68251dd1ac..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/WebServiceState.cs +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// The current state of the service. - public readonly partial struct WebServiceState : IEquatable - { - private readonly string _value; - - /// Determines if two values are the same. - /// is null. - public WebServiceState(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string TransitioningValue = "Transitioning"; - private const string HealthyValue = "Healthy"; - private const string UnhealthyValue = "Unhealthy"; - private const string FailedValue = "Failed"; - private const string UnschedulableValue = "Unschedulable"; - - /// Transitioning. - public static WebServiceState Transitioning { get; } = new WebServiceState(TransitioningValue); - /// Healthy. - public static WebServiceState Healthy { get; } = new WebServiceState(HealthyValue); - /// Unhealthy. - public static WebServiceState Unhealthy { get; } = new WebServiceState(UnhealthyValue); - /// Failed. - public static WebServiceState Failed { get; } = new WebServiceState(FailedValue); - /// Unschedulable. - public static WebServiceState Unschedulable { get; } = new WebServiceState(UnschedulableValue); - /// Determines if two values are the same. - public static bool operator ==(WebServiceState left, WebServiceState right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(WebServiceState left, WebServiceState right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator WebServiceState(string value) => new WebServiceState(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is WebServiceState other && Equals(other); - /// - public bool Equals(WebServiceState 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/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Workspace.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Workspace.Serialization.cs index 5b5d508bea15b..16f9e944c3248 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Workspace.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Workspace.Serialization.cs @@ -5,7 +5,6 @@ #nullable disable -using System; using System.Collections.Generic; using System.Text.Json; using Azure.Core; @@ -67,8 +66,15 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) } if (Optional.IsDefined(ContainerRegistry)) { - writer.WritePropertyName("containerRegistry"); - writer.WriteStringValue(ContainerRegistry); + if (ContainerRegistry != null) + { + writer.WritePropertyName("containerRegistry"); + writer.WriteStringValue(ContainerRegistry); + } + else + { + writer.WriteNull("containerRegistry"); + } } if (Optional.IsDefined(StorageAccount)) { @@ -100,6 +106,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("allowPublicAccessWhenBehindVnet"); writer.WriteBooleanValue(AllowPublicAccessWhenBehindVnet.Value); } + if (Optional.IsDefined(PublicNetworkAccess)) + { + writer.WritePropertyName("publicNetworkAccess"); + writer.WriteStringValue(PublicNetworkAccess.Value.ToString()); + } if (Optional.IsCollectionDefined(SharedPrivateLinkResources)) { writer.WritePropertyName("sharedPrivateLinkResources"); @@ -110,23 +121,33 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) } writer.WriteEndArray(); } + if (Optional.IsDefined(ServiceManagedResourcesSettings)) + { + writer.WritePropertyName("serviceManagedResourcesSettings"); + writer.WriteObjectValue(ServiceManagedResourcesSettings); + } + if (Optional.IsDefined(PrimaryUserAssignedIdentity)) + { + writer.WritePropertyName("primaryUserAssignedIdentity"); + writer.WriteStringValue(PrimaryUserAssignedIdentity); + } writer.WriteEndObject(); writer.WriteEndObject(); } internal static Workspace DeserializeWorkspace(JsonElement element) { - Optional id = default; - Optional name = default; Optional identity = default; Optional location = default; - Optional type = default; Optional> tags = default; Optional sku = default; + Optional systemData = default; + Optional id = default; + Optional name = default; + Optional type = default; Optional workspaceId = default; Optional description = default; Optional friendlyName = default; - Optional creationTime = default; Optional keyVault = default; Optional applicationInsights = default; Optional containerRegistry = default; @@ -139,20 +160,17 @@ internal static Workspace DeserializeWorkspace(JsonElement element) Optional privateLinkCount = default; Optional imageBuildCompute = default; Optional allowPublicAccessWhenBehindVnet = default; + Optional publicNetworkAccess = default; Optional> privateEndpointConnections = default; Optional> sharedPrivateLinkResources = default; + Optional notebookInfo = default; + Optional serviceManagedResourcesSettings = default; + Optional primaryUserAssignedIdentity = default; + Optional tenantId = default; + Optional storageHnsEnabled = default; + Optional mlFlowTrackingUri = default; foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("id")) - { - id = property.Value.GetString(); - continue; - } - if (property.NameEquals("name")) - { - name = property.Value.GetString(); - continue; - } if (property.NameEquals("identity")) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -168,11 +186,6 @@ internal static Workspace DeserializeWorkspace(JsonElement element) location = property.Value.GetString(); continue; } - if (property.NameEquals("type")) - { - type = property.Value.GetString(); - continue; - } if (property.NameEquals("tags")) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -198,6 +211,31 @@ internal static Workspace DeserializeWorkspace(JsonElement element) sku = Sku.DeserializeSku(property.Value); continue; } + if (property.NameEquals("systemData")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + systemData = SystemData.DeserializeSystemData(property.Value); + continue; + } + if (property.NameEquals("id")) + { + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } if (property.NameEquals("properties")) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -222,16 +260,6 @@ internal static Workspace DeserializeWorkspace(JsonElement element) friendlyName = property0.Value.GetString(); continue; } - if (property0.NameEquals("creationTime")) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - property0.ThrowNonNullablePropertyIsNull(); - continue; - } - creationTime = property0.Value.GetDateTimeOffset("O"); - continue; - } if (property0.NameEquals("keyVault")) { keyVault = property0.Value.GetString(); @@ -244,6 +272,11 @@ internal static Workspace DeserializeWorkspace(JsonElement element) } if (property0.NameEquals("containerRegistry")) { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + containerRegistry = null; + continue; + } containerRegistry = property0.Value.GetString(); continue; } @@ -317,6 +350,16 @@ internal static Workspace DeserializeWorkspace(JsonElement element) allowPublicAccessWhenBehindVnet = property0.Value.GetBoolean(); continue; } + if (property0.NameEquals("publicNetworkAccess")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + property0.ThrowNonNullablePropertyIsNull(); + continue; + } + publicNetworkAccess = new PublicNetworkAccess(property0.Value.GetString()); + continue; + } if (property0.NameEquals("privateEndpointConnections")) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -347,11 +390,56 @@ internal static Workspace DeserializeWorkspace(JsonElement element) sharedPrivateLinkResources = array; continue; } + if (property0.NameEquals("notebookInfo")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + property0.ThrowNonNullablePropertyIsNull(); + continue; + } + notebookInfo = NotebookResourceInfo.DeserializeNotebookResourceInfo(property0.Value); + continue; + } + if (property0.NameEquals("serviceManagedResourcesSettings")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + property0.ThrowNonNullablePropertyIsNull(); + continue; + } + serviceManagedResourcesSettings = ServiceManagedResourcesSettings.DeserializeServiceManagedResourcesSettings(property0.Value); + continue; + } + if (property0.NameEquals("primaryUserAssignedIdentity")) + { + primaryUserAssignedIdentity = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("tenantId")) + { + tenantId = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("storageHnsEnabled")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + property0.ThrowNonNullablePropertyIsNull(); + continue; + } + storageHnsEnabled = property0.Value.GetBoolean(); + continue; + } + if (property0.NameEquals("mlFlowTrackingUri")) + { + mlFlowTrackingUri = property0.Value.GetString(); + continue; + } } continue; } } - return new Workspace(id.Value, name.Value, identity.Value, location.Value, type.Value, Optional.ToDictionary(tags), sku.Value, workspaceId.Value, description.Value, friendlyName.Value, Optional.ToNullable(creationTime), keyVault.Value, applicationInsights.Value, containerRegistry.Value, storageAccount.Value, discoveryUrl.Value, Optional.ToNullable(provisioningState), encryption.Value, Optional.ToNullable(hbiWorkspace), serviceProvisionedResourceGroup.Value, Optional.ToNullable(privateLinkCount), imageBuildCompute.Value, Optional.ToNullable(allowPublicAccessWhenBehindVnet), Optional.ToList(privateEndpointConnections), Optional.ToList(sharedPrivateLinkResources)); + return new Workspace(id.Value, name.Value, type.Value, identity.Value, location.Value, Optional.ToDictionary(tags), sku.Value, systemData.Value, workspaceId.Value, description.Value, friendlyName.Value, keyVault.Value, applicationInsights.Value, containerRegistry.Value, storageAccount.Value, discoveryUrl.Value, Optional.ToNullable(provisioningState), encryption.Value, Optional.ToNullable(hbiWorkspace), serviceProvisionedResourceGroup.Value, Optional.ToNullable(privateLinkCount), imageBuildCompute.Value, Optional.ToNullable(allowPublicAccessWhenBehindVnet), Optional.ToNullable(publicNetworkAccess), Optional.ToList(privateEndpointConnections), Optional.ToList(sharedPrivateLinkResources), notebookInfo.Value, serviceManagedResourcesSettings.Value, primaryUserAssignedIdentity.Value, tenantId.Value, Optional.ToNullable(storageHnsEnabled), mlFlowTrackingUri.Value); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Workspace.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Workspace.cs index 2997cebf3be7c..fc6aa7c3f084f 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Workspace.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Workspace.cs @@ -5,7 +5,6 @@ #nullable disable -using System; using System.Collections.Generic; using Azure.Core; @@ -17,22 +16,23 @@ public partial class Workspace : Resource /// Initializes a new instance of Workspace. public Workspace() { + Tags = new ChangeTrackingDictionary(); PrivateEndpointConnections = new ChangeTrackingList(); SharedPrivateLinkResources = new ChangeTrackingList(); } /// Initializes a new instance of Workspace. - /// Specifies the resource ID. - /// Specifies the name of the resource. + /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + /// The name of the resource. + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". /// The identity of the resource. /// Specifies the location of the resource. - /// Specifies the type of the resource. /// Contains resource tags defined as key/value pairs. /// The sku of the workspace. + /// System data. /// The immutable id associated with this workspace. /// The description of this workspace. /// The friendly name for this workspace. This name in mutable. - /// The creation time of the machine learning workspace in ISO8601 format. /// ARM id of the key vault associated with this workspace. This cannot be changed once the workspace has been created. /// ARM id of the application insights associated with this workspace. This cannot be changed once the workspace has been created. /// ARM id of the container registry associated with this workspace. This cannot be changed once the workspace has been created. @@ -45,14 +45,25 @@ public Workspace() /// Count of private connections in the workspace. /// The compute name for image build. /// The flag to indicate whether to allow public access when behind VNet. + /// Whether requests from Public Network are allowed. /// The list of private endpoint connections in the workspace. /// The list of shared private link resources in this workspace. - internal Workspace(string id, string name, Identity identity, string location, string type, IDictionary tags, Sku sku, string workspaceId, string description, string friendlyName, DateTimeOffset? creationTime, string keyVault, string applicationInsights, string containerRegistry, string storageAccount, string discoveryUrl, ProvisioningState? provisioningState, EncryptionProperty encryption, bool? hbiWorkspace, string serviceProvisionedResourceGroup, int? privateLinkCount, string imageBuildCompute, bool? allowPublicAccessWhenBehindVnet, IReadOnlyList privateEndpointConnections, IList sharedPrivateLinkResources) : base(id, name, identity, location, type, tags, sku) + /// The notebook info of Azure ML workspace. + /// The service managed resource settings. + /// The user assigned identity resource id that represents the workspace identity. + /// The tenant id associated with this workspace. + /// If the storage associated with the workspace has hierarchical namespace(HNS) enabled. + /// The URI associated with this workspace that machine learning flow must point at to set up tracking. + internal Workspace(string id, string name, string type, Identity identity, string location, IDictionary tags, Sku sku, SystemData systemData, string workspaceId, string description, string friendlyName, string keyVault, string applicationInsights, string containerRegistry, string storageAccount, string discoveryUrl, ProvisioningState? provisioningState, EncryptionProperty encryption, bool? hbiWorkspace, string serviceProvisionedResourceGroup, int? privateLinkCount, string imageBuildCompute, bool? allowPublicAccessWhenBehindVnet, PublicNetworkAccess? publicNetworkAccess, IReadOnlyList privateEndpointConnections, IList sharedPrivateLinkResources, NotebookResourceInfo notebookInfo, ServiceManagedResourcesSettings serviceManagedResourcesSettings, string primaryUserAssignedIdentity, string tenantId, bool? storageHnsEnabled, string mlFlowTrackingUri) : base(id, name, type) { + Identity = identity; + Location = location; + Tags = tags; + Sku = sku; + SystemData = systemData; WorkspaceId = workspaceId; Description = description; FriendlyName = friendlyName; - CreationTime = creationTime; KeyVault = keyVault; ApplicationInsights = applicationInsights; ContainerRegistry = containerRegistry; @@ -65,18 +76,33 @@ internal Workspace(string id, string name, Identity identity, string location, s PrivateLinkCount = privateLinkCount; ImageBuildCompute = imageBuildCompute; AllowPublicAccessWhenBehindVnet = allowPublicAccessWhenBehindVnet; + PublicNetworkAccess = publicNetworkAccess; PrivateEndpointConnections = privateEndpointConnections; SharedPrivateLinkResources = sharedPrivateLinkResources; + NotebookInfo = notebookInfo; + ServiceManagedResourcesSettings = serviceManagedResourcesSettings; + PrimaryUserAssignedIdentity = primaryUserAssignedIdentity; + TenantId = tenantId; + StorageHnsEnabled = storageHnsEnabled; + MlFlowTrackingUri = mlFlowTrackingUri; } + /// The identity of the resource. + public Identity Identity { get; set; } + /// Specifies the location of the resource. + public string Location { get; set; } + /// Contains resource tags defined as key/value pairs. + public IDictionary Tags { get; } + /// The sku of the workspace. + public Sku Sku { get; set; } + /// System data. + public SystemData SystemData { get; } /// The immutable id associated with this workspace. public string WorkspaceId { get; } /// The description of this workspace. public string Description { get; set; } /// The friendly name for this workspace. This name in mutable. public string FriendlyName { get; set; } - /// The creation time of the machine learning workspace in ISO8601 format. - public DateTimeOffset? CreationTime { get; } /// ARM id of the key vault associated with this workspace. This cannot be changed once the workspace has been created. public string KeyVault { get; set; } /// ARM id of the application insights associated with this workspace. This cannot be changed once the workspace has been created. @@ -101,9 +127,23 @@ internal Workspace(string id, string name, Identity identity, string location, s public string ImageBuildCompute { get; set; } /// The flag to indicate whether to allow public access when behind VNet. public bool? AllowPublicAccessWhenBehindVnet { get; set; } + /// Whether requests from Public Network are allowed. + public PublicNetworkAccess? PublicNetworkAccess { get; set; } /// The list of private endpoint connections in the workspace. public IReadOnlyList PrivateEndpointConnections { get; } /// The list of shared private link resources in this workspace. public IList SharedPrivateLinkResources { get; } + /// The notebook info of Azure ML workspace. + public NotebookResourceInfo NotebookInfo { get; } + /// The service managed resource settings. + public ServiceManagedResourcesSettings ServiceManagedResourcesSettings { get; set; } + /// The user assigned identity resource id that represents the workspace identity. + public string PrimaryUserAssignedIdentity { get; set; } + /// The tenant id associated with this workspace. + public string TenantId { get; } + /// If the storage associated with the workspace has hierarchical namespace(HNS) enabled. + public bool? StorageHnsEnabled { get; } + /// The URI associated with this workspace that machine learning flow must point at to set up tracking. + public string MlFlowTrackingUri { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/WorkspaceConnection.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/WorkspaceConnection.Serialization.cs index db468f6bffe1f..d2ac929cf9a02 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/WorkspaceConnection.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/WorkspaceConnection.Serialization.cs @@ -10,8 +10,42 @@ namespace Azure.ResourceManager.MachineLearningServices.Models { - public partial class WorkspaceConnection + public partial class WorkspaceConnection : IUtf8JsonSerializable { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("properties"); + writer.WriteStartObject(); + if (Optional.IsDefined(Category)) + { + writer.WritePropertyName("category"); + writer.WriteStringValue(Category); + } + if (Optional.IsDefined(Target)) + { + writer.WritePropertyName("target"); + writer.WriteStringValue(Target); + } + if (Optional.IsDefined(AuthType)) + { + writer.WritePropertyName("authType"); + writer.WriteStringValue(AuthType); + } + if (Optional.IsDefined(Value)) + { + writer.WritePropertyName("value"); + writer.WriteStringValue(Value); + } + if (Optional.IsDefined(ValueFormat)) + { + writer.WritePropertyName("valueFormat"); + writer.WriteStringValue(ValueFormat.Value.ToString()); + } + writer.WriteEndObject(); + writer.WriteEndObject(); + } + internal static WorkspaceConnection DeserializeWorkspaceConnection(JsonElement element) { Optional id = default; @@ -21,6 +55,7 @@ internal static WorkspaceConnection DeserializeWorkspaceConnection(JsonElement e Optional target = default; Optional authType = default; Optional value = default; + Optional valueFormat = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("id")) @@ -67,11 +102,21 @@ internal static WorkspaceConnection DeserializeWorkspaceConnection(JsonElement e value = property0.Value.GetString(); continue; } + if (property0.NameEquals("valueFormat")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + property0.ThrowNonNullablePropertyIsNull(); + continue; + } + valueFormat = new ValueFormat(property0.Value.GetString()); + continue; + } } continue; } } - return new WorkspaceConnection(id.Value, name.Value, type.Value, category.Value, target.Value, authType.Value, value.Value); + return new WorkspaceConnection(id.Value, name.Value, type.Value, category.Value, target.Value, authType.Value, value.Value, Optional.ToNullable(valueFormat)); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/WorkspaceConnection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/WorkspaceConnection.cs index 4d6e0f6091672..58a84404d496c 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/WorkspaceConnection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/WorkspaceConnection.cs @@ -11,7 +11,7 @@ namespace Azure.ResourceManager.MachineLearningServices.Models public partial class WorkspaceConnection { /// Initializes a new instance of WorkspaceConnection. - internal WorkspaceConnection() + public WorkspaceConnection() { } @@ -23,7 +23,8 @@ internal WorkspaceConnection() /// Target of the workspace connection. /// Authorization type of the workspace connection. /// Value details of the workspace connection. - internal WorkspaceConnection(string id, string name, string type, string category, string target, string authType, string value) + /// format for the workspace connection value. + internal WorkspaceConnection(string id, string name, string type, string category, string target, string authType, string value, ValueFormat? valueFormat) { Id = id; Name = name; @@ -32,6 +33,7 @@ internal WorkspaceConnection(string id, string name, string type, string categor Target = target; AuthType = authType; Value = value; + ValueFormat = valueFormat; } /// ResourceId of the workspace connection. @@ -41,12 +43,14 @@ internal WorkspaceConnection(string id, string name, string type, string categor /// Resource type of workspace connection. public string Type { get; } /// Category of the workspace connection. - public string Category { get; } + public string Category { get; set; } /// Target of the workspace connection. - public string Target { get; } + public string Target { get; set; } /// Authorization type of the workspace connection. - public string AuthType { get; } + public string AuthType { get; set; } /// Value details of the workspace connection. - public string Value { get; } + public string Value { get; set; } + /// format for the workspace connection value. + public ValueFormat? ValueFormat { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/WorkspaceConnectionDto.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/WorkspaceConnectionDto.Serialization.cs deleted file mode 100644 index 1163d6a1f0dde..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/WorkspaceConnectionDto.Serialization.cs +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - public partial class WorkspaceConnectionDto : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(Name); - } - writer.WritePropertyName("properties"); - writer.WriteStartObject(); - if (Optional.IsDefined(Category)) - { - writer.WritePropertyName("category"); - writer.WriteStringValue(Category); - } - if (Optional.IsDefined(Target)) - { - writer.WritePropertyName("target"); - writer.WriteStringValue(Target); - } - if (Optional.IsDefined(AuthType)) - { - writer.WritePropertyName("authType"); - writer.WriteStringValue(AuthType); - } - if (Optional.IsDefined(Value)) - { - writer.WritePropertyName("value"); - writer.WriteStringValue(Value); - } - writer.WriteEndObject(); - writer.WriteEndObject(); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/WorkspaceConnectionDto.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/WorkspaceConnectionDto.cs deleted file mode 100644 index 823870a7928f6..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/WorkspaceConnectionDto.cs +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearningServices.Models -{ - /// object used for creating workspace connection. - public partial class WorkspaceConnectionDto - { - /// Initializes a new instance of WorkspaceConnectionDto. - public WorkspaceConnectionDto() - { - } - - /// Friendly name of the workspace connection. - public string Name { get; set; } - /// Category of the workspace connection. - public string Category { get; set; } - /// Target of the workspace connection. - public string Target { get; set; } - /// Authorization type of the workspace connection. - public string AuthType { get; set; } - /// Value details of the workspace connection. - public string Value { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/WorkspaceUpdateParameters.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/WorkspaceUpdateParameters.Serialization.cs index f531c94f1d3c9..1ec4bb588e2b9 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/WorkspaceUpdateParameters.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/WorkspaceUpdateParameters.Serialization.cs @@ -31,6 +31,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("sku"); writer.WriteObjectValue(Sku); } + if (Optional.IsDefined(Identity)) + { + writer.WritePropertyName("identity"); + writer.WriteObjectValue(Identity); + } writer.WritePropertyName("properties"); writer.WriteStartObject(); if (Optional.IsDefined(Description)) @@ -43,6 +48,26 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("friendlyName"); writer.WriteStringValue(FriendlyName); } + if (Optional.IsDefined(ImageBuildCompute)) + { + writer.WritePropertyName("imageBuildCompute"); + writer.WriteStringValue(ImageBuildCompute); + } + if (Optional.IsDefined(ServiceManagedResourcesSettings)) + { + writer.WritePropertyName("serviceManagedResourcesSettings"); + writer.WriteObjectValue(ServiceManagedResourcesSettings); + } + if (Optional.IsDefined(PrimaryUserAssignedIdentity)) + { + writer.WritePropertyName("primaryUserAssignedIdentity"); + writer.WriteStringValue(PrimaryUserAssignedIdentity); + } + if (Optional.IsDefined(PublicNetworkAccess)) + { + writer.WritePropertyName("publicNetworkAccess"); + writer.WriteStringValue(PublicNetworkAccess.Value.ToString()); + } writer.WriteEndObject(); writer.WriteEndObject(); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/WorkspaceUpdateParameters.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/WorkspaceUpdateParameters.cs index 2e801061b36c4..e674f39d80a8d 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/WorkspaceUpdateParameters.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/WorkspaceUpdateParameters.cs @@ -23,9 +23,19 @@ public WorkspaceUpdateParameters() public IDictionary Tags { get; } /// The sku of the workspace. public Sku Sku { get; set; } + /// The identity of the resource. + public Identity Identity { get; set; } /// The description of this workspace. public string Description { get; set; } /// The friendly name for this workspace. public string FriendlyName { get; set; } + /// The compute name for image build. + public string ImageBuildCompute { get; set; } + /// The service managed resource settings. + public ServiceManagedResourcesSettings ServiceManagedResourcesSettings { get; set; } + /// The user assigned identity resource id that represents the workspace identity. + public string PrimaryUserAssignedIdentity { get; set; } + /// Whether requests from Public Network are allowed. + public PublicNetworkAccess? PublicNetworkAccess { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/NotebooksOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/NotebooksOperations.cs deleted file mode 100644 index 4a152d5522243..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/NotebooksOperations.cs +++ /dev/null @@ -1,136 +0,0 @@ -// 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.Pipeline; -using Azure.ResourceManager.MachineLearningServices.Models; - -namespace Azure.ResourceManager.MachineLearningServices -{ - /// The Notebooks service client. - public partial class NotebooksOperations - { - private readonly ClientDiagnostics _clientDiagnostics; - private readonly HttpPipeline _pipeline; - internal NotebooksRestOperations RestClient { get; } - - /// Initializes a new instance of NotebooksOperations for mocking. - protected NotebooksOperations() - { - } - - /// Initializes a new instance of NotebooksOperations. - /// The handler for diagnostic messaging in the client. - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// Azure subscription identifier. - /// server parameter. - /// Api Version. - internal NotebooksOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2020-09-01-preview") - { - RestClient = new NotebooksRestOperations(clientDiagnostics, pipeline, subscriptionId, endpoint, apiVersion); - _clientDiagnostics = clientDiagnostics; - _pipeline = pipeline; - } - - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - public virtual async Task> ListKeysAsync(string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("NotebooksOperations.ListKeys"); - scope.Start(); - try - { - return await RestClient.ListKeysAsync(resourceGroupName, workspaceName, cancellationToken).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - public virtual Response ListKeys(string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("NotebooksOperations.ListKeys"); - scope.Start(); - try - { - return RestClient.ListKeys(resourceGroupName, workspaceName, cancellationToken); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - /// or is null. - public virtual async Task StartPrepareAsync(string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var scope = _clientDiagnostics.CreateScope("NotebooksOperations.StartPrepare"); - scope.Start(); - try - { - var originalResponse = await RestClient.PrepareAsync(resourceGroupName, workspaceName, cancellationToken).ConfigureAwait(false); - return new NotebooksPrepareOperation(_clientDiagnostics, _pipeline, RestClient.CreatePrepareRequest(resourceGroupName, workspaceName).Request, originalResponse); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - /// or is null. - public virtual NotebooksPrepareOperation StartPrepare(string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var scope = _clientDiagnostics.CreateScope("NotebooksOperations.StartPrepare"); - scope.Start(); - try - { - var originalResponse = RestClient.Prepare(resourceGroupName, workspaceName, cancellationToken); - return new NotebooksPrepareOperation(_clientDiagnostics, _pipeline, RestClient.CreatePrepareRequest(resourceGroupName, workspaceName).Request, originalResponse); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/NotebooksRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/NotebooksRestOperations.cs deleted file mode 100644 index fa36e7bf1ced8..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/NotebooksRestOperations.cs +++ /dev/null @@ -1,209 +0,0 @@ -// 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.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager.MachineLearningServices.Models; - -namespace Azure.ResourceManager.MachineLearningServices -{ - internal partial class NotebooksRestOperations - { - private string subscriptionId; - private Uri endpoint; - private string apiVersion; - private ClientDiagnostics _clientDiagnostics; - private HttpPipeline _pipeline; - - /// Initializes a new instance of NotebooksRestOperations. - /// The handler for diagnostic messaging in the client. - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// Azure subscription identifier. - /// server parameter. - /// Api Version. - /// or is null. - public NotebooksRestOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2020-09-01-preview") - { - if (subscriptionId == null) - { - throw new ArgumentNullException(nameof(subscriptionId)); - } - endpoint ??= new Uri("https://management.azure.com"); - if (apiVersion == null) - { - throw new ArgumentNullException(nameof(apiVersion)); - } - - this.subscriptionId = subscriptionId; - this.endpoint = endpoint; - this.apiVersion = apiVersion; - _clientDiagnostics = clientDiagnostics; - _pipeline = pipeline; - } - - internal HttpMessage CreatePrepareRequest(string resourceGroupName, string workspaceName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/prepareNotebook", false); - uri.AppendQuery("api-version", apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - /// or is null. - public async Task PrepareAsync(string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreatePrepareRequest(resourceGroupName, workspaceName); - 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); - } - } - - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - /// or is null. - public Response Prepare(string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreatePrepareRequest(resourceGroupName, workspaceName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 202: - return message.Response; - default: - throw _clientDiagnostics.CreateRequestFailedException(message.Response); - } - } - - internal HttpMessage CreateListKeysRequest(string resourceGroupName, string workspaceName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/listNotebookKeys", false); - uri.AppendQuery("api-version", apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - /// or is null. - public async Task> ListKeysAsync(string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateListKeysRequest(resourceGroupName, workspaceName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - ListNotebookKeysResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = ListNotebookKeysResult.DeserializeListNotebookKeysResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); - } - } - - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// The cancellation token to use. - /// or is null. - public Response ListKeys(string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - if (resourceGroupName == null) - { - throw new ArgumentNullException(nameof(resourceGroupName)); - } - if (workspaceName == null) - { - throw new ArgumentNullException(nameof(workspaceName)); - } - - using var message = CreateListKeysRequest(resourceGroupName, workspaceName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - ListNotebookKeysResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = ListNotebookKeysResult.DeserializeListNotebookKeysResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw _clientDiagnostics.CreateRequestFailedException(message.Response); - } - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Operations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Operations.cs index 610fd7a38b008..3e29f0d09e32b 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Operations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Operations.cs @@ -32,7 +32,7 @@ protected Operations() /// The HTTP pipeline for sending and receiving REST requests and responses. /// server parameter. /// Api Version. - internal Operations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Uri endpoint = null, string apiVersion = "2020-09-01-preview") + internal Operations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Uri endpoint = null, string apiVersion = "2021-07-01") { RestClient = new RestOperations(clientDiagnostics, pipeline, endpoint, apiVersion); _clientDiagnostics = clientDiagnostics; diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/PrivateEndpointConnectionsOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/PrivateEndpointConnectionsOperations.cs index 8f0f17c08b715..95334a7edc8cc 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/PrivateEndpointConnectionsOperations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/PrivateEndpointConnectionsOperations.cs @@ -9,6 +9,7 @@ using System.Threading; using System.Threading.Tasks; using Azure; +using Azure.Core; using Azure.Core.Pipeline; using Azure.ResourceManager.MachineLearningServices.Models; @@ -29,10 +30,10 @@ protected PrivateEndpointConnectionsOperations() /// Initializes a new instance of PrivateEndpointConnectionsOperations. /// The handler for diagnostic messaging in the client. /// The HTTP pipeline for sending and receiving REST requests and responses. - /// Azure subscription identifier. + /// The ID of the target subscription. /// server parameter. /// Api Version. - internal PrivateEndpointConnectionsOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2020-09-01-preview") + internal PrivateEndpointConnectionsOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2021-07-01") { RestClient = new PrivateEndpointConnectionsRestOperations(clientDiagnostics, pipeline, subscriptionId, endpoint, apiVersion); _clientDiagnostics = clientDiagnostics; @@ -40,7 +41,7 @@ internal PrivateEndpointConnectionsOperations(ClientDiagnostics clientDiagnostic } /// Gets the specified private endpoint connection associated with the workspace. - /// Name of the resource group in which workspace is located. + /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. /// The name of the private endpoint connection associated with the workspace. /// The cancellation token to use. @@ -60,7 +61,7 @@ public virtual async Task> GetAsync(string r } /// Gets the specified private endpoint connection associated with the workspace. - /// Name of the resource group in which workspace is located. + /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. /// The name of the private endpoint connection associated with the workspace. /// The cancellation token to use. @@ -80,18 +81,18 @@ public virtual Response Get(string resourceGroupName, } /// Update the state of specified private endpoint connection associated with the workspace. - /// Name of the resource group in which workspace is located. + /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. /// The name of the private endpoint connection associated with the workspace. /// The private endpoint connection properties. /// The cancellation token to use. - public virtual async Task> PutAsync(string resourceGroupName, string workspaceName, string privateEndpointConnectionName, PrivateEndpointConnection properties, CancellationToken cancellationToken = default) + public virtual async Task> CreateOrUpdateAsync(string resourceGroupName, string workspaceName, string privateEndpointConnectionName, PrivateEndpointConnection properties, CancellationToken cancellationToken = default) { - using var scope = _clientDiagnostics.CreateScope("PrivateEndpointConnectionsOperations.Put"); + using var scope = _clientDiagnostics.CreateScope("PrivateEndpointConnectionsOperations.CreateOrUpdate"); scope.Start(); try { - return await RestClient.PutAsync(resourceGroupName, workspaceName, privateEndpointConnectionName, properties, cancellationToken).ConfigureAwait(false); + return await RestClient.CreateOrUpdateAsync(resourceGroupName, workspaceName, privateEndpointConnectionName, properties, cancellationToken).ConfigureAwait(false); } catch (Exception e) { @@ -101,18 +102,18 @@ public virtual async Task> PutAsync(string r } /// Update the state of specified private endpoint connection associated with the workspace. - /// Name of the resource group in which workspace is located. + /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. /// The name of the private endpoint connection associated with the workspace. /// The private endpoint connection properties. /// The cancellation token to use. - public virtual Response Put(string resourceGroupName, string workspaceName, string privateEndpointConnectionName, PrivateEndpointConnection properties, CancellationToken cancellationToken = default) + public virtual Response CreateOrUpdate(string resourceGroupName, string workspaceName, string privateEndpointConnectionName, PrivateEndpointConnection properties, CancellationToken cancellationToken = default) { - using var scope = _clientDiagnostics.CreateScope("PrivateEndpointConnectionsOperations.Put"); + using var scope = _clientDiagnostics.CreateScope("PrivateEndpointConnectionsOperations.CreateOrUpdate"); scope.Start(); try { - return RestClient.Put(resourceGroupName, workspaceName, privateEndpointConnectionName, properties, cancellationToken); + return RestClient.CreateOrUpdate(resourceGroupName, workspaceName, privateEndpointConnectionName, properties, cancellationToken); } catch (Exception e) { @@ -122,7 +123,7 @@ public virtual Response Put(string resourceGroupName, } /// Deletes the specified private endpoint connection associated with the workspace. - /// Name of the resource group in which workspace is located. + /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. /// The name of the private endpoint connection associated with the workspace. /// The cancellation token to use. @@ -142,7 +143,7 @@ public virtual async Task DeleteAsync(string resourceGroupName, string } /// Deletes the specified private endpoint connection associated with the workspace. - /// Name of the resource group in which workspace is located. + /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. /// The name of the private endpoint connection associated with the workspace. /// The cancellation token to use. @@ -160,5 +161,73 @@ public virtual Response Delete(string resourceGroupName, string workspaceName, s throw; } } + + /// List all the private endpoint connections associated with the workspace. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + /// or is null. + public virtual AsyncPageable ListAsync(string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + async Task> FirstPageFunc(int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("PrivateEndpointConnectionsOperations.List"); + scope.Start(); + try + { + var response = await RestClient.ListAsync(resourceGroupName, workspaceName, cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value, null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, null); + } + + /// List all the private endpoint connections associated with the workspace. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + /// or is null. + public virtual Pageable List(string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + Page FirstPageFunc(int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("PrivateEndpointConnectionsOperations.List"); + scope.Start(); + try + { + var response = RestClient.List(resourceGroupName, workspaceName, cancellationToken); + return Page.FromValues(response.Value.Value, null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateEnumerable(FirstPageFunc, null); + } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/PrivateEndpointConnectionsRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/PrivateEndpointConnectionsRestOperations.cs index 4bedc04eaf5dc..ced1b612d56cc 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/PrivateEndpointConnectionsRestOperations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/PrivateEndpointConnectionsRestOperations.cs @@ -27,11 +27,11 @@ internal partial class PrivateEndpointConnectionsRestOperations /// Initializes a new instance of PrivateEndpointConnectionsRestOperations. /// The handler for diagnostic messaging in the client. /// The HTTP pipeline for sending and receiving REST requests and responses. - /// Azure subscription identifier. + /// The ID of the target subscription. /// server parameter. /// Api Version. /// or is null. - public PrivateEndpointConnectionsRestOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2020-09-01-preview") + public PrivateEndpointConnectionsRestOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2021-07-01") { if (subscriptionId == null) { @@ -50,6 +50,90 @@ public PrivateEndpointConnectionsRestOperations(ClientDiagnostics clientDiagnost _pipeline = pipeline; } + internal HttpMessage CreateListRequest(string resourceGroupName, string workspaceName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/privateEndpointConnections", false); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// List all the private endpoint connections associated with the workspace. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + /// or is null. + public async Task> ListAsync(string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateListRequest(resourceGroupName, workspaceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + PrivateEndpointConnectionListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = PrivateEndpointConnectionListResult.DeserializePrivateEndpointConnectionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// List all the private endpoint connections associated with the workspace. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + /// or is null. + public Response List(string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateListRequest(resourceGroupName, workspaceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + PrivateEndpointConnectionListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = PrivateEndpointConnectionListResult.DeserializePrivateEndpointConnectionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + internal HttpMessage CreateGetRequest(string resourceGroupName, string workspaceName, string privateEndpointConnectionName) { var message = _pipeline.CreateMessage(); @@ -72,7 +156,7 @@ internal HttpMessage CreateGetRequest(string resourceGroupName, string workspace } /// Gets the specified private endpoint connection associated with the workspace. - /// Name of the resource group in which workspace is located. + /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. /// The name of the private endpoint connection associated with the workspace. /// The cancellation token to use. @@ -109,7 +193,7 @@ public async Task> GetAsync(string resourceG } /// Gets the specified private endpoint connection associated with the workspace. - /// Name of the resource group in which workspace is located. + /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. /// The name of the private endpoint connection associated with the workspace. /// The cancellation token to use. @@ -145,7 +229,7 @@ public Response Get(string resourceGroupName, string } } - internal HttpMessage CreatePutRequest(string resourceGroupName, string workspaceName, string privateEndpointConnectionName, PrivateEndpointConnection properties) + internal HttpMessage CreateCreateOrUpdateRequest(string resourceGroupName, string workspaceName, string privateEndpointConnectionName, PrivateEndpointConnection properties) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -171,13 +255,13 @@ internal HttpMessage CreatePutRequest(string resourceGroupName, string workspace } /// Update the state of specified private endpoint connection associated with the workspace. - /// Name of the resource group in which workspace is located. + /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. /// The name of the private endpoint connection associated with the workspace. /// The private endpoint connection properties. /// The cancellation token to use. /// , , , or is null. - public async Task> PutAsync(string resourceGroupName, string workspaceName, string privateEndpointConnectionName, PrivateEndpointConnection properties, CancellationToken cancellationToken = default) + public async Task> CreateOrUpdateAsync(string resourceGroupName, string workspaceName, string privateEndpointConnectionName, PrivateEndpointConnection properties, CancellationToken cancellationToken = default) { if (resourceGroupName == null) { @@ -196,7 +280,7 @@ public async Task> PutAsync(string resourceG throw new ArgumentNullException(nameof(properties)); } - using var message = CreatePutRequest(resourceGroupName, workspaceName, privateEndpointConnectionName, properties); + using var message = CreateCreateOrUpdateRequest(resourceGroupName, workspaceName, privateEndpointConnectionName, properties); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -213,13 +297,13 @@ public async Task> PutAsync(string resourceG } /// Update the state of specified private endpoint connection associated with the workspace. - /// Name of the resource group in which workspace is located. + /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. /// The name of the private endpoint connection associated with the workspace. /// The private endpoint connection properties. /// The cancellation token to use. /// , , , or is null. - public Response Put(string resourceGroupName, string workspaceName, string privateEndpointConnectionName, PrivateEndpointConnection properties, CancellationToken cancellationToken = default) + public Response CreateOrUpdate(string resourceGroupName, string workspaceName, string privateEndpointConnectionName, PrivateEndpointConnection properties, CancellationToken cancellationToken = default) { if (resourceGroupName == null) { @@ -238,7 +322,7 @@ public Response Put(string resourceGroupName, string throw new ArgumentNullException(nameof(properties)); } - using var message = CreatePutRequest(resourceGroupName, workspaceName, privateEndpointConnectionName, properties); + using var message = CreateCreateOrUpdateRequest(resourceGroupName, workspaceName, privateEndpointConnectionName, properties); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -276,7 +360,7 @@ internal HttpMessage CreateDeleteRequest(string resourceGroupName, string worksp } /// Deletes the specified private endpoint connection associated with the workspace. - /// Name of the resource group in which workspace is located. + /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. /// The name of the private endpoint connection associated with the workspace. /// The cancellation token to use. @@ -309,7 +393,7 @@ public async Task DeleteAsync(string resourceGroupName, string workspa } /// Deletes the specified private endpoint connection associated with the workspace. - /// Name of the resource group in which workspace is located. + /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. /// The name of the private endpoint connection associated with the workspace. /// The cancellation token to use. diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/PrivateLinkResourcesOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/PrivateLinkResourcesOperations.cs index 23c1029dac3fe..12cd13c013774 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/PrivateLinkResourcesOperations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/PrivateLinkResourcesOperations.cs @@ -29,10 +29,10 @@ protected PrivateLinkResourcesOperations() /// Initializes a new instance of PrivateLinkResourcesOperations. /// The handler for diagnostic messaging in the client. /// The HTTP pipeline for sending and receiving REST requests and responses. - /// Azure subscription identifier. + /// The ID of the target subscription. /// server parameter. /// Api Version. - internal PrivateLinkResourcesOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2020-09-01-preview") + internal PrivateLinkResourcesOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2021-07-01") { RestClient = new PrivateLinkResourcesRestOperations(clientDiagnostics, pipeline, subscriptionId, endpoint, apiVersion); _clientDiagnostics = clientDiagnostics; @@ -40,16 +40,16 @@ internal PrivateLinkResourcesOperations(ClientDiagnostics clientDiagnostics, Htt } /// Gets the private link resources that need to be created for a workspace. - /// Name of the resource group in which workspace is located. + /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. /// The cancellation token to use. - public virtual async Task> ListByWorkspaceAsync(string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + public virtual async Task> ListAsync(string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) { - using var scope = _clientDiagnostics.CreateScope("PrivateLinkResourcesOperations.ListByWorkspace"); + using var scope = _clientDiagnostics.CreateScope("PrivateLinkResourcesOperations.List"); scope.Start(); try { - return await RestClient.ListByWorkspaceAsync(resourceGroupName, workspaceName, cancellationToken).ConfigureAwait(false); + return await RestClient.ListAsync(resourceGroupName, workspaceName, cancellationToken).ConfigureAwait(false); } catch (Exception e) { @@ -59,16 +59,16 @@ public virtual async Task> ListByWorkspa } /// Gets the private link resources that need to be created for a workspace. - /// Name of the resource group in which workspace is located. + /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. /// The cancellation token to use. - public virtual Response ListByWorkspace(string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + public virtual Response List(string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) { - using var scope = _clientDiagnostics.CreateScope("PrivateLinkResourcesOperations.ListByWorkspace"); + using var scope = _clientDiagnostics.CreateScope("PrivateLinkResourcesOperations.List"); scope.Start(); try { - return RestClient.ListByWorkspace(resourceGroupName, workspaceName, cancellationToken); + return RestClient.List(resourceGroupName, workspaceName, cancellationToken); } catch (Exception e) { diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/PrivateLinkResourcesRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/PrivateLinkResourcesRestOperations.cs index 9f62e6fdb3112..c17174960e910 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/PrivateLinkResourcesRestOperations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/PrivateLinkResourcesRestOperations.cs @@ -27,11 +27,11 @@ internal partial class PrivateLinkResourcesRestOperations /// Initializes a new instance of PrivateLinkResourcesRestOperations. /// The handler for diagnostic messaging in the client. /// The HTTP pipeline for sending and receiving REST requests and responses. - /// Azure subscription identifier. + /// The ID of the target subscription. /// server parameter. /// Api Version. /// or is null. - public PrivateLinkResourcesRestOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2020-09-01-preview") + public PrivateLinkResourcesRestOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2021-07-01") { if (subscriptionId == null) { @@ -50,7 +50,7 @@ public PrivateLinkResourcesRestOperations(ClientDiagnostics clientDiagnostics, H _pipeline = pipeline; } - internal HttpMessage CreateListByWorkspaceRequest(string resourceGroupName, string workspaceName) + internal HttpMessage CreateListRequest(string resourceGroupName, string workspaceName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -71,11 +71,11 @@ internal HttpMessage CreateListByWorkspaceRequest(string resourceGroupName, stri } /// Gets the private link resources that need to be created for a workspace. - /// Name of the resource group in which workspace is located. + /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. /// The cancellation token to use. /// or is null. - public async Task> ListByWorkspaceAsync(string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + public async Task> ListAsync(string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) { if (resourceGroupName == null) { @@ -86,7 +86,7 @@ public async Task> ListByWorkspaceAsync( throw new ArgumentNullException(nameof(workspaceName)); } - using var message = CreateListByWorkspaceRequest(resourceGroupName, workspaceName); + using var message = CreateListRequest(resourceGroupName, workspaceName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -103,11 +103,11 @@ public async Task> ListByWorkspaceAsync( } /// Gets the private link resources that need to be created for a workspace. - /// Name of the resource group in which workspace is located. + /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. /// The cancellation token to use. /// or is null. - public Response ListByWorkspace(string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + public Response List(string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) { if (resourceGroupName == null) { @@ -118,7 +118,7 @@ public Response ListByWorkspace(string resourceGr throw new ArgumentNullException(nameof(workspaceName)); } - using var message = CreateListByWorkspaceRequest(resourceGroupName, workspaceName); + using var message = CreateListRequest(resourceGroupName, workspaceName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/QuotasOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/QuotasOperations.cs index 3d35d54ea2212..ef3164a2cafbc 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/QuotasOperations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/QuotasOperations.cs @@ -30,10 +30,10 @@ protected QuotasOperations() /// Initializes a new instance of QuotasOperations. /// The handler for diagnostic messaging in the client. /// The HTTP pipeline for sending and receiving REST requests and responses. - /// Azure subscription identifier. + /// The ID of the target subscription. /// server parameter. /// Api Version. - internal QuotasOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2020-09-01-preview") + internal QuotasOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2021-07-01") { RestClient = new QuotasRestOperations(clientDiagnostics, pipeline, subscriptionId, endpoint, apiVersion); _clientDiagnostics = clientDiagnostics; diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/QuotasRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/QuotasRestOperations.cs index efaa65685409c..6ffdff2b09c47 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/QuotasRestOperations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/QuotasRestOperations.cs @@ -27,11 +27,11 @@ internal partial class QuotasRestOperations /// Initializes a new instance of QuotasRestOperations. /// The handler for diagnostic messaging in the client. /// The HTTP pipeline for sending and receiving REST requests and responses. - /// Azure subscription identifier. + /// The ID of the target subscription. /// server parameter. /// Api Version. /// or is null. - public QuotasRestOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2020-09-01-preview") + public QuotasRestOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2021-07-01") { if (subscriptionId == null) { @@ -147,7 +147,7 @@ internal HttpMessage CreateListRequest(string location) uri.AppendPath(subscriptionId, true); uri.AppendPath("/providers/Microsoft.MachineLearningServices/locations/", false); uri.AppendPath(location, true); - uri.AppendPath("/Quotas", false); + uri.AppendPath("/quotas", false); uri.AppendQuery("api-version", apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/RestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/RestOperations.cs index 9c995cd07168b..58b2d9fb2d46a 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/RestOperations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/RestOperations.cs @@ -29,7 +29,7 @@ internal partial class RestOperations /// server parameter. /// Api Version. /// is null. - public RestOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Uri endpoint = null, string apiVersion = "2020-09-01-preview") + public RestOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Uri endpoint = null, string apiVersion = "2021-07-01") { endpoint ??= new Uri("https://management.azure.com"); if (apiVersion == null) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/UsagesOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/UsagesOperations.cs index 26670c1e80368..fb32f3a9ec16e 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/UsagesOperations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/UsagesOperations.cs @@ -30,10 +30,10 @@ protected UsagesOperations() /// Initializes a new instance of UsagesOperations. /// The handler for diagnostic messaging in the client. /// The HTTP pipeline for sending and receiving REST requests and responses. - /// Azure subscription identifier. + /// The ID of the target subscription. /// server parameter. /// Api Version. - internal UsagesOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2020-09-01-preview") + internal UsagesOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2021-07-01") { RestClient = new UsagesRestOperations(clientDiagnostics, pipeline, subscriptionId, endpoint, apiVersion); _clientDiagnostics = clientDiagnostics; diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/UsagesRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/UsagesRestOperations.cs index a78f11f965944..f877dcbe9d275 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/UsagesRestOperations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/UsagesRestOperations.cs @@ -27,11 +27,11 @@ internal partial class UsagesRestOperations /// Initializes a new instance of UsagesRestOperations. /// The handler for diagnostic messaging in the client. /// The HTTP pipeline for sending and receiving REST requests and responses. - /// Azure subscription identifier. + /// The ID of the target subscription. /// server parameter. /// Api Version. /// or is null. - public UsagesRestOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2020-09-01-preview") + public UsagesRestOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2021-07-01") { if (subscriptionId == null) { diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/VirtualMachineSizesOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/VirtualMachineSizesOperations.cs index 9e1815c5ea71e..bc36861296767 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/VirtualMachineSizesOperations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/VirtualMachineSizesOperations.cs @@ -29,10 +29,10 @@ protected VirtualMachineSizesOperations() /// Initializes a new instance of VirtualMachineSizesOperations. /// The handler for diagnostic messaging in the client. /// The HTTP pipeline for sending and receiving REST requests and responses. - /// Azure subscription identifier. + /// The ID of the target subscription. /// server parameter. /// Api Version. - internal VirtualMachineSizesOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2020-09-01-preview") + internal VirtualMachineSizesOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2021-07-01") { RestClient = new VirtualMachineSizesRestOperations(clientDiagnostics, pipeline, subscriptionId, endpoint, apiVersion); _clientDiagnostics = clientDiagnostics; diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/VirtualMachineSizesRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/VirtualMachineSizesRestOperations.cs index 152a604e41e3f..6640cf7bbdc39 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/VirtualMachineSizesRestOperations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/VirtualMachineSizesRestOperations.cs @@ -27,11 +27,11 @@ internal partial class VirtualMachineSizesRestOperations /// Initializes a new instance of VirtualMachineSizesRestOperations. /// The handler for diagnostic messaging in the client. /// The HTTP pipeline for sending and receiving REST requests and responses. - /// Azure subscription identifier. + /// The ID of the target subscription. /// server parameter. /// Api Version. /// or is null. - public VirtualMachineSizesRestOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2020-09-01-preview") + public VirtualMachineSizesRestOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2021-07-01") { if (subscriptionId == null) { diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/WorkspaceConnectionsOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/WorkspaceConnectionsOperations.cs index 4d8d9b24f9acd..ed5204caa0410 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/WorkspaceConnectionsOperations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/WorkspaceConnectionsOperations.cs @@ -30,10 +30,10 @@ protected WorkspaceConnectionsOperations() /// Initializes a new instance of WorkspaceConnectionsOperations. /// The handler for diagnostic messaging in the client. /// The HTTP pipeline for sending and receiving REST requests and responses. - /// Azure subscription identifier. + /// The ID of the target subscription. /// server parameter. /// Api Version. - internal WorkspaceConnectionsOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2020-09-01-preview") + internal WorkspaceConnectionsOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2021-07-01") { RestClient = new WorkspaceConnectionsRestOperations(clientDiagnostics, pipeline, subscriptionId, endpoint, apiVersion); _clientDiagnostics = clientDiagnostics; @@ -41,12 +41,12 @@ internal WorkspaceConnectionsOperations(ClientDiagnostics clientDiagnostics, Htt } /// Add a new workspace connection. - /// Name of the resource group in which workspace is located. + /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. /// Friendly name of the workspace connection. /// The object for creating or updating a new workspace connection. /// The cancellation token to use. - public virtual async Task> CreateAsync(string resourceGroupName, string workspaceName, string connectionName, WorkspaceConnectionDto parameters, CancellationToken cancellationToken = default) + public virtual async Task> CreateAsync(string resourceGroupName, string workspaceName, string connectionName, WorkspaceConnection parameters, CancellationToken cancellationToken = default) { using var scope = _clientDiagnostics.CreateScope("WorkspaceConnectionsOperations.Create"); scope.Start(); @@ -62,12 +62,12 @@ public virtual async Task> CreateAsync(string reso } /// Add a new workspace connection. - /// Name of the resource group in which workspace is located. + /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. /// Friendly name of the workspace connection. /// The object for creating or updating a new workspace connection. /// The cancellation token to use. - public virtual Response Create(string resourceGroupName, string workspaceName, string connectionName, WorkspaceConnectionDto parameters, CancellationToken cancellationToken = default) + public virtual Response Create(string resourceGroupName, string workspaceName, string connectionName, WorkspaceConnection parameters, CancellationToken cancellationToken = default) { using var scope = _clientDiagnostics.CreateScope("WorkspaceConnectionsOperations.Create"); scope.Start(); @@ -83,7 +83,7 @@ public virtual Response Create(string resourceGroupName, st } /// Get the detail of a workspace connection. - /// Name of the resource group in which workspace is located. + /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. /// Friendly name of the workspace connection. /// The cancellation token to use. @@ -103,7 +103,7 @@ public virtual async Task> GetAsync(string resourc } /// Get the detail of a workspace connection. - /// Name of the resource group in which workspace is located. + /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. /// Friendly name of the workspace connection. /// The cancellation token to use. @@ -123,7 +123,7 @@ public virtual Response Get(string resourceGroupName, strin } /// Delete a workspace connection. - /// Name of the resource group in which workspace is located. + /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. /// Friendly name of the workspace connection. /// The cancellation token to use. @@ -143,7 +143,7 @@ public virtual async Task DeleteAsync(string resourceGroupName, string } /// Delete a workspace connection. - /// Name of the resource group in which workspace is located. + /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. /// Friendly name of the workspace connection. /// The cancellation token to use. @@ -163,7 +163,7 @@ public virtual Response Delete(string resourceGroupName, string workspaceName, s } /// List all connections under a AML workspace. - /// Name of the resource group in which workspace is located. + /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. /// Target of the workspace connection. /// Category of the workspace connection. @@ -199,7 +199,7 @@ async Task> FirstPageFunc(int? pageSizeHint) } /// List all connections under a AML workspace. - /// Name of the resource group in which workspace is located. + /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. /// Target of the workspace connection. /// Category of the workspace connection. diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/WorkspaceConnectionsRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/WorkspaceConnectionsRestOperations.cs index c1aecf918897d..6858e51992112 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/WorkspaceConnectionsRestOperations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/WorkspaceConnectionsRestOperations.cs @@ -27,11 +27,11 @@ internal partial class WorkspaceConnectionsRestOperations /// Initializes a new instance of WorkspaceConnectionsRestOperations. /// The handler for diagnostic messaging in the client. /// The HTTP pipeline for sending and receiving REST requests and responses. - /// Azure subscription identifier. + /// The ID of the target subscription. /// server parameter. /// Api Version. /// or is null. - public WorkspaceConnectionsRestOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2020-09-01-preview") + public WorkspaceConnectionsRestOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2021-07-01") { if (subscriptionId == null) { @@ -79,7 +79,7 @@ internal HttpMessage CreateListRequest(string resourceGroupName, string workspac } /// List all connections under a AML workspace. - /// Name of the resource group in which workspace is located. + /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. /// Target of the workspace connection. /// Category of the workspace connection. @@ -113,7 +113,7 @@ public async Task> ListAsync(string } /// List all connections under a AML workspace. - /// Name of the resource group in which workspace is located. + /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. /// Target of the workspace connection. /// Category of the workspace connection. @@ -146,7 +146,7 @@ public Response List(string resourceGroupName } } - internal HttpMessage CreateCreateRequest(string resourceGroupName, string workspaceName, string connectionName, WorkspaceConnectionDto parameters) + internal HttpMessage CreateCreateRequest(string resourceGroupName, string workspaceName, string connectionName, WorkspaceConnection parameters) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -172,13 +172,13 @@ internal HttpMessage CreateCreateRequest(string resourceGroupName, string worksp } /// Add a new workspace connection. - /// Name of the resource group in which workspace is located. + /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. /// Friendly name of the workspace connection. /// The object for creating or updating a new workspace connection. /// The cancellation token to use. /// , , , or is null. - public async Task> CreateAsync(string resourceGroupName, string workspaceName, string connectionName, WorkspaceConnectionDto parameters, CancellationToken cancellationToken = default) + public async Task> CreateAsync(string resourceGroupName, string workspaceName, string connectionName, WorkspaceConnection parameters, CancellationToken cancellationToken = default) { if (resourceGroupName == null) { @@ -214,13 +214,13 @@ public async Task> CreateAsync(string resourceGrou } /// Add a new workspace connection. - /// Name of the resource group in which workspace is located. + /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. /// Friendly name of the workspace connection. /// The object for creating or updating a new workspace connection. /// The cancellation token to use. /// , , , or is null. - public Response Create(string resourceGroupName, string workspaceName, string connectionName, WorkspaceConnectionDto parameters, CancellationToken cancellationToken = default) + public Response Create(string resourceGroupName, string workspaceName, string connectionName, WorkspaceConnection parameters, CancellationToken cancellationToken = default) { if (resourceGroupName == null) { @@ -277,7 +277,7 @@ internal HttpMessage CreateGetRequest(string resourceGroupName, string workspace } /// Get the detail of a workspace connection. - /// Name of the resource group in which workspace is located. + /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. /// Friendly name of the workspace connection. /// The cancellation token to use. @@ -314,7 +314,7 @@ public async Task> GetAsync(string resourceGroupNa } /// Get the detail of a workspace connection. - /// Name of the resource group in which workspace is located. + /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. /// Friendly name of the workspace connection. /// The cancellation token to use. @@ -372,7 +372,7 @@ internal HttpMessage CreateDeleteRequest(string resourceGroupName, string worksp } /// Delete a workspace connection. - /// Name of the resource group in which workspace is located. + /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. /// Friendly name of the workspace connection. /// The cancellation token to use. @@ -405,7 +405,7 @@ public async Task DeleteAsync(string resourceGroupName, string workspa } /// Delete a workspace connection. - /// Name of the resource group in which workspace is located. + /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. /// Friendly name of the workspace connection. /// The cancellation token to use. diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/WorkspaceFeaturesOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/WorkspaceFeaturesOperations.cs index f824c6d5b0e42..3a9aedfb6e9ed 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/WorkspaceFeaturesOperations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/WorkspaceFeaturesOperations.cs @@ -30,10 +30,10 @@ protected WorkspaceFeaturesOperations() /// Initializes a new instance of WorkspaceFeaturesOperations. /// The handler for diagnostic messaging in the client. /// The HTTP pipeline for sending and receiving REST requests and responses. - /// Azure subscription identifier. + /// The ID of the target subscription. /// server parameter. /// Api Version. - internal WorkspaceFeaturesOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2020-09-01-preview") + internal WorkspaceFeaturesOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2021-07-01") { RestClient = new WorkspaceFeaturesRestOperations(clientDiagnostics, pipeline, subscriptionId, endpoint, apiVersion); _clientDiagnostics = clientDiagnostics; @@ -41,7 +41,7 @@ internal WorkspaceFeaturesOperations(ClientDiagnostics clientDiagnostics, HttpPi } /// Lists all enabled features for a workspace. - /// Name of the resource group in which workspace is located. + /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. /// The cancellation token to use. /// or is null. @@ -90,7 +90,7 @@ async Task> NextPageFunc(string nextLink, int? pageSizeHint } /// Lists all enabled features for a workspace. - /// Name of the resource group in which workspace is located. + /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. /// The cancellation token to use. /// or is null. diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/WorkspaceFeaturesRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/WorkspaceFeaturesRestOperations.cs index 599fd9dc68d1d..4b203788a3726 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/WorkspaceFeaturesRestOperations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/WorkspaceFeaturesRestOperations.cs @@ -27,11 +27,11 @@ internal partial class WorkspaceFeaturesRestOperations /// Initializes a new instance of WorkspaceFeaturesRestOperations. /// The handler for diagnostic messaging in the client. /// The HTTP pipeline for sending and receiving REST requests and responses. - /// Azure subscription identifier. + /// The ID of the target subscription. /// server parameter. /// Api Version. /// or is null. - public WorkspaceFeaturesRestOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2020-09-01-preview") + public WorkspaceFeaturesRestOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2021-07-01") { if (subscriptionId == null) { @@ -71,7 +71,7 @@ internal HttpMessage CreateListRequest(string resourceGroupName, string workspac } /// Lists all enabled features for a workspace. - /// Name of the resource group in which workspace is located. + /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. /// The cancellation token to use. /// or is null. @@ -103,7 +103,7 @@ public async Task> ListAsync(string resourceG } /// Lists all enabled features for a workspace. - /// Name of the resource group in which workspace is located. + /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. /// The cancellation token to use. /// or is null. @@ -149,7 +149,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string resourceG /// Lists all enabled features for a workspace. /// The URL to the next page of results. - /// Name of the resource group in which workspace is located. + /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. /// The cancellation token to use. /// , , or is null. @@ -186,7 +186,7 @@ public async Task> ListNextPageAsync(string n /// Lists all enabled features for a workspace. /// The URL to the next page of results. - /// Name of the resource group in which workspace is located. + /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. /// The cancellation token to use. /// , , or is null. diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/AzureMachineLearningWorkspacesOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/WorkspaceSkusOperations.cs similarity index 66% rename from sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/AzureMachineLearningWorkspacesOperations.cs rename to sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/WorkspaceSkusOperations.cs index 818d580a57625..d92a55b443c14 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/AzureMachineLearningWorkspacesOperations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/WorkspaceSkusOperations.cs @@ -15,42 +15,42 @@ namespace Azure.ResourceManager.MachineLearningServices { - /// The AzureMachineLearningWorkspaces service client. - public partial class AzureMachineLearningWorkspacesOperations + /// The WorkspaceSkus service client. + public partial class WorkspaceSkusOperations { private readonly ClientDiagnostics _clientDiagnostics; private readonly HttpPipeline _pipeline; - internal AzureMachineLearningWorkspacesRestOperations RestClient { get; } + internal WorkspaceSkusRestOperations RestClient { get; } - /// Initializes a new instance of AzureMachineLearningWorkspacesOperations for mocking. - protected AzureMachineLearningWorkspacesOperations() + /// Initializes a new instance of WorkspaceSkusOperations for mocking. + protected WorkspaceSkusOperations() { } - /// Initializes a new instance of AzureMachineLearningWorkspacesOperations. + /// Initializes a new instance of WorkspaceSkusOperations. /// The handler for diagnostic messaging in the client. /// The HTTP pipeline for sending and receiving REST requests and responses. - /// Azure subscription identifier. + /// The ID of the target subscription. /// server parameter. /// Api Version. - internal AzureMachineLearningWorkspacesOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2020-09-01-preview") + internal WorkspaceSkusOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2021-07-01") { - RestClient = new AzureMachineLearningWorkspacesRestOperations(clientDiagnostics, pipeline, subscriptionId, endpoint, apiVersion); + RestClient = new WorkspaceSkusRestOperations(clientDiagnostics, pipeline, subscriptionId, endpoint, apiVersion); _clientDiagnostics = clientDiagnostics; _pipeline = pipeline; } /// Lists all skus with associated features. /// The cancellation token to use. - public virtual AsyncPageable ListSkusAsync(CancellationToken cancellationToken = default) + public virtual AsyncPageable ListAsync(CancellationToken cancellationToken = default) { async Task> FirstPageFunc(int? pageSizeHint) { - using var scope = _clientDiagnostics.CreateScope("AzureMachineLearningWorkspacesOperations.ListSkus"); + using var scope = _clientDiagnostics.CreateScope("WorkspaceSkusOperations.List"); scope.Start(); try { - var response = await RestClient.ListSkusAsync(cancellationToken).ConfigureAwait(false); + var response = await RestClient.ListAsync(cancellationToken).ConfigureAwait(false); return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); } catch (Exception e) @@ -61,11 +61,11 @@ async Task> FirstPageFunc(int? pageSizeHint) } async Task> NextPageFunc(string nextLink, int? pageSizeHint) { - using var scope = _clientDiagnostics.CreateScope("AzureMachineLearningWorkspacesOperations.ListSkus"); + using var scope = _clientDiagnostics.CreateScope("WorkspaceSkusOperations.List"); scope.Start(); try { - var response = await RestClient.ListSkusNextPageAsync(nextLink, cancellationToken).ConfigureAwait(false); + var response = await RestClient.ListNextPageAsync(nextLink, cancellationToken).ConfigureAwait(false); return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); } catch (Exception e) @@ -79,15 +79,15 @@ async Task> NextPageFunc(string nextLink, int? pageSizeHint) /// Lists all skus with associated features. /// The cancellation token to use. - public virtual Pageable ListSkus(CancellationToken cancellationToken = default) + public virtual Pageable List(CancellationToken cancellationToken = default) { Page FirstPageFunc(int? pageSizeHint) { - using var scope = _clientDiagnostics.CreateScope("AzureMachineLearningWorkspacesOperations.ListSkus"); + using var scope = _clientDiagnostics.CreateScope("WorkspaceSkusOperations.List"); scope.Start(); try { - var response = RestClient.ListSkus(cancellationToken); + var response = RestClient.List(cancellationToken); return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); } catch (Exception e) @@ -98,11 +98,11 @@ Page FirstPageFunc(int? pageSizeHint) } Page NextPageFunc(string nextLink, int? pageSizeHint) { - using var scope = _clientDiagnostics.CreateScope("AzureMachineLearningWorkspacesOperations.ListSkus"); + using var scope = _clientDiagnostics.CreateScope("WorkspaceSkusOperations.List"); scope.Start(); try { - var response = RestClient.ListSkusNextPage(nextLink, cancellationToken); + var response = RestClient.ListNextPage(nextLink, cancellationToken); return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); } catch (Exception e) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/AzureMachineLearningWorkspacesRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/WorkspaceSkusRestOperations.cs similarity index 83% rename from sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/AzureMachineLearningWorkspacesRestOperations.cs rename to sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/WorkspaceSkusRestOperations.cs index f15eea53f3623..c0980501076b9 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/AzureMachineLearningWorkspacesRestOperations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/WorkspaceSkusRestOperations.cs @@ -16,7 +16,7 @@ namespace Azure.ResourceManager.MachineLearningServices { - internal partial class AzureMachineLearningWorkspacesRestOperations + internal partial class WorkspaceSkusRestOperations { private string subscriptionId; private Uri endpoint; @@ -24,14 +24,14 @@ internal partial class AzureMachineLearningWorkspacesRestOperations private ClientDiagnostics _clientDiagnostics; private HttpPipeline _pipeline; - /// Initializes a new instance of AzureMachineLearningWorkspacesRestOperations. + /// Initializes a new instance of WorkspaceSkusRestOperations. /// The handler for diagnostic messaging in the client. /// The HTTP pipeline for sending and receiving REST requests and responses. - /// Azure subscription identifier. + /// The ID of the target subscription. /// server parameter. /// Api Version. /// or is null. - public AzureMachineLearningWorkspacesRestOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2020-09-01-preview") + public WorkspaceSkusRestOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2021-07-01") { if (subscriptionId == null) { @@ -50,7 +50,7 @@ public AzureMachineLearningWorkspacesRestOperations(ClientDiagnostics clientDiag _pipeline = pipeline; } - internal HttpMessage CreateListSkusRequest() + internal HttpMessage CreateListRequest() { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -68,9 +68,9 @@ internal HttpMessage CreateListSkusRequest() /// Lists all skus with associated features. /// The cancellation token to use. - public async Task> ListSkusAsync(CancellationToken cancellationToken = default) + public async Task> ListAsync(CancellationToken cancellationToken = default) { - using var message = CreateListSkusRequest(); + using var message = CreateListRequest(); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -88,9 +88,9 @@ public async Task> ListSkusAsync(CancellationToken cance /// Lists all skus with associated features. /// The cancellation token to use. - public Response ListSkus(CancellationToken cancellationToken = default) + public Response List(CancellationToken cancellationToken = default) { - using var message = CreateListSkusRequest(); + using var message = CreateListRequest(); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -106,7 +106,7 @@ public Response ListSkus(CancellationToken cancellationToken = de } } - internal HttpMessage CreateListSkusNextPageRequest(string nextLink) + internal HttpMessage CreateListNextPageRequest(string nextLink) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -123,14 +123,14 @@ internal HttpMessage CreateListSkusNextPageRequest(string nextLink) /// The URL to the next page of results. /// The cancellation token to use. /// is null. - public async Task> ListSkusNextPageAsync(string nextLink, CancellationToken cancellationToken = default) + public async Task> ListNextPageAsync(string nextLink, CancellationToken cancellationToken = default) { if (nextLink == null) { throw new ArgumentNullException(nameof(nextLink)); } - using var message = CreateListSkusNextPageRequest(nextLink); + using var message = CreateListNextPageRequest(nextLink); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -150,14 +150,14 @@ public async Task> ListSkusNextPageAsync(string nextLink /// The URL to the next page of results. /// The cancellation token to use. /// is null. - public Response ListSkusNextPage(string nextLink, CancellationToken cancellationToken = default) + public Response ListNextPage(string nextLink, CancellationToken cancellationToken = default) { if (nextLink == null) { throw new ArgumentNullException(nameof(nextLink)); } - using var message = CreateListSkusNextPageRequest(nextLink); + using var message = CreateListNextPageRequest(nextLink); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/WorkspacesDiagnoseHeaders.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/WorkspacesDiagnoseHeaders.cs new file mode 100644 index 0000000000000..a25b612cefdd2 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/WorkspacesDiagnoseHeaders.cs @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices +{ + internal partial class WorkspacesDiagnoseHeaders + { + private readonly Response _response; + public WorkspacesDiagnoseHeaders(Response response) + { + _response = response; + } + /// URI to poll for asynchronous operation result. + public string Location => _response.Headers.TryGetValue("Location", out string value) ? value : null; + /// Duration the client should wait between requests, in seconds. + public int? RetryAfter => _response.Headers.TryGetValue("Retry-After", out int? value) ? value : null; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/WorkspacesDiagnoseOperation.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/WorkspacesDiagnoseOperation.cs new file mode 100644 index 0000000000000..76c71f1fdb0aa --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/WorkspacesDiagnoseOperation.cs @@ -0,0 +1,72 @@ +// 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.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.MachineLearningServices.Models; + +namespace Azure.ResourceManager.MachineLearningServices +{ + /// Diagnose workspace setup issue. + public partial class WorkspacesDiagnoseOperation : Operation, IOperationSource + { + private readonly ArmOperationHelpers _operation; + + /// Initializes a new instance of WorkspacesDiagnoseOperation for mocking. + protected WorkspacesDiagnoseOperation() + { + } + + internal WorkspacesDiagnoseOperation(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Request request, Response response) + { + _operation = new ArmOperationHelpers(this, clientDiagnostics, pipeline, request, response, OperationFinalStateVia.Location, "WorkspacesDiagnoseOperation"); + } + /// + public override string Id => _operation.Id; + + /// + public override DiagnoseResponseResult 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); + + DiagnoseResponseResult IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + return DiagnoseResponseResult.DeserializeDiagnoseResponseResult(document.RootElement); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + return DiagnoseResponseResult.DeserializeDiagnoseResponseResult(document.RootElement); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/WorkspacesOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/WorkspacesOperations.cs index a436d44b837a5..28a5a94a52c9b 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/WorkspacesOperations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/WorkspacesOperations.cs @@ -30,10 +30,10 @@ protected WorkspacesOperations() /// Initializes a new instance of WorkspacesOperations. /// The handler for diagnostic messaging in the client. /// The HTTP pipeline for sending and receiving REST requests and responses. - /// Azure subscription identifier. + /// The ID of the target subscription. /// server parameter. /// Api Version. - internal WorkspacesOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2020-09-01-preview") + internal WorkspacesOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2021-07-01") { RestClient = new WorkspacesRestOperations(clientDiagnostics, pipeline, subscriptionId, endpoint, apiVersion); _clientDiagnostics = clientDiagnostics; @@ -41,7 +41,7 @@ internal WorkspacesOperations(ClientDiagnostics clientDiagnostics, HttpPipeline } /// Gets the properties of the specified machine learning workspace. - /// Name of the resource group in which workspace is located. + /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. /// The cancellation token to use. public virtual async Task> GetAsync(string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) @@ -60,7 +60,7 @@ public virtual async Task> GetAsync(string resourceGroupName } /// Gets the properties of the specified machine learning workspace. - /// Name of the resource group in which workspace is located. + /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. /// The cancellation token to use. public virtual Response Get(string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) @@ -79,7 +79,7 @@ public virtual Response Get(string resourceGroupName, string workspac } /// Updates a machine learning workspace with the specified parameters. - /// Name of the resource group in which workspace is located. + /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. /// The parameters for updating a machine learning workspace. /// The cancellation token to use. @@ -99,7 +99,7 @@ public virtual async Task> UpdateAsync(string resourceGroupN } /// Updates a machine learning workspace with the specified parameters. - /// Name of the resource group in which workspace is located. + /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. /// The parameters for updating a machine learning workspace. /// The cancellation token to use. @@ -119,7 +119,7 @@ public virtual Response Update(string resourceGroupName, string works } /// Lists all the keys associated with this workspace. This includes keys for the storage account, app insights and password for container registry. - /// Name of the resource group in which workspace is located. + /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. /// The cancellation token to use. public virtual async Task> ListKeysAsync(string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) @@ -138,7 +138,7 @@ public virtual async Task> ListKeysAsync(strin } /// Lists all the keys associated with this workspace. This includes keys for the storage account, app insights and password for container registry. - /// Name of the resource group in which workspace is located. + /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. /// The cancellation token to use. public virtual Response ListKeys(string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) @@ -156,17 +156,17 @@ public virtual Response ListKeys(string resourceGroupNa } } - /// Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and password for container registry. - /// Name of the resource group in which workspace is located. + /// return notebook access token and refresh token. + /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. /// The cancellation token to use. - public virtual async Task ResyncKeysAsync(string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + public virtual async Task> ListNotebookAccessTokenAsync(string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) { - using var scope = _clientDiagnostics.CreateScope("WorkspacesOperations.ResyncKeys"); + using var scope = _clientDiagnostics.CreateScope("WorkspacesOperations.ListNotebookAccessToken"); scope.Start(); try { - return await RestClient.ResyncKeysAsync(resourceGroupName, workspaceName, cancellationToken).ConfigureAwait(false); + return await RestClient.ListNotebookAccessTokenAsync(resourceGroupName, workspaceName, cancellationToken).ConfigureAwait(false); } catch (Exception e) { @@ -175,17 +175,131 @@ public virtual async Task ResyncKeysAsync(string resourceGroupName, st } } - /// Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and password for container registry. - /// Name of the resource group in which workspace is located. + /// return notebook access token and refresh token. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + public virtual Response ListNotebookAccessToken(string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("WorkspacesOperations.ListNotebookAccessToken"); + scope.Start(); + try + { + return RestClient.ListNotebookAccessToken(resourceGroupName, workspaceName, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// List storage account keys of a workspace. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + public virtual async Task> ListStorageAccountKeysAsync(string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("WorkspacesOperations.ListStorageAccountKeys"); + scope.Start(); + try + { + return await RestClient.ListStorageAccountKeysAsync(resourceGroupName, workspaceName, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// List storage account keys of a workspace. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + public virtual Response ListStorageAccountKeys(string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("WorkspacesOperations.ListStorageAccountKeys"); + scope.Start(); + try + { + return RestClient.ListStorageAccountKeys(resourceGroupName, workspaceName, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// List keys of a notebook. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + public virtual async Task> ListNotebookKeysAsync(string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("WorkspacesOperations.ListNotebookKeys"); + scope.Start(); + try + { + return await RestClient.ListNotebookKeysAsync(resourceGroupName, workspaceName, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// List keys of a notebook. + /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. /// The cancellation token to use. - public virtual Response ResyncKeys(string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + public virtual Response ListNotebookKeys(string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) { - using var scope = _clientDiagnostics.CreateScope("WorkspacesOperations.ResyncKeys"); + using var scope = _clientDiagnostics.CreateScope("WorkspacesOperations.ListNotebookKeys"); scope.Start(); try { - return RestClient.ResyncKeys(resourceGroupName, workspaceName, cancellationToken); + return RestClient.ListNotebookKeys(resourceGroupName, workspaceName, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Called by Client (Portal, CLI, etc) to get a list of all external outbound dependencies (FQDNs) programmatically. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + public virtual async Task> ListOutboundNetworkDependenciesEndpointsAsync(string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("WorkspacesOperations.ListOutboundNetworkDependenciesEndpoints"); + scope.Start(); + try + { + return await RestClient.ListOutboundNetworkDependenciesEndpointsAsync(resourceGroupName, workspaceName, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Called by Client (Portal, CLI, etc) to get a list of all external outbound dependencies (FQDNs) programmatically. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + public virtual Response ListOutboundNetworkDependenciesEndpoints(string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("WorkspacesOperations.ListOutboundNetworkDependenciesEndpoints"); + scope.Start(); + try + { + return RestClient.ListOutboundNetworkDependenciesEndpoints(resourceGroupName, workspaceName, cancellationToken); } catch (Exception e) { @@ -195,11 +309,11 @@ public virtual Response ResyncKeys(string resourceGroupName, string workspaceNam } /// Lists all the available machine learning workspaces under the specified resource group. - /// Name of the resource group in which workspace is located. - /// Continuation token for pagination. + /// The name of the resource group. The name is case insensitive. + /// Continuation token for pagination. /// The cancellation token to use. /// is null. - public virtual AsyncPageable ListByResourceGroupAsync(string resourceGroupName, string skiptoken = null, CancellationToken cancellationToken = default) + public virtual AsyncPageable ListByResourceGroupAsync(string resourceGroupName, string skip = null, CancellationToken cancellationToken = default) { if (resourceGroupName == null) { @@ -212,7 +326,7 @@ async Task> FirstPageFunc(int? pageSizeHint) scope.Start(); try { - var response = await RestClient.ListByResourceGroupAsync(resourceGroupName, skiptoken, cancellationToken).ConfigureAwait(false); + var response = await RestClient.ListByResourceGroupAsync(resourceGroupName, skip, cancellationToken).ConfigureAwait(false); return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); } catch (Exception e) @@ -227,7 +341,7 @@ async Task> NextPageFunc(string nextLink, int? pageSizeHint) scope.Start(); try { - var response = await RestClient.ListByResourceGroupNextPageAsync(nextLink, resourceGroupName, skiptoken, cancellationToken).ConfigureAwait(false); + var response = await RestClient.ListByResourceGroupNextPageAsync(nextLink, resourceGroupName, skip, cancellationToken).ConfigureAwait(false); return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); } catch (Exception e) @@ -240,11 +354,11 @@ async Task> NextPageFunc(string nextLink, int? pageSizeHint) } /// Lists all the available machine learning workspaces under the specified resource group. - /// Name of the resource group in which workspace is located. - /// Continuation token for pagination. + /// The name of the resource group. The name is case insensitive. + /// Continuation token for pagination. /// The cancellation token to use. /// is null. - public virtual Pageable ListByResourceGroup(string resourceGroupName, string skiptoken = null, CancellationToken cancellationToken = default) + public virtual Pageable ListByResourceGroup(string resourceGroupName, string skip = null, CancellationToken cancellationToken = default) { if (resourceGroupName == null) { @@ -257,7 +371,7 @@ Page FirstPageFunc(int? pageSizeHint) scope.Start(); try { - var response = RestClient.ListByResourceGroup(resourceGroupName, skiptoken, cancellationToken); + var response = RestClient.ListByResourceGroup(resourceGroupName, skip, cancellationToken); return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); } catch (Exception e) @@ -272,7 +386,7 @@ Page NextPageFunc(string nextLink, int? pageSizeHint) scope.Start(); try { - var response = RestClient.ListByResourceGroupNextPage(nextLink, resourceGroupName, skiptoken, cancellationToken); + var response = RestClient.ListByResourceGroupNextPage(nextLink, resourceGroupName, skip, cancellationToken); return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); } catch (Exception e) @@ -285,9 +399,9 @@ Page NextPageFunc(string nextLink, int? pageSizeHint) } /// Lists all the available machine learning workspaces under the specified subscription. - /// Continuation token for pagination. + /// Continuation token for pagination. /// The cancellation token to use. - public virtual AsyncPageable ListBySubscriptionAsync(string skiptoken = null, CancellationToken cancellationToken = default) + public virtual AsyncPageable ListBySubscriptionAsync(string skip = null, CancellationToken cancellationToken = default) { async Task> FirstPageFunc(int? pageSizeHint) { @@ -295,7 +409,7 @@ async Task> FirstPageFunc(int? pageSizeHint) scope.Start(); try { - var response = await RestClient.ListBySubscriptionAsync(skiptoken, cancellationToken).ConfigureAwait(false); + var response = await RestClient.ListBySubscriptionAsync(skip, cancellationToken).ConfigureAwait(false); return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); } catch (Exception e) @@ -310,7 +424,7 @@ async Task> NextPageFunc(string nextLink, int? pageSizeHint) scope.Start(); try { - var response = await RestClient.ListBySubscriptionNextPageAsync(nextLink, skiptoken, cancellationToken).ConfigureAwait(false); + var response = await RestClient.ListBySubscriptionNextPageAsync(nextLink, skip, cancellationToken).ConfigureAwait(false); return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); } catch (Exception e) @@ -323,9 +437,9 @@ async Task> NextPageFunc(string nextLink, int? pageSizeHint) } /// Lists all the available machine learning workspaces under the specified subscription. - /// Continuation token for pagination. + /// Continuation token for pagination. /// The cancellation token to use. - public virtual Pageable ListBySubscription(string skiptoken = null, CancellationToken cancellationToken = default) + public virtual Pageable ListBySubscription(string skip = null, CancellationToken cancellationToken = default) { Page FirstPageFunc(int? pageSizeHint) { @@ -333,7 +447,7 @@ Page FirstPageFunc(int? pageSizeHint) scope.Start(); try { - var response = RestClient.ListBySubscription(skiptoken, cancellationToken); + var response = RestClient.ListBySubscription(skip, cancellationToken); return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); } catch (Exception e) @@ -348,7 +462,7 @@ Page NextPageFunc(string nextLink, int? pageSizeHint) scope.Start(); try { - var response = RestClient.ListBySubscriptionNextPage(nextLink, skiptoken, cancellationToken); + var response = RestClient.ListBySubscriptionNextPage(nextLink, skip, cancellationToken); return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); } catch (Exception e) @@ -361,7 +475,7 @@ Page NextPageFunc(string nextLink, int? pageSizeHint) } /// Creates or updates a workspace with the specified parameters. - /// Name of the resource group in which workspace is located. + /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. /// The parameters for creating or updating a machine learning workspace. /// The cancellation token to use. @@ -396,7 +510,7 @@ public virtual async Task StartCreateOrUpdate } /// Creates or updates a workspace with the specified parameters. - /// Name of the resource group in which workspace is located. + /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. /// The parameters for creating or updating a machine learning workspace. /// The cancellation token to use. @@ -431,7 +545,7 @@ public virtual WorkspacesCreateOrUpdateOperation StartCreateOrUpdate(string reso } /// Deletes a machine learning workspace. - /// Name of the resource group in which workspace is located. + /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. /// The cancellation token to use. /// or is null. @@ -461,7 +575,7 @@ public virtual async Task StartDeleteAsync(string res } /// Deletes a machine learning workspace. - /// Name of the resource group in which workspace is located. + /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. /// The cancellation token to use. /// or is null. @@ -489,5 +603,187 @@ public virtual WorkspacesDeleteOperation StartDelete(string resourceGroupName, s throw; } } + + /// Diagnose workspace setup issue. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// The parameter of diagnosing workspace health. + /// The cancellation token to use. + /// or is null. + public virtual async Task StartDiagnoseAsync(string resourceGroupName, string workspaceName, DiagnoseWorkspaceParameters parameters = null, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var scope = _clientDiagnostics.CreateScope("WorkspacesOperations.StartDiagnose"); + scope.Start(); + try + { + var originalResponse = await RestClient.DiagnoseAsync(resourceGroupName, workspaceName, parameters, cancellationToken).ConfigureAwait(false); + return new WorkspacesDiagnoseOperation(_clientDiagnostics, _pipeline, RestClient.CreateDiagnoseRequest(resourceGroupName, workspaceName, parameters).Request, originalResponse); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Diagnose workspace setup issue. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// The parameter of diagnosing workspace health. + /// The cancellation token to use. + /// or is null. + public virtual WorkspacesDiagnoseOperation StartDiagnose(string resourceGroupName, string workspaceName, DiagnoseWorkspaceParameters parameters = null, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var scope = _clientDiagnostics.CreateScope("WorkspacesOperations.StartDiagnose"); + scope.Start(); + try + { + var originalResponse = RestClient.Diagnose(resourceGroupName, workspaceName, parameters, cancellationToken); + return new WorkspacesDiagnoseOperation(_clientDiagnostics, _pipeline, RestClient.CreateDiagnoseRequest(resourceGroupName, workspaceName, parameters).Request, originalResponse); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and password for container registry. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + /// or is null. + public virtual async Task StartResyncKeysAsync(string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var scope = _clientDiagnostics.CreateScope("WorkspacesOperations.StartResyncKeys"); + scope.Start(); + try + { + var originalResponse = await RestClient.ResyncKeysAsync(resourceGroupName, workspaceName, cancellationToken).ConfigureAwait(false); + return new WorkspacesResyncKeysOperation(_clientDiagnostics, _pipeline, RestClient.CreateResyncKeysRequest(resourceGroupName, workspaceName).Request, originalResponse); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and password for container registry. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + /// or is null. + public virtual WorkspacesResyncKeysOperation StartResyncKeys(string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var scope = _clientDiagnostics.CreateScope("WorkspacesOperations.StartResyncKeys"); + scope.Start(); + try + { + var originalResponse = RestClient.ResyncKeys(resourceGroupName, workspaceName, cancellationToken); + return new WorkspacesResyncKeysOperation(_clientDiagnostics, _pipeline, RestClient.CreateResyncKeysRequest(resourceGroupName, workspaceName).Request, originalResponse); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Prepare a notebook. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + /// or is null. + public virtual async Task StartPrepareNotebookAsync(string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var scope = _clientDiagnostics.CreateScope("WorkspacesOperations.StartPrepareNotebook"); + scope.Start(); + try + { + var originalResponse = await RestClient.PrepareNotebookAsync(resourceGroupName, workspaceName, cancellationToken).ConfigureAwait(false); + return new WorkspacesPrepareNotebookOperation(_clientDiagnostics, _pipeline, RestClient.CreatePrepareNotebookRequest(resourceGroupName, workspaceName).Request, originalResponse); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Prepare a notebook. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + /// or is null. + public virtual WorkspacesPrepareNotebookOperation StartPrepareNotebook(string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var scope = _clientDiagnostics.CreateScope("WorkspacesOperations.StartPrepareNotebook"); + scope.Start(); + try + { + var originalResponse = RestClient.PrepareNotebook(resourceGroupName, workspaceName, cancellationToken); + return new WorkspacesPrepareNotebookOperation(_clientDiagnostics, _pipeline, RestClient.CreatePrepareNotebookRequest(resourceGroupName, workspaceName).Request, originalResponse); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/NotebooksPrepareOperation.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/WorkspacesPrepareNotebookOperation.cs similarity index 82% rename from sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/NotebooksPrepareOperation.cs rename to sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/WorkspacesPrepareNotebookOperation.cs index e21a949d18cfb..67ac2d215b449 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/NotebooksPrepareOperation.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/WorkspacesPrepareNotebookOperation.cs @@ -16,18 +16,19 @@ namespace Azure.ResourceManager.MachineLearningServices { - public partial class NotebooksPrepareOperation : Operation, IOperationSource + /// Prepare a notebook. + public partial class WorkspacesPrepareNotebookOperation : Operation, IOperationSource { private readonly ArmOperationHelpers _operation; - /// Initializes a new instance of NotebooksPrepareOperation for mocking. - protected NotebooksPrepareOperation() + /// Initializes a new instance of WorkspacesPrepareNotebookOperation for mocking. + protected WorkspacesPrepareNotebookOperation() { } - internal NotebooksPrepareOperation(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Request request, Response response) + internal WorkspacesPrepareNotebookOperation(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Request request, Response response) { - _operation = new ArmOperationHelpers(this, clientDiagnostics, pipeline, request, response, OperationFinalStateVia.Location, "NotebooksPrepareOperation"); + _operation = new ArmOperationHelpers(this, clientDiagnostics, pipeline, request, response, OperationFinalStateVia.Location, "WorkspacesPrepareNotebookOperation"); } /// public override string Id => _operation.Id; diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/WorkspacesRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/WorkspacesRestOperations.cs index 5ef9d8996f54b..de10befc9ad04 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/WorkspacesRestOperations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/WorkspacesRestOperations.cs @@ -27,11 +27,11 @@ internal partial class WorkspacesRestOperations /// Initializes a new instance of WorkspacesRestOperations. /// The handler for diagnostic messaging in the client. /// The HTTP pipeline for sending and receiving REST requests and responses. - /// Azure subscription identifier. + /// The ID of the target subscription. /// server parameter. /// Api Version. /// or is null. - public WorkspacesRestOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2020-09-01-preview") + public WorkspacesRestOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2021-07-01") { if (subscriptionId == null) { @@ -70,7 +70,7 @@ internal HttpMessage CreateGetRequest(string resourceGroupName, string workspace } /// Gets the properties of the specified machine learning workspace. - /// Name of the resource group in which workspace is located. + /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. /// The cancellation token to use. /// or is null. @@ -102,7 +102,7 @@ public async Task> GetAsync(string resourceGroupName, string } /// Gets the properties of the specified machine learning workspace. - /// Name of the resource group in which workspace is located. + /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. /// The cancellation token to use. /// or is null. @@ -157,7 +157,7 @@ internal HttpMessage CreateCreateOrUpdateRequest(string resourceGroupName, strin } /// Creates or updates a workspace with the specified parameters. - /// Name of the resource group in which workspace is located. + /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. /// The parameters for creating or updating a machine learning workspace. /// The cancellation token to use. @@ -182,7 +182,6 @@ public async Task CreateOrUpdateAsync(string resourceGroupName, string switch (message.Response.Status) { case 200: - case 201: case 202: return message.Response; default: @@ -191,7 +190,7 @@ public async Task CreateOrUpdateAsync(string resourceGroupName, string } /// Creates or updates a workspace with the specified parameters. - /// Name of the resource group in which workspace is located. + /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. /// The parameters for creating or updating a machine learning workspace. /// The cancellation token to use. @@ -216,7 +215,6 @@ public Response CreateOrUpdate(string resourceGroupName, string workspaceName, W switch (message.Response.Status) { case 200: - case 201: case 202: return message.Response; default: @@ -244,7 +242,7 @@ internal HttpMessage CreateDeleteRequest(string resourceGroupName, string worksp } /// Deletes a machine learning workspace. - /// Name of the resource group in which workspace is located. + /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. /// The cancellation token to use. /// or is null. @@ -273,7 +271,7 @@ public async Task DeleteAsync(string resourceGroupName, string workspa } /// Deletes a machine learning workspace. - /// Name of the resource group in which workspace is located. + /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. /// The cancellation token to use. /// or is null. @@ -325,7 +323,7 @@ internal HttpMessage CreateUpdateRequest(string resourceGroupName, string worksp } /// Updates a machine learning workspace with the specified parameters. - /// Name of the resource group in which workspace is located. + /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. /// The parameters for updating a machine learning workspace. /// The cancellation token to use. @@ -362,7 +360,7 @@ public async Task> UpdateAsync(string resourceGroupName, str } /// Updates a machine learning workspace with the specified parameters. - /// Name of the resource group in which workspace is located. + /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. /// The parameters for updating a machine learning workspace. /// The cancellation token to use. @@ -398,7 +396,7 @@ public Response Update(string resourceGroupName, string workspaceName } } - internal HttpMessage CreateListByResourceGroupRequest(string resourceGroupName, string skiptoken) + internal HttpMessage CreateListByResourceGroupRequest(string resourceGroupName, string skip) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -411,9 +409,9 @@ internal HttpMessage CreateListByResourceGroupRequest(string resourceGroupName, uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces", false); uri.AppendQuery("api-version", apiVersion, true); - if (skiptoken != null) + if (skip != null) { - uri.AppendQuery("$skiptoken", skiptoken, true); + uri.AppendQuery("$skip", skip, true); } request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -421,18 +419,18 @@ internal HttpMessage CreateListByResourceGroupRequest(string resourceGroupName, } /// Lists all the available machine learning workspaces under the specified resource group. - /// Name of the resource group in which workspace is located. - /// Continuation token for pagination. + /// The name of the resource group. The name is case insensitive. + /// Continuation token for pagination. /// The cancellation token to use. /// is null. - public async Task> ListByResourceGroupAsync(string resourceGroupName, string skiptoken = null, CancellationToken cancellationToken = default) + public async Task> ListByResourceGroupAsync(string resourceGroupName, string skip = null, CancellationToken cancellationToken = default) { if (resourceGroupName == null) { throw new ArgumentNullException(nameof(resourceGroupName)); } - using var message = CreateListByResourceGroupRequest(resourceGroupName, skiptoken); + using var message = CreateListByResourceGroupRequest(resourceGroupName, skip); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -449,18 +447,18 @@ public async Task> ListByResourceGroupAsync(string } /// Lists all the available machine learning workspaces under the specified resource group. - /// Name of the resource group in which workspace is located. - /// Continuation token for pagination. + /// The name of the resource group. The name is case insensitive. + /// Continuation token for pagination. /// The cancellation token to use. /// is null. - public Response ListByResourceGroup(string resourceGroupName, string skiptoken = null, CancellationToken cancellationToken = default) + public Response ListByResourceGroup(string resourceGroupName, string skip = null, CancellationToken cancellationToken = default) { if (resourceGroupName == null) { throw new ArgumentNullException(nameof(resourceGroupName)); } - using var message = CreateListByResourceGroupRequest(resourceGroupName, skiptoken); + using var message = CreateListByResourceGroupRequest(resourceGroupName, skip); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -476,6 +474,93 @@ public Response ListByResourceGroup(string resourceGroupNam } } + internal HttpMessage CreateDiagnoseRequest(string resourceGroupName, string workspaceName, DiagnoseWorkspaceParameters parameters) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/diagnose", false); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + if (parameters != null) + { + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(parameters); + request.Content = content; + } + return message; + } + + /// Diagnose workspace setup issue. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// The parameter of diagnosing workspace health. + /// The cancellation token to use. + /// or is null. + public async Task> DiagnoseAsync(string resourceGroupName, string workspaceName, DiagnoseWorkspaceParameters parameters = null, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateDiagnoseRequest(resourceGroupName, workspaceName, parameters); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + var headers = new WorkspacesDiagnoseHeaders(message.Response); + switch (message.Response.Status) + { + case 200: + case 202: + return ResponseWithHeaders.FromValue(headers, message.Response); + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Diagnose workspace setup issue. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// The parameter of diagnosing workspace health. + /// The cancellation token to use. + /// or is null. + public ResponseWithHeaders Diagnose(string resourceGroupName, string workspaceName, DiagnoseWorkspaceParameters parameters = null, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateDiagnoseRequest(resourceGroupName, workspaceName, parameters); + _pipeline.Send(message, cancellationToken); + var headers = new WorkspacesDiagnoseHeaders(message.Response); + switch (message.Response.Status) + { + case 200: + case 202: + return ResponseWithHeaders.FromValue(headers, message.Response); + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + internal HttpMessage CreateListKeysRequest(string resourceGroupName, string workspaceName) { var message = _pipeline.CreateMessage(); @@ -497,7 +582,7 @@ internal HttpMessage CreateListKeysRequest(string resourceGroupName, string work } /// Lists all the keys associated with this workspace. This includes keys for the storage account, app insights and password for container registry. - /// Name of the resource group in which workspace is located. + /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. /// The cancellation token to use. /// or is null. @@ -529,7 +614,7 @@ public async Task> ListKeysAsync(string resour } /// Lists all the keys associated with this workspace. This includes keys for the storage account, app insights and password for container registry. - /// Name of the resource group in which workspace is located. + /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. /// The cancellation token to use. /// or is null. @@ -581,7 +666,7 @@ internal HttpMessage CreateResyncKeysRequest(string resourceGroupName, string wo } /// Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and password for container registry. - /// Name of the resource group in which workspace is located. + /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. /// The cancellation token to use. /// or is null. @@ -601,6 +686,7 @@ public async Task ResyncKeysAsync(string resourceGroupName, string wor switch (message.Response.Status) { case 200: + case 202: return message.Response; default: throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); @@ -608,7 +694,7 @@ public async Task ResyncKeysAsync(string resourceGroupName, string wor } /// Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and password for container registry. - /// Name of the resource group in which workspace is located. + /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. /// The cancellation token to use. /// or is null. @@ -628,13 +714,14 @@ public Response ResyncKeys(string resourceGroupName, string workspaceName, Cance switch (message.Response.Status) { case 200: + case 202: return message.Response; default: throw _clientDiagnostics.CreateRequestFailedException(message.Response); } } - internal HttpMessage CreateListBySubscriptionRequest(string skiptoken) + internal HttpMessage CreateListBySubscriptionRequest(string skip) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -645,9 +732,9 @@ internal HttpMessage CreateListBySubscriptionRequest(string skiptoken) uri.AppendPath(subscriptionId, true); uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces", false); uri.AppendQuery("api-version", apiVersion, true); - if (skiptoken != null) + if (skip != null) { - uri.AppendQuery("$skiptoken", skiptoken, true); + uri.AppendQuery("$skip", skip, true); } request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -655,11 +742,11 @@ internal HttpMessage CreateListBySubscriptionRequest(string skiptoken) } /// Lists all the available machine learning workspaces under the specified subscription. - /// Continuation token for pagination. + /// Continuation token for pagination. /// The cancellation token to use. - public async Task> ListBySubscriptionAsync(string skiptoken = null, CancellationToken cancellationToken = default) + public async Task> ListBySubscriptionAsync(string skip = null, CancellationToken cancellationToken = default) { - using var message = CreateListBySubscriptionRequest(skiptoken); + using var message = CreateListBySubscriptionRequest(skip); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -676,11 +763,11 @@ public async Task> ListBySubscriptionAsync(string } /// Lists all the available machine learning workspaces under the specified subscription. - /// Continuation token for pagination. + /// Continuation token for pagination. /// The cancellation token to use. - public Response ListBySubscription(string skiptoken = null, CancellationToken cancellationToken = default) + public Response ListBySubscription(string skip = null, CancellationToken cancellationToken = default) { - using var message = CreateListBySubscriptionRequest(skiptoken); + using var message = CreateListBySubscriptionRequest(skip); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -696,7 +783,419 @@ public Response ListBySubscription(string skiptoken = null, } } - internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, string resourceGroupName, string skiptoken) + internal HttpMessage CreateListNotebookAccessTokenRequest(string resourceGroupName, string workspaceName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/listNotebookAccessToken", false); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// return notebook access token and refresh token. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + /// or is null. + public async Task> ListNotebookAccessTokenAsync(string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateListNotebookAccessTokenRequest(resourceGroupName, workspaceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + NotebookAccessTokenResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = NotebookAccessTokenResult.DeserializeNotebookAccessTokenResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// return notebook access token and refresh token. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + /// or is null. + public Response ListNotebookAccessToken(string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateListNotebookAccessTokenRequest(resourceGroupName, workspaceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + NotebookAccessTokenResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = NotebookAccessTokenResult.DeserializeNotebookAccessTokenResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreatePrepareNotebookRequest(string resourceGroupName, string workspaceName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/prepareNotebook", false); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// Prepare a notebook. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + /// or is null. + public async Task PrepareNotebookAsync(string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreatePrepareNotebookRequest(resourceGroupName, workspaceName); + 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); + } + } + + /// Prepare a notebook. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + /// or is null. + public Response PrepareNotebook(string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreatePrepareNotebookRequest(resourceGroupName, workspaceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListStorageAccountKeysRequest(string resourceGroupName, string workspaceName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/listStorageAccountKeys", false); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// List storage account keys of a workspace. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + /// or is null. + public async Task> ListStorageAccountKeysAsync(string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateListStorageAccountKeysRequest(resourceGroupName, workspaceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ListStorageAccountKeysResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ListStorageAccountKeysResult.DeserializeListStorageAccountKeysResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// List storage account keys of a workspace. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + /// or is null. + public Response ListStorageAccountKeys(string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateListStorageAccountKeysRequest(resourceGroupName, workspaceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ListStorageAccountKeysResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ListStorageAccountKeysResult.DeserializeListStorageAccountKeysResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListNotebookKeysRequest(string resourceGroupName, string workspaceName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/listNotebookKeys", false); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// List keys of a notebook. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + /// or is null. + public async Task> ListNotebookKeysAsync(string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateListNotebookKeysRequest(resourceGroupName, workspaceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ListNotebookKeysResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ListNotebookKeysResult.DeserializeListNotebookKeysResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// List keys of a notebook. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + /// or is null. + public Response ListNotebookKeys(string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateListNotebookKeysRequest(resourceGroupName, workspaceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ListNotebookKeysResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ListNotebookKeysResult.DeserializeListNotebookKeysResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListOutboundNetworkDependenciesEndpointsRequest(string resourceGroupName, string workspaceName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/outboundNetworkDependenciesEndpoints", false); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// Called by Client (Portal, CLI, etc) to get a list of all external outbound dependencies (FQDNs) programmatically. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + /// or is null. + public async Task> ListOutboundNetworkDependenciesEndpointsAsync(string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateListOutboundNetworkDependenciesEndpointsRequest(resourceGroupName, workspaceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ExternalFqdnResponse value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ExternalFqdnResponse.DeserializeExternalFqdnResponse(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Called by Client (Portal, CLI, etc) to get a list of all external outbound dependencies (FQDNs) programmatically. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + /// or is null. + public Response ListOutboundNetworkDependenciesEndpoints(string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateListOutboundNetworkDependenciesEndpointsRequest(resourceGroupName, workspaceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ExternalFqdnResponse value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ExternalFqdnResponse.DeserializeExternalFqdnResponse(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, string resourceGroupName, string skip) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -711,11 +1210,11 @@ internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, s /// Lists all the available machine learning workspaces under the specified resource group. /// The URL to the next page of results. - /// Name of the resource group in which workspace is located. - /// Continuation token for pagination. + /// The name of the resource group. The name is case insensitive. + /// Continuation token for pagination. /// The cancellation token to use. /// or is null. - public async Task> ListByResourceGroupNextPageAsync(string nextLink, string resourceGroupName, string skiptoken = null, CancellationToken cancellationToken = default) + public async Task> ListByResourceGroupNextPageAsync(string nextLink, string resourceGroupName, string skip = null, CancellationToken cancellationToken = default) { if (nextLink == null) { @@ -726,7 +1225,7 @@ public async Task> ListByResourceGroupNextPageAsyn throw new ArgumentNullException(nameof(resourceGroupName)); } - using var message = CreateListByResourceGroupNextPageRequest(nextLink, resourceGroupName, skiptoken); + using var message = CreateListByResourceGroupNextPageRequest(nextLink, resourceGroupName, skip); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -744,11 +1243,11 @@ public async Task> ListByResourceGroupNextPageAsyn /// Lists all the available machine learning workspaces under the specified resource group. /// The URL to the next page of results. - /// Name of the resource group in which workspace is located. - /// Continuation token for pagination. + /// The name of the resource group. The name is case insensitive. + /// Continuation token for pagination. /// The cancellation token to use. /// or is null. - public Response ListByResourceGroupNextPage(string nextLink, string resourceGroupName, string skiptoken = null, CancellationToken cancellationToken = default) + public Response ListByResourceGroupNextPage(string nextLink, string resourceGroupName, string skip = null, CancellationToken cancellationToken = default) { if (nextLink == null) { @@ -759,7 +1258,7 @@ public Response ListByResourceGroupNextPage(string nextLink throw new ArgumentNullException(nameof(resourceGroupName)); } - using var message = CreateListByResourceGroupNextPageRequest(nextLink, resourceGroupName, skiptoken); + using var message = CreateListByResourceGroupNextPageRequest(nextLink, resourceGroupName, skip); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -775,7 +1274,7 @@ public Response ListByResourceGroupNextPage(string nextLink } } - internal HttpMessage CreateListBySubscriptionNextPageRequest(string nextLink, string skiptoken) + internal HttpMessage CreateListBySubscriptionNextPageRequest(string nextLink, string skip) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -790,17 +1289,17 @@ internal HttpMessage CreateListBySubscriptionNextPageRequest(string nextLink, st /// Lists all the available machine learning workspaces under the specified subscription. /// The URL to the next page of results. - /// Continuation token for pagination. + /// Continuation token for pagination. /// The cancellation token to use. /// is null. - public async Task> ListBySubscriptionNextPageAsync(string nextLink, string skiptoken = null, CancellationToken cancellationToken = default) + public async Task> ListBySubscriptionNextPageAsync(string nextLink, string skip = null, CancellationToken cancellationToken = default) { if (nextLink == null) { throw new ArgumentNullException(nameof(nextLink)); } - using var message = CreateListBySubscriptionNextPageRequest(nextLink, skiptoken); + using var message = CreateListBySubscriptionNextPageRequest(nextLink, skip); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -818,17 +1317,17 @@ public async Task> ListBySubscriptionNextPageAsync /// Lists all the available machine learning workspaces under the specified subscription. /// The URL to the next page of results. - /// Continuation token for pagination. + /// Continuation token for pagination. /// The cancellation token to use. /// is null. - public Response ListBySubscriptionNextPage(string nextLink, string skiptoken = null, CancellationToken cancellationToken = default) + public Response ListBySubscriptionNextPage(string nextLink, string skip = null, CancellationToken cancellationToken = default) { if (nextLink == null) { throw new ArgumentNullException(nameof(nextLink)); } - using var message = CreateListBySubscriptionNextPageRequest(nextLink, skiptoken); + using var message = CreateListBySubscriptionNextPageRequest(nextLink, skip); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/WorkspacesResyncKeysOperation.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/WorkspacesResyncKeysOperation.cs new file mode 100644 index 0000000000000..459c4257bea91 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/WorkspacesResyncKeysOperation.cs @@ -0,0 +1,68 @@ +// 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.ResourceManager.MachineLearningServices +{ + /// Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and password for container registry. + public partial class WorkspacesResyncKeysOperation : Operation, IOperationSource + { + private readonly ArmOperationHelpers _operation; + + /// Initializes a new instance of WorkspacesResyncKeysOperation for mocking. + protected WorkspacesResyncKeysOperation() + { + } + + internal WorkspacesResyncKeysOperation(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Request request, Response response) + { + _operation = new ArmOperationHelpers(this, clientDiagnostics, pipeline, request, response, OperationFinalStateVia.Location, "WorkspacesResyncKeysOperation"); + } + /// + 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/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/autorest.md b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/autorest.md index febbe46442279..55b5f30063ed4 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/autorest.md +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/autorest.md @@ -6,9 +6,9 @@ Run `dotnet build /t:GenerateCode` to generate code. azure-arm: true library-name: MachineLearningServices -require: https://raw.githubusercontent.com/forteddyt/azure-rest-api-specs/db218390cc57f2509db0e88d8d5ffd1872aa9435/specification/machinelearningservices/resource-manager/readme.md +require: https://github.com/Azure/azure-rest-api-specs/blob/cde7f150e8d3bf3af2418cc347cae0fb2baed6a7/specification/machinelearningservices/resource-manager/readme.md modelerfour: lenient-model-deduplication: true namespace: Azure.ResourceManager.MachineLearningServices -``` \ No newline at end of file +```